* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  color: #1e293b;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Навигация (как на главной) */
.navbar {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo a {
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  color: #ffffff;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
}

.logo a:hover {
  color: #5a9cce;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  text-decoration: none;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #5a9cce;
  transition: all 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
}

/* Основной контент */
.main {
  flex: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 2rem;
  width: 100%;
}

/* Hero секция (сужена по высоте) */
.hero {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.2rem 2rem;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 24px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  background: linear-gradient(135deg, #0f172a 0%, #2c5f8a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 0.95rem;
  color: #475569;
}

/* Галерея: 5 колонок, 3 строки = 15 фото */
.gallery {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
}

.gallery-item {
  cursor: pointer;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(44,95,138,0.15);
}

.gallery-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.05);
}

.gallery-caption {
  padding: 0.8rem;
  text-align: center;
  background: #ffffff;
}

.gallery-caption p {
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.gallery-caption .author {
  font-size: 0.7rem;
  color: #5a9cce;
  font-weight: 500;
  margin-top: 0.2rem;
}

/* Модальное окно для увеличенного фото (почти на весь экран) */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 95vw;
  max-height: 95vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-content img {
  max-width: 95vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  font-size: 2.2rem;
  color: white;
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 300;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: #5a9cce;
  transform: scale(1.1);
  background: rgba(255,255,255,0.1);
}

.modal-caption {
  margin-top: 1rem;
  text-align: center;
  color: white;
  font-size: 0.95rem;
  padding: 0.6rem 1.2rem;
  background: rgba(0,0,0,0.6);
  border-radius: 40px;
  backdrop-filter: blur(4px);
}

/* Футер (как на главной) */
.footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  text-align: center;
  padding: 1.2rem;
  font-size: 0.85rem;
  margin-top: auto;
}

/* Адаптивность */
@media (max-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .nav-links {
    justify-content: center;
    gap: 1rem;
  }
  
  .main {
    padding: 1rem;
  }
  
  .gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
  }
  
  .hero {
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
  }
  
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .modal-caption {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
  }
  
  .modal-close {
    top: -45px;
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-caption p {
    font-size: 0.65rem;
  }
}