/* Lamas, Peru - Tourism Website Styles */
:root {
  --color-earth: #2d5016;
  --color-forest: #3d6b1e;
  --color-warm: #c47b2d;
  --color-gold: #d4a84b;
  --color-cream: #f5f0e6;
  --color-white: #ffffff;
  --color-text: #2c2c2c;
  --color-text-muted: #5a5a5a;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-cream);
  background-image: linear-gradient(
    to right,
    rgba(1, 0, 38, 0.4) 0%,
    rgba(1, 0, 38, 0.4) 33.33%,
    rgba(255, 255, 96, 0.4) 33.33%,
    rgba(255, 255, 96, 0.4) 66.66%,
    rgba(250, 0, 0, 0.4) 66.66%,
    rgba(250, 0, 0, 0.4) 100%
  );
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header & Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: transparent;
  background-image: linear-gradient(
    to right,
    rgba(1, 0, 38, 0.4) 0%,
    rgba(1, 0, 38, 0.4) 33.33%,
    rgba(255, 255, 96, 0.4) 33.33%,
    rgba(255, 255, 96, 0.4) 66.66%,
    rgba(250, 0, 0, 0.4) 66.66%,
    rgba(250, 0, 0, 0.4) 100%
  );
  box-shadow: var(--shadow);
  transition: background 0.3s ease;
}

.header-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 0.5rem 1rem;
}

.header-inner .logo {
  grid-column: 1 / -1;
  grid-row: 1;
  justify-self: center;
}

.header-inner nav {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  position: relative;
}

.header-inner .nav-toggle {
  grid-column: 1;
  grid-row: 2;
}

/* Language toggle in top-right so logo can be centered across full width */
.header-inner .lang-toggle {
  position: absolute;
  top: 0.75rem;
  right: 1.5rem;
  grid-column: auto;
  grid-row: auto;
}

/* Mobile-only title (hidden on desktop) */
.site-title-mobile {
  display: none;
}

.logo {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-earth);
  text-decoration: none;
}

/* Desktop: Menu button + dropdown */
.nav-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-earth);
  background: rgba(245, 240, 230, 0.5);
  border: 2px solid var(--color-gold);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-menu-btn:hover {
  background: var(--color-gold);
  color: var(--color-white);
  border-color: var(--color-gold);
}

.nav-menu-btn__chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.nav-with-dropdown.is-open .nav-menu-btn__chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  min-width: 320px;
  max-width: 420px;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 12px 40px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.06);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 100;
  margin-top: 4px;
}

.nav-with-dropdown.is-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-dropdown .nav-links a {
  display: block;
  padding: 0.5rem 0.6rem;
  font-size: 0.9rem;
  border-radius: 6px;
}

.nav-links {
  list-style: none;
}

.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
  color: var(--color-forest);
  background: rgba(45, 80, 22, 0.08);
}

.lang-toggle {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 5rem;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-earth);
  background: var(--color-cream);
  border: 2px solid var(--color-earth);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.lang-toggle:hover {
  color: var(--color-earth);
  background: rgba(45, 80, 22, 0.08);
}

/* Inverted when English is active (toggled) */
body.lang-en .lang-toggle {
  color: var(--color-cream);
  background: var(--color-earth);
  border-color: var(--color-earth);
}

body.lang-en .lang-toggle:hover {
  background: var(--color-forest);
  border-color: var(--color-forest);
  color: var(--color-cream);
}

/* Gallery banner (index page) – scrolling images, height 407px */
.gallery-banner {
  height: 407px;
  margin-top: 8rem;
  overflow: hidden;
  background: #1a1a1a;
}

/* Desktop: clear fixed two-row header so banner/hero are not covered */
@media (min-width: 769px) {
  .gallery-banner {
    margin-top: 14rem;
  }
  .page-hero {
    margin-top: 14rem;
  }
}

.gallery-banner__track {
  display: flex;
  width: max-content;
  height: 100%;
  animation: gallery-banner-scroll 90s linear infinite;
}

.gallery-banner__strip {
  display: flex;
  flex-shrink: 0;
  height: 100%;
  gap: 0;
}

.gallery-banner img {
  height: 407px;
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: center;
  display: block;
  flex-shrink: 0;
  background: #1a1a1a;
}

@keyframes gallery-banner-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Welcome block below gallery (index page) */
.welcome-block {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}

.welcome-block__title {
  font-family: var(--font-heading);
  color: var(--color-earth);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 0.5rem;
  padding-bottom: 0;
  border: none;
}

.welcome-block__tagline {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Hero / Home */
.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  margin-top: 8rem;
  overflow: hidden;
}

/* Single centered hero image (index page) */
.hero--single .hero__image-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a1a;
}

.hero--single .hero__image-wrap img {
  max-width: 610px;
  max-height: 407px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* Multi-image hero gallery (if used elsewhere) */
.hero-gallery {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 4px;
}

.hero-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-gallery .span-2 {
  grid-column: span 2;
}

.hero-gallery .span-row-2 {
  grid-row: span 2;
}

.hero-overlay {
  position: relative;
  z-index: 2;
  background: linear-gradient(transparent 0%, rgba(0,0,0,0.75) 100%);
  color: var(--color-white);
  padding: 4rem 1.5rem 3rem;
}

.hero-overlay h1 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.hero-overlay .tagline {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 600px;
}

/* Content sections (shared) */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.page-content h1 {
  font-family: var(--font-heading);
  color: var(--color-earth);
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--color-gold);
  text-align: center;
}

.page-content h2 {
  font-family: var(--font-heading);
  color: var(--color-forest);
  font-size: 1.5rem;
  margin: 2rem 0 0.75rem;
}

.page-content h3 {
  font-family: var(--font-body);
  color: var(--color-earth);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.25rem 0 0.35rem;
}

.page-content ul,
.page-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

.page-content li {
  margin-bottom: 0.35rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--color-text);
}

.history-timeline {
  background: rgba(45, 80, 22, 0.06);
  border-left: 4px solid var(--color-gold);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.history-timeline ul {
  margin: 0 0 0 1rem;
  list-style: none;
}

.history-timeline li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
}

.history-timeline li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-gold);
  font-weight: 700;
}

.directions-note {
  background: rgba(45, 80, 22, 0.06);
  border-left: 4px solid var(--color-gold);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.directions-note strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--color-earth);
}

.page-content .intro-block {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

/* Interior page hero */
.page-hero {
  height: 45vh;
  min-height: 280px;
  position: relative;
  margin-top: 8rem;
  overflow: hidden;
  background: #1a1a1a;
}

.page-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.page-hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.7) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem 1.5rem;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-heading);
  color: var(--color-white);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  border: none;
  padding: 0;
  margin: 0;
  text-align: center;
  width: 100%;
}

.page-hero--short {
  height: 28vh;
  min-height: 180px;
}

.photo-rotator-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-earth) 100%);
}

/* Photo rotator / slideshow */
.photo-rotator {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #1a1a1a;
}

.photo-rotator__track {
  position: relative;
  width: 100%;
  height: 70vh;
  max-height: 600px;
  min-height: 320px;
  overflow: hidden;
  background: #1a1a1a;
}

.photo-slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}

.photo-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.photo-slide img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #1a1a1a;
}

.photo-rotator__prev,
.photo-rotator__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--color-earth);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
  z-index: 2;
}

.photo-rotator__prev:hover,
.photo-rotator__next:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

.photo-rotator__prev {
  left: 1rem;
}

.photo-rotator__next {
  right: 1rem;
}

.photo-rotator__prev svg,
.photo-rotator__next svg {
  width: 24px;
  height: 24px;
}

.photo-rotator__dots {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0 3rem;
  z-index: 2;
}

.photo-rotator__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: background 0.2s;
}

.photo-rotator__dots button:hover {
  background: rgba(255,255,255,0.8);
}

.photo-rotator__dots button.active {
  background: var(--color-white);
  transform: scale(1.2);
}

.page-content--photos .intro-block {
  margin-bottom: 1.5rem;
}

/* Cards / grid for listings */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card-image {
  height: 160px;
  background: var(--color-forest);
  background-size: cover;
  background-position: center;
}

.card-body {
  padding: 1.25rem;
}

.card-body h3 {
  font-family: var(--font-heading);
  color: var(--color-earth);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.card-body p {
  font-size: 0.95rem;
  margin: 0;
  color: var(--color-text-muted);
}

/* Restaurant directory listings */
.restaurant-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.restaurant-entry {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 1.25rem 0;
}

.restaurant-entry:first-child {
  padding-top: 0;
}

.restaurant-entry h3 {
  font-family: var(--font-heading);
  color: var(--color-earth);
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}

.restaurant-entry .restaurant-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.restaurant-entry .restaurant-meta a {
  color: var(--color-forest);
  font-weight: 500;
}

.restaurant-entry .restaurant-desc {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

/* Message board (tablón) */
.page-content--tablon {
  max-width: 720px;
}

.tablon-form {
  background: rgba(0,0,0,0.03);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.tablon-form__row {
  margin-bottom: 1rem;
}

.tablon-form__label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-earth);
  margin-bottom: 0.35rem;
}

.tablon-form__input,
.tablon-form__textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 6px;
  background: var(--color-white);
}

.tablon-form__textarea {
  resize: vertical;
  min-height: 100px;
}

.tablon-form__input:focus,
.tablon-form__textarea:focus {
  outline: none;
  border-color: var(--color-forest);
  box-shadow: 0 0 0 2px rgba(45, 80, 22, 0.15);
}

.tablon-form__submit {
  margin-top: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  background: var(--color-forest);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.tablon-form__submit:hover {
  background: var(--color-earth);
}

.tablon-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tablon-post {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--color-white);
}

.tablon-post__header {
  margin-bottom: 0.75rem;
}

.tablon-post__subject {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-earth);
  margin: 0 0 0.35rem;
}

.tablon-post__meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

.tablon-post__body {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--color-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.tablon-post__body br {
  white-space: normal;
}

.tablon-replies {
  margin-top: 1rem;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tablon-post--reply {
  margin-left: 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--color-gold);
  background: rgba(0,0,0,0.02);
}

.tablon-post--reply .tablon-post__subject {
  font-size: 1rem;
}

.tablon-post--reply .tablon-post__meta,
.tablon-post--reply .tablon-post__body {
  font-size: 0.9rem;
}

.tablon-reply-btn {
  margin-top: 0.75rem;
  padding: 0.4rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-forest);
  background: transparent;
  border: 1px solid var(--color-gold);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.tablon-reply-btn:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

.tablon-reply-form {
  margin-top: 0.75rem;
  padding: 1rem;
  background: rgba(0,0,0,0.03);
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,0.06);
}

.tablon-reply-form .tablon-form__row {
  margin-bottom: 0.75rem;
}

.tablon-reply-form .tablon-form__submit {
  margin-top: 0.25rem;
}

.tablon-empty {
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Footer */
.site-footer {
  background: var(--color-earth);
  color: var(--color-cream);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Utility: hide by language */
[data-lang="en"] { display: none; }
[data-lang="es"] { display: inline; }
body.lang-en [data-lang="es"] { display: none; }
body.lang-en [data-lang="en"] { display: inline; }

/* Block-level language content */
[data-lang="en"].block { display: none; }
[data-lang="es"].block { display: block; }
body.lang-en [data-lang="es"].block { display: none; }
body.lang-en [data-lang="en"].block { display: block; }

/* Mobile: hamburger button (hidden on desktop) */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--color-cream);
  border: 2px solid var(--color-gold);
  border-radius: 8px;
  cursor: pointer;
  color: var(--color-earth);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover {
  background: var(--color-gold);
  color: var(--color-white);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-close {
  display: block;
}

.nav-toggle .nav-toggle-close {
  display: none;
}

/* Responsive: tablet and below */
@media (max-width: 768px) {
  .gallery-banner {
    height: 280px;
    margin-top: 0;
  }

  .gallery-banner img {
    height: 280px;
    object-fit: contain;
    object-position: center;
  }

  .welcome-block {
    padding: 1.5rem 1rem 1rem;
  }

  .hero-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
  }
  .hero-gallery .span-2,
  .hero-gallery .span-row-2 {
    grid-column: auto;
    grid-row: auto;
  }

  .hero {
    min-height: 70vh;
    margin-top: 0;
  }

  .hero-overlay {
    padding: 2rem 1rem 2rem;
  }

  .hero-overlay h1 {
    font-size: clamp(1.5rem, 6vw, 2.25rem);
  }

  .hero-overlay .tagline {
    font-size: 0.95rem;
  }

  .page-hero {
    height: 35vh;
    min-height: 220px;
    margin-top: 0;
  }

  .page-hero .overlay {
    padding: 1.25rem 1rem;
  }

  .page-hero h1 {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }

  .page-content {
    padding: 1.75rem 1rem 2.5rem;
  }

  .page-content h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  .page-content h2 {
    font-size: 1.35rem;
    margin: 1.5rem 0 0.5rem;
  }

  .page-content h3 {
    font-size: 1.05rem;
  }

  .page-content .intro-block {
    font-size: 1rem;
  }

  .history-timeline,
  .directions-note {
    padding: 1rem 1rem;
    margin: 1.5rem 0;
  }

  .site-footer {
    padding: 1.5rem 1rem;
    margin-top: 2rem;
  }

  .site-footer p {
    font-size: 0.9rem;
  }
}

/* Mobile: hamburger nav */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-menu-btn {
    display: none;
  }

  .nav-dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    border: none;
    padding: 0;
    min-width: 0;
    max-width: none;
    background: rgba(255, 255, 255, 0.7);
    margin-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  .nav-dropdown .nav-links {
    display: none;
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Mobile header: single compact row, fixed height so content can clear it */
  .site-header {
    min-height: 56px;
    height: 56px;
    max-height: 56px;
  }

  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: 56px;
    align-items: center;
    padding: 0 1rem;
    gap: 0.5rem;
    min-height: 56px;
    height: 56px;
    max-height: 56px;
    box-sizing: border-box;
  }

  .header-inner .logo {
    display: none;
  }

  .header-inner .nav-toggle {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }

  .header-inner .lang-toggle {
    position: static;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    top: auto;
    right: auto;
    min-height: 44px;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    -webkit-tap-highlight-color: transparent;
  }

  .header-inner nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    grid-column: 1 / -1;
    grid-row: none;
    width: 100%;
    z-index: 10;
  }

  /* Reserve space for fixed header so title and content are never covered */
  body {
    padding-top: 56px;
  }

  /* Title below header on mobile – no extra margin; body padding-top clears header */
  .site-title-mobile {
    display: block;
    text-align: center;
    padding: 1rem 1rem 0.75rem;
    margin-top: 0;
    background: rgba(255,255,255,0.98);
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }

  .site-title-mobile .logo {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-earth);
    text-decoration: none;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease;
  }

  body.nav-open .nav-links {
    display: flex;
    max-height: 80vh;
    opacity: 1;
    overflow-y: auto;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .header-inner {
    padding: 0.5rem 0.75rem;
  }

  .page-content {
    padding: 1.25rem 0.75rem 2rem;
  }

  .page-content ul,
  .page-content ol {
    margin-left: 1rem;
    padding-left: 0.25rem;
  }

  .history-timeline ul,
  .directions-note {
    padding-left: 1rem;
  }
}

/* Safe area for notched devices */
@supports (padding: env(safe-area-inset-top)) {
  .site-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .header-inner {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }

  @media (max-width: 768px) {
    .page-content {
      padding-left: max(0.75rem, env(safe-area-inset-left));
      padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    .site-footer {
      padding-left: max(1rem, env(safe-area-inset-left));
      padding-right: max(1rem, env(safe-area-inset-right));
    }
  }
}
