/*
  ═══════════════════════════════════════════════════════════════════════════
  MI WUK CABIN GUIDEBOOK - STYLESHEET
  ═══════════════════════════════════════════════════════════════════════════

  Modern-rustic design system for a Sierra Nevada cabin experience
  Based on Mi Wuk Cabin Design & Formatting Reference

  TABLE OF CONTENTS
  ─────────────────────────────────────────────────────────────────────────
  1. CSS Variables & Theming (Design Tokens)
  2. Reset & Base Styles
  3. Layout Components (Container, Header, Footer)
  4. Typography (Headings, Body Text)
  5. UI Components (Cards, Buttons, Navigation)
  6. Content Sections (Hero, Photo Grids, QR Cards)
  7. Utilities & Animations
  8. Accessibility
  9. Print Styles
  10. Media Queries
  ═══════════════════════════════════════════════════════════════════════════
*/

/* ═══════════════════════════════════════════════════════════════════════════
   1. CSS VARIABLES & THEMING
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Typography - Font Families (defined first for Inter variable font support) */
  font-family: Inter, sans-serif;
  font-feature-settings:
    'liga' 1,
    'calt' 1; /* fix for Chrome */

  /* Color Palette - Light Mode */
  --color-background: #f5f0e8; /* Warm cream page background */
  --color-card: #ffffff; /* Cards, modals, content panels */
  --color-surface: #f4f4f1; /* Alternate section backgrounds */
  --color-text: #2c2a27; /* Main text color */
  --color-muted: #5a564f; /* Secondary text, footers */
  --color-brand: #3c4841; /* Cabin siding green — headers/nav */
  --color-accent: #c1905a; /* Cedar wood tone — primary buttons */
  --color-accent-hover: #9a6340; /* Darker cedar for hover states */
  --color-secondary: #536a7e; /* Slate blue — secondary buttons, links */
  --color-outline: #a3a7a9; /* Borders and subtle dividers */

  /* State colors */
  --color-error: #cc3333; /* Error messages, reject buttons */
  --color-error-bg: rgba(204, 51, 51, 0.1);
  --color-error-border: rgba(204, 51, 51, 0.3);
  --color-success: #228b22; /* Success messages, approve buttons */
  --color-success-hover: #1a6b1a;
  --color-success-bg: rgba(51, 204, 51, 0.1);
  --color-success-border: rgba(51, 204, 51, 0.3);
  --color-info: #4a90e2; /* Info messages, admin buttons */
  --color-info-hover: #357abd;
  --color-info-bg: rgba(0, 100, 200, 0.1);
  --color-info-border: rgba(0, 100, 200, 0.3);
  --color-info-text: #004085;
  --color-warning: #ff9500; /* Warning/pending states */
  --color-warning-hover: #e68600;

  /* Pure colors for overlays and shadows */
  --color-white: #ffffff;
  --color-black: #000000;

  /* Shadow system - light mode */
  --shadow-sm: 0 2px 8px rgba(44, 42, 39, 0.06);
  --shadow-md: 0 4px 16px rgba(44, 42, 39, 0.08);
  --shadow-lg: 0 8px 24px rgba(44, 42, 39, 0.1);
  --shadow-xl: 0 12px 32px rgba(44, 42, 39, 0.12);

  /* Border system */
  --border-subtle: rgba(163, 167, 169, 0.2);
  --border-medium: rgba(163, 167, 169, 0.3);
  --border-strong: rgba(163, 167, 169, 0.6);

  /* Additional theme variables */
  --nav-hover-bg: rgba(193, 144, 90, 0.08);
  --code-bg: rgba(60, 72, 65, 0.05);
  --card-subtle-bg: rgba(244, 244, 241, 0.5);
  --card-subtle-border: rgba(163, 167, 169, 0.2);
  --theme-toggle-hover-bg: rgba(60, 72, 65, 0.08);

  /* Spacing Scale - 8px System */
  --space-0: 0.25rem; /* 4px - Micro spacing */
  --space-1: 0.5rem; /* 8px - Gaps, icons */
  --space-2: 0.75rem; /* 12px - Button padding */
  --space-3: 1.5rem; /* 24px - Card padding */
  --space-4: 2rem; /* 32px - Section spacing */
  --space-5: 3rem; /* 48px - Large layout gaps */
  --space-6: 3.5rem; /* 56px - Extra large gaps */
  --space-7: 4.5rem; /* 72px - Massive spacing */

  /* Border Radius */
  --radius-sm: 6px; /* Small inputs, badges */
  --radius-md: 10px; /* Buttons */
  --radius-lg: 14px; /* Cards, modals */
  --radius-xl: 20px; /* Hero images, large containers */

  /* Typography Scale */
  --font-size-xs: 0.8125rem; /* 13px */
  --font-size-sm: 0.875rem; /* 14px - Small text */
  --font-size-base: 1rem; /* 16px - Body text */
  --font-size-md: 1.0625rem; /* 17px */
  --font-size-lg: 1.25rem; /* 20px - H4 */
  --font-size-xl: 1.5rem; /* 24px - H3 */
  --font-size-2xl: 1.75rem; /* 28px - H2 */
  --font-size-3xl: 2.5rem; /* 40px - H1 */

  /* Font family variables */
  --font-body: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: Inter, system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-width: 1100px;
  --header-height: 80px;

  /* Breakpoints (for reference) */
  --breakpoint-sm: 520px;
  --breakpoint-md: 640px;
  --breakpoint-lg: 768px;

  /* Transparency controls */
  --alpha-card: 0.65; /* Standard card transparency */
  --alpha-card-strong: 0.8; /* Important cards */
  --alpha-site: 0.85; /* Site wrapper */

  /* Typography refinements */
  --lh-heading: 1.3;
  --lh-body: 1.7;
  --ls-heading: -0.01em;
  --ls-body: 0em;
  --ls-small: 0.01em;

  /* Fluid typography (responsive font sizes) */
  --font-h1: clamp(2rem, 1.2rem + 2vw, 2.5rem);
  --font-h2: clamp(1.5rem, 1.1rem + 1vw, 1.75rem);
  --font-h3: clamp(1.25rem, 1rem + 0.6vw, 1.5rem);
  --font-h4: clamp(1.1rem, 0.95rem + 0.3vw, 1.25rem);

  /* Transition system */
  --transition-fast: 100ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
}

/* Use Inter Variable font when supported */
@supports (font-variation-settings: normal) {
  :root {
    font-family: InterVariable, sans-serif;
  }
}

/* Dark Mode - Automatic via prefers-color-scheme */
@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #1f2322;
    --color-card: #252a29;
    --color-surface: #2a2f2e;
    --color-text: #eceeeb;
    --color-muted: #b7b6b3;
    --color-brand: #4f5e56;
    --color-accent: #d4935d;
    --color-accent-hover: #e5a876;
    --color-secondary: #6a8096;
    --color-outline: #5a5f5d;

    /* State colors - dark mode */
    --color-error: #ff8888;
    --color-error-bg: rgba(255, 100, 100, 0.15);
    --color-error-border: rgba(255, 100, 100, 0.3);
    --color-success: #88ff88;
    --color-success-hover: #66dd66;
    --color-success-bg: rgba(100, 255, 100, 0.15);
    --color-success-border: rgba(100, 255, 100, 0.3);
    --color-info: #88b3ff;
    --color-info-hover: #669aff;
    --color-info-bg: rgba(100, 150, 255, 0.15);
    --color-info-border: rgba(100, 150, 255, 0.3);
    --color-info-text: #88b3ff;
    --color-warning: #ffb347;
    --color-warning-hover: #ffa326;

    /* Shadow system - dark mode */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.4);

    /* Border system - dark mode */
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(90, 95, 93, 0.6);

    /* Dark mode overrides */
    --nav-hover-bg: rgba(212, 147, 93, 0.12);

    /* Transparency adjustments for dark mode */
    --alpha-card: 0.55; /* Lighter cards on dark */
    --alpha-card-strong: 0.7; /* Important cards dark mode */
    --alpha-site: 0.85; /* Site wrapper dark mode */
    --code-bg: rgba(255, 255, 255, 0.05);
    --card-subtle-bg: rgba(255, 255, 255, 0.02);
    --card-subtle-border: rgba(255, 255, 255, 0.08);
    --theme-toggle-hover-bg: rgba(255, 255, 255, 0.08);
  }
}

/* Smooth theme transitions */
body,
.site,
.card,
.card-link,
header,
footer {
  transition:
    background-color var(--transition-base),
    color var(--transition-base),
    border-color var(--transition-base);
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. RESET & BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base); /* 16px base */
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
}

/* Fixed background image that content scrolls over */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url('/assets/images/mountain-view-snow.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  filter: sepia(0.15) saturate(1.4) brightness(1.1) contrast(1.35);
  opacity: 0.65;
  transition:
    filter var(--transition-base),
    opacity var(--transition-base);
}

/* Opacity fade mask for content scrolling under header */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 150px;
  z-index: 40;
  pointer-events: none;
  /* Transparent fade that gets completely opaque at the top */
  background: linear-gradient(
    to bottom,
    var(--color-background) 0%,
    var(--color-background) 15%,
    rgba(245, 240, 232, 0.8) 40%,
    rgba(245, 240, 232, 0.4) 70%,
    transparent 100%
  );
  transition: opacity var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  body::before {
    filter: grayscale(0.3) brightness(0.85) contrast(1.25) saturate(0.9);
    opacity: 0.5;
  }

  body::after {
    background: linear-gradient(
      to bottom,
      #1f2322 0%,
      #1f2322 15%,
      rgba(31, 35, 34, 0.8) 40%,
      rgba(31, 35, 34, 0.4) 70%,
      transparent 100%
    );
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. LAYOUT COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Page container — transparent with blur */
.site {
  max-width: var(--max-width);
  width: calc(100% - 4rem);
  margin: var(--space-4) auto 2rem auto;
  padding: var(--space-3) var(--space-6);
  background: rgba(245, 240, 232, var(--alpha-site));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(10px);
  min-height: calc(100vh - 8rem);
  box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
  .site {
    background: rgba(31, 35, 34, var(--alpha-site));
  }
}

@media (max-width: 768px) {
  .site {
    margin: 1rem auto;
    width: calc(100% - 2rem);
    padding: var(--space-4);
    border-radius: var(--radius-md);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FROSTED GLASS TIMBER BEAM HEADER - Ultra-Slim Two Row Layout
   ═══════════════════════════════════════════════════════════════════════════ */

/* Sticky header container */
.hc-header {
  position: sticky;
  top: clamp(8px, 1vw, 12px);
  z-index: 1000;
  max-width: var(--max-width);
  width: calc(100% - 4rem);
  margin: 2rem auto 0 auto;
  box-sizing: border-box;
}

/* Single frosted bar - two row layout */
.hc-header__inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: visible;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(12px) brightness(1.05);
  border: 1px solid var(--border-strong);
}

@media (prefers-color-scheme: dark) {
  .hc-header__inner {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* Top row - Brand and User Menu - darker background */
.hc-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.4rem, 0.8vw, 0.5rem) clamp(1.25rem, 2.5vw, 2rem);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Divider line between rows */
.hc-header__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0;
}

/* Bottom row - Navigation - lighter background */
.hc-header__bottom {
  display: flex;
  align-items: center;
  padding: 0 clamp(1.25rem, 2.5vw, 2rem);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(12px);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

@media (prefers-color-scheme: dark) {
  .hc-header__bottom {
    background: rgba(255, 255, 255, 0.02);
  }
}

/* Brand lockup - extra compact */
.hc-brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.hc-brand__icon {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  flex-shrink: 0;
  line-height: 1;
}

/* Header icon - cabin illustration with rounded corners */
.hc-brand__icon.header-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: none;
}

.hc-brand__icon-img {
  height: 32px;
  width: auto;
  display: block;
  border-radius: var(--radius-md);
}

.hc-brand__text {
  display: grid;
  line-height: 1.05;
  gap: 0px;
  min-width: 0;
}

.hc-brand__text strong {
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: clamp(0.95rem, 1.7vw, 1.25rem);
  white-space: nowrap;
}

.hc-brand__text small {
  color: var(--color-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: clamp(0.6rem, 0.9vw, 0.7rem);
  opacity: 0.8;
  white-space: nowrap;
}

/* Navigation - centered */
.hc-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  gap: 0;
  flex-wrap: nowrap;
}

.hc-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.3rem, 0.6vw, 0.4rem) clamp(0.5rem, 1vw, 0.75rem);
  text-decoration: none;
  color: var(--color-muted);
  font-weight: 600;
  font-size: clamp(0.65rem, 1vw, 0.75rem);
  letter-spacing: 0.01em;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
  white-space: nowrap;
  text-align: center;
}

.hc-nav__link:hover {
  color: var(--color-text);
  background: rgba(42, 47, 46, 0.16);
}

.hc-nav__link.is-active,
.hc-nav__link.active {
  color: var(--color-accent);
}

/* Active indicator: thin cedar line at bottom */
.hc-nav__link.is-active::after,
.hc-nav__link.active::after {
  content: '';
  position: absolute;
  left: clamp(0.4rem, 1.5vw, 1rem);
  right: clamp(0.4rem, 1.5vw, 1rem);
  bottom: 0;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px 2px 0 0;
}

/* Header actions container */
.hc-header__actions {
  display: flex;
  align-items: center;
  gap: clamp(0.6rem, 1.2vw, 0.85rem);
  flex-shrink: 0;
}

/* User dropdown menu */
.hc-user-menu {
  position: relative;
  flex-shrink: 0;
}

.hc-user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: clamp(0.35rem, 0.75vw, 0.45rem) clamp(0.65rem, 1.3vw, 0.85rem);
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: clamp(0.75rem, 1.2vw, 0.85rem);
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hc-user-menu__trigger:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

.hc-user-menu__arrow {
  font-size: 0.7em;
  transition: transform 0.2s ease;
}

.hc-user-menu__trigger[aria-expanded='true'] .hc-user-menu__arrow {
  transform: rotate(180deg);
}

.hc-user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: rgba(37, 42, 41, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  padding: 0.25rem 0;
  display: none;
  z-index: 1001;
}

.hc-user-menu__trigger[aria-expanded='true'] ~ .hc-user-menu__dropdown {
  display: block;
}

.hc-user-menu__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
  text-align: left;
  white-space: nowrap;
}

.hc-user-menu__item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-accent);
}

.hc-user-menu__item--logout {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 0.125rem;
  padding-top: 0.625rem;
}

/* Login chip - extra compact button */
.hc-chip {
  background: #9a6340;
  color: var(--color-white);
  border: none;
  padding: clamp(0.35rem, 0.75vw, 0.45rem) clamp(0.75rem, 1.5vw, 1rem);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: clamp(0.75rem, 1.2vw, 0.9rem);
  text-decoration: none;
  transition:
    transform 0.1s ease,
    background-color 0.1s ease;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hc-chip:hover {
  background: #7d4f2f;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Mobile Menu Toggle Button (Hamburger) */
.hc-mobile-menu-toggle {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 0;
  transition: all var(--transition-fast);
  position: relative;
  z-index: 1001;
}

.hc-mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Hamburger icon (three lines) */
.hc-mobile-menu-toggle__icon {
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hc-mobile-menu-toggle__icon::before,
.hc-mobile-menu-toggle__icon::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-base);
  left: 0;
}

.hc-mobile-menu-toggle__icon::before {
  top: -6px;
}

.hc-mobile-menu-toggle__icon::after {
  top: 6px;
}

/* Hamburger animation when active (X) */
.hc-mobile-menu-toggle.active .hc-mobile-menu-toggle__icon {
  background: transparent;
}

.hc-mobile-menu-toggle.active .hc-mobile-menu-toggle__icon::before {
  top: 0;
  transform: rotate(45deg);
}

.hc-mobile-menu-toggle.active .hc-mobile-menu-toggle__icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* Mobile Navigation Menu */
.hc-mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: var(--color-brand);
  z-index: 1000;
  transition: right var(--transition-base);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
  display: none; /* Hidden on desktop */
}

.hc-mobile-nav.active {
  right: 0;
}

.hc-mobile-nav__content {
  padding: calc(var(--space-6) + 20px) var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.hc-mobile-nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  color: var(--color-white);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  position: relative;
}

.hc-mobile-nav__link:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hc-mobile-nav__link.active {
  background: rgba(193, 144, 90, 0.2);
  font-weight: 600;
}

.hc-mobile-nav__link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: var(--color-accent);
  border-radius: 0 2px 2px 0;
}

.hc-mobile-nav__icon {
  font-size: 1.25rem;
  width: 1.5rem;
  text-align: center;
}

.hc-mobile-nav__link--admin {
  margin-top: var(--space-3);
  padding-top: calc(var(--space-3) + 0.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(193, 144, 90, 0.1);
}

.hc-chip:focus-visible,
.hc-nav__link:focus-visible,
.hc-brand:focus-visible,
.hc-user-menu__trigger:focus-visible,
.hc-mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .hc-nav__link {
    font-size: clamp(0.9rem, 1.6vw, 1.2rem);
  }
}

@media (max-width: 768px) {
  .hc-nav__link {
    font-size: clamp(0.75rem, 1.4vw, 1rem);
    padding: clamp(0.65rem, 1.2vw, 1rem) clamp(0.4rem, 0.8vw, 0.75rem);
  }
  .hc-user-menu__trigger {
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
    max-width: 150px;
  }
}

@media (max-width: 680px) {
  /* Hide desktop navigation */
  .hc-header__bottom {
    display: none;
  }
  .hc-header__divider {
    display: none;
  }

  /* Show mobile menu toggle and navigation */
  .hc-mobile-menu-toggle {
    display: flex;
  }

  .hc-mobile-nav {
    display: block;
  }

  /* Adjust header branding for mobile */
  .hc-brand__icon {
    font-size: clamp(1.5rem, 3vw, 2rem);
  }
  .hc-brand__icon-img {
    height: 40px;
  }
  .hc-brand__text strong {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  }
  .hc-brand__text small {
    font-size: clamp(0.65rem, 1vw, 0.75rem);
  }

  /* Hide desktop user menu on very small screens */
  .hc-user-menu {
    display: none;
  }
}

@media (min-width: 520px) and (max-width: 680px) {
  /* Show user menu on medium-small screens (but not tiny phones) */
  .hc-user-menu {
    display: block;
  }
}

@media (max-width: 400px) {
  .hc-header {
    padding-inline: 8px;
  }
  .hc-header__top {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  .hc-brand {
    gap: 0.5rem;
  }
}

/* Light mode tweaks removed - now uses design tokens */

/* Legacy class support - hide old elements */
.header-top,
.header-nav,
.header-branding,
.header-actions,
.header-user,
.user-section,
.user-actions,
.user-email,
.logout-btn,
.cabin-icon,
.nav-icon {
  display: none;
}

/* Footer */
footer {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  padding-bottom: var(--space-3);
  border-top: 1px solid var(--border-medium);
  text-align: center;
  color: var(--color-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

/* Homepage footer - matches header/container width */
.home-footer {
  max-width: var(--max-width);
  width: calc(100% - 4rem);
  margin: var(--space-5) auto 2rem auto;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-medium);
  text-align: center;
  color: var(--color-muted);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  box-sizing: border-box;
}

footer div {
  margin-bottom: var(--space-1);
}

footer div:last-child {
  margin-bottom: 0;
  opacity: 0.8;
}

/* Main content */
main {
  color: var(--color-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Headings — keep dark, use brand color sparingly */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-text);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  margin: 0;
}

h1 {
  font-size: var(--font-h1); /* Fluid: 2rem - 2.5rem */
  font-weight: 700;
  margin-bottom: var(--space-4);
}

h2 {
  font-size: var(--font-h2); /* Fluid: 1.5rem - 1.75rem */
  font-weight: 600;
  margin: var(--space-5) 0 var(--space-3);
}

h3 {
  font-size: var(--font-h3); /* Fluid: 1.25rem - 1.5rem */
  font-weight: 600;
  margin: var(--space-4) 0 var(--space-3);
}

h4 {
  font-size: var(--font-h4); /* Fluid: 1.1rem - 1.25rem */
  font-weight: 500;
  margin: var(--space-4) 0 var(--space-2);
}

p {
  color: var(--color-text);
  font-size: var(--font-size-base); /* 1rem / 16px */
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: var(--ls-body);
  margin-bottom: var(--space-3);
}

p:last-child {
  margin-bottom: 0;
}

ul,
ol {
  padding-left: var(--space-3);
  margin-bottom: var(--space-3);
}

li {
  color: var(--color-text);
  font-size: var(--font-size-base);
  font-weight: 400;
  line-height: 1.7;
  margin-bottom: var(--space-1);
}

strong {
  font-weight: 700;
  color: var(--color-brand);
}

em {
  font-style: italic;
}

small {
  font-size: var(--font-size-sm); /* 0.875rem / 14px */
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: var(--ls-small);
}

/* Links */
a {
  color: var(--color-secondary);
  text-decoration: underline;
  text-decoration-color: var(--color-secondary);
  text-underline-offset: 2px;
  transition: all var(--transition-fast);
  opacity: 0.9;
}

a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. UI COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Dark header utility class - used across site header, welcome card, and AI chat
   Apply this class to header sections for consistent dark background styling.
   Usage: <div class="hc-header__top header-dark"> or <div class="welcome-card__header header-dark">
*/
.header-dark {
  background: rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  .header-dark {
    background: rgba(0, 0, 0, 0.35);
  }
}

/* Light body utility class - used for card content areas below headers
   Apply this class to body sections for consistent lighter background styling.
   Usage: <div class="welcome-card__body body-light"> or <div class="ai-chat__messages body-light">
*/
.body-light {
  background: rgba(255, 255, 255, 0.45);
}

@media (prefers-color-scheme: dark) {
  .body-light {
    background: rgba(255, 255, 255, 0.02);
  }
}

/* Cards - Unified system with semi-transparent surfaces */
.card {
  background: rgba(244, 244, 241, var(--alpha-card));
  backdrop-filter: blur(12px) brightness(1.05);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .card {
    background: rgba(37, 42, 41, var(--alpha-card));
    border-color: var(--border-strong);
    box-shadow: var(--shadow-xl);
  }
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

/* Strong variant for key content */
.card--strong {
  background: rgba(244, 244, 241, var(--alpha-card-strong));
}

@media (prefers-color-scheme: dark) {
  .card--strong {
    background: rgba(37, 42, 41, var(--alpha-card-strong));
  }
}

/* Buttons */
.btn {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-base);
  box-shadow: var(--shadow-sm);
  backdrop-filter: saturate(1.1);
  transition:
    transform var(--transition-fast),
    background-color var(--transition-fast),
    box-shadow var(--transition-fast);
  border: none;
  cursor: pointer;
  text-align: center;
}

.btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

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

/* Theme toggle button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: var(--space-1) var(--space-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  transition: all var(--transition-fast);
  font-size: 1.25rem;
  line-height: 1;
  width: 36px;
  height: 36px;
}

.theme-toggle:hover {
  background: var(--theme-toggle-hover-bg);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Form elements */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  color: var(--color-text);
  font-weight: 600;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
}

.form-group input {
  width: 100%;
  padding: var(--space-3);
  border: 2px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: var(--color-background);
  color: var(--color-text);
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  font-family: var(--font-body);
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(193, 144, 90, 0.2);
}

/* Primary button */
.btn-primary {
  width: 100%;
  background: var(--color-text);
  color: var(--color-background);
  padding: var(--space-3);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    background-color var(--transition-base);
  margin-top: var(--space-2);
  font-family: var(--font-body);
}

.btn-primary:hover {
  background: var(--color-brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Message boxes */
.error {
  background: var(--color-error-bg);
  border: 1px solid var(--color-error-border);
  color: var(--color-error);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.success {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: var(--color-success);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.info {
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-border);
  color: var(--color-info-text);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. CONTENT SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Hero image card */
.hero {
  position: relative;
  padding-bottom: 60px;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.hero-title {
  margin-top: var(--space-2);
  font-weight: 700;
  color: var(--color-brand);
  font-size: var(--font-size-lg);
}

/* Content sections */
.section {
  background: transparent;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--border-subtle);
  margin-bottom: var(--space-4);
}

/* Photo grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: var(--space-3) 0;
}

.photo-grid img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.photo-grid img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

/* QR card */
.qr-card {
  display: inline-block;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px) brightness(1.05);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  text-align: center;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

@media (prefers-color-scheme: dark) {
  .qr-card {
    background: rgba(0, 0, 0, 0.2);
    border-color: var(--border-strong);
  }
}

.qr-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.qr-card img {
  max-width: 200px;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}

/* QR Modal */
.qr-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(245, 240, 232, 0.95);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fadeIn 200ms ease;
}

@media (prefers-color-scheme: dark) {
  .qr-modal {
    background: rgba(31, 35, 34, 0.92);
  }
}

.qr-modal.active {
  display: flex;
}

.qr-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  animation: scaleIn 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.qr-modal-content img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.qr-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--color-text);
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--color-card);
  border: 1px solid var(--border-medium);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.qr-modal-close:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .qr-card img {
    max-width: 160px;
  }
  .qr-modal-close {
    top: 10px;
    right: 10px;
  }
}

/* Link grid & cards (homepage) - compact 3-column, 2-row layout */
.link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 0;
  align-items: start;
  z-index: 10;
  position: relative;
  padding: 0;
}

@media (max-width: 639px) {
  .link-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Card link appearance - compact rectangular cards for 3-column 2-row layout */
.card-link {
  width: 100%;
  display: block;
  position: relative;
  height: 140px;
  border-radius: var(--radius-md);
  background: transparent;
  text-decoration: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
  border: 2px solid transparent;
  transform: translateY(0);
  transition:
    transform var(--transition-fast),
    filter var(--transition-fast),
    border-color var(--transition-fast);
  overflow: hidden;
}

.card-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

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

.card-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.45) 100%
  );
  z-index: 1;
  transition: background 100ms ease;
}

.card-content {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.card-title {
  font-size: clamp(0.65rem, 1vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-muted);
  text-shadow: none;
  margin-bottom: 0;
  line-height: 1.3;
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.card-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-white);
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
  text-align: right;
  align-self: flex-end;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.card-link:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
  border-color: var(--color-accent);
}

.card-link:hover::before {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
}

.card-link:hover .card-title {
  color: var(--color-white);
}

@media (max-width: 520px) {
  .hero img {
    height: 220px;
    object-fit: cover;
  }
  .link-grid {
    gap: 10px;
    margin-top: var(--space-2);
  }
  .card-link {
    height: 120px;
  }
  .card-content {
    padding: 10px;
  }
  .card-title {
    padding: 6px 10px;
    font-size: 0.7rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. UTILITIES & ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Form utilities */
.form-reset {
  margin: 0;
}

/* Text utilities */
.text-spacing-top {
  margin-top: var(--space-4);
}

.text-small {
  font-size: var(--font-size-sm);
}

/* Link variants */
.link-accent {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}

.link-accent:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border-medium);
  margin: var(--space-5) 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  margin: var(--space-2) 0;
}

/* Code blocks */
pre,
code {
  background: var(--code-bg);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Courier New', monospace;
  font-size: var(--font-size-sm);
}

/* Caption text */
.caption {
  font-size: var(--font-size-xs);
  color: var(--color-muted);
  margin-top: var(--space-1);
}

/* Narrow container */
.narrow {
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

/* Emergency banner */
.emergency-banner {
  background: var(--color-error);
  color: var(--color-white);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  margin-bottom: var(--space-3);
  text-align: center;
}

/* Fade-in animation */
.fade-in {
  animation: fadeIn 420ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Card animation */
.card-link.fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: cardIn 420ms ease forwards;
  animation-delay: calc(90ms * var(--i));
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE TWO-COLUMN LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.page-home main ul,
.page-home main > ul,
.page-home .content ul {
  display: none !important;
  margin: 0;
  padding: 0;
  height: 0;
  overflow: hidden;
}

/* Homepage container - matches header width */
.home-container {
  max-width: var(--max-width);
  width: calc(100% - 4rem);
  margin: clamp(1rem, 2vw, 1.5rem) auto 0 auto;
  box-sizing: border-box;
  position: relative;
  z-index: 50;
}

/* Two-column grid for homepage */
.home-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: var(--space-5);
  align-items: start;
}

/* Left column - Welcome + Navigation */
.home-welcome {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: stretch;
}

.welcome-card {
  background: transparent;
  backdrop-filter: blur(12px) brightness(1.05);
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* Page header card - matches welcome card structure for content pages */
.page-header-card {
  background: transparent;
  backdrop-filter: blur(12px) brightness(1.05);
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.page-header-card__header {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-medium);
}

.page-header-card__header h1 {
  margin: 0;
  font-size: var(--font-size-2xl);
  color: var(--color-accent);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.page-header-card__body {
  padding: var(--space-3);
}

.page-header-card__body p {
  text-wrap: pretty;
}

.links-card {
  background: rgba(244, 244, 241, var(--alpha-card));
  backdrop-filter: blur(12px) brightness(1.05);
  padding: var(--space-2) var(--space-3) var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 520px;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .welcome-card,
  .page-header-card,
  .links-card {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-xl);
  }

  .links-card {
    background: rgba(37, 42, 41, var(--alpha-card));
  }
}

/* Welcome card header - darker background, slim padding to match AI chat header */
.welcome-card__header {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-medium);
}

.welcome-card__header h1 {
  margin: 0;
  font-size: var(--font-size-2xl);
  color: var(--color-accent);
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Emoji badges with orange circular background */
.page-emoji,
.greeting-emoji {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* Welcome card body - lighter background */
.welcome-card__body {
  padding: var(--space-3);
}

.welcome-card__body p {
  text-wrap: pretty;
}

.emoji-group {
  white-space: nowrap;
  display: inline-block;
}

/* Right column - AI Chat */
.home-chat {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  align-self: start;
}

.ai-chat {
  display: flex;
  flex-direction: column;
  height: 638px;
  background: transparent;
  backdrop-filter: blur(12px) brightness(1.05);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .ai-chat {
    border-color: var(--border-strong);
  }
}

/* Chat header - slim padding to match welcome card */
.ai-chat__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-medium);
}

.ai-chat__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* AI chat avatar - cabin illustration with rounded corners */
.ai-chat__avatar--pill {
  width: auto;
  background: transparent;
}

.ai-chat__avatar-img {
  height: 24px;
  width: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.ai-chat__message-avatar-img {
  height: 24px;
  width: auto;
  display: block;
  border-radius: var(--radius-sm);
}

.ai-chat__title {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.3;
}

.ai-chat__title strong {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
}

.ai-chat__title small {
  font-size: var(--font-size-xs);
  color: var(--color-muted);
  line-height: 1.3;
}

/* Chat messages area - fixed height, scrollable */
.ai-chat__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 0;
}

.ai-chat__message {
  display: flex;
  gap: var(--space-2);
  max-width: 95%;
  animation: messageSlideIn 0.3s ease;
}

.ai-chat__message--assistant {
  max-width: 95%;
}

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

.ai-chat__message--user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-chat__message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ai-chat__message--user .ai-chat__message-avatar {
  background: var(--color-info);
}

.ai-chat__message-content {
  background: rgba(0, 0, 0, 0.03);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  color: var(--color-text);
}

.ai-chat__message-content h3 {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin: var(--space-3) 0 var(--space-2) 0;
  color: var(--color-brand);
}

.ai-chat__message-content h3:first-child {
  margin-top: 0;
}

.ai-chat__message-content p {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
}

.ai-chat__message-content p:last-child {
  margin-bottom: 0;
}

.ai-chat__message-content ul,
.ai-chat__message-content ol {
  margin: var(--space-2) 0;
  padding-left: var(--space-4);
  list-style-position: outside;
}

.ai-chat__message-content ul {
  list-style-type: disc;
}

.ai-chat__message-content ol {
  list-style-type: decimal;
}

.ai-chat__message-content li {
  margin-bottom: var(--space-3);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.ai-chat__message-content li:last-child {
  margin-bottom: 0;
}

.ai-chat__message-content li strong {
  font-size: var(--font-size-base);
  color: var(--color-brand);
  display: block;
  margin-bottom: var(--space-1);
}

.ai-chat__message-content li em {
  font-style: normal;
  font-weight: 600;
  color: var(--color-text);
}

.ai-chat__message-content a {
  color: var(--color-secondary);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.ai-chat__message-content a:hover {
  color: var(--color-accent);
}

/* Ensure proper spacing between paragraphs and lists */
.ai-chat__message-content p + ul,
.ai-chat__message-content p + ol,
.ai-chat__message-content ul + p,
.ai-chat__message-content ol + p {
  margin-top: var(--space-2);
}

@media (prefers-color-scheme: dark) {
  .ai-chat__message-content {
    background: rgba(0, 0, 0, 0.2);
  }

  .ai-chat__message-content h3 {
    color: var(--color-accent);
  }

  .ai-chat__message-content li strong {
    color: var(--color-accent);
  }
}

.ai-chat__message--user .ai-chat__message-content {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Chat input area */
.ai-chat__input {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  background: rgba(0, 0, 0, 0.05);
  border-top: 1px solid var(--border-medium);
}

@media (prefers-color-scheme: dark) {
  .ai-chat__input {
    background: rgba(0, 0, 0, 0.2);
  }
}

.ai-chat__input-field {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-sm);
  resize: none;
  min-height: 40px;
  max-height: 120px;
}

.ai-chat__input-field:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(193, 144, 90, 0.2);
}

.ai-chat__send-btn {
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.1s ease;
  white-space: nowrap;
}

.ai-chat__send-btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
}

.ai-chat__send-btn:active {
  transform: translateY(0);
}

.ai-chat__send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Suggested prompts */
.ai-chat__prompts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-1);
  padding: 0 var(--space-3) var(--space-2);
}

.ai-chat__prompt-chip {
  background: transparent;
  border: 1px solid var(--border-medium);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: var(--font-size-xs);
  color: var(--color-text);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}

.ai-chat__prompt-chip:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: var(--color-accent);
}

@media (prefers-color-scheme: dark) {
  .ai-chat__prompt-chip:hover {
    background: rgba(255, 255, 255, 0.05);
  }
}

/* Typing indicator animation */
.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--color-muted);
  border-radius: 50%;
  display: inline-block;
  animation: typingDot 1.4s infinite;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Disabled input state */
.ai-chat__input-field:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-chat {
    position: relative;
    top: 0;
    max-height: none;
  }

  .ai-chat {
    height: 450px;
  }
}

@media (max-width: 768px) {
  .home-grid {
    gap: var(--space-3);
  }

  .ai-chat {
    height: 400px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT PAGE LAYOUT - Frosted Card System
   ═══════════════════════════════════════════════════════════════════════════ */

/* Content wrapper - matches homepage welcome card aesthetic */
.content-page main {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-bottom: var(--space-5);
}

/* Two-column grid for content pages */
.content-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

/* Single column spans full width */
.content-grid--single {
  grid-column: 1 / -1;
}

@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

/* Content sections - matches homepage card styling with header/body structure */
.content-section {
  background: transparent;
  backdrop-filter: blur(12px) brightness(1.05);
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  z-index: 50;
}

@media (prefers-color-scheme: dark) {
  .content-section {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-xl);
  }
}

/* Content section header - dark background like homepage cards */
.content-section__header {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border-medium);
  background: rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
  .content-section__header {
    background: rgba(0, 0, 0, 0.35);
  }
}

.content-section__header h2 {
  margin: 0;
  font-size: var(--font-h2);
  color: var(--color-accent);
  line-height: 1.3;
}

/* Content section body - light background like homepage cards */
.content-section__body {
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.45);
}

@media (prefers-color-scheme: dark) {
  .content-section__body {
    background: rgba(255, 255, 255, 0.02);
  }
}

.content-section__body h3 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  font-size: var(--font-h3);
  color: var(--color-brand);
}

.content-section__body h3:first-child {
  margin-top: 0;
}

/* Legacy support for content sections without header/body structure */
.content-section:not(:has(.content-section__header)) {
  padding: var(--space-4);
  background: rgba(244, 244, 241, var(--alpha-card));
}

@media (prefers-color-scheme: dark) {
  .content-section:not(:has(.content-section__header)) {
    background: rgba(37, 42, 41, var(--alpha-card));
  }
}

.content-section:not(:has(.content-section__header)) h2 {
  margin-top: 0;
  margin-bottom: var(--space-3);
  font-size: var(--font-h2);
  color: var(--color-text);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-accent);
}

.content-section:not(:has(.content-section__header)) h3 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  font-size: var(--font-h3);
  color: var(--color-brand);
}

.content-section:not(:has(.content-section__header)) h3:first-child {
  margin-top: 0;
}

/* Info rows for key-value pairs */
.info-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-accent);
}

@media (prefers-color-scheme: dark) {
  .info-row {
    background: rgba(0, 0, 0, 0.2);
  }
}

.info-row strong {
  min-width: 120px;
  flex-shrink: 0;
}

/* Location/business cards for recommendations */
.location-card {
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px) brightness(1.05);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .location-card {
    background: rgba(0, 0, 0, 0.15);
    border-color: var(--border-strong);
  }
}

.location-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  .location-card:hover {
    box-shadow: var(--shadow-xl);
  }
}

.location-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  color: var(--color-accent);
}

.location-card p {
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.location-card p:last-child {
  margin-bottom: 0;
}

/* Photo gallery for photos page */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
  padding: var(--space-4);
  background: rgba(244, 244, 241, var(--alpha-card));
  backdrop-filter: blur(12px) brightness(1.05);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  .photo-gallery {
    background: rgba(37, 42, 41, var(--alpha-card));
  }
}

.photo-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base);
  cursor: pointer;
  margin: 0;
}

.photo-gallery img:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Photo Lightbox Modal */
.photo-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}

.photo-lightbox[aria-hidden='false'] {
  opacity: 1;
  pointer-events: auto;
}

.photo-lightbox__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
}

.photo-lightbox__content {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.photo-lightbox__image-container {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.photo-lightbox__image {
  max-width: 100%;
  max-height: calc(90vh - 100px);
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.photo-lightbox__caption {
  color: white;
  font-size: var(--font-size-base);
  text-align: center;
  max-width: 600px;
  padding: var(--space-2) var(--space-3);
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
}

.photo-lightbox__close {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(8px);
}

.photo-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.photo-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.photo-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.photo-lightbox__nav--prev {
  left: var(--space-3);
}

.photo-lightbox__nav--next {
  right: var(--space-3);
}

.photo-lightbox__counter {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: var(--font-size-base);
  padding: var(--space-2) var(--space-3);
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Before/After Slider Component */
.before-after-card {
  background: rgba(244, 244, 241, var(--alpha-card));
  backdrop-filter: blur(12px) brightness(1.05);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

@media (prefers-color-scheme: dark) {
  .before-after-card {
    background: rgba(37, 42, 41, var(--alpha-card));
  }
}

.before-after-card__header {
  padding: var(--space-3) var(--space-4);
}

.before-after-card__header h3 {
  margin: 0 0 var(--space-1) 0;
  font-size: var(--font-h3);
}

.before-after-card__header p {
  margin: 0;
  font-size: var(--font-size-sm);
  opacity: 0.85;
}

.before-after-card__body {
  padding: var(--space-4);
}

.before-after-slider__container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: ew-resize;
  user-select: none;
  --object-fit: cover; /* Default, can be overridden inline */
}

.before-after-slider__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--object-fit);
  user-select: none;
  pointer-events: none;
}

.before-after-slider__before {
  z-index: 1;
}

.before-after-slider__after-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  clip-path: inset(0 0 0 50%);
  transition: clip-path 0.05s ease-out;
}

.before-after-slider__after {
  position: relative;
}

.before-after-slider__divider {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: white;
  z-index: 3;
  transform: translateX(-50%);
  transition: left 0.05s ease-out;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.before-after-slider__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: var(--color-accent);
  border: 3px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: grab;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.before-after-slider__handle:active {
  cursor: grabbing;
  transform: translate(-50%, -50%) scale(1.1);
}

.before-after-slider__handle svg {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.before-after-slider__labels {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  padding: 0 var(--space-2);
}

.before-after-slider__label {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Seasonal Gallery Component */
.seasonal-section {
  background: rgba(244, 244, 241, var(--alpha-card));
  backdrop-filter: blur(12px) brightness(1.05);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

@media (prefers-color-scheme: dark) {
  .seasonal-section {
    background: rgba(37, 42, 41, var(--alpha-card));
  }
}

.seasonal-section__header {
  padding: var(--space-3) var(--space-4);
}

.seasonal-section__header h2 {
  margin: 0 0 var(--space-1) 0;
  font-size: var(--font-h2);
}

.seasonal-section__header p {
  margin: 0;
  font-size: var(--font-size-sm);
  opacity: 0.85;
}

.seasonal-section__body {
  padding: var(--space-4);
}

.seasonal-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.seasonal-card {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .seasonal-card {
    background: rgba(0, 0, 0, 0.2);
  }
}

.seasonal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.seasonal-card__label {
  padding: var(--space-2) var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: white;
  font-weight: 600;
  font-size: var(--font-size-base);
}

.seasonal-card__emoji {
  font-size: 1.5rem;
}

.seasonal-card__name {
  letter-spacing: 0.025em;
}

.seasonal-card__images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border-medium);
}

.seasonal-card__images img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  cursor: pointer;
  transition: all var(--transition-base);
  margin: 0;
}

.seasonal-card__images img:hover {
  filter: brightness(1.1);
}

/* FAQ accordion-style cards */
.faq-item {
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-3);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px) brightness(1.05);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--color-secondary);
  box-shadow: var(--shadow-md);
}

@media (prefers-color-scheme: dark) {
  .faq-item {
    background: rgba(0, 0, 0, 0.15);
    border-color: var(--border-strong);
    border-left-color: var(--color-secondary);
  }
}

.faq-item h2 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  font-size: var(--font-h3);
  color: var(--color-secondary);
  border: none;
  padding: 0;
}

.faq-item p {
  margin-bottom: var(--space-2);
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* Emergency banner highlight */
.emergency-highlight {
  background: linear-gradient(135deg, rgba(204, 51, 51, 0.15), rgba(204, 51, 51, 0.05));
  backdrop-filter: blur(12px) brightness(1.05);
  border: 2px solid var(--color-error);
  box-shadow: var(--shadow-lg);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: var(--space-4);
}

.emergency-highlight p {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-error);
  margin: 0;
}

/* Contact cards for emergency info */
.contact-card {
  padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px) brightness(1.05);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-3);
  transition: all var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .contact-card {
    background: rgba(0, 0, 0, 0.15);
    border-color: var(--border-strong);
  }
}

.contact-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

@media (prefers-color-scheme: dark) {
  .contact-card:hover {
    box-shadow: var(--shadow-xl);
  }
}

.contact-card h3 {
  margin-top: 0;
  margin-bottom: var(--space-2);
  color: var(--color-accent);
  font-size: var(--font-h3);
}

.contact-card p {
  margin-bottom: var(--space-1);
  font-size: var(--font-size-sm);
}

.contact-card p:last-child {
  margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .page-header-card__header,
  .page-header-card__body,
  .content-section {
    padding: var(--space-3);
  }

  .photo-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-2);
    padding: var(--space-3);
  }

  .photo-gallery img {
    height: 180px;
  }

  .info-row {
    flex-direction: column;
    gap: var(--space-1);
  }

  .info-row strong {
    min-width: 0;
  }

  /* Photo page responsive adjustments */
  .before-after-slider__container {
    height: 300px;
  }

  .before-after-slider__handle {
    width: 40px;
    height: 40px;
  }

  .photo-lightbox__nav {
    width: 44px;
    height: 44px;
  }

  .photo-lightbox__nav svg {
    width: 24px;
    height: 24px;
  }

  .seasonal-gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .before-after-slider__container {
    height: 250px;
  }

  .before-after-card__body,
  .seasonal-section__body {
    padding: var(--space-3);
  }

  .photo-lightbox__nav--prev {
    left: var(--space-2);
  }

  .photo-lightbox__nav--next {
    right: var(--space-2);
  }

  .photo-lightbox__close {
    top: var(--space-2);
    right: var(--space-2);
    width: 40px;
    height: 40px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Focus-visible styles */
*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  background: var(--color-accent);
  color: white;
  padding: var(--space-2) var(--space-4);
  z-index: 9999;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: var(--font-size-sm);
  transition: top 200ms ease;
}

.skip-link:focus {
  top: var(--space-2);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
  .theme-toggle,
  nav,
  .card-link::before,
  .skip-link {
    display: none !important;
  }

  body {
    background: var(--color-white) !important;
    color: var(--color-black) !important;
  }

  .site {
    max-width: 100%;
    margin: 0;
    padding: 1rem;
    box-shadow: none !important;
    border: none !important;
    background: var(--color-white) !important;
  }

  .card,
  .card-link {
    page-break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid var(--color-outline) !important;
  }

  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: var(--font-size-sm);
    color: var(--color-muted);
  }

  a[href^='/']::after,
  nav a::after {
    content: '';
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: var(--color-black) !important;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }

  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}
