/* ==========================================================================
   AMNATOS.GR — Official Village Portal Design System (v1.5.7)
   Dual Persona: Global Traveler Guide & Local Resident Single Point of Truth
   Aesthetic: Venetian Classical & Cretan Earth (Sandstone, Olive, Aegean Navy)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=GFS+Didot&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --color-sandstone-gold: #D4A373;
  --color-sandstone-light: #F7F4EF;
  --color-sandstone-muted: #E2D9CC;
  --color-sandstone-dark: #8C653B;
  
  --color-olive: #3A5A40;
  --color-olive-dark: #283618;
  --color-olive-light: #588157;
  
  --color-navy: #1D3557;
  --color-navy-dark: #0B192C;
  --color-navy-light: #457B9D;
  
  --color-terracotta: #A64B2A;
  --color-terracotta-light: #E07A5F;
  --color-gold: #DDA15E;
  
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-surface-translucent: rgba(255, 255, 255, 0.90);
  --color-text-main: #242426;
  --color-text-muted: #646870;
  --color-border: #E8E2D8;
  
  /* Typography */
  --font-serif: Georgia, 'GFS Didot', 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(29, 53, 87, 0.05);
  --shadow-md: 0 8px 24px rgba(29, 53, 87, 0.08);
  --shadow-lg: 0 16px 40px rgba(29, 53, 87, 0.12);
  --shadow-gold: 0 8px 30px rgba(212, 163, 115, 0.25);
  
  --container-max: 1240px;
  --header-height: 80px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 100px;
  scroll-behavior: smooth;
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

html, body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100vw;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Glassmorphism Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background: rgba(250, 248, 245, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(232, 226, 216, 0.85);
  z-index: 1000;
  transition: var(--transition-smooth);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  height: 70px;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand-logo {
  flex-shrink: 0;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-olive) 0%, var(--color-navy) 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-sandstone-gold);
  box-shadow: 0 4px 12px rgba(40, 54, 24, 0.2);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-navy);
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-sandstone-dark);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  white-space: nowrap;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text-main);
  transition: var(--transition-smooth);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-sandstone-gold);
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-olive);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* Persona Switcher Pill */
.persona-switcher {
  display: flex;
  background: var(--color-sandstone-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 3px;
}

.persona-btn {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.persona-btn.active {
  background: var(--color-olive);
  color: #FFF;
  box-shadow: var(--shadow-sm);
}

/* Language Toggle Pill — Reference Match to index.html */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: rgba(232, 226, 216, 0.55);
  border: 1px solid rgba(212, 163, 115, 0.35);
  padding: 3px;
  border-radius: var(--radius-full);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-navy);
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.lang-btn:hover:not(.active) {
  background: rgba(212, 163, 115, 0.18);
}

.lang-btn.active {
  background: var(--color-navy);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(29, 53, 87, 0.28);
}

.flag-icon {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  display: inline-block;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  position: relative;
  min-height: 88vh;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 70px;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at 85% 15%, rgba(212, 163, 115, 0.16) 0%, transparent 50%),
              radial-gradient(circle at 15% 85%, rgba(58, 90, 64, 0.14) 0%, transparent 50%),
              var(--color-bg);
  overflow: hidden;
}

.hero-live-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  margin-bottom: 24px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-navy-dark) 0%, #1d3557 100%);
  border: 1px solid rgba(212, 163, 115, 0.45);
  box-shadow: 0 6px 20px rgba(15, 29, 47, 0.12);
  color: #FFF;
  text-decoration: none;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.hero-live-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 29, 47, 0.2);
  border-color: var(--color-sandstone-gold);
}

.hero-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(188, 71, 73, 0.24);
  border: 1px solid rgba(230, 57, 70, 0.55);
  color: #FFD166;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #FF4D4D;
  box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7);
  animation: livePulseDot 2s infinite;
}

@keyframes livePulseDot {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(255, 77, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 77, 0); }
}

.hero-live-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-live-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--color-sandstone-gold);
  background: rgba(212, 163, 115, 0.14);
  border: 1px solid rgba(212, 163, 115, 0.35);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-live-banner:hover .hero-live-cta {
  background: var(--color-sandstone-gold);
  color: var(--color-navy-dark);
}

@media (max-width: 768px) {
  .hero-live-banner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    row-gap: 8px;
    column-gap: 8px;
    border-radius: 16px;
    padding: 10px 14px;
    margin-bottom: 20px;
  }
  .hero-live-pill {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    font-size: 0.7rem;
    padding: 3px 9px;
  }
  .hero-live-cta {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    margin-left: 0;
    font-size: 0.74rem;
    padding: 4px 10px;
  }
  .hero-live-text {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: none;
    width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 0.84rem;
    line-height: 1.38;
    text-align: center;
    padding-top: 6px;
    border-top: 1px solid rgba(212, 163, 115, 0.2);
  }
}

@media (max-width: 375px) {
  .hero-live-banner {
    padding: 9px 11px;
    column-gap: 6px;
  }
  .hero-live-pill {
    font-size: 0.65rem;
    padding: 3px 8px;
  }
  .hero-live-cta {
    font-size: 0.69rem;
    padding: 3px 8px;
  }
  .hero-live-text {
    font-size: 0.8rem;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(58, 90, 64, 0.1);
  color: var(--color-olive);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  border: 1px solid rgba(58, 90, 64, 0.2);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.12;
  color: var(--color-navy-dark);
  margin-bottom: 18px;
}

.hero-title span {
  background: linear-gradient(135deg, var(--color-olive) 0%, var(--color-sandstone-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-motto-box {
  background: var(--color-surface);
  border-left: 4px solid var(--color-sandstone-gold);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.latin-motto {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-sandstone-dark);
}

.latin-trans {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.hero-description {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: 28px;
  max-width: 580px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  font-size: 0.92rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: var(--transition-smooth);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-olive) 100%);
  color: #FFF;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(29, 53, 87, 0.25);
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-navy);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-sandstone-light);
  border-color: var(--color-sandstone-gold);
  transform: translateY(-2px);
}

/* Portal Card */
.portal-card {
  position: relative;
  background: linear-gradient(160deg, #FFFFFF 0%, var(--color-sandstone-light) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

/* Quick Tasks Grid */
.quick-tasks-container {
  margin-top: -36px;
  position: relative;
  z-index: 10;
  margin-bottom: 48px;
}

.quick-tasks-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.quick-task-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  text-decoration: none;
}

.quick-task-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-sandstone-gold);
  box-shadow: var(--shadow-lg);
}

.qt-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--color-sandstone-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.qt-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.2;
}

.qt-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Stats Ribbon */
.stats-ribbon {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 60px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--color-sandstone-light);
  color: var(--color-sandstone-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.stat-val {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  line-height: 1.2;
}

.stat-lbl {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

/* ==========================================================================
   Sections Common
   ========================================================================== */
.section {
  padding: 80px 0;
}

.section-alt {
  background-color: #F4EFEA;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.section-subtitle {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-olive);
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-lead {
  font-size: 1rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Cards & Grids
   ========================================================================== */
.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 36px;
}

.tab-btn {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
}

.tab-btn.active, .tab-btn:hover {
  background: var(--color-olive);
  color: #FFF;
  border-color: var(--color-olive);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.landmark-card, .stay-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.landmark-card:hover, .stay-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-sandstone-gold);
}

.card-media {
  position: relative;
  height: 200px;
  background: var(--color-sandstone-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: linear-gradient(135deg, rgba(212, 163, 115, 0.35) 0%, rgba(58, 90, 64, 0.25) 100%);
}

.card-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(29, 53, 87, 0.9);
  backdrop-filter: blur(8px);
  color: #FFF;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.card-text {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-border);
  padding-top: 14px;
}

.card-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-sandstone-dark);
}

.card-action {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-olive);
}

/* ==========================================================================
   Museums Feature
   ========================================================================== */
.museums-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}

.museum-feature-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  }
  
  .museum-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(29, 53, 87, 0.12);
    border-color: rgba(212, 163, 115, 0.5);
  }

.museum-badge {
  display: inline-block;
  background: var(--color-sandstone-light);
  color: var(--color-sandstone-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.museum-title {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
  line-height: 1.25;
}

.museum-phones {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.phone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #E8F5E9;
  color: #2E7D32;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.museum-highlights {
  list-style: none;
  margin: 20px 0 28px;
}

.museum-highlights li {
  font-size: 0.88rem;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed var(--color-border);
}

/* ==========================================================================
   Stay & Eat Features
   ========================================================================== */
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-sandstone-light);
  color: var(--color-navy);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Resident & Community Services
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 36px;
  margin-bottom: 48px;
}

.service-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.doctor-box {
  background: #E8F5E9;
  border: 1px solid #C8E6C9;
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 16px 0;
}

.contacts-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.contact-item {
  background: var(--color-sandstone-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-icon {
  font-size: 1.3rem;
}

.contact-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-navy);
}

.contact-val {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Events Calendar Cards */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.event-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  border-left: 4px solid var(--color-olive);
}

.event-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-terracotta);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.event-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.event-desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Timeline & Demographics
   ========================================================================== */
.timeline-container {
  position: relative;
  max-width: 860px;
  margin: 0 auto 48px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--color-sandstone-gold);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 40px;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 40px;
}

.timeline-dot {
  position: absolute;
  top: 0;
  width: 18px;
  height: 18px;
  background: var(--color-surface);
  border: 4px solid var(--color-olive);
  border-radius: 50%;
  z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot { right: -9px; }
.timeline-item:nth-child(even) .timeline-dot { left: -9px; }

.timeline-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.timeline-era {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-terracotta);
}

.timeline-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 4px 0 6px;
}

.timeline-text {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}

.heroine-box {
  background: linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-olive-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 40px;
  color: #FFF;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 36px;
  align-items: center;
}

.heroine-avatar {
  height: 200px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: var(--color-sandstone-gold);
  border: 2px solid rgba(212, 163, 115, 0.3);
}

.census-table-wrapper {
  overflow-x: auto;
  margin-top: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.census-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.census-table th, .census-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}

.census-table th {
  background: var(--color-sandstone-light);
  color: var(--color-navy);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
}

/* ==========================================================================
   Manifesto Banner & Modal
   ========================================================================== */
.manifesto-banner {
  background: var(--color-sandstone-light);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 24px 0;
  text-align: center;
}

.manifesto-quote {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--color-navy);
  max-width: 900px;
  margin: 0 auto;
  line-height: 1.6;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 25, 44, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  padding: 20px;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--color-surface);
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 1.6rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

/* Footer */
.site-footer {
  background: var(--color-navy-dark);
  color: #FFF;
  padding: 56px 0 28px;
  border-top: 4px solid var(--color-sandstone-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 36px;
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  color: var(--color-sandstone-gold);
  margin: 0 0 8px 0;
  font-weight: 700;
}

.footer-col-main .footer-title {
  margin-top: 14px;
}

.footer-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
  margin: 0;
  max-width: 540px;
}

.footer-contact-desc {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  margin: 0 0 10px 0;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.footer-email:hover {
  color: var(--color-sandstone-gold);
}

.footer-phone-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 4px;
}

.footer-phone-list p {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  line-height: 1.5;
}

.footer-phone-list a:hover {
  color: var(--color-sandstone-gold) !important;
}

.footer-grid-legacy-unused {
  gap: 40px;
  margin-bottom: 48px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .quick-tasks-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-ribbon { grid-template-columns: repeat(2, 1fr); }
  .museums-grid, .services-grid { grid-template-columns: 1fr; }
  .heroine-box { grid-template-columns: 1fr; text-align: center; }
  .heroine-avatar { margin: 0 auto; }
}

@media (max-width: 768px) {
  .brand-tagline { display: none; }
  .nav-actions { flex-shrink: 0; }
  .lang-btn { padding: 5px 8px; gap: 4px; font-size: 0.78rem; }
  .nav-menu { display: none; }
  .hero-title { font-size: 2.4rem; }
  .quick-tasks-grid { grid-template-columns: 1fr; }
  .stats-ribbon { grid-template-columns: 1fr; }
  .contacts-list { grid-template-columns: 1fr; }
  .timeline-container::before { left: 20px; }
  .timeline-item { width: 100%; left: 0 !important; padding-left: 50px !important; padding-right: 0 !important; text-align: left !important; }
  .timeline-item .timeline-dot { left: 11px !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}


/* Anchor scroll margins for perfect fixed-header clearance */
section[id], #section-telemetry, .museum-section, .section {
  scroll-margin-top: 75px;
}

/* Smart Auto-hiding header */
.site-header {
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease !important;
}
.site-header.nav-hidden {
  transform: translateY(-100%);
}


/* ==========================================================================
   Space Cards Multi-Image Slideshow Carousel
   ========================================================================== */
.space-img-wrap.space-carousel {
  position: relative;
  height: 250px;
  background: #0b1320;
  overflow: hidden;
  cursor: pointer;
}

.space-carousel .space-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  pointer-events: none;
}

.space-carousel .space-slide.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
}

.space-carousel .space-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.space-card:hover .space-carousel .space-slide.active img {
  transform: scale(1.05);
}

.space-carousel-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  z-index: 6;
  background: rgba(11, 19, 32, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  pointer-events: auto;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: scale(1.2);
}

.carousel-dot.active {
  width: 22px;
  border-radius: 10px;
  background: var(--color-terracotta, #D4A373);
  box-shadow: 0 0 8px rgba(212, 163, 115, 0.8);
}

.space-carousel-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(11, 19, 32, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #FAF8F5;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 12px;
  z-index: 6;
  border: 1px solid rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

/* Lightbox Modal Carousel & Caption Box */
.lightbox-body {
  position: relative;
  padding: 16px 20px;
  overflow-y: auto;
  text-align: center;
  background: #0b1320;
}

/* Lightbox Stage & Navigation Buttons */
.lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.lightbox-img-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  touch-action: pan-y;
  cursor: grab;
}

.lightbox-nav-btn {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background: rgba(15, 29, 47, 0.5) !important;
  border: 1.5px solid rgba(212, 163, 115, 0.45) !important;
  color: rgba(250, 248, 245, 0.75) !important;
  opacity: 0.35 !important;
  font-size: 24px !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 50 !important;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35) !important;
  user-select: none !important;
  padding: 0 !important;
}

/* Subtly illuminate when mouse approaches the image stage */
.lightbox-stage:hover .lightbox-nav-btn {
  opacity: 0.75 !important;
  border-color: rgba(212, 163, 115, 0.85) !important;
  color: #FAF8F5 !important;
}

/* Fully opaque with glowing gold background when hovering directly on the button */
.lightbox-nav-btn:hover {
  opacity: 1 !important;
  background: #D4A373 !important;
  color: #0B1320 !important;
  border-color: #FFFFFF !important;
  transform: translateY(-50%) scale(1.12) !important;
  box-shadow: 0 6px 24px rgba(212, 163, 115, 0.6) !important;
}

.lightbox-nav-btn:active {
  transform: translateY(-50%) scale(0.95) !important;
}

.lightbox-nav-btn.prev {
  left: 14px !important;
}

.lightbox-nav-btn.next {
  right: 14px !important;
}

/* Touchscreens without mouse hover */
@media (hover: none) {
  .lightbox-nav-btn {
    opacity: 0.75 !important;
    background: rgba(15, 29, 47, 0.75) !important;
    border-color: rgba(212, 163, 115, 0.75) !important;
    color: #FAF8F5 !important;
  }
}

/* Hide counters completely as requested */
.space-carousel-counter,
#lightbox-counter {
  display: none !important;
}

#lightbox-caption-box {
  margin: 14px auto 4px;
  max-width: 820px;
  text-align: center;
}

#lightbox-item-title {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  color: #FAF8F5;
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#lightbox-caption {
  font-size: 0.95rem;
  color: #E8E2D2;
  margin: 0 auto;
  line-height: 1.55;
  font-family: var(--font-sans, system-ui);
}

@media (max-width: 640px) {
  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 26px;
  }
  .lightbox-nav-btn.prev { left: 8px; }
  .lightbox-nav-btn.next { right: 8px; }
  .space-carousel-dots { bottom: 8px; }
  .space-carousel-counter { bottom: 8px; right: 8px; }
}

.space-gallery-badge { display: none !important; }


/* ==========================================================================
   Living Images - Ambient Breathing & Dynamic Focal Shift
   ========================================================================== */
@keyframes livingBreath1 {
  0% { transform: scale(1.0) translate(0%, 0%); }
  50% { transform: scale(1.055) translate(1.4%, -1%); }
  100% { transform: scale(1.015) translate(-0.8%, 1.2%); }
}

@keyframes livingBreath2 {
  0% { transform: scale(1.02) translate(-1%, 0.8%); }
  50% { transform: scale(1.065) translate(-1.2%, -1.2%); }
  100% { transform: scale(1.0) translate(1.2%, -0.6%); }
}

@keyframes livingBreath3 {
  0% { transform: scale(1.01) translate(0.8%, 1%); }
  50% { transform: scale(1.06) translate(1%, 1.2%); }
  100% { transform: scale(1.0) translate(-1%, -1%); }
}

@keyframes livingBreath4 {
  0% { transform: scale(1.0) translate(0%, 0%); }
  50% { transform: scale(1.065) translate(-1.2%, 1%); }
  100% { transform: scale(1.02) translate(1%, -1%); }
}

.living-img-container,
.space-img-wrap,
.mansion-img-wrap,
.fossils-img-pane {
  position: relative;
  overflow: hidden;
}

.living-img-container img,
.space-img-wrap img,
.mansion-img-wrap img,
.fossils-img-pane img {
  will-change: transform;
  transform-origin: center center;
  transition: transform 0.35s cubic-bezier(0.2, 0, 0.25, 1);
  display: block;
}

/* Staggered desynchronized ambient drift */
.spaces-grid article:nth-child(4n+1) .space-img-wrap:not(.is-interacting) img,
.spaces-grid .space-card:nth-child(4n+1) .space-img-wrap:not(.is-interacting) img {
  animation: livingBreath1 18s ease-in-out infinite alternate;
}
.spaces-grid article:nth-child(4n+2) .space-img-wrap:not(.is-interacting) img,
.spaces-grid .space-card:nth-child(4n+2) .space-img-wrap:not(.is-interacting) img {
  animation: livingBreath2 22s ease-in-out infinite alternate;
}
.spaces-grid article:nth-child(4n+3) .space-img-wrap:not(.is-interacting) img,
.spaces-grid .space-card:nth-child(4n+3) .space-img-wrap:not(.is-interacting) img {
  animation: livingBreath3 19s ease-in-out infinite alternate;
}
.spaces-grid article:nth-child(4n) .space-img-wrap:not(.is-interacting) img,
.spaces-grid .space-card:nth-child(4n) .space-img-wrap:not(.is-interacting) img {
  animation: livingBreath4 24s ease-in-out infinite alternate;
}

.mansion-img-wrap:not(.is-interacting) img {
  animation: livingBreath2 24s ease-in-out infinite alternate;
}
.fossils-img-pane:not(.is-interacting) img {
  animation: livingBreath3 20s ease-in-out infinite alternate;
}

/* Pause keyframes when interacting via mouse */
.living-img-container.is-interacting img,
.space-img-wrap.is-interacting img,
.mansion-img-wrap.is-interacting img,
.fossils-img-pane.is-interacting img {
  animation: none !important;
}

/* Interactive subtle gallery spotlight reflection */
.living-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
  mix-blend-mode: overlay;
}
.living-img-container:hover .living-sheen,
.space-img-wrap:hover .living-sheen,
.mansion-img-wrap:hover .living-sheen,
.fossils-img-pane:hover .living-sheen {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .living-img-container img,
  .space-img-wrap img,
  .mansion-img-wrap img,
  .fossils-img-pane img {
    animation: none !important;
    transform: none !important;
  }
}


/* ==========================================================================
   METEOROLOGICAL STATION INTEGRATION (ACT-15)
   ========================================================================== */

/* 1. Header Weather Widget Pill */
.weather-widget-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--color-navy);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(27, 54, 93, 0.05);
  flex-shrink: 0;
  user-select: none;
}

.weather-widget-pill:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--color-ochre);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.25);
  color: var(--color-terracotta);
}

.weather-widget-pill:active {
  transform: translateY(0);
}

.weather-widget-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background-color: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: weatherPulse 2s infinite;
  flex-shrink: 0;
}

.weather-widget-pulse.stale {
  background-color: #F59E0B;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: weatherPulseAmber 2s infinite;
}

@keyframes weatherPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes weatherPulseAmber {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.weather-widget-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.weather-widget-temp {
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: -0.01em;
}

.weather-widget-wind {
  display: none !important;
}

@media (max-width: 768px) {
  .weather-widget-pill { padding: 5px 10px; gap: 6px; font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .weather-widget-pill { padding: 4px 8px; gap: 5px; font-size: 0.8rem; }
  .weather-widget-icon { font-size: 0.95rem; }
}

/* 2. Weather Portal Page Styles (weather.html) */
.weather-page {
  padding-top: calc(var(--header-height) + 24px);
  padding-bottom: 60px;
  min-height: 100vh;
  background: linear-gradient(180deg, #F8F6F0 0%, #FAF8F5 100%);
}

.weather-hero {
  background: linear-gradient(135deg, rgba(27, 54, 93, 0.96) 0%, rgba(13, 94, 175, 0.92) 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(27, 54, 93, 0.16);
}

.weather-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.22) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.weather-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.weather-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.weather-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.weather-badge.gold {
  background: rgba(212, 175, 55, 0.25);
  border-color: rgba(212, 175, 55, 0.5);
  color: #FFF2C6;
}

.weather-status-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: #E2E8F0;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.weather-hero-main {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 36px;
}

.weather-temp-huge {
  font-size: 5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  font-family: var(--font-heading);
  display: flex;
  align-items: flex-start;
}

.weather-temp-deg {
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--color-ochre);
  margin-left: 4px;
}

.weather-hero-summary h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #FFFFFF;
}

.weather-hero-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 8px;
}

.weather-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 3. Bento Grid Cards */
.weather-bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.weather-card {
  background: #FFFFFF;
  border: 1px solid rgba(232, 226, 216, 0.85);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.weather-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(27, 54, 93, 0.08);
  border-color: rgba(212, 175, 55, 0.45);
}

.weather-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.weather-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-stone);
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-card-title svg, .weather-card-title .card-glyph {
  font-size: 1.1rem;
}

.weather-card-val-big {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.1;
  font-family: var(--font-heading);
  margin-bottom: 4px;
}

.weather-card-sub {
  font-size: 0.86rem;
  color: var(--color-stone);
  line-height: 1.4;
}

/* Specific Card Layouts */

/* Wind Compass Card */
.compass-dial-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 0;
}

.compass-svg {
  width: 140px;
  height: 140px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.06));
}

.compass-needle {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: 50% 50%;
}

/* Hydrology Rain Card */
.rain-metrics-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.rain-metric-box {
  background: rgba(248, 246, 240, 0.7);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(232, 226, 216, 0.6);
}

.rain-metric-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-stone);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.rain-metric-num {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-navy);
}

/* Sun Trajectory Arc Card */
.sun-arc-container {
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sun-arc-svg {
  width: 100%;
  max-width: 260px;
  height: 85px;
}

.sun-times-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-top: 6px;
}

/* Comfort & Dew Point Gauge */
.comfort-meter {
  height: 8px;
  background: linear-gradient(90deg, #38BDF8 0%, #22C55E 40%, #EAB308 75%, #EF4444 100%);
  border-radius: var(--radius-full);
  position: relative;
  margin: 16px 0 10px;
}

.comfort-marker {
  position: absolute;
  top: -4px;
  width: 16px;
  height: 16px;
  background: #FFFFFF;
  border: 3px solid var(--color-navy);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: left 0.5s ease;
}

/* 4. Forecast Section */
.weather-forecast-section {
  margin-bottom: 36px;
}

.weather-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.forecast-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.forecast-day-card {
  background: #FFFFFF;
  border: 1px solid rgba(232, 226, 216, 0.85);
  border-radius: var(--radius-md);
  padding: 18px 14px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s ease;
}

.forecast-day-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-ochre);
}

.forecast-day-card.today {
  border: 1.5px solid var(--color-navy);
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8F5 100%);
}

.forecast-day-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 4px;
}

.forecast-date {
  font-size: 0.76rem;
  color: var(--color-stone);
  margin-bottom: 12px;
}

.forecast-icon {
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 10px;
}

.forecast-temps {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 6px;
}

.forecast-temps .min-temp {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-stone);
}

.forecast-rain-prob {
  font-size: 0.78rem;
  color: #0284C7;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* 5. Stewardship & Institution Citation Card */
.weather-stewardship-card {
  background: #FFFFFF;
  border-left: 4px solid var(--color-ochre);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 36px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.stewardship-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 14px;
}

.stewardship-item {
  font-size: 0.85rem;
}

.stewardship-role {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-stone);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.stewardship-name {
  font-weight: 700;
  color: var(--color-navy);
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .weather-bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .forecast-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .stewardship-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .weather-hero {
    padding: 24px;
  }
  .weather-hero-main {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .weather-temp-huge {
    font-size: 4rem;
  }
  .weather-bento-grid {
    grid-template-columns: 1fr;
  }
  .forecast-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .forecast-cards-grid {
    grid-template-columns: 1fr;
  }
  .stewardship-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   24-HOUR WEATHER TIMELINE SECTION & 7-DAY FORECAST GRID (v1.4.1)
   ========================================================================== */
.weather-timeline-section {
  margin-bottom: 48px;
}
.weather-timeline-card {
  background: #FFFFFF;
  border: 1px solid rgba(232, 226, 216, 0.85);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}
.timeline-chart-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0;
}
.weather-timeline-svg {
  min-width: 680px;
  width: 100%;
  height: auto;
  display: block;
}
.timeline-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(232, 226, 216, 0.6);
  font-size: 0.82rem;
  color: var(--color-stone);
  font-weight: 600;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.temp {
  background: #2B6CB0;
}
.legend-dot.rain {
  background: #38BDF8;
  border-radius: 2px;
}
.legend-dot.now {
  background: #D97706;
}

/* 7-Day Forecast Grid Responsiveness */
.forecast-cards-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 12px !important;
}
@media (max-width: 1100px) {
  .forecast-cards-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}
@media (max-width: 768px) {
  .forecast-cards-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 480px) {
  .forecast-cards-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Timeline Mode Toggle (24h vs Yearly) */
.timeline-mode-toggle {
  display: inline-flex;
  background: rgba(232, 226, 216, 0.5);
  padding: 3px;
  border-radius: var(--radius-sm);
  gap: 4px;
}
.timeline-tab-btn {
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--color-stone);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.timeline-tab-btn:hover {
  color: var(--color-navy);
}
.timeline-tab-btn.active {
  background: #FFFFFF;
  color: var(--color-navy);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   SMART DAY SCRUBBER STRIP (Apple Weather / Yr.no style) (v1.4.3)
   ========================================================================== */
.day-scrubber-wrapper {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(232, 226, 216, 0.6);
  position: relative;
}
.day-scrubber-scroll {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 163, 115, 0.4) transparent;
  padding: 4px 2px;
}
.day-scrubber-scroll::-webkit-scrollbar {
  height: 4px;
}
.day-scrubber-scroll::-webkit-scrollbar-thumb {
  background: rgba(212, 163, 115, 0.4);
  border-radius: 4px;
}
.day-scrubber-btn {
  background: #F8FAFC;
  color: var(--color-navy);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
  flex-shrink: 0;
}
.day-scrubber-btn:hover {
  background: #EDF2F7;
  border-color: #CBD5E0;
  transform: translateY(-1px);
}
.day-scrubber-btn.active {
  background: var(--color-navy);
  color: #FFFFFF;
  border-color: var(--color-navy);
  box-shadow: 0 3px 10px rgba(26, 54, 93, 0.22);
}
.day-scrubber-btn.live-pill {
  font-weight: 700;
}
.day-scrubber-btn.live-pill .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  display: inline-block;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Past Day Verified Station Extremes Badge */
.past-day-badge {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.95));
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-left: 4px solid var(--color-sandstone-gold);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--color-navy);
}
.past-day-badge-title {
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--color-navy-dark);
}
.past-day-badge-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.past-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-stone);
}
.past-stat-item strong {
  color: var(--color-navy);
}

/* Timeline Subheadings and Extended Legend Dots */
.timeline-subheading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.subheading-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--color-navy, #1B365D);
}
.legend-dot.wind {
  background: #0D9488;
}
.legend-dot.gust {
  background: #C86446;
}
.legend-dot.pressure {
  background: #6366F1;
}


/* ==========================================================================
   MOBILE HEADER, HAMBURGER NAVIGATION DRAWER & SUBPAGE JUMP BAR (v1.4.8)
   ========================================================================== */

/* Hamburger Button */
.hamburger-btn {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px 8px;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: rgba(232, 226, 216, 0.45);
  border: 1px solid rgba(212, 163, 115, 0.35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  z-index: 1001;
  transition: all 0.25s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.hamburger-btn:hover {
  background: rgba(212, 163, 115, 0.2);
  border-color: var(--color-sandstone-gold);
}

.hamburger-btn:focus-visible {
  outline: 2px solid var(--color-sandstone-gold);
  outline-offset: 2px;
}

.hamburger-bar {
  display: block;
  width: 22px;
  height: 2.2px;
  background-color: var(--color-navy);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.25s ease;
  transform-origin: center;
}

/* Open State Animation (Morphs to ✕) */
.hamburger-btn.is-active {
  background: rgba(29, 53, 87, 0.08);
}
.hamburger-btn.is-active .hamburger-bar:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger-btn.is-active .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger-btn.is-active .hamburger-bar:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Drawer Backdrop Overlay */
.mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 25, 44, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
  touch-action: none;
}

.mobile-drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Mobile Slide-Over Drawer */
.mobile-nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 86vw);
  background: rgba(253, 251, 248, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid rgba(212, 163, 115, 0.3);
  box-shadow: -8px 0 32px rgba(11, 25, 44, 0.22);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.mobile-nav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Drawer Header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(250, 248, 245, 0.95);
  position: sticky;
  top: 0;
  z-index: 2;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-brand-emblem {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--color-olive) 0%, var(--color-navy) 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-sandstone-gold);
  flex-shrink: 0;
}

.drawer-brand-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-navy);
  line-height: 1.1;
}

.drawer-brand-tagline {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(232, 226, 216, 0.5);
  border: 1px solid rgba(212, 163, 115, 0.3);
  color: var(--color-navy);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
  flex-shrink: 0;
}

.drawer-close-btn:hover {
  background: rgba(212, 163, 115, 0.25);
  transform: rotate(90deg);
}

/* Drawer Content */
.drawer-content {
  flex: 1;
  padding: 16px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-section-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--color-sandstone-dark);
  margin-bottom: 8px;
  padding-left: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.drawer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-navy);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-decoration: none;
}

.drawer-link:hover, .drawer-link:active {
  background: rgba(212, 163, 115, 0.15);
  border-color: rgba(212, 163, 115, 0.35);
  color: var(--color-olive-dark);
  padding-left: 15px;
}

.drawer-link-arrow {
  color: var(--color-sandstone-gold);
  font-size: 0.85rem;
  transition: transform 0.2s ease;
}

.drawer-link:hover .drawer-link-arrow {
  transform: translateX(3px);
}

/* Quick Contacts in Drawer */
.drawer-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-contact-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #FFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--color-navy);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.drawer-contact-card:hover {
  border-color: var(--color-sandstone-gold);
  box-shadow: var(--shadow-sm);
}

.drawer-contact-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.drawer-contact-info {
  display: flex;
  flex-direction: column;
}

.drawer-contact-label {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.drawer-contact-val {
  font-weight: 700;
  color: var(--color-olive-dark);
}

/* Drawer Footer */
.drawer-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--color-border);
  background: rgba(250, 248, 245, 0.8);
  font-size: 0.76rem;
  color: var(--color-text-muted);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-weather-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  background: #FFF;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  margin-bottom: 4px;
}

/* Coupled Subpage Pill Jump Bar */
.mobile-subpage-jumpbar {
  display: none;
}

/* Mid-Width Header Budget (769px - 1120px) */
@media (max-width: 1120px) {
  .nav-menu {
    gap: 14px;
  }
  .nav-link {
    font-size: 0.84rem;
  }
  .nav-actions {
    gap: 10px;
  }
}

/* Media Query Rules for Mobile Screens (<= 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .site-header {
    height: 60px !important;
  }

  .site-header.scrolled {
    height: 60px !important;
  }

  .container.nav-wrapper {
    padding: 0 14px;
    height: 100%;
  }

  .brand-logo {
    flex-shrink: 0;
    white-space: nowrap;
    gap: 8px;
  }

  .brand-emblem {
    width: 34px;
    height: 34px;
    border-radius: 9px;
  }

  .brand-emblem svg {
    width: 18px;
    height: 18px;
  }

  .brand-name, .brand-title {
    font-size: 1.12rem;
    letter-spacing: 1.2px;
  }

  .brand-tagline, .brand-sub {
    display: none !important;
  }

  .nav-actions {
    gap: 8px;
    flex-shrink: 0;
  }

  .hamburger-btn {
    display: inline-flex;
  }

  .lang-switch {
    padding: 2px !important;
  }

  .lang-btn {
    padding: 4px 7px !important;
    font-size: 0.75rem !important;
    gap: 4px !important;
  }

  .lang-btn .flag-icon {
    width: 14px !important;
    height: 10px !important;
  }

  .folklore-hero .back-bar + br {
    display: none !important;
  }

  .weather-widget-pill {
    padding: 4px 8px;
    gap: 5px;
    font-size: 0.78rem;
  }

  .weather-widget-icon {
    font-size: 0.9rem;
  }

  /* Weather page redundancy elimination */
  body.page-weather #header-weather-widget,
  .weather-page-body #header-weather-widget {
    display: none !important;
  }

  /* Coupled Subpage Jump Bar */
  .mobile-subpage-jumpbar {
    display: block;
    position: sticky;
    top: 60px;
    left: 0;
    width: 100%;
    z-index: 990;
    background: rgba(250, 248, 245, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(232, 226, 216, 0.85);
    padding: 6px 12px;
    transition: top 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  }

  /* Header auto-hide coupling: jump bar glides smoothly to top: 0 */
  .site-header.nav-hidden + .mobile-subpage-jumpbar,
  body.header-is-hidden .mobile-subpage-jumpbar {
    top: 0 !important;
  }

  .jumpbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .jumpbar-nav::-webkit-scrollbar {
    display: none;
  }

  .jumpbar-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-navy);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(212, 163, 115, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
    text-decoration: none;
  }

  .jumpbar-pill:hover,
  .jumpbar-pill.active {
    background: var(--color-navy);
    color: #FFF;
    border-color: var(--color-navy);
    box-shadow: 0 2px 6px rgba(29, 53, 87, 0.2);
  }

  .jumpbar-pill.back-pill {
    background: rgba(58, 90, 64, 0.1);
    border-color: rgba(58, 90, 64, 0.35);
    color: var(--color-olive-dark);
  }

  /* Smartphone Hero & Subpage Header Optimization */
  .hero-section {
    min-height: auto;
    padding-top: 76px;
    padding-bottom: 44px;
  }

  .events-hero,
  .history-hero,
  .museum-hero,
  .folklore-hero {
    padding: 76px 0 36px !important;
  }

  .weather-page {
    padding-top: 76px !important;
    padding-bottom: 40px;
  }

  /* Eliminate redundant desktop back-bars & duplicate in-hero/sticky jump bars on mobile (handled by .mobile-subpage-jumpbar) */
  .back-bar,
  .history-back-bar,
  .history-quicknav,
  .events-jump-nav,
  .museum-jump-nav,
  .jump-pills-bar {
    display: none !important;
  }

  /* Mobile Scroll Margin Clearance */
  section[id], #section-telemetry, .museum-section, .section {
    scroll-margin-top: 68px;
  }

  body.has-jumpbar section[id],
  body.has-jumpbar #section-telemetry,
  body.has-jumpbar .museum-section,
  body.has-jumpbar .section {
    scroll-margin-top: 108px;
  }
}

/* Smartphone Viewport Budget (<= 440px) */
@media (max-width: 440px) {
  #header-weather-widget {
    display: none !important;
  }
}

/* Micro-viewport Budget (< 360px) */
@media (max-width: 359px) {

  .brand-name, .brand-title {
    font-size: 1.02rem;
    letter-spacing: 0.8px;
  }

  .container.nav-wrapper {
    padding: 0 10px;
  }

  .nav-actions {
    gap: 6px;
  }

  .hamburger-btn {
    width: 38px;
    height: 38px;
    padding: 8px 6px;
  }
  
  .hamburger-bar {
    width: 20px;
  }
}

/* Modal Backdrop Accessibility Visibility Guard (ACT-21) */
.modal-backdrop {
  visibility: hidden;
}
.modal-backdrop.open,
.modal-backdrop.active {
  visibility: visible;
}
