/* ============================================================
   SOY ALHAMA — Layout (Nav, Footer, Hero, Page Header)
   ============================================================ */

/* --- Section base --- */
section {
  padding-block: var(--space-4xl);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200; /* Must be above mobile-menu */
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: all var(--duration-normal) var(--ease-smooth);
  background: transparent;
}

.navbar.scrolled {
  height: var(--nav-height-scrolled);
  background: rgba(250, 250, 250, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--ff-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  transition: color var(--duration-normal) var(--ease-smooth);
  letter-spacing: 0.01em;
  z-index: 101;
}

.navbar.scrolled .nav-logo {
  color: var(--black-soft) !important;
}

.nav-logo svg {
  width: 28px;
  height: 28px;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-link {
  position: relative;
  font-size: var(--fs-small);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--duration-fast) var(--ease-smooth);
  letter-spacing: 0.02em;
  padding: 6px 0;
}

.navbar.scrolled .nav-link {
  color: var(--gray-600) !important;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.navbar.scrolled .nav-link:hover,
.navbar.scrolled .nav-link.active {
  color: var(--terracotta) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--terracotta);
  transition: width var(--duration-normal) var(--ease-smooth);
}

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

/* --- Language Switcher --- */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: var(--space-md);
  padding-left: var(--space-md);
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.navbar.scrolled .lang-switcher {
  border-left-color: var(--gray-200);
}

.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  border-radius: 4px;
  transition: all var(--duration-fast) var(--ease-smooth);
  opacity: 0.5;
  filter: grayscale(1);
}

.lang-btn:hover,
.lang-btn.active {
  opacity: 1;
  filter: grayscale(0);
  background: rgba(255, 255, 255, 0.1);
}

.navbar.scrolled .lang-btn:hover,
.navbar.scrolled .lang-btn.active {
  background: var(--sand);
}

.lang-btn svg {
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Nav Right (mobile) */
.nav-right-mobile {
  display: none;
  align-items: center;
  gap: var(--space-sm);
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  z-index: 210;
  width: 44px; /* Force touch target width */
  height: 44px; /* Force touch target height */
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all var(--duration-normal) var(--ease-smooth);
  border-radius: 2px;
}

.navbar.scrolled .nav-hamburger span {
  background: var(--black-soft) !important;
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
  background: #fff;
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
  background: #fff;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.97);
  backdrop-filter: blur(20px);
  z-index: 190; /* Just below navbar */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-smooth);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu .nav-link {
  font-size: 1.4rem;
  color: #fff;
  font-family: var(--ff-heading);
}

.mobile-menu .nav-link:hover {
  color: var(--terracotta-light);
}

.mobile-lang-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 80%;
}

.mobile-lang-selector .nav-link {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
}

.mobile-menu .lang-switcher {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
  margin-top: var(--space-lg);
  gap: var(--space-md);
}

.mobile-menu .lang-btn {
  opacity: 0.6;
}

.mobile-menu .lang-btn:hover,
.mobile-menu .lang-btn.active {
  opacity: 1;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  animation: heroKenBurns 40s linear infinite alternate;
}

@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(26, 26, 26, 0.25) 0%,
    rgba(26, 26, 26, 0.1) 40%,
    rgba(26, 26, 26, 0.45) 75%,
    rgba(26, 26, 26, 0.7) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: var(--space-md);
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-md);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  animation: fadeInDown 1.2s var(--ease-out-expo) 0.3s both;
}

.hero-badge svg {
  color: var(--terracotta-light);
  filter: drop-shadow(0 0 4px rgba(212, 137, 106, 0.4));
  animation: badgeIconPulse 3s ease-in-out infinite;
}

@keyframes badgeIconPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: var(--space-md);
  animation: fadeInUp 1s var(--ease-smooth) 0.5s both;
}

.hero-title em {
  font-style: italic;
  color: var(--sand);
}

.hero-description {
  font-size: var(--fs-body-lg);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-lg);
  max-width: 560px;
  margin-inline: auto;
  animation: fadeInUp 1s var(--ease-smooth) 0.7s both;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  animation: fadeInUp 1s var(--ease-smooth) 0.9s both;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: rgba(255, 255, 255, 0.5);
  font-size: var(--fs-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: fadeInUp 1s var(--ease-smooth) 1.2s both;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.page-header {
  position: relative;
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-3xl);
  text-align: center;
  background: var(--sand);
  overflow: hidden;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--off-white));
}

.page-header .section-title {
  font-size: var(--fs-h1);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--black-soft);
  color: rgba(255, 255, 255, 0.7);
  padding-top: var(--space-4xl);
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand h3 {
  font-size: var(--fs-h3);
  color: #fff;
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: var(--fs-small);
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.5);
  max-width: 360px;
}

.footer-col h4 {
  font-family: var(--ff-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.footer-col a {
  display: block;
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.5);
  padding: 4px 0;
  transition: color var(--duration-fast);
}

.footer-col a:hover {
  color: var(--terracotta-light);
}

/* Footer Map */
.footer-map {
  margin-top: var(--space-2xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 280px;
}

.footer-map iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(0.3) brightness(0.9);
}

/* Footer Bottom */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) 0;
  margin-top: var(--space-lg);
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================================
   HOMEPAGE SECTIONS
   ============================================================ */

/* --- Discover Grid --- */
.decouvrir {
  background: var(--off-white);
}

.decouvrir-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-top: var(--space-2xl);
}

.decouvrir-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.decouvrir-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth);
}

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

.decouvrir-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.2), transparent);
  pointer-events: none;
}

.decouvrir-text p {
  color: var(--gray-600);
  margin-bottom: var(--space-md);
}

.decouvrir-text p:first-of-type::first-letter {
  font-family: var(--ff-heading);
  font-size: 3.5em;
  float: left;
  line-height: 0.8;
  margin-right: 8px;
  margin-top: 4px;
  color: var(--terracotta);
  font-weight: 700;
}

/* --- History Section --- */
.histoire {
  background: var(--black-soft);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.histoire .section-label { color: var(--terracotta-light); }
.histoire .section-title { color: #fff; }
.histoire .section-subtitle { color: rgba(255, 255, 255, 0.5); }

.history-journey {
  position: relative;
  margin-top: var(--space-3xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-3xl);
}

.history-journey::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--terracotta), var(--blue-med), var(--terracotta-light));
  transform: translateX(-50%);
  z-index: 1;
  opacity: 0.3;
}

.journey-item {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  position: relative;
  z-index: 2;
}

.journey-item--reversed {
  flex-direction: row-reverse;
}

.journey-image {
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.journey-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth), filter var(--duration-slow) var(--ease-smooth);
}

.history-img-sepia {
  filter: sepia(0.5) contrast(1.1) brightness(0.9);
}

.history-img-bw {
  filter: grayscale(1) contrast(1.2) brightness(0.9);
}

.journey-item:hover .journey-image img {
  transform: scale(1.05);
  filter: none;
}

.journey-content {
  flex: 1;
}

.journey-content.glass {
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: var(--space-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.journey-era {
  display: inline-block;
  font-family: var(--ff-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--terracotta-light);
  margin-bottom: var(--space-sm);
}

.journey-title {
  font-size: var(--fs-h3);
  color: #fff;
  margin-bottom: var(--space-sm);
}

.journey-divider {
  width: 40px;
  height: 2px;
  background: var(--terracotta);
  margin-bottom: var(--space-md);
}

.journey-text {
  font-size: var(--fs-small);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.8;
}

/* --- Thermes Showcase --- */
.thermes {
  background: var(--off-white);
}

.thermes-showcase {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
  margin-top: var(--space-2xl);
}

.thermes-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.thermes-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thermes-badge {
  position: absolute;
  bottom: var(--space-md);
  left: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--terracotta);
}

.thermes-badge svg {
  width: 18px;
  height: 18px;
}

.thermes-info h3 {
  font-size: var(--fs-h3);
  margin-bottom: var(--space-md);
}

.thermes-info p {
  color: var(--gray-600);
  margin-bottom: var(--space-sm);
}

/* --- Vivre (Experience) Section --- */
.vivre {
  background: var(--sand);
}

.vivre-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-xl);
}

/* --- Galerie Section --- */
.galerie {
  background: var(--off-white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .decouvrir-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .thermes-showcase {
    grid-template-columns: 1fr;
  }

  .journey-item,
  .journey-item--reversed {
    flex-direction: column;
    gap: var(--space-lg);
  }

  .history-journey::before {
    display: none;
  }
}

@media (max-width: 768px) {
  section {
    padding-block: var(--space-3xl);
  }

  .nav-links {
    display: none;
  }

  .nav-right-mobile {
    display: flex;
  }

  .nav-hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-xs);
    text-align: center;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10vw, 3.5rem);
  }

  .hero-description {
    font-size: var(--fs-body);
  }

  .hero-cta-group {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
  }

  .vivre-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: var(--space-xs);
  }

  .vivre-tabs::-webkit-scrollbar {
    display: none;
  }

  .vivre-tabs .tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: var(--space-sm);
  }

  .stats-bar {
    grid-template-columns: 1fr;
    gap: var(--space-md);
    text-align: center;
  }
}
