/* ===== COOKIE CONSENT POPUP ===== */
.cookie-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(26, 31, 23, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-xl);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.cookie-overlay.active {
  opacity: 1;
  visibility: visible;
}
.cookie-popup {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(90, 107, 78, 0.08);
  max-width: 380px;
  width: 100%;
  padding: var(--space-xl);
  text-align: center;
  transform: translateY(40px) scale(0.96);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cookie-overlay.active .cookie-popup {
  transform: translateY(0) scale(1);
}
.cookie-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-sm);
  border-radius: 50%;
  background: var(--primary-50, rgba(107, 122, 61, 0.1));
  color: var(--primary-600, #1e6091);
}
.cookie-icon svg {
  width: 28px;
  height: 28px;
}
.cookie-popup h4 {
  font-family: var(--font-display);
  color: var(--neutral-900);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs, 6px);
}
.cookie-popup > p {
  color: var(--neutral-500);
  font-size: 0.82rem;
  line-height: 1.55;
  margin: 0 auto var(--space-xs, 6px);
  max-width: 320px;
}
.cookie-link {
  margin-bottom: var(--space-md) !important;
}
.cookie-link a {
  color: var(--primary-500);
  font-size: 0.78rem;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-link a:hover {
  color: var(--primary-700);
}
.cookie-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
}
.cookie-btn-reject {
  background: var(--neutral-100);
  color: var(--neutral-600);
  border: 1.5px solid var(--neutral-200);
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.82rem;
  transition: all var(--transition-base);
}
.cookie-btn-reject:hover {
  background: var(--neutral-200);
  color: var(--neutral-800);
  transform: translateY(-1px);
}
.cookie-btn-accept {
  padding: 9px 20px;
  font-size: 0.82rem;
}

/* ===== LANGUAGE TOGGLE — NAVBAR ===== */
.navbar-lang {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all var(--transition-base);
  white-space: nowrap;
}

/* Mobile-only language toggle living inside navbar (next to hamburger) */
.navbar-lang-mobile {
  display: none; /* hidden on desktop */
}

/* ===== HAMBURGER FIX — keep spans visible when menu is open over dark overlay ===== */
.navbar-toggle.open span,
.navbar.scrolled .navbar-toggle.open span,
.navbar.transparent .navbar-toggle.open span {
  background: #ffffff !important;
}

/* Ensure the toggle stays clickable above the menu */
.navbar-toggle {
  position: relative;
  z-index: 1001;
}

/* ===== MOBILE MENU — static (no scroll), fits viewport, full overlay ===== */
.mobile-menu {
  z-index: 999 !important;        /* above page content, below navbar (1000) */
  overflow: hidden !important;     /* user request: no scroll */
  -webkit-overflow-scrolling: auto;
  height: 100dvh;                  /* dynamic viewport height — handles mobile URL bar */
  height: 100vh;                   /* fallback */
}
.mobile-menu-content {
  min-height: auto !important;
  height: 100%;
  padding: var(--space-lg) !important;
  /* Pile items from top → keeps footer right below the links (not stuck to bottom) */
  justify-content: flex-start !important;
  overflow: hidden !important;
}
/* Hide duplicate logo inside menu — the navbar logo already shows */
.mobile-menu-header {
  display: none !important;
}
.mobile-menu-nav {
  gap: 4px !important;
  /* Push down to clear the navbar height */
  padding-top: calc(var(--navbar-height, 65px) + var(--space-md)) !important;
  flex: 0 0 auto !important;
}
.mobile-menu-link {
  padding: 14px 0 !important;
  font-size: 1.05rem !important;
}
.mobile-menu-footer {
  /* Don't push to the absolute bottom — sit right under the nav links */
  margin-top: var(--space-xl) !important;
  padding-top: var(--space-md) !important;
}
.mobile-menu-contact {
  margin-bottom: var(--space-md) !important;
  gap: 8px !important;
  font-size: 0.85rem;
}

/* ===== GLOBAL LIGHTBOX — covers home gallery + about-mosaic clicks ===== */
.global-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 12, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: zoom-out;
}
.global-lightbox.active {
  opacity: 1;
  visibility: visible;
}
.global-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 80px 90px;
  box-sizing: border-box;
  pointer-events: auto;
}
.global-lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  cursor: default;
  background: transparent;
  display: block;
}
.global-lightbox-close,
.global-lightbox-prev,
.global-lightbox-next {
  position: absolute;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.18);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
}
.global-lightbox-close:hover,
.global-lightbox-prev:hover,
.global-lightbox-next:hover {
  background: rgba(255,255,255,0.32);
}
.global-lightbox-close {
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
  line-height: 1;
}
.global-lightbox-prev,
.global-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
}
.global-lightbox-prev { left: 22px; }
.global-lightbox-next { right: 22px; }
.global-lightbox-prev:hover,
.global-lightbox-next:hover {
  transform: translateY(-50%) scale(1.06);
}
.global-lightbox-prev:active,
.global-lightbox-next:active {
  transform: translateY(-50%) scale(0.96);
}

/* Hide the legacy lightbox shipped with the main bundle so it can never
   overlay our global one. We handle every click via .global-lightbox now. */
#lightbox { display: none !important; }

/* On mobile the gallery becomes 2 columns and the 6th tile ends up alone
   in the last row — hide it so the grid stays balanced. Desktop unaffected. */
@media (max-width: 768px) {
  .gallery-grid .gallery-item:nth-child(6) { display: none !important; }
}

@media (max-width: 768px) {
  .global-lightbox-stage {
    padding: 64px 56px;
  }
  .global-lightbox-close {
    width: 38px;
    height: 38px;
    top: 12px;
    right: 12px;
    font-size: 1.4rem;
  }
  .global-lightbox-prev,
  .global-lightbox-next {
    width: 40px;
    height: 40px;
  }
  .global-lightbox-prev svg,
  .global-lightbox-next svg {
    width: 22px;
    height: 22px;
  }
  .global-lightbox-prev { left: 10px; }
  .global-lightbox-next { right: 10px; }
}

/* Cursor hint that gallery photos are clickable */
.gallery-item img,
.about-mosaic-main img,
.about-mosaic-side img,
.about-featured-img img,
.about-story-image img {
  cursor: zoom-in;
}

/* ===== Force animate-on-scroll content visible immediately on page load
   — prevents the "photos appear dark on refresh" issue when the
   IntersectionObserver hasn't fired yet for in-viewport elements ===== */
.animate-on-scroll {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

/* ===== NAVBAR turns GREEN when the mobile menu is open ===== */
/* Using :has() (modern browsers) — falls back below to a body class for older */
body:has(.mobile-menu.open) .navbar,
.navbar.menu-open {
  background: var(--primary-800, #1a3a55) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: none !important;
}
body:has(.mobile-menu.open) .navbar .navbar-logo,
.navbar.menu-open .navbar-logo {
  color: #ffffff !important;
  text-shadow: none !important;
}
body:has(.mobile-menu.open) .navbar .navbar-lang-mobile,
.navbar.menu-open .navbar-lang-mobile {
  color: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.1) !important;
}
.navbar-lang svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}
.navbar-lang:hover svg {
  transform: rotate(20deg);
}

/* Transparent navbar state */
.navbar.transparent .navbar-lang {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
}
.navbar.transparent .navbar-lang:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* Scrolled navbar state */
.navbar.scrolled .navbar-lang {
  color: var(--primary-600);
  border-color: var(--primary-200);
  background: var(--primary-50);
}
.navbar.scrolled .navbar-lang:hover {
  background: var(--primary-100);
  border-color: var(--primary-400);
  color: var(--primary-700);
}

/* Mobile menu language toggle */
.mobile-lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: var(--space-md);
  margin-top: var(--space-lg);
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all var(--transition-base);
}
.mobile-lang-toggle:hover,
.mobile-lang-toggle:active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}
.mobile-lang-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cookie-overlay {
    padding: var(--space-md);
    align-items: flex-end;
  }
  .cookie-popup {
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-lg) var(--radius-lg) var(--radius-md) var(--radius-md);
    max-width: 100%;
  }
  .cookie-popup h4 {
    font-size: 1rem;
  }
  .cookie-popup > p {
    font-size: 0.78rem;
  }
  .cookie-icon {
    width: 40px;
    height: 40px;
  }
  .cookie-icon svg {
    width: 22px;
    height: 22px;
  }
  .cookie-actions {
    flex-direction: column;
    gap: var(--space-sm);
  }
  .cookie-btn-reject,
  .cookie-btn-accept {
    width: 100%;
    justify-content: center;
  }
  /* Hide the desktop navbar-lang variant inside .navbar-links on mobile,
     but keep the dedicated mobile button (.navbar-lang-mobile) visible. */
  .navbar-links .navbar-lang {
    display: none !important;
  }
  .navbar-lang-mobile {
    display: inline-flex !important;
    margin-right: 10px;
    padding: 6px 12px;
    font-size: 0.72rem;
  }
  .navbar-lang-mobile svg {
    width: 14px;
    height: 14px;
  }
  /* The transparent navbar variant on mobile */
  .navbar.transparent .navbar-lang-mobile {
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
  }
  .navbar.scrolled .navbar-lang-mobile {
    color: var(--primary-600);
    border-color: var(--primary-200);
    background: var(--primary-50);
  }
}




/* POWERED BY LETRIONAI — separate centered row at the very bottom */
.footer .footer-powered-row {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 24px;
  padding: 22px 0 6px;
  text-align: center;
}
.footer .footer-powered-text {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}
.footer .footer-powered-text a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  padding-bottom: 1px;
  margin-left: 6px;
  font-weight: 600;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer .footer-powered-text a:hover {
  color: #fff;
  border-bottom-color: #fff;
}
