/* ===================================
   Modern Reset
   =================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #000;
  background: #fff;
  overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ===================================
   Main Layout
   =================================== */
.container {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: url(images/back.jpg) no-repeat center center fixed;
  background-size: cover;
  position: relative;
}

/* Overlay затемнения */
.container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  z-index: 1;
  pointer-events: none;
  transition: background 0.5s ease;
}

.container:has(.content-image:hover)::before {
  background: rgba(0, 0, 0, 0.4);
}

.content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

.content-image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  background: transparent;
  transform: scale(0.85);
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.content-image:hover {
  transform: scale(1);
}

/* Анимация появления */
@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ===================================
   Responsive Design
   =================================== */

/* Tablets and smaller desktops */
@media screen and (max-width: 1600px) {
  .container {
    padding: 1.5rem;
  }
  
  .content {
    padding: 1.5rem;
  }
}

/* Tablets */
@media screen and (max-width: 1024px) {
  .container {
    padding: 1rem;
  }
  
  .content {
    padding: 1rem;
  }
  
  .content-image {
    border-radius: 6px;
  }
}

/* Mobile devices */
@media screen and (max-width: 768px) {
  html {
    font-size: 14px;
  }
  
  .container {
    padding: 0.5rem;
    background-attachment: scroll;
  }
  
  .content {
    padding: 0.5rem;
  }
  
  .content-image {
    border-radius: 0;
    box-shadow: none;
    transform: scale(0.85);
    animation: fadeIn 0.8s ease-out forwards;
  }
  
  .content-image:hover {
    transform: scale(0.95);
  }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
  .container {
    padding: 0.25rem;
  }
  
  .content {
    padding: 0.25rem;
  }
}

/* ===================================
   Accessibility
   =================================== */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #4A90E2;
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .container::before {
    background: rgba(0, 0, 0, 0.3);
  }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
  .container {
    background: white;
    min-height: auto;
  }
  
  .container::before {
    display: none;
  }
  
  .content-image {
    box-shadow: none;
    page-break-inside: avoid;
  }
}
