/* ============================
   1. ОБЩИЕ СТИЛИ
============================ */
body {
  margin: 0;
  font-family: "Noto Sans", Arial, sans-serif;
  background-color: #fff;
  color: #fff;
}

/* ============================
   2. ХЕДЕР (Hero Section)
============================ */
#hero {
  background-image: url('images/Apartment-living-room.jpg');
  background-size: cover;
  background-position: center;
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: relative;
}

.nav-menu {
  display: flex;
  justify-content: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.nav-menu li a {
  text-decoration: none;
  font-size: 18px;
  font-weight: 400;
  color: white;
  transition: 0.3s;
}

.nav-menu li a:hover {
  color: #f1c40f;
}

.nav-email {
  font-size: 18px;
  font-weight: 400;
  padding: 0 20px;
  white-space: nowrap;
  color: white;
}

.burger {
  display: none;
  font-size: 28px;
  color: white;
  cursor: pointer;
  padding: 10px 20px;
}

.hero-title h1 {
  font-size: 48px;
  font-weight: 700;
  margin: 0;
  padding: 40px 0;
}

.scroll-down {
  font-size: 32px;
  color: white;
  margin-bottom: 30px;
  animation: bounce 2s infinite;
  text-decoration: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(10px); }
  60% { transform: translateY(5px); }
}

/* ============================
   3. СЕКЦИИ: ABOUT, GALLERY, PLAN, BUILDING, VIDEO, DISTRICT
============================ */
#about {
  padding: 20px 20px;
  background-color: #fff;
  color: #000;
  font-family: "Noto Sans", 'Arial', sans-serif;
}
.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 70px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap; /* для мобильной адаптации */
}

.about-left, .about-right {
  flex: 1 1 400px;
  width: 45%;
}

.about-left {
  margin-left: 70px;
  margin-right: 40px;
}

.about-right {
    margin-right: 40px;
}

.about-left p {
  font-size: 24px;
  font-weight: 400;
  line-height: 1.6;
}

.about-right p {
  font-size: 16px;
  font-weight: 300;
  line-height: 1.8;
}

.gallery-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.gallery-container img {
  width: 100%;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.3s;
}

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

/* Модальное окно */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
}

.lightbox.hidden {
  display: none;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

.close {
  position: absolute;
  top: 30px;
  right: 50px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.lightbox-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 30px;
}

.prev, .next {
  font-size: 50px;
  color: white;
  cursor: pointer;
  user-select: none;
  background: rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  border-radius: 50%;
  transition: background 0.3s;
}

.prev:hover, .next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.plan-section {
  padding: 10px 20px;
  background-color: #fff;
  color: #000;
}

.plan-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 60px;
  align-items: center;
  flex-wrap: wrap;
}

.plan-image {
  flex: 1 1 400px;
  text-align: center;
}

.plan-image img {
  max-width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.plan-text {
  flex: 1 1 400px;
  font-size: 16px;
  line-height: 1.8;
}

.plan-text p {
  margin-bottom: 16px;
}

.building-section {
  padding: 50px 20px;
  background-color: #fff;
  color: #000;
}

.building-row {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  align-items: stretch; /* ВЫРАВНИВАЕТ КОЛОНКИ ПО ВЫСОТЕ */
  max-width: 1200px;
  margin: 0 auto 60px;
}

.building-row {
  align-items: stretch;
  min-height: 500px;
}

.building-col {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* ВЫРАВНИВАЕТ КОНТЕНТ ВНУТРИ КОЛОНКИ */
  gap: 20px;
}

.building-text {
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
}

.building-text p {
  margin-bottom: 5px;
}

.building-img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.3s;
}

.building-img:hover {
  transform: scale(1.03);
}

.building-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* ← фиксируем 3 колонки */
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.building-gallery img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.3s;
}

.building-gallery img:hover {
  transform: scale(1.03);
}

.video-section {
  background-color: #fff;
  padding: 50px 0;
}

.video-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  aspect-ratio: 16 / 9; /* задаём пропорции */
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.section-title {
  font-size: 28px;
  font-weight: 500;
  text-align: center;
  color: #000;
  margin-bottom: 30px;
}

/* Общие стили для обеих секций Via España и Via Argentina */
#district-part1,
#district-part2 {
  padding: 30px 20px;
  background-color: #fff;
  color: #000;
  font-family: "Noto Sans", Arial, sans-serif;
}

/* Контейнеры */
#district-part1 .plan-container,
#district-part2 .plan-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 60px;
}

/* Текст */
#district-part1 .plan-text,
#district-part2 .plan-text {
  font-weight: 300 !important;
  font-family: 'Noto Sans', Arial, sans-serif !important;
  font-size: 16px;
  line-height: 1.8;
}

#district-part1 .plan-text p,
#district-part2 .plan-text p {
  font-weight: 300 !important;
}

/* Изображение */
#district-part1 .plan-image,
#district-part2 .plan-image {
  flex: 1 1 400px;
  text-align: center;
}

#district-part1 .plan-image img,
#district-part2 .plan-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

/* Подпись к изображению */
#district-part1 .plan-image figcaption,
#district-part2 .plan-image figcaption {
  margin-top: 8px;
  font-size: 14px;
  font-style: italic;
  color: #666;
  text-align: center;
}

.map-container {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================
   4. АДАПТИВНОСТЬ
============================ */
@media (max-width: 768px) {
  .burger {
    display: block;
    position: absolute;
    top: 20px;
    left: 20px;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    gap: 20px;
    background: rgba(0,0,0,0.85);
    position: absolute;
    top: 60px;
    right: 20px;
    padding: 20px;
    border-radius: 10px;
  }

  .nav-menu.active {
    display: flex;
  }

  .nav-email {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 16px;
    white-space: nowrap;
  }
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    gap: 30px;
    align-items: stretch;
    padding: 20px;
  }

  .about-left,
  .about-right {
    flex: unset;         /* ← вот эта строка убирает фиксированную высоту */
    width: 100%;
    margin: 0 auto;
    text-align: center;
  }

  .about-left p {
    font-size: 20px;
    line-height: 1.6;
    font-weight: 400;
    margin-bottom: 16px;
  }

  .about-right p {
    font-size: 16px;
    line-height: 1.6;
    font-weight: 300;
    margin-bottom: 14px;
  }
}

@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: 1fr; /* 1 колонка на телефоне */
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .gallery-container {
    grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшете */
  }
}

@media (max-width: 768px) {
  .plan-container {
    flex-direction: column;
    gap: 30px;
  }
  .plan-text {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .building-gallery {
    grid-template-columns: 1fr; /* 1 колонка на телефоне */
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .building-gallery {
    grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшете */
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  #district-part1 .plan-container,
  #district-part2 .plan-container {
    flex-direction: column;
    gap: 30px;
  }

  #district-part1 .plan-text,
  #district-part2 .plan-text,
  #district-part1 .plan-image-image,
  #district-part2 .plan-image-image {
    width: 100%;
    max-width: 100%;
    text-align: left;
  }

  #district-part1 .plan-image figcaption,
  #district-part2 .plan-image figcaption {
    text-align: center;
  }
}

@media (max-width: 768px) {
  /* Заменяем фото на вертикальные версии */
  .espana-img {
    content: url("images/via-espana-mobile.jpg");
  }

  .argentina-img {
    content: url("images/via-argentina-mobile.jpg");
  }
}


/* ============================
   5. LIGHTBOX, SCROLL TO TOP
============================ */
#scrollToTop {
  position: fixed;
  right: 20px;
  bottom: 30px;
  background: linear-gradient(to top, #a8e0ec, #73aecd);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 24px;
  line-height: 48px;
  text-align: center;
  color: white;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

#scrollToTop.show {
  opacity: 1;
  pointer-events: all;
}
