/* ===== CSS VARIABLES ===== */
:root {
  --cream: #F6F1E9;
  --warm-white: #FDFAF4;
  --charcoal: #1A1C18;
  --jungle: #2B4A2E;
  --jungle-mid: #3A6B3F;
  --leaf: #6B9E6E;
  --leaf-light: #9DC49F;
  --gold: #C8A84B;
  --gold-light: #DEC47A;
  --river: #4A7C8E;
  --river-light: #7AAAB8;
  --stone: #7A7060;
  --stone-light: #C0B8A8;
  --border: rgba(200,168,75,0.22);
  --transition: 0.4s cubic-bezier(0.25,0.46,0.45,0.94);
  --nav-height: 74px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Play', sans-serif;
  background: var(--warm-white);
  color: var(--charcoal);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }

/* Language visibility */
[data-lang] { display: none; }
[data-lang].active { display: block; }
[data-lang-inline] { display: none; }
[data-lang-inline].active { display: inline; }

/* ===== TYPOGRAPHY ===== */
.caveat { font-family: 'Caveat', cursive; }
h1 { font-family: 'Play', sans-serif; font-size: clamp(2.2rem, 5.5vw, 4.8rem); font-weight: 700; line-height: 1.12; }
h2 { font-family: 'Play', sans-serif; font-size: clamp(1.8rem, 3.5vw, 3rem); font-weight: 700; line-height: 1.2; }
h3 { font-family: 'Play', sans-serif; font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 700; }
h4 { font-family: 'Play', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 0.04em; }
p { line-height: 1.8; color: var(--stone); font-size: 0.98rem; }

.label {
  font-family: 'Play', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ===== UTILITIES ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 clamp(1.5rem, 5vw, 4rem); }
.section-pad { padding: clamp(5rem, 9vw, 8rem) 0; }
.text-center { text-align: center; }

.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: 'Play', sans-serif;
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 1rem 2.2rem;
  border: 2px solid var(--gold);
  color: var(--gold);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:hover { background: var(--gold); color: var(--charcoal); }
.btn-solid { background: var(--gold); color: var(--charcoal); border-color: var(--gold); }
.btn-solid:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn-white { border-color: rgba(255,255,255,0.5); color: white; }
.btn-white:hover { background: white; color: var(--charcoal); border-color: white; }
.btn-dark { border-color: var(--charcoal); color: var(--charcoal); }
.btn-dark:hover { background: var(--charcoal); color: var(--cream); }
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ===== NAVBAR ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000; height: var(--nav-height);
  display: flex; align-items: center;
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: rgba(253,250,244,0.97);
  box-shadow: 0 1px 24px rgba(0,0,0,0.09);
  backdrop-filter: blur(16px);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1300px; margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

.nav-logo {
  font-family: 'Caveat', cursive;
  font-size: 1.65rem; font-weight: 700;
  color: white; line-height: 1;
  transition: color var(--transition);
}
.nav-logo span { color: var(--gold); }
#navbar.scrolled .nav-logo { color: var(--charcoal); }

.nav-links { display: flex; align-items: center; gap: 1.8rem; list-style: none; }
.nav-links a {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.82);
  transition: color var(--transition);
  position: relative; padding-bottom: 3px;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 0; height: 2px; background: var(--gold);
  transition: width var(--transition);
}
.nav-links a:hover, .nav-links a.active-link { color: var(--gold); }
.nav-links a:hover::after, .nav-links a.active-link::after { width: 100%; }
#navbar.scrolled .nav-links a { color: var(--stone); }
#navbar.scrolled .nav-links a:hover { color: var(--gold); }

/* Language switcher with flags */
.lang-switcher { display: flex; align-items: center; gap: 0.4rem; }
.lang-btn {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.63rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.75);
  background: transparent; cursor: pointer;
  transition: all var(--transition);
  border-radius: 3px;
}
.flag { font-size: 0.95rem; line-height: 1; }
#navbar.scrolled .lang-btn { border-color: var(--stone-light); color: var(--stone); }
.lang-btn:hover, .lang-btn.active {
  background: var(--gold); border-color: var(--gold); color: var(--charcoal);
}

.nav-cta { display: none; }
@media (min-width: 1024px) { .nav-cta { display: flex; } }

/* Hamburger */
.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 26px; height: 2px;
  background: white; transition: all var(--transition);
  border-radius: 2px;
}
#navbar.scrolled .hamburger span { background: var(--charcoal); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
  background: var(--warm-white); z-index: 999;
  display: flex; flex-direction: column; padding: 2.5rem 2.5rem 3rem;
  transform: translateX(100%); transition: transform var(--transition);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-nav-links { list-style: none; }
.mobile-nav-links li { border-bottom: 1px solid var(--border); }
.mobile-nav-links a {
  display: block; padding: 1.1rem 0;
  font-family: 'Play', sans-serif; font-size: 1.4rem; font-weight: 700;
  color: var(--charcoal); transition: color var(--transition);
}
.mobile-nav-links a:hover { color: var(--gold); }
.mobile-lang { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2.5rem; }
.mobile-lang .lang-btn { border-color: var(--stone-light); color: var(--stone); }

@media (min-width: 1024px) {
  .hamburger { display: none; }
  .mobile-menu { display: none !important; }
}
@media (max-width: 1023px) { .nav-links { display: none; } }

/* ===== HERO – IMAGE SLIDER ===== */
#hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(4rem, 8vw, 7rem);
  overflow: hidden;
}

.hero-slides {
  position: absolute; inset: 0; z-index: 0;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.4s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide:nth-child(1) { background-image: url('../assets/images/hero/hero1.jpg'); }
.hero-slide:nth-child(2) { background-image: url('../assets/images/hero/hero2.jpg'); }
.hero-slide:nth-child(3) { background-image: url('../assets/images/hero/hero3.jpg'); }
.hero-slide:nth-child(4) { background-image: url('../assets/images/hero/hero4.jpg'); }

.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top,
    rgba(18,28,18,0.88) 0%,
    rgba(18,28,18,0.35) 50%,
    rgba(18,28,18,0.25) 100%);
}
.hero-overlay::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 70% at 30% 60%, rgba(43,74,46,0.3) 0%, transparent 65%);
}

.hero-content {
  position: relative; z-index: 10;
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 1rem;
  margin-bottom: 1.8rem;
  animation: fadeUp 0.9s 0.2s both;
}
.hero-eyebrow .label { color: var(--gold-light); font-size: 0.72rem; letter-spacing: 0.22em; }
.hero-divider { width: 40px; height: 2px; background: var(--gold); }

.hero-title {
  color: white; margin-bottom: 1.6rem;
  animation: fadeUp 0.9s 0.4s both;
  max-width: 860px;
}
.hero-title em { color: var(--gold-light); font-style: normal; }

.hero-sub {
  color: rgba(255,255,255,0.72); font-size: 1.05rem;
  max-width: 580px; margin-bottom: 2.8rem;
  animation: fadeUp 0.9s 0.6s both;
  line-height: 1.75;
}

.hero-ctas {
  display: flex; flex-wrap: wrap; gap: 1rem;
  animation: fadeUp 0.9s 0.8s both;
  margin-bottom: 4rem;
}

.hero-keyfacts {
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 2.5rem;
  animation: fadeUp 0.9s 1s both;
}
.kf-item {
  padding: 0 2.5rem 0 0;
  margin-right: 2.5rem;
  border-right: 1px solid rgba(255,255,255,0.1);
}
.kf-item:last-child { border-right: none; }
.kf-num {
  font-family: 'Play', sans-serif;
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700; color: white; line-height: 1;
  margin-bottom: 0.3rem;
}
.kf-num sup { font-size: 45%; vertical-align: super; }
.kf-label { font-size: 0.70rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.82); }

.scroll-arrow {
  position: absolute; bottom: 2rem; left: 50%;
  transform: translateX(-50%); z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-arrow svg { width: 24px; height: 24px; color: rgba(255,255,255,0.4); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

/* ===== ABOUT ===== */
#about { background: var(--warm-white); }
.about-layout {
  display: block; /* header spans full width */
}
.about-layout-header {
  margin-bottom: 2rem;
}
.about-layout-header .label { display: block; margin-bottom: 1rem; }
.about-layout-header h2 { color: var(--charcoal); margin-bottom: 0; }

.about-layout-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 7rem);
  align-items: start;
}
@media (max-width: 800px) {
  .about-layout-body { grid-template-columns: 1fr; }
}

.about-text .label { display: block; margin-bottom: 1rem; }
.about-text h2 { margin-bottom: 1.6rem; color: var(--charcoal); }
.about-text p { margin-bottom: 1.3rem; }
.about-text p:last-of-type { margin-bottom: 0; }

.about-highlight {
  background: var(--jungle);
  padding: 2rem 2.2rem;
  margin: 2.2rem 0;
  border-left: 4px solid var(--gold);
}
.about-highlight p {
  color: rgba(255,255,255,0.75); font-size: 1rem; margin: 0;
  font-style: italic; line-height: 1.7;
}

/* Lower row: full-width image with overlapping highlight box */
.about-lower-row {
  position: relative;
  padding-bottom: clamp(3rem, 8vw, 6rem); /* room for the overlapping box */
}
.about-highlight-overlap {
  position: absolute;
  bottom: 0;
  right: 0;
  width: clamp(280px, 38%, 480px);
  margin: 0;
  /* transform: translateY(25%); */
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
@media (max-width: 600px) {
  .about-highlight-overlap {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 1.5rem;
    box-shadow: none;
  }
  .about-lower-row { padding-bottom: 0; }
}

.about-keyfacts-list { list-style: none; margin: 2rem 0 2.5rem; }
.about-keyfacts-list li {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.92rem; color: var(--charcoal); font-weight: 400;
}
.about-keyfacts-list li:first-child { border-top: 1px solid var(--border); }
.about-kf-icon { color: var(--gold); flex-shrink: 0; margin-top: 1px; }
.about-kf-icon svg { width: 18px; height: 18px; }

.about-media { display: flex; flex-direction: column; gap: 1.5rem; }
.about-img-main {
  width: 100%; aspect-ratio: 16/10;
  object-fit: cover;
  background: url('../assets/images/haupthaus/Haupthaus-Terrassenansicht-am-Abend.jpg') center/cover;
  position: relative;
}
.about-img-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  padding: 1.5rem 1.2rem 0.8rem;
  font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.about-img-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
.about-img-s {
  aspect-ratio: 4/3; object-fit: cover;
}
.about-img-s:nth-child(1) { background: url('../assets/images/haupthaus/Haupthaus-Terrassenbereich-Eckansicht.jpg') center/cover; }
.about-img-s:nth-child(2) { background: url('../assets/images/haupthaus/Haupthaus-Wohnbereich-Blick-zur-Terrasse-und-Büro.jpg') center/cover; }

/* ===== DETAILS ===== */
#details { background: var(--jungle); }
.details-header { text-align: center; margin-bottom: 4.5rem; }
.details-header .label { color: var(--gold-light); display: block; margin-bottom: 1rem; }
.details-header h2 { color: var(--cream); }

/* Buildings grid */
.buildings-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem; margin-bottom: 4rem;
}
.building-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2.2rem 2rem;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}
.building-card:hover { background: rgba(200,168,75,0.08); border-color: var(--gold); transform: translateY(-3px); }
.building-icon { color: var(--gold); margin-bottom: 1.2rem; }
.building-icon svg { width: 32px; height: 32px; }
.building-name {
  font-family: 'Play', sans-serif; font-weight: 700;
  color: var(--cream); font-size: 1.1rem; margin-bottom: 1.2rem;
  padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.building-specs { list-style: none; }
.building-specs li {
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
  padding: 0.45rem 0; display: flex; align-items: center; gap: 0.6rem;
}
.building-specs li::before {
  content: ''; width: 4px; height: 4px;
  background: var(--gold); border-radius: 50%; flex-shrink: 0;
}

/* Amenities */
.amenities-section { margin-top: 1rem; }
.amenities-label { text-align: center; margin-bottom: 2.5rem; }
.amenities-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.2rem;
}
.amenity-card {
  border: 1px solid rgba(200,168,75,0.2);
  padding: 1.8rem 1.2rem; text-align: center;
  transition: all var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
}
.amenity-card:hover { border-color: var(--gold); background: rgba(200,168,75,0.07); }
.amenity-icon { color: var(--gold); }
.amenity-icon svg { width: 26px; height: 26px; }
.amenity-label-text { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.55); }

/* Details text block */
.details-prose {
  background: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.06);
  padding: clamp(2.5rem, 5vw, 4rem);
  margin-top: 4rem;
}
.details-prose p {
  color: rgba(255,255,255,0.6); margin-bottom: 1.2rem; font-size: 0.95rem;
}
.details-prose p:last-child { margin-bottom: 0; }
.details-prose p strong { color: var(--gold-light); font-weight: 700; }

/* ===== FLOOR PLANS ===== */
#floorplans { background: var(--cream); }
.fp-header { text-align: center; margin-bottom: 4rem; }
.fp-header .label { display: block; margin-bottom: 1rem; }
.fp-header h2 { color: var(--charcoal); }

.fp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 2rem; }
.fp-card {
  background: white; border: 1px solid var(--stone-light); padding: 2.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}
.fp-card:hover { box-shadow: 0 16px 48px rgba(0,0,0,0.1); transform: translateY(-4px); }
.fp-thumb {
  width: 100%; aspect-ratio: 4/3;
  background: var(--cream); margin-bottom: 1.8rem;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 4px; padding: 12px;
}
.fp-room {
  background: rgba(43,74,46,0.07);
  border: 1px solid rgba(43,74,46,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.48rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--stone); font-family: 'Play', sans-serif; text-align: center; padding: 4px;
}
.fp-room.wide { grid-column: 1 / -1; }
.fp-room.tall { grid-row: 1 / -1; }

.fp-building-name { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; font-weight: 700; }
.fp-title { font-family: 'Play', sans-serif; font-size: 1.4rem; font-weight: 700; color: var(--charcoal); margin-bottom: 0.5rem; }
.fp-size { font-size: 0.8rem; color: var(--stone); margin-bottom: 1.5rem; letter-spacing: 0.05em; }
.fp-rooms-row { display: flex; gap: 1.5rem; margin-bottom: 1.8rem; flex-wrap: wrap; }
.fp-stat strong { display: block; font-size: 1.3rem; font-family: 'Play', sans-serif; color: var(--charcoal); font-weight: 700; }
.fp-stat span { font-size: 0.72rem; color: var(--stone); letter-spacing: 0.05em; }
.fp-dl { width: 100%; justify-content: center; }

/* Video within floorplans section */
.video-section-inner { margin-top: 5rem; }
.video-wrap {
  position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;
  max-width: 1100px; margin: 0 auto;
  border: 1px solid var(--stone-light);
}
.video-wrap iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--jungle) 0%, #1a3020 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  cursor: pointer;
}
/* Dark overlay on top of the preview image for contrast */
.video-placeholder::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 0;
}
.video-placeholder > * { position: relative; z-index: 1; }
.play-btn {
  width: 88px; height: 88px; background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition), background var(--transition);
  box-shadow: 0 0 0 6px rgba(200,168,75,0.3), 0 4px 24px rgba(0,0,0,0.5);
}
.play-btn:hover { transform: scale(1.1); background: var(--gold-light); }
.play-btn svg { width: 32px; height: 32px; color: var(--charcoal); margin-left: 5px; }
.play-label {
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: white;
  text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  font-weight: 700;
}

/* ===== GALLERY ===== */
#gallery { background: var(--charcoal); }
.gallery-header { text-align: center; margin-bottom: 4rem; }
.gallery-header .label { color: var(--gold-light); display: block; margin-bottom: 1rem; }
.gallery-header h2 { color: var(--cream); }

.gallery-grid {
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px;
}
.g-item {
  overflow: hidden; cursor: pointer; position: relative;
  background: var(--charcoal);
  display: flex; flex-direction: column;
}
.g-item::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: calc(100% - 2.4rem);
  background: rgba(0,0,0,0.25); opacity: 0; transition: opacity var(--transition);
  pointer-events: none;
}
.g-item:hover::after { opacity: 1; }
.g-img {
  flex: 1; min-height: 0;
  background-size: cover; background-position: center;
  transition: transform 0.6s ease;
  display: block;
  width: 100%;
}
.g-item:hover .g-img { transform: scale(1.04); }
.g-item:hover::before {
  content: '⊕'; position: absolute; left: 0; right: 0;
  top: 0; bottom: 2.4rem;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 2rem; opacity: 0.8;
  pointer-events: none;
}

.g1  { grid-column: 1/7;  grid-row: 1; }
.g2  { grid-column: 7/13; grid-row: 1; }
.g3  { grid-column: 1/5;  grid-row: 2; }
.g4  { grid-column: 5/9;  grid-row: 2; }
.g5  { grid-column: 9/13; grid-row: 2; }
.g6  { grid-column: 1/5;  grid-row: 3; }
.g7  { grid-column: 5/13; grid-row: 3; }
.gh  { height: 300px; }

/* Tablet: 2-column layout */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3px;
  }
  /* Reset CSS class-based positions */
  .g1,.g2,.g3,.g4,.g5,.g6,.g7 { grid-column: auto; grid-row: auto; }
  /* Override inline grid-column/grid-row styles set by JS */
  .g-item[style] { grid-column: auto !important; grid-row: auto !important; }
  .gh { height: 200px; }
}

/* Mobile: single column, aspect-ratio based height */
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .g-item[style] { grid-column: auto !important; grid-row: auto !important; }
  .gh { height: auto; aspect-ratio: 4/3; }
  /* Make g-img fill aspect-ratio container */
  .g-img[style*="height:100%"] {
    height: auto !important;
    min-height: 180px;
    flex: 1;
  }
  /* Captions always visible on touch devices */
  .g-caption {
    color: rgba(255,255,255,0.85);
  }
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lb-close {
  position: absolute; top: 2rem; right: 2rem;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: white; width: 46px; height: 46px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  transition: background var(--transition);
}
.lb-close:hover { background: var(--gold); color: var(--charcoal); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: white; width: 50px; height: 50px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  transition: background var(--transition);
}
.lb-nav:hover { background: var(--gold); color: var(--charcoal); }
.lb-prev { left: 1.5rem; }
.lb-next { right: 1.5rem; }

/* ===== LOCATION ===== */
#location { background: var(--warm-white); }

/* Full-width header */
.loc-header { margin-bottom: 2.5rem; }
.loc-header .label { display: block; margin-bottom: 1rem; }
.loc-header h2 { color: var(--charcoal); margin-bottom: 0; }

/* Two-column body: text left, list right */
.loc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
@media (max-width: 800px) { .loc-body { grid-template-columns: 1fr; } }

.loc-text p { margin-bottom: 2rem; color: var(--stone); }

.loc-coords {
  display: inline-flex; align-items: center; gap: 0.6rem;
  background: var(--jungle); color: rgba(255,255,255,0.75);
  padding: 0.6rem 1rem; font-size: 0.72rem; letter-spacing: 0.1em;
  font-family: 'Play', sans-serif; margin-bottom: 2rem;
  border-left: 3px solid var(--gold);
}
.loc-coords svg { width: 13px; height: 13px; color: var(--gold); flex-shrink: 0; }

.loc-list { list-style: none; }
.loc-list li {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.loc-list li:first-child { border-top: 1px solid var(--border); }
.loc-dot { width: 8px; height: 8px; background: var(--gold); border-radius: 50%; flex-shrink: 0; }
.loc-dist {
  margin-left: auto;
  font-family: 'Play', sans-serif; font-size: 1.1rem; font-weight: 700;
  color: var(--jungle);
}

/* Full-width map */
.loc-map-full {
  position: relative; overflow: hidden;
  border: 1px solid var(--stone-light);
}
.loc-map-img-full {
  width: 100%; aspect-ratio: 21/8;
  background: url('../assets/images/panama-map.jpg') center/cover;
  display: block;
  filter: saturate(0.7) brightness(0.85);
}

/* Small interactive map pin */
.map-pin-link {
  position: absolute;
  top: 45%; left: 19%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; text-decoration: none;
}
.map-pin-link::after {
  content: 'Google Maps';
  font-size: 0.55rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: white;
  background: rgba(0,0,0,0.55);
  padding: 2px 6px;
  opacity: 0;
  transition: opacity var(--transition);
  white-space: nowrap;
  font-family: 'Play', sans-serif;
}
.map-pin-link:hover::after { opacity: 1; }
.map-pin-small {
  width: 24px; height: 24px;
  background: var(--gold);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}
.map-pin-small::after {
  content: ''; position: absolute;
  inset: 3px; background: white; border-radius: 50%;
}
.map-pin-link:hover .map-pin-small {
  transform: rotate(-45deg) scale(1.4);
  box-shadow: 0 4px 14px rgba(0,0,0,0.6);
}

.map-caption {
  position: absolute; bottom: 1rem; left: 1rem;
  background: rgba(253,250,244,0.95); padding: 0.5rem 1rem;
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; font-family: 'Play', sans-serif;
}
.map-caption span { color: var(--gold); }

/* ===== LOCATION SURROUNDINGS ===== */
.loc-surroundings {
  margin-top: clamp(3rem, 5vw, 4.5rem);
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 5vw, 3rem);
  background: var(--cream);
  border-left: 4px solid var(--gold);
}
.loc-surroundings-title {
  font-family: 'Play', sans-serif;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 1.8rem;
  line-height: 1.4;
}
.loc-surroundings-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 3rem;
  margin-bottom: 2rem;
}
@media (max-width: 640px) {
  .loc-surroundings-list { grid-template-columns: 1fr; }
}
.loc-surroundings-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--stone);
  line-height: 1.55;
}
.loc-surroundings-list li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.45em;
}
.loc-surroundings-tagline {
  font-size: 1rem;
  color: var(--charcoal);
  font-weight: 400;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 0.5rem;
  line-height: 1.7;
}
.loc-surroundings-tagline em {
  color: var(--jungle);
  font-style: normal;
  font-weight: 700;
}


/* ===== CONTACT ===== */
#contact { background: var(--jungle); }
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.5fr;
  gap: clamp(3rem, 6vw, 7rem);
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-info .label { color: var(--gold-light); display: block; margin-bottom: 1rem; }
.contact-info h2 { color: var(--cream); margin-bottom: 1.5rem; }
.contact-info p { color: rgba(255,255,255,0.6); margin-bottom: 2.5rem; font-size: 0.95rem; }

.contact-details-list { list-style: none; }
.contact-details-list li {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1.1rem 0; border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.65); font-size: 0.88rem;
}
.contact-details-list li:last-child { border-bottom: none; }
.contact-details-list svg { width: 18px; height: 18px; color: var(--gold); flex-shrink: 0; margin-top: 1px; }
.contact-details-list a { transition: color var(--transition); }
.contact-details-list a:hover { color: var(--gold); }

.contact-pickup {
  margin-top: 2rem; padding: 1.5rem 1.8rem;
  border: 1px solid rgba(200,168,75,0.25);
  border-left: 4px solid var(--gold);
  background: rgba(0,0,0,0.15);
}
.contact-pickup p { color: rgba(255,255,255,0.65); font-size: 0.88rem; margin: 0; }
.contact-pickup strong { color: var(--gold-light); display: block; margin-bottom: 0.4rem; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* Form */
.contact-form-box {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  padding: clamp(2rem, 5vw, 3.5rem);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
@media (max-width: 500px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1.3rem; }
.form-group label {
  display: block; font-size: 0.63rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 0.5rem;
  font-weight: 700;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.22);
  color: white; font-family: 'Play', sans-serif;
  font-size: 0.9rem; padding: 0.85rem 1rem;
  outline: none; transition: border-color var(--transition);
  -webkit-appearance: none; border-radius: 0;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.45); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); background: rgba(255,255,255,0.1); }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--jungle); color: white; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group label { display: block; font-size: 0.63rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.7); margin-bottom: 0.5rem; font-weight: 700; }
.form-group .optional-note { font-size: 0.6rem; color: rgba(255,255,255,0.4); margin-top: 0.3rem; letter-spacing: 0.08em; }
.form-submit { width: 100%; justify-content: center; margin-top: 0.5rem; }

.form-success {
  display: none; text-align: center; padding: 3rem 2rem;
}
.form-success svg { width: 48px; height: 48px; margin: 0 auto 1.5rem; }
.form-success p {
  color: var(--gold-light); font-family: 'Play', sans-serif;
  font-size: 1.1rem; font-weight: 700;
}

/* ===== FOOTER ===== */
footer {
  background: var(--charcoal); padding: 3rem 0;
  text-align: center; border-top: 1px solid rgba(255,255,255,0.05);
}
.footer-logo {
  font-family: 'Caveat', cursive; font-size: 1.8rem;
  font-weight: 700; color: var(--cream); margin-bottom: 0.5rem;
}
.footer-logo span { color: var(--gold); }
.footer-coords { font-size: 0.68rem; letter-spacing: 0.12em; color: rgba(255,255,255,0.65); margin-bottom: 0.5rem; }
.footer-copy { font-size: 0.68rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.55); }

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.rd1 { transition-delay: 0.1s; }
.rd2 { transition-delay: 0.2s; }
.rd3 { transition-delay: 0.3s; }
.rd4 { transition-delay: 0.4s; }

/* ===== MISC ===== */
@media (max-width: 600px) {
  .kf-item { padding-right: 1.5rem; margin-right: 1.5rem; }
  .hero-keyfacts { gap: 1rem; }
}

/* ===== MOBILE FIXES (≤ 480px / 360px) ===== */

/* Navbar: tighter padding and smaller logo on very small screens */
@media (max-width: 480px) {
  :root { --nav-height: 60px; }

  .nav-inner {
    padding: 0 1rem;
    gap: 0.5rem;
  }
  .nav-logo {
    font-size: 1.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
  }

  /* Hide flag emoji on very small screens to save space */
  /* flags kept visible — they help identify language quickly */

  /* Language switcher: collapse into a compact dropdown */
  .lang-switcher {
    position: relative;
  }
  /* Hide all lang buttons except the active one */
  .lang-switcher .lang-btn {
    display: none;
  }
  .lang-switcher .lang-btn.active {
    display: flex;
    padding: 0.25rem 0.5rem;
    font-size: 0.6rem;
    border-radius: 3px;
  }
  /* Dropdown arrow on active button */
  .lang-switcher .lang-btn.active::after {
    content: ' ▾';
    font-size: 0.6rem;
    margin-left: 1px;
  }
  /* Show all buttons when dropdown is open */
  .lang-switcher.open .lang-btn {
    display: flex;
  }
  .lang-switcher.open {
    position: absolute;
    right: 3rem;
    top: calc(var(--nav-height) / 2 - 14px);
    background: var(--charcoal);
    border: 1px solid var(--gold);
    border-radius: 4px;
    flex-direction: column;
    gap: 0;
    z-index: 1100;
    padding: 0.3rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  }
  .lang-switcher.open .lang-btn {
    border: none;
    border-radius: 2px;
    width: 100%;
    justify-content: center;
    padding: 0.4rem 0.8rem;
  }
  .lang-switcher.open .lang-btn.active::after {
    display: none;
  }

  /* Hamburger: always visible, never pushed off screen */
  .hamburger {
    flex-shrink: 0;
    margin-left: auto;
  }

  /* Hero: push content up ~20% by increasing bottom padding (flex-end means more pb = higher content) */
  #hero {
    align-items: flex-end;
    padding-top: 0;
    padding-bottom: 100px;
  }
  .hero-content {
    padding: 0 1rem;
    padding-top: 0;
  }
  .hero-eyebrow { margin-bottom: 1rem; }
  .hero-title { margin-bottom: 1rem; font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .hero-sub { font-size: 0.9rem; margin-bottom: 1.5rem; }
  .hero-ctas { gap: 0.6rem; margin-bottom: 2rem; }
  .hero-ctas .btn { padding: 0.75rem 1.2rem; font-size: 0.65rem; }
  .hero-keyfacts {
    padding-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem 0;
  }
  .kf-item {
    padding-right: 1rem;
    margin-right: 1rem;
  }
  .kf-num { font-size: 1.6rem; }
  .kf-label { font-size: 0.55rem; }
}
/* ===== GALLERY TABS ===== */
.gallery-tabs {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin-top: 2.5rem; margin-bottom: 0;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  max-width: 1180px; margin-left: auto; margin-right: auto;
}
.g-tab {
  font-family: 'Play', sans-serif;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.75rem 1.8rem;
  border: 2px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.45);
  background: transparent; cursor: pointer;
  transition: all var(--transition);
}
.g-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.g-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--charcoal);
}

/* ===== GALLERY PANELS ===== */
.gallery-panel {
  display: none;
  margin-top: 1.5rem;
}
.gallery-panel.active { display: block; }

/* ===== GALLERY CAPTIONS ===== */
.g-caption {
  display: block;
  flex-shrink: 0;
  height: 2.4rem;
  line-height: 2.4rem;
  padding: 0 0.9rem;
  background: var(--charcoal);
  color: rgba(255,255,255,0.65);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Play', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid rgba(200,168,75,0.18);
  transition: color var(--transition), background var(--transition);
  z-index: 3;
}
.g-item:hover .g-caption {
  background: rgba(200,168,75,0.12);
  color: var(--gold-light);
}

/* ===== LIGHTBOX CAPTION ===== */
#lb-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.75);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: 'Play', sans-serif;
  white-space: normal;
  text-align: center;
  line-height: 1.6;
  pointer-events: none;
  max-width: min(90vw, 480px);
  padding: 0.4rem 0.8rem;
  background: rgba(0,0,0,0.45);
  border-radius: 2px;
}
@media (max-width: 480px) {
  #lb-caption {
    font-size: 0.62rem;
    bottom: 1rem;
    letter-spacing: 0.08em;
  }
}
