/* ===================================
   CSS Variables (Custom Properties)
   =================================== */
:root {
  --primary-color: #4a5568;
  --accent-color: #7a2333;       /* deep burgundy; contrast on white 9.9:1 (WCAG AAA) */
  --accent-secondary: #9c3a49;   /* lighter burgundy, gradient endpoints */
  --accent-light: #e6b8ac;       /* warm champagne-rose, for text/links on dark backgrounds (nav, footer) */
  --background-color: #f8f7f5;   /* warm off-white, so white cards read as raised */
  --card-background: #ffffff;
  --surface-muted: #f4f2f0;      /* quiet fills: detail tiles, captions, tints */
  --text-color: #2d3748;
  --text-secondary: #5a6a7a;     /* darkened from #718096 for WCAG AA contrast on white (5.6:1) */
  --border-color: #e7e3df;
  --dark-navy: #1a202c;
  --dark-navy-light: #2d3748;
  --spacing: 2rem;
  --radius: 16px;
  --radius-sm: 10px;
  --prose-width: 760px;          /* ~75 characters per line at body size */
  --shadow-light: 0 1px 2px rgba(17, 24, 39, 0.04), 0 4px 14px rgba(17, 24, 39, 0.05);
  --shadow-medium: 0 2px 4px rgba(17, 24, 39, 0.05), 0 12px 32px rgba(17, 24, 39, 0.1);
  --font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
}

/* ===================================
   Fonts (self-hosted, no third-party requests)
   =================================== */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/playfair-600.woff2") format("woff2");
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/playfair-700.woff2") format("woff2");
}

@font-face {
  font-family: "Playfair Display";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/playfair-600italic.woff2") format("woff2");
}

/* ===================================
   Base Reset & Typography
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent-color);
  text-underline-offset: 0.15em;
}

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

/* ===================================
   Accessibility Utilities
   =================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===================================
   Header & Navigation
   =================================== */
/* Slim masthead on inner pages: a breadcrumb trail, not a repeated title */
.masthead {
  background: var(--card-background);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb ol {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.7rem var(--spacing);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breadcrumb li + li::before {
  content: "/";
  margin: 0 0.6em;
  color: #a1a1aa;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

.breadcrumb [aria-current="page"] {
  color: var(--text-color);
  font-weight: 600;
}

/* Homepage hero: real H1 + intro over a darkened Degas rehearsal painting */
.home-hero {
  position: relative;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(26, 32, 44, 0.94) 0%, rgba(26, 32, 44, 0.8) 48%, rgba(61, 32, 41, 0.55) 100%),
    url("/images/hero/degas-rehearsal.webp") center 40% / cover no-repeat,
    var(--dark-navy);
}

.home-hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 4.5rem var(--spacing) 4rem;
}

.home-hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.home-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  max-width: 20ch;
  margin-bottom: 1.25rem;
}

.home-hero-lede {
  font-size: 1.15rem;
  line-height: 1.7;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.88);
}

.home-hero .cta-group {
  justify-content: flex-start;
}

.home-hero-credit {
  position: absolute;
  right: 1rem;
  bottom: 0.6rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ===================================
   Main Content Layout
   =================================== */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--spacing);
}

/* About page specific main container */
.about-main,
main:has(.about-section) {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 3rem;
  background: var(--card-background);
  border-radius: var(--radius);
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  margin-top: var(--spacing);
  margin-bottom: var(--spacing);
}

/* ===================================
   Hero Sections
   =================================== */
/* Page title on About / Contact / Privacy-style pages */
main:has(.about-section) > h1 {
  font-size: 2.4rem;
  color: var(--primary-color);
  margin-bottom: 1.25rem;
}

.hero-section {
  background: var(--card-background);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  margin: 2rem 0;
  text-align: center;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.hero-section h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.hero-section p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* ===================================
   Page Headers
   =================================== */
.page-header {
  text-align: center;
  margin: 1.5rem auto 2.5rem;
  max-width: 820px;
}

.page-header h1,
.page-header h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.9rem;
  font-weight: 700;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 68ch;
  margin: 0 auto;
  line-height: 1.7;
}

.page-header p + p {
  margin-top: 0.9rem;
}

/* ===================================
   Sections & General Content
   =================================== */
.section {
  margin: 3rem 0;
}

.section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 600;
}

/* ===================================
   About Page Specific Styles
   =================================== */
.about-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
  margin: 2rem 0;
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, var(--accent-color) 0%, #9c3a49 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 300;
}

.about-section {
  margin-bottom: 2.5rem;
}

.about-section h2 {
  color: var(--primary-color);
  margin-bottom: 0.9rem;
  font-size: 1.6rem;
  font-weight: 600;
}

.about-section h3 {
  color: var(--accent-color);
  margin: 1.5rem 0 0.75rem 0;
  font-size: 1.3rem;
  font-weight: 600;
}

.about-section p {
  margin-bottom: 1.2rem;
  color: var(--text-color);
  font-size: 1rem;
  line-height: 1.7;
}

.donation-section {
  background: linear-gradient(
    135deg,
    rgba(122, 35, 51, 0.05) 0%,
    rgba(156, 58, 73, 0.05) 100%
  );
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.donation-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.6rem;
}

.donation-section p {
  font-size: 1.1rem;
  color: var(--text-color);
  margin-bottom: 1.5rem;
}

.donation-button {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
}

.coffee-button {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  margin-top: 1rem;
  border: none;
  cursor: pointer;
}

.coffee-button::before {
  content: "☕ ";
  margin-right: 0.5rem;
}

.mission-highlight {
  background: rgba(181, 73, 90, 0.08);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.mission-highlight p {
  margin-bottom: 0;
  font-style: italic;
  color: var(--text-color);
}

/* ===================================
   FAQ Accordion Styles
   =================================== */
.faq-section {
  background: var(--card-background);
  border-radius: 12px;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin: 2rem 0;
}

.faq-section-header {
  padding: 1.5rem 2rem;
  background: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.faq-section-header:hover {
  background: rgba(181, 73, 90, 0.05);
}

.faq-section-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.3rem;
  font-weight: 600;
}

.faq-accordion-icon {
  font-size: 1.5rem;
  color: var(--accent-color);
  font-weight: bold;
  transition: transform 0.3s ease;
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 2rem;
  background: var(--card-background);
}

.faq-content.expanded {
  max-height: 2000px;
  padding: 2rem;
}

.faq-item {
  margin-bottom: 1.5rem;
}

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

.faq-question {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.faq-answer {
  color: var(--text-color);
  line-height: 1.7;
  padding-left: 1rem;
  border-left: 3px solid rgba(181, 73, 90, 0.2);
}

/* ===================================
   Index Page Specific Styles
   =================================== */

/* CTA button group in hero */
.cta-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Sections with standard vertical spacing */
.overview-section {
  margin: 3rem 0;
}

/* Centred call-to-action at the foot of a section */
.section-footer {
  text-align: center;
  margin-top: 2rem;
}

/* Block accent links listed inside a card (Learn / History / People cards) */
.card-nav-link {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--accent-color);
  text-decoration: none;
}

/* Wrapper for the list of card-nav-links */
.card-links {
  margin-bottom: 1rem;
}

/* Inline button group within a card (Stories / Quizzes cards) */
.card-btn-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

/* Small secondary note at the foot of a card */
.card-note {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Related sites - a quiet footnote row, not a banner competing with real content */
.related-sites-section {
  margin: 4rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.related-sites-eyebrow {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.related-sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.related-site-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s;
}

.related-site-link:hover {
  border-color: var(--accent-color);
  background: rgba(122, 35, 51, 0.03);
}

.related-site-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color);
}

.related-site-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Featured preview cards on the homepage use a slightly smaller image
   and tighter heading spacing than the full ballet-grid cards. The source
   photos vary wildly in color grading, so a shared warm filter ties them
   together visually instead of looking like mismatched stock photos. */
.featured-card img {
  height: 200px;
  filter: grayscale(0.15) sepia(0.12) saturate(1.15) contrast(1.02);
}

.featured-card h3 {
  margin-bottom: 0.5rem;
}

.featured-card-body {
  padding: 1.5rem;
}

.featured-card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
}

.cta-button {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  transition: background-color 0.2s ease, transform 0.2s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
}

/* Outline button for dark backgrounds (homepage hero) */
.cta-button.ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
}

.cta-button.ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.popular-ballets {
  background: var(--card-background);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
}

.ballet-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.ballet-item {
  padding: 1rem;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-color);
  cursor: pointer;
}

.ballet-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.ballet-item p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===================================
   Stories/Ballet Grid Styles
   =================================== */
.ballet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  margin-top: var(--spacing);
}

.featured-stories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.ballet-card,
.featured-card {
  background: var(--card-background);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  border: 1px solid var(--border-color);
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ballet-card:hover,
.featured-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.ballet-card:hover::before,
.featured-card:hover::before {
  transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
  .ballet-card,
  .featured-card,
  .cta-button {
    transition: none;
  }

  .ballet-card:hover,
  .featured-card:hover,
  .cta-button:hover {
    transform: none;
  }
}

.ballet-card::before,
.featured-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-color), #9c3a49);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.ballet-card-link,
.featured-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.ballet-card img,
.featured-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.ballet-card-content,
.featured-card-content {
  padding: 1.6rem 1.75rem 1.75rem;
}

.ballet-card h3,
.featured-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.6rem;
  font-size: 1.4rem;
  font-weight: 600;
}

.ballet-card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.card-icon {
  flex-shrink: 0;
  width: 1.3rem;
  height: 1.3rem;
  color: var(--accent-color);
}

.ballet-card p,
.featured-card p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.card-meta {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.rss-status {
  color: var(--text-secondary);
  font-style: italic;
  margin-top: var(--spacing);
}

.ballet-card h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.ballet-card h3 a:hover,
.ballet-card h3 a:focus-visible {
  color: var(--accent-color);
  text-decoration: underline;
}

.read-more-btn,
.card-button {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  background-color: transparent;
  color: var(--accent-color);
  border: 1.5px solid var(--accent-color);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.read-more-btn:hover,
.card-button:hover {
  background-color: var(--accent-color);
  color: white;
}

/* News page: smaller, denser cards */
#rss-viewer.ballet-grid,
#rss-viewer .ballet-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

#rss-viewer .ballet-card-content {
  padding: 1.25rem;
}

#rss-viewer .ballet-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

#rss-viewer .ballet-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

#rss-viewer .card-meta {
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

#rss-viewer .read-more-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ===================================
   Pagination Styles
   =================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0 2rem 0;
  gap: 1rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 12px 24px;
  background: var(--card-background);
  color: var(--primary-color);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease;
  box-shadow: var(--shadow-light);
}

.pagination-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.pagination-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.page-info {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0 1rem;
}

/* ===================================
   Footer Styles
   =================================== */
footer {
  background: linear-gradient(135deg, var(--dark-navy) 0%, var(--dark-navy-light) 55%, #3d2029 100%);
  color: white;
  padding: var(--spacing);
  margin-top: 4rem;
  border-top: 1px solid rgba(230, 184, 172, 0.2);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing);
}

.footer-section h3 {
  margin-bottom: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-light);
  font-family: var(--font-heading);
}

.footer-section p {
  opacity: 0.9;
  font-size: 0.95rem;
  line-height: 1.5;
}

.footer-link {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}

.share-links {
  display: flex;
  gap: 0.75rem;
}

.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-light);
  transition: background 0.3s ease, transform 0.2s ease;
}

.share-link:hover,
.share-link:focus-visible {
  background: var(--accent-light);
  color: var(--dark-navy);
  transform: translateY(-2px);
}

/* ===================================
   Responsive Design - Tablet & Mobile
   =================================== */
@media (max-width: 768px) {
  :root {
    --spacing: 1rem;
  }

  .home-hero-inner {
    padding: 3rem var(--spacing) 3.25rem;
  }

  .home-hero-lede {
    font-size: 1.02rem;
  }

  .home-hero-credit {
    left: var(--spacing);
    right: auto;
  }

  .hero-section {
    padding: 2rem 1.5rem;
    margin: 1rem 0;
  }

  .hero-section h2 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .page-header h1,
  .page-header h2 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 1rem;
  }

  /* About page specific mobile styles */
  main:has(.about-section) {
    margin: var(--spacing);
    padding: 1.5rem;
  }

  .about-image {
    height: 300px;
    font-size: 1.2rem;
  }

  .about-section h2 {
    font-size: 1.5rem;
  }

  .about-section h3 {
    font-size: 1.2rem;
  }

  .donation-section {
    padding: 1.5rem;
  }

  .donation-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  /* FAQ specific mobile styles */
  .faq-section-header {
    padding: 1.2rem 1.5rem;
  }

  .faq-section-header h3 {
    font-size: 1.2rem;
  }

  .faq-content {
    padding: 0 1.5rem;
  }

  .faq-content.expanded {
    padding: 1.5rem;
  }

  /* Glossary specific mobile styles */
  .glossary-container {
    padding: 1.5rem;
  }

  .alphabet-nav {
    gap: 0.3rem;
    padding: 1rem;
  }

  .alphabet-nav a {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    min-width: 35px;
  }

  .glossary-section h3 {
    font-size: 1.6rem;
  }

  .glossary-term {
    padding: 1rem;
  }

  .story-terms {
    padding: 1.5rem;
  }

  /* Stories/Ballet grid mobile styles */
  .ballet-grid,
  .featured-stories {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ballet-list {
    grid-template-columns: 1fr;
  }

  .ballet-card-content,
  .featured-card-content {
    padding: 1.5rem;
  }

  /* Pagination mobile styles */
  .pagination {
    margin: 2rem 0 1rem 0;
    gap: 0.5rem;
  }

  .pagination-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
  }

  .page-info {
    font-size: 0.9rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .hero-section h2,
  .page-header h1,
  .page-header h2 {
    font-size: 1.8rem;
  }

  .section h2 {
    font-size: 1.6rem;
  }

  .glossary-section h3 {
    font-size: 1.4rem;
  }

  .alphabet-nav a {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    min-width: 30px;
  }

  .ballet-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Navbar container */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--dark-navy);
  color: #fff;
  padding: 0.6rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(230, 184, 172, 0.15);
}

/* Logo + Brand */
.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-left img {
  width: 40px;
  height: 40px;
}

.nav-home-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.brand {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Menu Items */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-links li {
  list-style: none;
  position: relative;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  padding: 0.5rem 0.6rem;
  display: block;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent-light);
}

/* Dropdown Menu */
/* Dropdown Menu: a small CSS chevron instead of a heavy ▼ glyph */
.dropdown > a::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.5em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-0.2em) rotate(45deg);
  transition: transform 0.2s ease;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--dark-navy-light);
  min-width: 220px;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  z-index: 1001;
  border-top: 2px solid var(--accent-color);
  padding: 0.35rem 0;
}

.dropdown-content a {
  padding: 0.75rem 1rem;
}

.dropdown-content a:hover {
  background-color: rgba(230, 184, 172, 0.12);
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  padding: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: #fff;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
  will-change: transform, opacity;
}

/* Hamburger Animation */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive */
@media (max-width: 768px) {
  .site-nav {
    position: relative;
    padding: 0.6rem 1rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--dark-navy);
    position: absolute;
    top: 100%;
    left: 0;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
  }

  .nav-links.show {
    display: flex;
    animation: slideDown 0.3s ease-out;
  }

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

  .nav-links li {
    width: 100%;
    border-bottom: 1px solid #333;
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links > li > a {
    padding: 1rem 1.5rem;
    text-align: left;
    width: 100%;
    display: block;
  }

  .nav-links > li > a:hover {
    background-color: var(--dark-navy-light);
  }

  /* Simple dropdown for mobile */
  .dropdown:hover .dropdown-content {
    display: none;
  }

  .dropdown-content {
    display: none;
    background-color: var(--dark-navy);
    width: 100%;
    position: relative;
    z-index: 10;
  }

  .dropdown.active .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease-out;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  .dropdown-content a {
    padding: 0.75rem 2.5rem;
    border-bottom: 1px solid #444;
    color: #ccc;
    display: block;
    background-color: var(--dark-navy);
  }

  .dropdown-content a:last-child {
    border-bottom: none;
  }

  .dropdown-content a:hover {
    background-color: var(--dark-navy-light);
    color: #fff;
  }

  /* Arrow for mobile dropdowns */
  .dropdown > a::after {
    float: right;
    margin-top: 0.55em;
  }

  .dropdown.active > a::after {
    transform: translateY(0.1em) rotate(-135deg);
  }
}

/* ===================================
   Skip to main content link
   =================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  background: #000;
  color: #fff;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-link:focus {
  left: 0;
}

/* ===================================
   Keyboard-accessible dropdowns (desktop)
   =================================== */
@media (min-width: 769px) {
  .dropdown:focus-within .dropdown-content {
    display: block;
  }
}

/* ===================================
   Active nav link highlighting
   =================================== */
.nav-links a.active {
  color: var(--accent-light);
}

.nav-links .has-active > a {
  color: var(--accent-light);
}


