/* ============================================
   Jazdecká škola Ľubietová — Modern Stylesheet
   Visual design preserved from original site
   ============================================ */

/* ---------- Design Tokens ---------- */
:root {
  /* Original color palette - extracted from site */
  --color-bg-page: #4b6d22;
  --color-dark-brown: #2e2421;
  --color-mid-brown: #4e3d37;
  --color-light-brown: #372b27;
  --color-accent-green: #71a434;
  --color-cream-dark: #cbb68f;
  --color-cream-light: #f9e2c7;
  --color-cream-bg: #f4ddc1;
  --color-text-cream: #edd6b8;
  --color-text-light: #f5ddc1;
  --color-text-nav: #d4be9a;
  --color-text-dark: #2e2421;
  --color-footer-start: #cbb690;
  --color-footer-end: #ffe8ce;

  --font-family: 'Arial', 'Helvetica Neue', Helvetica, sans-serif;
  --font-size-base: 14px;
  --font-size-sm: 13px;
  --font-size-lg: 20px;
  --font-size-xl: 23px;
  --line-height: 1.2;

  --site-max-width: 1000px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg-page);
  color: var(--color-text-cream);
  line-height: var(--line-height);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-cream-light);
  text-decoration: underline;
}

/* ---------- Site Wrapper ---------- */
.site-wrapper {
  max-width: var(--site-max-width);
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===========================================
   HEADER — matches original exactly
   Logo row on top, nav row below
   =========================================== */
.site-header {
  background: linear-gradient(to bottom, var(--color-cream-dark), var(--color-cream-light));
  border-top: 5px solid var(--color-accent-green);
  position: relative;
}

.header-inner {
  width: max-content; /* Shrinks exactly to the width of the navigation bar */
  max-width: 100%;
  margin: 0; /* Left align to match main-content padding */
  position: relative;
}

/* Logo row — sun icon left, title aligned right */
.site-logo {
  display: flex;
  justify-content: flex-end;
  text-decoration: none;
  padding: 8px 10px 6px;
  position: relative;
  /* Removed hardcoded pixel max-width. Alignment is now handled organically by the parent wrapper */
}

.site-logo img.logo-icon {
  position: absolute;
  left: 10px;
  bottom: 0;
  width: 106px;
  height: 46px;
  object-fit: contain;
  z-index: 10;
}

.site-logo img.logo-text {
  height: 49px;
  width: auto;
}

/* ===========================================
   NAVIGATION — small gap between buttons
   =========================================== */
.main-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  padding: 0 10px;
}

.main-nav > * {
  flex: 0 0 auto; /* Prevent sub-pixel squishing */
  margin-right: 2px; /* Explicit margin instead of flex gap for browser consistency */
}

.main-nav > *:last-child {
  margin-right: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 106px;
  height: 30px;
  padding: 0;
  font-family: inherit;
  font-size: var(--font-size-sm);
  color: var(--color-text-cream);
  background: var(--color-dark-brown);
  border: 1px solid #1e1816;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  background: var(--color-mid-brown);
  color: var(--color-accent-green);
  text-decoration: none;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  appearance: none;
  cursor: pointer;
  font-weight: bold;
  color: var(--color-text-nav);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-dark-brown);
  border: 1px solid #333;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.nav-dropdown.is-open .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 11px;
  color: #d1bb96;
  text-decoration: none;
  transition: all 0.15s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.active {
  background: var(--color-mid-brown);
  color: var(--color-accent-green);
  text-decoration: none;
}

/* Green separator under header */
.header-separator {
  height: 5px;
  background: var(--color-accent-green);
}

/* Badge that overhangs the right side of the header (subpages).
   JS hides it dynamically when it would touch .main-nav or .site-logo img.logo-text. */
.header-badge {
  position: absolute;
  right: 12px;
  top: 2px;
  width: 130px;
  z-index: 30;
  pointer-events: none;
}

.header-badge img {
  width: 100%;
  height: auto;
  display: block;
}

.header-badge.is-hidden {
  display: none;
}

/* Mobile menu toggle — hidden on desktop */
.mobile-menu-toggle {
  display: none;
  background: var(--color-dark-brown);
  border: 1px solid #1e1816;
  color: var(--color-text-nav);
  padding: 8px 14px;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.mobile-menu-toggle:hover {
  background: var(--color-mid-brown);
  color: var(--color-accent-green);
}

/* ===========================================
   MAIN CONTENT — edge-to-edge, no side padding
   =========================================== */
.main-content {
  position: relative;
  background: linear-gradient(to bottom, var(--color-mid-brown) 0%, var(--color-dark-brown) 100%);
  padding: 8px 10px 0;
  min-height: 400px;
  overflow: hidden;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

/* ---------- Section Title ---------- */
.section-title-bar {
  background: var(--color-dark-brown);
  display: inline-block;
  padding: 5px 15px;
  margin-bottom: 2px;
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: bold;
  color: var(--color-accent-green);
  margin: 0;
}

.section-subtitle-bar {
  background: var(--color-dark-brown);
  display: inline-block;
  padding: 5px 15px;
  margin-top: 8px;
  margin-bottom: 0;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  font-weight: normal;
  color: var(--color-text-cream);
  margin: 0;
}

.section-subtitle strong {
  font-weight: bold;
  color: var(--color-accent-green);
}

/* ---------- Content Box (cream bg) ---------- */
.content-box {
  background: var(--color-cream-bg);
  border: 1px solid var(--color-dark-brown);
  padding: 10px 20px;
  color: var(--color-text-dark);
  font-size: var(--font-size-base);
  line-height: 1.5;
}

.content-box h2 {
  font-size: var(--font-size-base);
  font-weight: normal;
  color: var(--color-text-dark);
  margin-bottom: 8px;
}

.content-box ul {
  list-style: none;
  padding: 0;
  margin: 4px 0;
}

.content-box li {
  padding: 1px 0 1px 60px;
  position: relative;
}

.content-box li::before {
  content: "-";
  position: absolute;
  left: 46px;
}

/* ---------- Dark Content Area ---------- */
.dark-content {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.dark-content p {
  margin-bottom: 1em;
}

/* ---------- Hero / Slideshow ---------- */
.hero-section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-dark-brown);
  background: var(--color-cream-bg);
  padding: 8px;
  margin-bottom: 0;
}

.slideshow-container {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.slideshow-slides {
  display: flex;
  transition: transform 0.6s ease-in-out;
}

.slideshow-slides img {
  flex: 0 0 100%;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ---------- Hero Wrapper (holds slideshow + badge) ---------- */
.hero-wrapper {
  position: relative;
}

/* ---------- Logo Badge (horseshoe overlay) ---------- */
.logo-badge {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  pointer-events: none;
  width: 35%;
}

.logo-badge img {
  width: 100%;
  height: auto;
}

/* ---------- Two Column Layout ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  align-items: start;
}

.two-col--wide-right {
  grid-template-columns: 350px 1fr;
}

.two-col--wide-left {
  grid-template-columns: 1fr 350px;
}

/* ---------- Horse Portrait Grid ---------- */
.horse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.horse-card {
  background: var(--color-cream-bg);
  border: 1px solid var(--color-dark-brown);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horse-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.horse-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.horse-card-name {
  background: var(--color-dark-brown);
  padding: 4px 15px;
  display: inline-block;
}

.horse-card-name h3 {
  font-size: var(--font-size-base);
  color: var(--color-accent-green);
  font-weight: normal;
  margin: 0;
}

.horse-card a {
  text-decoration: none;
  display: block;
}

/* ---------- Audio Player ---------- */
.audio-player {
  margin: 15px 0;
}

.audio-player audio {
  width: 100%;
  height: 40px;
}

/* ---------- Gallery Grid ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.gallery-grid a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--color-dark-brown);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-grid a:hover img {
  transform: scale(1.05);
}

/* ---------- Image with Shadow ---------- */
.img-shadow {
  box-shadow: 1px 1px 6px rgba(0,0,0,0.8);
}

/* ---------- Cream Frame (image / gallery wrapper on dark bg) ---------- */
.cream-frame {
  background: var(--color-cream-bg);
  border: 1px solid var(--color-dark-brown);
  padding: 6px;
  margin-bottom: 12px;
}

.cream-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Tight Thumb Grid (small thumbnails in a cream frame) ---------- */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.thumb-grid a {
  display: block;
  overflow: hidden;
  cursor: pointer;
}

.thumb-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  transition: transform 0.2s ease;
}

.thumb-grid a:hover img {
  transform: scale(1.05);
}

/* ---------- Decorative Sun ---------- */
.decorative-sun {
  display: block;
  margin: auto auto -5px auto; /* auto top pushes it to the bottom */
  padding-top: 28px;
  max-width: 260px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 5px solid var(--color-accent-green);
  background: linear-gradient(to bottom, var(--color-footer-start), var(--color-footer-end));
  padding: 10px 15px;
  text-align: center;
}

.site-footer a {
  color: #3d3d3d;
  font-size: var(--font-size-sm);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-accent-green);
  text-decoration: underline;
}

/* ---------- Price Table ---------- */
.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.price-table th,
.price-table td {
  padding: 10px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(113, 164, 52, 0.2);
}

.price-table th {
  background: var(--color-dark-brown);
  color: var(--color-accent-green);
  font-weight: bold;
}

.price-table tr:hover td {
  background: rgba(113, 164, 52, 0.05);
}

/* Removed media query - handling dynamically via JS */

/* ===========================================
   RESPONSIVE — mobile (≤ 768px)
   =========================================== */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .header-inner {
    width: 100%; /* Restore full width on mobile so hamburger stays on edge */
  }

  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px; /* Offset to leave the header-separator visible */
    background: var(--color-dark-brown);
    z-index: 999;
    padding: 0;
    width: 100%;
    border-top: none; /* No double green line */
    border-bottom: none; /* Merges seamlessly with overlay */
  }

  /* Overlay that covers main content perfectly when menu is open */
  body.menu-open .main-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-dark-brown);
    z-index: 50; /* Covers all page text/images */
  }

  /* Keep sun exactly in front of the new brown overlay */
  body.menu-open .decorative-sun {
    position: relative;
    z-index: 60;
  }

  .main-nav.is-open {
    display: flex;
  }

  .nav-link {
    width: 100%;
    justify-content: center; /* Center text in full-screen menu */
    padding: 20px;
    font-size: 16px; /* Larger font for mobile menu */
    border: none;
    border-bottom: 1px solid var(--color-light-brown);
    min-width: auto;
  }

  .nav-dropdown-menu {
    position: static;
    display: block;
    box-shadow: none;
    border: none;
    background: var(--color-light-brown);
  }

  .nav-dropdown-menu a {
    padding: 15px;
    font-size: 14px;
    text-align: center;
  }

  .two-col,
  .two-col--wide-right,
  .two-col--wide-left {
    grid-template-columns: 1fr;
  }

  .site-logo {
    max-width: 100%;
    padding-left: 70px; /* Prevents text from ever going behind the hamburger */
    padding-right: 15px;
    display: flex;
    justify-content: flex-end; /* Keep aligned to the right */
  }

  .site-logo img.logo-icon {
    display: none;
  }

  .site-logo img.logo-text {
    height: 49px; /* Keep it large until it runs out of space */
    max-width: 100%;
    object-fit: contain;
    object-position: right center;
  }

  .horse-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .section-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .horse-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

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

  .site-logo img.logo-text {
    height: 24px;
  }

  .content-box {
    padding: 12px;
  }

  .content-box li {
    padding-left: 20px;
  }

  .content-box li::before {
    left: 6px;
  }
}

/* ---------- Lightbox ---------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.9);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox-overlay.is-open {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  border: 0;
  background: transparent;
  color: white;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  z-index: 10001;
}

/* ---------- Horse Story Pages ---------- */
.horse-profile {
  --horse-gap: clamp(16px, 7vw - 28px, 54px);
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: var(--horse-gap);
  align-items: start;
  margin-top: 34px;
  position: relative;
}

.horse-profile::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 6px;
  left: calc(420px + (var(--horse-gap) / 2));
  width: 1px;
  background: linear-gradient(to bottom, var(--color-accent-green), rgba(113, 164, 52, 0));
}

.horse-profile-gallery {
  padding: 10px 10px 8px;
}

.horse-photo-card {
  position: relative;
  aspect-ratio: 800 / 599;
  touch-action: pan-y;
}

.horse-photo-viewport {
  width: 100%;
  height: 100%;
}

.horse-photo {
  display: none;
  width: 100%;
  height: 100%;
}

.horse-photo.is-active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.horse-photo img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 1px 1px 6px rgba(0,0,0,0.75);
}

.horse-photo-nav {
  position: relative;
  flex: 0 0 auto;
  width: 24px;
  height: 18px;
  border: 0;
  background: transparent;
  color: var(--color-dark-brown);
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  padding: 0;
  transition: color 160ms ease;
}

.horse-photo-nav::before {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  color: var(--color-dark-brown);
  font-family: Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
  text-align: center;
  transform: translateY(-54%);
  transition: color 160ms ease;
}

.horse-photo-nav--prev::before {
  content: "‹";
}

.horse-photo-nav--next::before {
  content: "›";
}

.horse-photo-nav:hover,
.horse-photo-nav:focus-visible {
  outline: none;
}
.horse-photo-nav:hover,
.horse-photo-nav:focus-visible {
  color: var(--color-accent-green);
}

.horse-photo-nav:hover::before,
.horse-photo-nav:focus-visible::before {
  color: var(--color-accent-green);
}

.horse-photo-card.has-one-photo .horse-photo-nav,
.horse-photo-card.has-one-photo + .horse-photo-controls {
  display: none;
}

.horse-photo-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 11px;
  width: fit-content;
  max-width: 100%;
  margin: 9px auto 0;
  padding: 0;
}

.horse-photo-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: var(--color-dark-brown);
  line-height: 1;
  text-align: center;
}

.horse-photo-dot {
  width: 13px;
  height: 13px;
  border: 1px solid rgba(46, 36, 33, 0.62);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
  display: block;
  transition: background 160ms ease, border-color 160ms ease;
}

.horse-photo-dot.is-active {
  background: var(--color-accent-green);
  border-color: rgba(46, 36, 33, 0.76);
}

.horse-profile-story {
  line-height: 1.7;
}

.story-panel {
  background: rgba(46, 36, 33, 0.45);
  padding: 16px 18px;
}

.horse-profile-story p {
  margin-bottom: 1.25em;
}

.horse-profile-story p:last-child {
  margin-bottom: 0;
}

.horse-audio {
  grid-column: 1 / -1;
  position: relative;
  margin-top: 2px;
  padding: 16px 18px 20px;
  background: rgba(46, 36, 33, 0.45);
}

.horse-audio h2 {
  display: inline-block;
  margin: 0 0 14px;
  padding: 7px 13px 8px;
  background: var(--color-dark-brown);
  color: var(--color-accent-green);
  font-size: 20px;
  font-weight: normal;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.horse-audio p,
.horse-audio audio {
  position: relative;
  z-index: 1;
}

.horse-audio p {
  max-width: 760px;
  margin-bottom: 12px;
}

.horse-audio audio {
  width: min(100%, 820px);
  display: block;
}

.horse-audio-flower {
  position: absolute;
  right: -28px;
  bottom: -84px;
  width: min(52vw, 520px);
  opacity: 0.78;
  pointer-events: none;
}

.story-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.story-pager a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  background: linear-gradient(#4e3d37, #2e2421);
  border: 1px solid var(--color-cream-bg);
  color: var(--color-cream-bg);
  text-decoration: none;
  font-size: 13px;
}

.story-pager a:hover {
  color: var(--color-accent-green);
  text-decoration: none;
}

@media (max-width: 820px) {
  .horse-profile {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 24px;
  }

  .horse-profile::before {
    display: none;
  }

  .horse-profile-story {
    order: 1;
  }

  .horse-audio {
    order: 2;
    margin-top: -18px;
    border-top: 1px solid rgba(245, 221, 193, 0.08);
  }

  .horse-profile-gallery {
    order: 3;
  }

  .horse-audio-flower {
    display: none;
  }
}

@media (max-width: 520px) {
  .story-panel,
  .horse-audio {
    padding: 13px 12px;
  }

  .horse-profile-gallery {
    padding: 7px;
  }

  .horse-photo-nav {
    width: 32px;
    height: 24px;
  }

  .horse-photo-meta {
    gap: 6px;
  }

  .story-pager {
    display: grid;
    grid-template-columns: 1fr;
  }

  .story-pager a {
    justify-content: center;
  }
}

/* ---------- Remaining Subpages ---------- */
.subpage-grid {
  --subpage-gap: clamp(16px, 7vw - 28px, 52px);
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: var(--subpage-gap);
  align-items: start;
  margin-top: 32px;
  position: relative;
}

.subpage-grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 18px;
  left: calc(360px + (var(--subpage-gap) / 2));
  width: 1px;
  background: linear-gradient(to bottom, var(--color-accent-green), rgba(113, 164, 52, 0));
}

.subpage-panel {
  background: rgba(46, 36, 33, 0.45);
  padding: 16px 18px;
  line-height: 1.65;
}

.subpage-panel p {
  margin-bottom: 1.15em;
}

.subpage-panel p:last-child,
.subpage-panel ul:last-child {
  margin-bottom: 0;
}

.subpage-panel h2,
.subpage-panel h3 {
  color: var(--color-accent-green);
  font-weight: normal;
  margin: 0 0 0.85em;
}

.subpage-panel h2 {
  font-size: 21px;
}

.subpage-panel h3 {
  font-size: 18px;
  margin-top: 1.2em;
}

.feature-list,
.simple-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feature-list li,
.simple-list li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 0.75em;
}

.feature-list li::before,
.simple-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.66em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent-green);
}

.media-column {
  display: grid;
  gap: 22px;
}

.media-frame {
  background: var(--color-cream-bg);
  border: 1px solid var(--color-dark-brown);
  padding: 9px;
  box-shadow: 1px 1px 6px rgba(0,0,0,0.75);
}

.media-frame img,
.media-frame iframe {
  display: block;
  width: 100%;
}

.media-frame img {
  height: auto;
  box-shadow: 1px 1px 6px rgba(0,0,0,0.55);
}

.video-frame iframe,
.map-frame iframe {
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.map-frame iframe {
  aspect-ratio: 4 / 3;
}

.article-page {
  margin-top: 32px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  gap: clamp(18px, 5vw, 48px);
  align-items: start;
}

.article-layout .subpage-panel {
  max-width: 680px;
}

.article-media {
  display: grid;
  gap: 22px;
}

.course-layout {
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  gap: clamp(18px, 5vw, 42px);
  align-items: start;
  margin-top: 32px;
}

.course-media {
  display: grid;
  gap: 22px;
}

.gallery-panel .thumb-grid {
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: clamp(18px, 5vw, 52px);
  align-items: start;
  margin-top: 32px;
}

.contact-detail {
  font-size: 18px;
}

.contact-detail strong {
  color: var(--color-cream-bg);
}

.contact-detail a {
  color: var(--color-cream-bg);
}

.contact-detail .label {
  display: block;
  margin-top: 1.1em;
  color: var(--color-accent-green);
}

@media (max-width: 820px) {
  .subpage-grid,
  .article-layout,
  .course-layout,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .subpage-grid::before {
    display: none;
  }

  .media-column,
  .article-media,
  .course-media {
    order: 2;
  }

  .subpage-panel,
  .course-layout .subpage-panel,
  .contact-detail {
    order: 1;
  }
}

@media (max-width: 520px) {
  .subpage-panel {
    padding: 13px 12px;
  }

  .media-frame {
    padding: 7px;
  }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
