:root {
  --haibo-bg: #080d11;
  --haibo-bg-secondary: #0d151a;
  --haibo-glass: rgba(255, 255, 255, 0.055);
  --haibo-glass-hover: rgba(255, 255, 255, 0.085);
  --haibo-border: rgba(255, 255, 255, 0.1);
  --haibo-border-hover: rgba(255, 255, 255, 0.16);
  --haibo-text: #ffffff;
  --haibo-text-secondary: rgba(255, 255, 255, 0.68);
  --haibo-text-muted: rgba(255, 255, 255, 0.48);
  --haibo-gold: #f5b51b;
  --haibo-gold-hover: #ffc43d;
  --haibo-gold-glow: rgba(245, 181, 27, 0.16);
  --haibo-radius-card: 1.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  font-family: 'Poppins', sans-serif;
}

body {
  background: var(--haibo-bg);
  color: var(--haibo-text);
}

.page-hero {
  /* Heights handled in hero-overlays.css */
}

.glass {
  background: var(--haibo-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--haibo-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.orange {
  color: var(--haibo-gold);
}

.btn-main {
  background: linear-gradient(135deg, var(--haibo-gold), var(--haibo-gold-hover));
  color: #0a0a0a;
  font-weight: 600;
  transition: 0.4s;
  display: inline-block;
}

.btn-main:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 30px var(--haibo-gold-glow);
}

/* ── Floating Apple-style glass pill navbar ── */
nav.nav-blur {
  position: fixed;
  top: max(1.25rem, calc(env(safe-area-inset-top, 0px) + 0.5rem));
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: calc(100% - 10vw);
  max-width: 1450px;
  min-height: 4.75rem;
  z-index: 50;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.7rem 0.85rem 0.7rem 1.5rem !important;
  border-radius: 9999px;
  background: rgba(20, 28, 34, 0.42);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

nav.nav-blur > .flex.justify-between {
  align-items: center;
  gap: 0.75rem;
  min-height: 3.35rem;
}

nav.nav-blur a.flex.items-center {
  flex-shrink: 0;
  padding-left: 0.15rem;
}

nav.nav-blur .brand-title {
  letter-spacing: 0.02em;
}

nav.nav-blur .gap-10 a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  position: relative;
  transition: color 0.2s ease;
}

nav.nav-blur a.orange {
  color: var(--haibo-gold);
}

nav.nav-blur .gap-10 a.orange::after {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -0.35rem;
  height: 1.5px;
  border-radius: 999px;
  background: var(--haibo-gold);
  box-shadow: 0 0 10px var(--haibo-gold-glow);
  opacity: 0.9;
}

nav.nav-blur .btn-main {
  background: var(--haibo-gold);
  color: #080d11;
  font-weight: 700;
  border-radius: 9999px;
  padding: 0.8rem 1.4rem !important;
  margin-right: 0.25rem;
  box-shadow: none;
  transition:
    transform 0.2s ease,
    filter 0.2s ease,
    background 0.2s ease;
}

nav.nav-blur .btn-main:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
  background: var(--haibo-gold-hover);
  box-shadow: 0 6px 20px var(--haibo-gold-glow);
}

body.mobile-nav-open nav.nav-blur {
  border-radius: 1.65rem;
  padding-bottom: 0.85rem !important;
}

@media (max-width: 1023px) {
  nav.nav-blur {
    width: calc(100% - 2.5rem);
    top: max(0.85rem, calc(env(safe-area-inset-top, 0px) + 0.35rem));
    padding: 0.65rem 0.75rem 0.65rem 1.1rem !important;
  }
}

@media (max-width: 767px) {
  nav.nav-blur {
    width: calc(100% - 1.75rem);
    max-width: none;
    min-height: 3.85rem;
    top: max(0.75rem, calc(env(safe-area-inset-top, 0px) + 0.25rem));
    padding: 0.55rem 0.65rem 0.55rem 0.9rem !important;
  }

  nav.nav-blur .btn-main {
    margin-right: 0;
    padding: 0.65rem 1.1rem !important;
  }
}

.destination-card {
  transition: 0.5s;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.destination-card img {
  transition: 0.7s;
}

.destination-card:not(.dest-card-catalog):hover img {
  transform: scale(1.1);
}

.destination-card:not(.dest-card-catalog):hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.fade-up {
  animation: fadeUp 1.2s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.floating {
  animation: floating 4s ease-in-out infinite;
}

@keyframes floating {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
  100% {
    transform: translateY(0);
  }
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
}

#home-destinations,
#all-destinations {
  align-items: stretch;
}

.destination-card {
  height: 100%;
}

.destination-card .dest-card-media {
  position: relative;
  overflow: hidden;
  background-color: #141414;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.destination-card .dest-card-media img,
.destination-card .dest-card-media .dest-card-img {
  display: block;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

/* Desktop-only tall cards (mobile uses cards-mobile.css) */
@media (min-width: 1025px) {
  .destination-card .dest-card-media {
    min-height: 420px;
  }

  .destination-card .dest-card-media img,
  .destination-card .dest-card-media .dest-card-img {
    min-height: 420px;
    height: 420px;
  }
}

.overlay-dark {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.12) 0%,
    rgba(0, 0, 0, 0.4) 45%,
    rgba(0, 0, 0, 0.85) 100%
  );
}

.gallery img,
.gallery-item {
  transition: 0.6s;
}

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

.stats-card {
  transition: 0.4s;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.12);
}

.about-stat-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #d98b2b, #ffb347);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(217, 139, 43, 0.35);
}

.about-stat-icon svg {
  width: 1.65rem;
  height: 1.65rem;
  stroke: #1a1a1a;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stats-card .stats-card-title {
  color: #d98b2b;
  font-weight: 700;
  line-height: 1.35;
}

.stats-card .stats-card-sub {
  color: #d98b2b;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.mobile-menu-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.mobile-nav-open {
  overflow: hidden;
  touch-action: none;
}

nav.nav-blur {
  z-index: 50;
}

#menu-btn.is-open {
  color: #d98b2b;
}

#mobile-menu {
  position: relative;
  z-index: 51;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.4s ease,
    opacity 0.3s ease;
}

#mobile-menu.open {
  max-height: min(80vh, 420px);
  overflow-y: auto;
  opacity: 1;
}

nav a:hover {
  color: #d98b2b;
  transition: color 0.3s;
}

.package-card--premium {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.dest-experience-card {
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.dest-experience-card:hover {
  transform: translateY(-5px);
  border-color: rgba(217, 139, 43, 0.35);
}

.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 50;
  width: 4rem;
  height: 4rem;
  background: #25d366;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
  transition: transform 0.35s, box-shadow 0.35s;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 36px rgba(37, 211, 102, 0.55);
}

.whatsapp-float svg {
  width: 1.75rem;
  height: 1.75rem;
  fill: white;
}

.breadcrumb a {
  color: #9ca3af;
  transition: color 0.3s;
}

.breadcrumb a:hover {
  color: #d98b2b;
}

/* Firestore realtime — subtle loading (no layout change) */
body.haibo-content-loading main {
  opacity: 0.97;
  transition: opacity 0.2s ease;
}

body.haibo-content-ready main {
  opacity: 1;
}

/* Header logo: sized here (not only by the Tailwind runtime) so its box exists before the
   image or Tailwind loads; alt text stays for assistive tech but never renders as large text. */
nav img[data-haibo-logo] {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  flex-shrink: 0;
  object-fit: contain;
  color: transparent;
  font-size: 0;
  overflow: hidden;
}

/* In-page navigation (js/site-nav.js): page content fades, the header stays put */
html.haibo-nav-active body > :is(main, header, footer) {
  transition: opacity 0.16s ease;
}

html.haibo-nav-leaving body > :is(main, header, footer) {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html.haibo-nav-active body > :is(main, header, footer) {
    transition: none;
  }
}
