/* Global Styles */
:root {
  --primary-color: #0f1440;
  --secondary-color: #f8f8f8;
  --accent-color: #d4af37;
  --text-color: #333;
  --light-text: #fff;
  --font-primary: 'Montserrat', sans-serif;
  --font-secondary: 'Playfair Display', serif;
}

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

body {
  font-family: var(--font-primary);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-secondary);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Header Styles */
header {
  position: absolute;
  top: 20px;
  left: 0;
  width: 100%;
  background: transparent;
  color: var(--light-text);
  padding: 1rem 2rem;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-toggle {
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1001;
  position: absolute;
  left: 2rem;
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
}

.menu-toggle.active i:before {
  content: "\f00d";
}

/* Hide logo */
.logo-container { display: none; }

.logo {
  height: 45px; /* Decreased logo height to fit within header */
  margin-right: 1rem;
  background-color: var(--primary-color);
}

.logo img {
  height: 100%;
  background-color: var(--primary-color);
}

.brand-signature {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  min-width: 200px;
}

.brand-signature div {
  line-height: 1.5;
  white-space: nowrap;
}

.language-switcher {
  position: absolute;
  right: 7rem; /* Отступ, чтобы не перекрывать кнопку меню */
}

.language-switcher button {
  background: transparent;
  border: 1px solid #fff;
  color: #fff;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: all 0.3s ease;
}

nav {
  position: fixed;
  top: 0;
  left: -100%;
  width: 250px;
  height: 100vh;
  background: rgba(0,0,0,0.4); /* Semi-transparent, colour-neutral */
  padding-top: 80px;
  transition: left 0.3s ease;
  z-index: 999;
}

nav.active {
  left: 0;
}

nav ul {
  padding: 1rem;
}

nav ul li {
  margin-bottom: 1rem;
}

nav ul li a {
  color: var(--light-text);
  font-size: 1.1rem;
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--accent-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  overflow: hidden;
  margin-top: 0; /* Removed margin to eliminate white space */
}

.hero-slider {
  height: 100%;
  position: relative;
}

.hero-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slider img.active {
  opacity: 1;
}

/* About Section */
.about {
  padding: 0.2rem 0;
}

.about-title {
  text-align: center;
  margin-bottom: 0.2rem;
}

.about-title h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.about-title .slogan {
  font-style: italic;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-size: 2em; /* Doubled font size */
  text-decoration: underline; /* Added underline */
}

.about-title h2 {
  font-size: 1.5rem;
  font-weight: normal;
}

.about-title p {
  font-style: italic;
  color: var(--accent-color);
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Lobby Section */
.lobby {
  padding-top: 0.1rem;
  padding-bottom: 0.2rem;
  background-color: var(--secondary-color);
  margin-top: -1rem;
}

.lobby h2 {
  text-align: center;
  margin-bottom: 0.2rem;
  color: var(--primary-color);
}

.lobby-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.lobby-gallery img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 5px;
  transition: transform 0.3s;
  cursor: pointer;
}

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

/* Video Section */
.video {
  padding: 0rem 0;
}

.video h2 {
  text-align: center;
  margin-bottom: 0rem;
  color: var(--primary-color);
}

.video-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 5px;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background-color: #000;
}

.fullscreen-button {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

/* Technology Section */
.technology {
  padding: 0.2rem 0; /* Reduced padding by 90% from 2rem to 0.2rem */
  background-color: var(--secondary-color);
}

.technology h2 {
  text-align: center;
  margin-bottom: 0.2rem; /* Reduced margin by 90% from 2rem to 0.2rem */
  color: var(--primary-color);
}

.technology-content {
  display: block;
  max-width: 800px;
  margin: 0 auto;
}

.tech-subtitle {
  text-align: center;
  margin-bottom: 1rem;
}

.tech-section {
  margin-bottom: 0.2rem; /* Reduced margin by 90% from 2rem to 0.2rem */
}

.tech-section h3 {
  color: var(--primary-color);
  margin-bottom: 0.1rem; /* Reduced margin by 90% from 1rem to 0.1rem */
}

/* Apartments Section */
.apartments {
  padding: 0.2rem 0;
}

.apartments h2 {
  text-align: center;
  margin-bottom: 0.2rem;
  color: var(--primary-color);
}

.apartment-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  margin: 0 0.5rem 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
}

.tab-btn.active, .tab-btn:hover {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.apartment-content {
  max-width: 800px;
  margin: 0 auto;
}

.apartment-gallery {
  margin-bottom: 2rem;
}

.apartment-image {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 5px;
}

.apartment-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s;
}

.apartment-image img.active {
  opacity: 1;
}

.apartment-details {
  display: none;
}

.apartment-details.active {
  display: block;
}

.apartment-details h3 {
  color: var(--primary-color);
  font-size: 1.8rem;
}

.apartment-details p {
  font-style: italic;
  margin-bottom: 1.5rem;
}

.apartment-details ul {
  margin-bottom: 1.5rem;
}

.apartment-details ul li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.apartment-details ul li:before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--accent-color);
}

.apartment-plans {
  margin-bottom: 2rem;
}

.apartment-plans h4 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Location Section */
.location {
  padding: 0.2rem 0;
  background-color: var(--secondary-color);
}

.location h2 {
  text-align: center;
  margin-bottom: 0.2rem;
  color: var(--primary-color);
}

.map-container {
  height: 400px;
  border-radius: 5px;
  overflow: hidden;
}

/* Contacts Section */
.contacts {
  padding: 0.2rem 0;
}

.contacts h2 {
  text-align: center;
  margin-bottom: 0.2rem;
  color: var(--primary-color);
}

.contact-info {
  max-width: 600px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 0.5rem; /* consistent spacing between icon and text */
}

.contact-item i {
  font-size: 1.5rem;
  margin-right: 1rem;
  color: var(--primary-color);
  width: 1.5rem; /* fixed width for alignment */
  text-align: center;
}

/* Ensure links inside contact items align vertically */
.contact-item p,
.contact-item a {
  margin: 0;
  line-height: 1.3;
}

.contact-item a {
  color: var(--text-color);
  transition: color 0.3s;
}

.contact-item a:hover {
  color: var(--primary-color);
}

.social-icons {
  display: flex;
}

.social-icons a {
  margin-right: 1rem;
  font-size: 1.5rem;
  color: var(--primary-color);
  transition: color 0.3s;
}

.social-icons a:hover {
  color: var(--accent-color);
}

/* Footer */
footer {
  background: transparent;
  color: var(--text-color);
  padding: 2rem 0;
  display: none;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo {
  height: 60px;
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 100%;
}

.footer-copyright {
  text-align: center;
  font-size: 0.9rem;
}

/* Remove Manus badge */
.manus-badge {
  display: none !important;
}

/* Media Queries */
@media (min-width: 768px) {
  /* Keep the same header layout as mobile for all devices */
  .menu-toggle {
    display: block;
    position: absolute;
    left: 2rem;
  }
  
  nav {
    position: fixed;
    width: 250px;
    height: 100vh;
    background: rgba(0,0,0,0.4); /* Match mobile nav transparency */
    padding-top: 80px;
    left: -100%;
  }
  
  nav.active {
    left: 0;
  }
  
  nav ul {
    display: block;
    padding: 1rem;
  }
  
  nav ul li {
    margin-bottom: 1rem;
  }
  
  .logo-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .language-switcher {
    position: absolute;
    right: 2rem;
  }
}

@media (max-width: 767px) {
  .container {
    width: 95%;
  }
  
  .about-title h1 {
    font-size: 2rem;
  }
  
  .about-title h2 {
    font-size: 1.2rem;
  }
  
  .apartment-image {
    height: 300px;
  }
  
  .map-container {
    height: 300px;
  }
  
  /* Fix logo position in mobile */
  .logo-container {
    max-width: 60%;
  }
  
  /* Ensure brand signature doesn't overlap with language switcher */
  .brand-signature {
    font-size: 0.7rem;
    max-width: 150px;
  }
  
  /* Remove space between about and lobby sections on mobile */
  .about {
    padding-bottom: 0;
  }
  
  .about-content {
    margin-bottom: 0;
  }
  
  .about-content p:last-child {
    margin-bottom: 0;
  }
  
  .lobby {
    margin-top: 0;
    padding-top: 0;
  }
  
  .lobby .container {
    padding-top: 0.5rem;
  }
  
  /* Fix hero image proportions on mobile */
  .hero {
    height: auto;
    aspect-ratio: 1/1;
    margin-top: 0; /* Remove white space between header and hero */
  }
  
  .hero-slider {
    height: 100%;
    width: 100%;
  }
  
  .hero-slider img {
    object-fit: cover; /* Changed from contain to cover for better performance */
    will-change: opacity; /* Optimize for animation */
    transform: translateZ(0); /* Hardware acceleration */
  }
  
  /* Reduce space between hero and about section by 70% */
  .about {
    padding-top: 0.6rem; /* Reduced from 2rem by 70% */
  }
  
  /* Fix header to ensure no gap with hero section */
  header {
    position: relative; /* Changed from fixed to remove gap */
    margin-bottom: 0;
  }
}

/* --- Portrait Mobile Fix: reposition menu & language buttons --- */
@media (max-width: 767px) and (orientation: portrait) {
  .menu-toggle,
  .language-switcher {
    top: 2rem; /* смещение вниз ≈ высота кнопки переключения языка */
  }
  .language-switcher {
    right: 1rem; /* уменьшаем расстояние от правого края */
  }
}

/* -------------------------------------------------- */
/*  Responsive Enhancements (2025-06)                 */
/* -------------------------------------------------- */

/* Small phones (≤575px) */
@media (max-width: 575px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  .tab-btn {
    padding: 0.4rem 0.8rem;
    margin: 0 0.3rem 0.5rem;
    font-size: 0.9rem;
  }
  .apartment-images {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  .contact-item i { font-size: 1.2rem; margin-right: 0.5rem; }
  .map-container { height: 250px; }
}

/* Desktop (≥992px) */
@media (min-width: 992px) {
  /* Layout */
  .container { width: 85%; max-width: 1400px; }

  /* Header & Navigation */
  .menu-toggle { display: block; }
  header { display: flex; align-items: center; }
  nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 250px;
    height: 100vh;
    background: rgba(0,0,0,0.4); /* Match mobile nav transparency */
    padding-top: 80px;
    transition: left 0.3s ease;
    z-index: 999;
  }
  nav ul {
    display: block;
    padding: 1rem;
  }
  nav ul li { margin: 0; }
  nav ul li a { color: var(--light-text); font-size: 1rem; }

  .language-switcher { position: absolute; right: 7rem; }

  /* Technology two-column layout */
  .technology-content { display: block; max-width: 800px; margin: 0 auto; }

  /* Bigger thumbnails in Lobby */
  .lobby-gallery {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  /* Apartments: side-by-side */
  .apartment-details.active {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }
  .apartment-images { flex: 1; }
  .apartment-info { flex: 1; }
  .apartment-info ul { padding-left: 1rem; }
}

/* Default grid for apartment images */
.apartment-images {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* Превью всех квартир — одинаковая «карточка» 4 : 3 */
.apartment-images img {
  width: 100%;
  aspect-ratio: 4 / 3; /*  пример 1024×768 */
  object-fit: cover;   /* обрезаем лишнее, заполняя всю рамку */
  border-radius: 5px;
  display: block;
  cursor: pointer;
}
