/* ============================================
   The Lightness Foundation — Heritage Modern
   Equestrian Elegance Meets Contemporary Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================
   CSS Variables — Heritage Equestrian Palette
   ============================================ */
:root {
  /* Dark Theme — Heritage Barn */
  --bg-primary: #1c1917;        /* Warm charcoal / barn wood */
  --bg-secondary: #292524;      /* Leather brown */
  --bg-card: #231f1b;           /* Saddle leather */
  --bg-elevated: #2d2924;       /* Lighter leather */
  
  --text-primary: #fafaf9;      /* Warm white / cream */
  --text-secondary: #a8a29e;    /* Warm gray / sand */
  --text-muted: #78716c;        /* Stone gray */
  
  /* Amber/Gold — Wheat, honey, autumn */
  --amber: #d97706;
  --amber-light: #f59e0b;
  --amber-dark: #92400e;
  --amber-glow: rgba(217, 119, 6, 0.2);
  
  /* Sage/Olive — Nature, pastures */
  --sage: #65a30d;
  --sage-light: #84cc16;
  --sage-dark: #3f6212;
  
  /* Earth tones */
  --earth-cream: #fef3c7;
  --earth-sand: #d6d3d1;
  --earth-clay: #9a3412;
  
  /* Semantic Colors */
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  --color-warning: #f59e0b;
  
  /* Border Radius Scale */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  /* Borders & Shadows */
  --border: rgba(250, 250, 249, 0.08);
  --border-strong: rgba(250, 250, 249, 0.15);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Light Theme — Natural Day */
[data-theme="light"] {
  --bg-primary: #fafaf9;        /* Cream / warm white */
  --bg-secondary: #f5f5f4;      /* Soft white */
  --bg-card: #ffffff;           /* Pure white */
  --bg-elevated: #e7e5e4;       /* Warm gray */
  
  --text-primary: #1c1917;      /* Warm charcoal */
  --text-secondary: #57534e;    /* Warm brown-gray */
  --text-muted: #a8a29e;        /* Sand */
  
  /* Rust/Amber for light mode */
  --amber: #c2410c;
  --amber-light: #ea580c;
  --amber-dark: #9a3412;
  --amber-glow: rgba(194, 65, 12, 0.15);
  
  --sage: #3f6212;
  --sage-light: #65a30d;
  --sage-dark: #14532d;
  
  --border: rgba(28, 25, 23, 0.08);
  --border-strong: rgba(28, 25, 23, 0.15);
  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(28, 25, 23, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(28, 25, 23, 0.1);
}

/* ============================================
   Texture Overlay
   ============================================ */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: ensure content is visible after 2 seconds even if JS fails */
@media (prefers-reduced-motion: no-preference) {
  .document-grid-featured .reveal,
  .document-grid .reveal {
    animation: revealFallback 0.8s ease 2s forwards;
  }
  
  @keyframes revealFallback {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Override animation when JS properly activates */
.document-grid-featured .reveal.active,
.document-grid .reveal.active {
  animation: none;
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }

/* ============================================
   Typography — Heritage Style
   ============================================ */
h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 { 
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
}

h2 { 
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h3 { 
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 600;
}

h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  line-height: 1.8;
}

a {
  color: var(--amber-light);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--amber);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.25rem;
  }
}

/* ============================================
   Navigation — Heritage Style
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all 0.4s ease;
  border-bottom: 1px solid transparent;
  /* Default background for when no theme is set (dark theme default) */
  background: rgba(28, 25, 23, 0.5);
  backdrop-filter: blur(12px);
}

.navbar.scrolled {
  padding: 0.875rem 0;
  background: rgba(28, 25, 23, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(250, 250, 249, 0.95);
}

/* Light theme: semi-transparent navbar at top of page */
[data-theme="light"] .navbar {
  background: rgba(250, 250, 249, 0.5);
  backdrop-filter: blur(12px);
}

/* Dark theme: semi-transparent navbar at top of page */
[data-theme="dark"] .navbar {
  background: rgba(28, 25, 23, 0.5);
  backdrop-filter: blur(12px);
}

.navbar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.logo img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.logo:hover {
  opacity: 0.85;
}

/* Nav Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  letter-spacing: 0.5px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--amber);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Theme Toggle */
.theme-toggle {
  margin-left: 1.5rem;
}

.theme-toggle-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

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

.theme-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.theme-toggle-btn .moon-icon { display: none; }

[data-theme="light"] .theme-toggle-btn .sun-icon { display: none; }
[data-theme="light"] .theme-toggle-btn .moon-icon { display: block; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ============================================
   Hero — Heritage Equestrian
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px 0 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--bg-primary) 0%,
    rgba(28, 25, 23, 0.9) 30%,
    rgba(28, 25, 23, 0.7) 60%,
    rgba(28, 25, 23, 0.9) 100%
  );
  z-index: -1;
}

/* When there's a hero image */
.hero.has-image::before {
  background: linear-gradient(
    135deg,
    rgba(28, 25, 23, 0.55) 0%,
    rgba(28, 25, 23, 0.22) 50%,
    rgba(28, 25, 23, 0.50) 100%
  );
}

/* Light theme — more transparent overlay to show image better */
[data-theme="light"] .hero::before {
  background: linear-gradient(
    180deg,
    rgba(250, 250, 249, 0.7) 0%,
    rgba(250, 250, 249, 0.4) 30%,
    rgba(250, 250, 249, 0.3) 60%,
    rgba(250, 250, 249, 0.6) 100%
  );
}

[data-theme="light"] .hero.has-image::before {
  background: linear-gradient(
    135deg,
    rgba(250, 250, 249, 0.4) 0%,
    rgba(250, 250, 249, 0.1) 50%,
    rgba(250, 250, 249, 0.35) 100%
  );
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}

/* Hero background images - page specific */
.hero-home .hero-image {
  background-image: url('../img/hero-home.jpg');
}

.hero-tournament .hero-image {
  background-image: url('../img/KAT_9047.jpg');
}

.hero-calendar .hero-image {
  background-image: url('../img/KAT_4091.jpg');
}

.hero-gallery .hero-image {
  background-image: url('../img/AZLT5.jpg');
}

.hero-content {
  max-width: 700px;
  padding: 0 2rem;
  animation: fadeInUp 1s ease-out;
}

/* Hero text box — visible in both themes with different opacity */
.hero-text-box {
  border-radius: 16px;
  padding: 2rem 2.5rem;
  /* Default background for heroes with images when no theme is set */
  background: rgba(28, 25, 23, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

/* Dark theme: semi-transparent background for heroes with images */
[data-theme="dark"] .hero.has-image .hero-text-box {
  background: rgba(28, 25, 23, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

/* Dark theme: fully transparent for heroes without images */
[data-theme="dark"] .hero:not(.has-image) .hero-text-box {
  background: transparent;
  box-shadow: none;
}

/* Light theme: 0.5 opacity white background */
[data-theme="light"] .hero-text-box {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

/* Heroes WITHOUT images: remove text box and center text */
.hero:not(.has-image) .hero-text-box {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-align: center;
}

[data-theme="light"] .hero:not(.has-image) .hero-text-box {
  background: transparent;
  box-shadow: none;
}

/* Center hero content for heroes without images */
.hero:not(.has-image) .hero-content {
  margin: 0 auto;
}

/* Responsive adjustments for hero text box */
@media (max-width: 640px) {
  .hero-text-box {
    padding: 1.5rem;
    border-radius: 12px;
  }
}

/* Text shadow for readability — dark theme keeps shadows for image visibility */
.hero-content h1,
.hero-content .hero-description {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7), 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Light theme: no text shadows needed with the semi-transparent box */
[data-theme="light"] .hero-content h1,
[data-theme="light"] .hero-content .hero-description {
  text-shadow: none;
}

/* Tournament hero variant */
.hero-tournament {
  min-height: 60vh;
  padding: 140px 0 80px;
}

/* Calendar hero variant */
.hero-calendar {
  min-height: 50vh;
  padding: 140px 0 60px;
}

.hero-calendar .hero-content {
  max-width: 800px;
}

/* Gallery hero variant */
.hero-gallery {
  min-height: 50vh;
  padding: 140px 0 60px;
}

.hero-gallery .hero-content {
  max-width: 800px;
}

.hero-content-wide {
  max-width: 900px;
}

/* Side-by-side sections on tournament page */
@media (max-width: 768px) {
  #upcoming .container > div {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  #upcoming .container > div > div {
    padding: 1.5rem !important;
  }
}

/* ============================================
   Rules Quick Access — Tournament Page
   ============================================ */
.rules-quick-strip {
  padding: 60px 0;
}

.rules-quick-strip .card-grid-2col {
  max-width: 800px;
  margin: 0 auto;
}

/* Document card variant */
.card-document {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.card-document-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber-dark), var(--amber));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: white;
}

.card-document-icon svg {
  width: 18px;
  height: 18px;
}

.card-document h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.card-document p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* Two-column card grid for documents */
.card-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

/* ============================================
   5-Column Card Grid
   ============================================ */
.card-grid-5col {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

/* Card adjustments for 5-column layout */
.card-grid-5col .card {
  padding: 1.75rem 1.25rem;
}

.card-grid-5col .card-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 1rem;
}

.card-grid-5col .card-icon svg {
  width: 20px;
  height: 20px;
}

.card-grid-5col .card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.625rem;
}

.card-grid-5col .card p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* Card link style for rules cards */
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--amber-light);
  transition: color 0.2s ease;
}

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

/* Rules cards accent */
.card-rules {
  border-color: rgba(217, 119, 6, 0.25);
}

/* Responsive */
@media (max-width: 1199px) {
  .card-grid-5col {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .card-grid-5col .card {
    padding: 1.75rem;
  }
}

@media (max-width: 768px) {
  .card-grid-5col {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .card-grid-5col {
    grid-template-columns: 1fr;
  }
  
  .card-grid-5col .card {
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .rules-quick-strip {
    padding: 40px 0;
  }
  
  .card-document {
    padding: 1.5rem;
  }
  
  .card-grid-2col {
    grid-template-columns: 1fr;
  }
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.2);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--amber-light);
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
}

.hero h1 {
  margin-bottom: 1.25rem;
  line-height: 1.15;
}

.hero h1 em {
  color: var(--amber-light);
  font-style: italic;
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 540px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  cursor: pointer;
  /* Reset button styles */
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  transition: color 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

.scroll-indicator:hover {
  color: var(--amber);
}

.scroll-indicator svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   Buttons — Heritage Style
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--amber);
  color: white;
}

.btn-primary:hover {
  background: var(--amber-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px var(--amber-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--amber);
  color: var(--amber);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 0.95rem;
}

/* Focus indicators for keyboard navigation */
.btn:focus-visible,
.nav-links a:focus-visible,
.footer a:focus-visible,
.footer-logo-link:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* Gallery item focus */
.gallery-item:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
  transform: translateY(-4px);
}

/* Lightbox button focus */
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid white;
  outline-offset: 2px;
}

/* Scroll indicator focus */
.scroll-indicator:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

/* ============================================
   Section: Welcome / Philosophy
   ============================================ */
.section-welcome {
  padding: 100px 0;
  background: linear-gradient(
    135deg,
    var(--bg-secondary) 0%,
    var(--bg-primary) 50%,
    var(--bg-secondary) 100%
  );
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* Ambient glow decoration */
.section-welcome::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    var(--amber-glow) 0%,
    transparent 70%
  );
  opacity: 0.5;
  pointer-events: none;
}

/* Header */
.welcome-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 3rem;
}

.welcome-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.welcome-headline .accent {
  color: var(--amber-light);
  display: block;
}

.welcome-subtitle {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

/* Two-column layout */
.welcome-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

/* Left column: Image */
.welcome-image-col {
  position: relative;
}

.welcome-image-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: perspective(1000px) rotateY(-3deg);
  transition: transform 0.5s ease;
  max-width: 400px;
  margin: 0 auto;
}

.welcome-image-wrapper:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.welcome-image {
  width: 100%;
  height: auto;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.welcome-image-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  pointer-events: none;
}

/* Amber accent corner */
.welcome-image-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60px;
  height: 60px;
  border-top: 3px solid var(--amber);
  border-left: 3px solid var(--amber);
  border-radius: 16px 0 0 0;
  z-index: 1;
  pointer-events: none;
}

/* Right column: Content */
.welcome-content-col {
  position: relative;
  z-index: 1;
}

.welcome-text {
  margin-bottom: 2rem;
}

.welcome-text p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.welcome-text p:last-child {
  margin-bottom: 0;
}

/* Tournament card */
.tournament-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  position: relative;
}

.tournament-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--amber-dark),
    var(--amber),
    var(--amber-light)
  );
  border-radius: 12px 12px 0 0;
}

.tournament-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.tournament-card p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .welcome-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .welcome-image-wrapper {
    max-width: 384px;
    margin: 0 auto;
    transform: none;
  }
  
  .welcome-image-wrapper:hover {
    transform: none;
  }
}

@media (max-width: 640px) {
  .section-welcome {
    padding: 70px 0;
  }
  
  .welcome-grid {
    gap: 2rem;
  }
  
  .welcome-image-wrapper {
    max-width: 307px;
  }
  
  .tournament-card {
    padding: 1.25rem;
  }
}

/* ============================================
   Mission & Goals Section
   ============================================ */
.mission-goals-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr; /* 55/45 split */
  gap: 2rem;
  align-items: stretch;
}

/* Feature Card variant */
.card-feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  transition: all 0.4s ease;
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Permanent amber top accent */
.card-feature::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    var(--amber-dark),
    var(--amber),
    var(--amber-light)
  );
  border-radius: 12px 12px 0 0;
}

.card-feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(217, 119, 6, 0.2);
}

.card-feature h3 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

/* Mission text */
.mission-text p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.mission-text p:last-child {
  margin-bottom: 0;
}

/* Goals list */
.goals-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.goals-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.625rem 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}

.goals-list li:last-child {
  border-bottom: none;
}

.goals-list li::before {
  content: '✦';
  color: var(--amber);
  font-size: 0.75rem;
  margin-top: 0.35rem;
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .mission-goals-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .card-feature {
    padding: 2rem;
  }
}

@media (max-width: 640px) {
  .card-feature {
    padding: 1.5rem;
  }
  
  .goals-list li {
    padding: 0.5rem 0;
  }
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 100px 0;
  position: relative;
}

@media (max-width: 768px) {
  .section {
    padding: 70px 0;
  }
}

.section-heritage {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
}

.section-header p {
  font-size: 1.0625rem;
}

/* ============================================
   Cards — Heritage Craft
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.4s ease;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--amber-dark), var(--amber), var(--amber-light), var(--amber), var(--amber-dark));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(217, 119, 6, 0.2);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber-dark), var(--amber));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.card h3 {
  margin-bottom: 0.75rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
}

.card p {
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

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

.card-grid-2col {
  grid-template-columns: repeat(2, 1fr);
  max-width: 820px;
  margin-inline: auto;
}

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

/* Feature List */
.feature-list {
  list-style: none;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.feature-list li::before {
  content: '✦';
  color: var(--amber);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ============================================
   Quote Section
   ============================================ */
.quote-section {
  background: var(--bg-secondary);
}

.quote-block {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  padding: 2rem 0;
}

.quote-block::before {
  content: '"';
  font-family: 'Playfair Display', serif;
  font-size: 8rem;
  color: var(--amber);
  opacity: 0.15;
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}

.quote-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  position: relative;
}

.quote-author {
  color: var(--amber-light);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.5px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

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

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.footer-section h4 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--amber-light);
  margin-bottom: 0.75rem;
}

.footer-section p,
.footer-section a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: block;
  padding: 0.35rem 0;
}

.footer-section a:hover {
  color: var(--amber);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links.active {
    display: flex;
    animation: slideIn 0.3s ease;
  }
  
  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
    margin-right: 1rem;
  }
  
  .theme-toggle {
    margin-left: 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-newsletter-form {
    max-width: 300px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

/* ============================================
   Newsletter Form Enhancements
   ============================================ */

/* --------------------------------------------
   GDPR Consent Text (Bottom)
   -------------------------------------------- */
.newsletter-consent-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 0.75rem;
    text-align: center;
}

.newsletter-consent-text a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.newsletter-consent-text a:hover {
    color: var(--amber-light);
}



/* --------------------------------------------
   Loading State & Spinner
   -------------------------------------------- */
.btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
    margin-right: 0.5rem;
    vertical-align: middle;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Button disabled state */
.footer-newsletter-form button:disabled,
.footer-newsletter-form button.is-loading {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.footer-newsletter-form button.is-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------
   Newsletter Messages
   -------------------------------------------- */
.newsletter-message {
    display: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-top: 0.75rem;
    animation: fadeIn 0.3s ease;
}

.newsletter-message.is-visible {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

/* Success message - green with checkmark */
.newsletter-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-success);
}

.newsletter-success::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--color-success);
    color: white;
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* Error message - red with error icon */
.newsletter-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-error);
}

.newsletter-error::before {
    content: '!';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: var(--color-error);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

/* ARIA live region - visually hidden but accessible */
.newsletter-status {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------
   Input Validation States
   -------------------------------------------- */
.newsletter-input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

/* Invalid input state */
.newsletter-input-wrapper input[aria-invalid="true"],
.footer-newsletter-form input:invalid:not(:placeholder-shown).is-touched {
    border-color: var(--color-error);
    background: rgba(239, 68, 68, 0.05);
}

.newsletter-input-wrapper input[aria-invalid="true"]:focus,
.footer-newsletter-form input:invalid:not(:placeholder-shown).is-touched:focus {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Valid input state */
.newsletter-input-wrapper input[aria-invalid="false"] {
    border-color: var(--color-success);
}

.newsletter-input-wrapper input[aria-invalid="false"]:focus {
    border-color: var(--color-success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Inline error message below input */
.newsletter-error-inline {
    font-size: 0.75rem;
    color: var(--color-error);
    line-height: 1.4;
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.newsletter-error-inline::before {
    content: '•';
    color: var(--color-error);
    font-size: 1rem;
    line-height: 0;
}

.newsletter-error-inline.is-visible {
    display: flex;
}

/* --------------------------------------------
   Mobile Touch Targets & Responsive
   -------------------------------------------- */
@media (max-width: 768px) {
    /* Ensure minimum 44px touch target for button */
    .footer-newsletter-form button {
        min-height: 44px;
        min-width: 88px;
        padding: 0.625rem 1.25rem;
    }

    /* Ensure input has adequate height */
    .footer-newsletter-form input {
        min-height: 44px;
    }

    /* Better spacing on mobile */
    .newsletter-consent {
        font-size: 0.875rem;
        margin: 0.875rem 0;
    }

    .newsletter-consent input[type="checkbox"] {
        width: 20px;
        height: 20px;
        min-width: 20px;
    }

    /* Stack form elements on very small screens */
    .footer-newsletter-form {
        flex-wrap: wrap;
    }

    .newsletter-input-wrapper {
        width: 100%;
        min-width: 100%;
    }

    .footer-newsletter-form button {
        width: 100%;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .footer-newsletter {
        padding: 1.25rem;
    }

    .newsletter-message {
        font-size: 0.8125rem;
        padding: 0.625rem 0.875rem;
    }

    .newsletter-privacy {
        font-size: 0.6875rem;
    }
}

/* --------------------------------------------
   Reduced Motion Support
   -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .btn-spinner {
        animation: none;
        border-top-color: transparent;
        border-style: dashed;
    }

    .newsletter-message {
        animation: none;
    }
}

/* --------------------------------------------
   High Contrast Mode Support
   -------------------------------------------- */
@media (prefers-contrast: high) {
    .newsletter-success {
        border-width: 2px;
    }

    .newsletter-error {
        border-width: 2px;
    }

    .newsletter-consent input[type="checkbox"] {
        outline: 2px solid currentColor;
        outline-offset: 2px;
    }
}

/* --------------------------------------------
   Focus Visible for Accessibility
   -------------------------------------------- */
.newsletter-consent input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

.newsletter-consent label:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.hidden { display: none; }

/* Smooth theme transition */
* {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   Membership Page — Hero
   ============================================ */
.membership-hero {
  min-height: 65vh;
  padding: 140px 0 80px;
  text-align: center;
}

.membership-hero-content {
  margin: 0 auto;
}

.membership-hero-actions {
  justify-content: center;
}

/* ============================================
   How to Join Section
   ============================================ */
.how-to-join-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.how-to-join-cta h2 {
  margin-bottom: 1rem;
}

.how-to-join-cta p {
  font-size: 1.0625rem;
  margin-bottom: 2rem;
}

.how-to-join-steps {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.join-step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.join-step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-dark), var(--amber));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  font-family: 'Playfair Display', serif;
  box-shadow: 0 4px 12px var(--amber-glow);
}

.join-step-content h4 {
  margin-bottom: 0.375rem;
  font-size: 1rem;
  color: var(--text-primary);
}

.join-step-content p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .how-to-join-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ============================================
   Membership Tiers Grid
   ============================================ */
.membership-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .membership-tiers-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }
}

/* ============================================
   Membership Card
   ============================================ */
.membership-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.membership-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--amber-dark), var(--amber), var(--amber-light));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

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

.membership-card:hover::after {
  transform: scaleX(1);
}

/* Featured — Guerrero */
.membership-card-featured {
  border-color: var(--amber);
  border-width: 2px;
}

.membership-card-featured::after {
  transform: scaleX(1);
}

/* Premium — Maestro */
.membership-card-premium {
  border-color: rgba(217, 119, 6, 0.35);
}

/* Badge — block so both badges are equal width; text centered */
.membership-card-badge {
  display: block;
  text-align: center;
  background: var(--amber);
  color: white;
  padding: 0.2rem 0.75rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.75px;
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: 0.75rem;
}

.membership-card-badge-premium {
  background: linear-gradient(135deg, var(--amber-dark), var(--amber-light));
}

/* Card name & subtitle */
.membership-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--amber-light);
  margin-top: 0;
  margin-bottom: 0.25rem;
}



.membership-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Single price block (Guerrero / Maestro) */
.membership-price-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.membership-price-single {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.membership-price-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Age-bracket pricing (Apprendiz) */
.membership-pricing-brackets {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.pricing-bracket {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.pricing-bracket:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.pricing-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.pricing-amount {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

/* Feature list */
.membership-features {
  list-style: none;
  margin-bottom: 1.5rem;
  flex: 1;
}

.membership-features > li {
  position: relative;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.65;
  border-bottom: 1px solid var(--border);
}

.membership-features > li:last-child {
  border-bottom: none;
}

.membership-features > li::before {
  content: '✦';
  color: var(--amber);
  font-size: 0.6rem;
  position: absolute;
  left: 0;
  top: 0.72rem;
  line-height: 1;
}

/* Book sub-list */
.book-sublist {
  list-style: none;
  margin-top: 0.5rem;
  padding-left: 0;
}

.book-sublist li {
  position: relative;
  padding: 0.125rem 0 0.125rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.book-sublist li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

/* Feature sub-note (e.g. "$50 value") */
.membership-feature-note {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.2rem;
}

/* Discount note */
.membership-discount-note {
  font-size: 0.8125rem;
  color: var(--amber-light);
  font-style: italic;
  margin-bottom: 1.5rem;
  padding: 0.625rem 0.875rem;
  background: var(--amber-glow);
  border-radius: 8px;
  border-left: 2px solid var(--amber);
}

/* Full-width card CTA button */
.membership-btn {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

/* ============================================
   Footer Enhancements
   ============================================ */
.footer-logo-link {
  display: block;
  margin-bottom: 1rem;
}

.footer-logo-link:hover {
  opacity: 0.85;
}

.footer-logo-link img {
  height: auto;
  width: 100%;
  max-width: 220px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: 260px;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.footer-address {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-style: normal;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  max-width: 280px;
  margin-bottom: 0.75rem;
}

.footer-address {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-style: normal;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-social {
  display: flex;
  gap: 0.625rem;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  text-decoration: none;
}

.footer-social-link:hover {
  background: var(--bg-card);
  border-color: var(--amber);
  color: var(--amber);
}

.footer-social-link svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Competition Levels
   ============================================ */

/* Container - First row: 5 Under Saddle levels */
.level-list {
  max-width: 1400px;
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  list-style: none;
  padding: 0;
}

/* Second row: Special Test (Pied-à-Terre) - spans 5 columns */
.level-list--special {
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 0;
}

.level-list--special .level-card--special {
  grid-column: 1 / -1;
  width: 100%;
}

/* Card component - Vertical layout for side-by-side */
.level-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Special styling for Masters level */
.level-card--masters {
  border-color: var(--amber);
  border-width: 2px;
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    rgba(217, 119, 6, 0.08) 100%
  );
}

.level-card--masters::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--amber-dark),
    var(--amber),
    var(--amber-light),
    var(--amber),
    var(--amber-dark)
  );
  border-radius: 12px 12px 0 0;
}

/* Special styling for Pied-à-Terre */
.level-card--special {
  border-color: var(--sage);
  border-width: 2px;
  border-left: 3px solid var(--sage);
  background: linear-gradient(
    135deg,
    var(--bg-card) 0%,
    rgba(101, 163, 13, 0.08) 100%
  );
}

.level-card--special::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--sage-dark),
    var(--sage),
    var(--sage-light),
    var(--sage),
    var(--sage-dark)
  );
  border-radius: 12px 12px 0 0;
}

/* Special Test micro-label */
.level-card--special::after {
  content: 'Special';
  position: absolute;
  top: -10px;
  right: 12px;
  background: var(--sage);
  color: white;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

/* Number badge */
.level-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: relative;
  margin-bottom: 1rem;
}

/* Progressive color scheme for badges */
.level-badge--1 {
  background: var(--sage-dark);
}

.level-badge--2 {
  background: var(--sage);
}

.level-badge--3 {
  background: var(--amber);
}

.level-badge--4 {
  background: var(--amber-light);
  color: var(--amber-dark);
}

.level-badge--5 {
  background: linear-gradient(
    135deg,
    var(--amber) 0%,
    var(--amber-light) 50%,
    #fbbf24 100%
  );
  color: var(--amber-dark);
  box-shadow: 0 4px 16px var(--amber-glow);
}

.level-badge--5::after {
  content: '★';
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.75rem;
  color: var(--amber);
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Diamond-shaped badge for Special Test */
.level-badge--special {
  background: linear-gradient(
    135deg,
    var(--sage-dark) 0%,
    var(--sage) 50%,
    var(--sage-light) 100%
  );
  color: white;
  font-size: 1.125rem;
  box-shadow: 0 4px 16px rgba(101, 163, 13, 0.3);
  border-radius: 8px;
  transform: rotate(45deg);
  width: 50px;
  height: 50px;
}

/* Counter-rotate the letter P inside the diamond */
.level-badge--special span {
  display: block;
  transform: rotate(-45deg);
}

/* Content wrapper */
.level-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.level-title {
  margin-bottom: 0.75rem;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.level-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0 0 1rem;
  line-height: 1.6;
  flex: 1;
}

/* Test sheet link */
.level-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--amber);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  margin-top: auto;
}

.level-link::after {
  content: '→';
  transition: transform 0.2s ease;
}

.level-link:hover {
  color: var(--amber-light);
}

.level-link:hover::after {
  transform: translateX(4px);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .level-list {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
  }
}

@media (max-width: 768px) {
  .level-list {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
  }
  
  .level-list--special {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .level-list {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-bottom: 1rem;
  }
  
  .level-list--special {
    grid-template-columns: 1fr;
  }
  
  .level-card {
    padding: 1.25rem;
  }
  
  .level-badge {
    width: 52px;
    height: 52px;
    font-size: 1.25rem;
  }
  
  /* Reset diamond badge on mobile for better readability */
  .level-badge--special {
    transform: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
  }
  
  .level-badge--special span {
    transform: none;
  }
}


/* ============================================
   Gallery — Auto-loaded grid + lightbox
   ============================================ */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--amber);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Amber shimmer on card hover */
.gallery-item::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--amber), var(--amber-light));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(28, 25, 23, 0.9) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-title {
    color: white;
    font-weight: 500;
    font-size: 0.9375rem;
}

/* Loading skeleton */
.gallery-skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 25%,
        var(--bg-elevated) 50%,
        var(--bg-card) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    cursor: default;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Empty / error state */
.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ── Lightbox ──────────────────────────────────────────────────────────────── */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: var(--amber);
    color: white;
    border-color: var(--amber);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.lightbox-nav:hover {
    background: var(--amber);
    color: white;
    border-color: var(--amber);
}

.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }

.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
    background: var(--bg-card);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .lightbox-nav {
        display: none;
    }
}

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

/* ============================================
   Form Components
   ============================================ */

.form-success {
    display: none;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--color-success);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.form-error {
    display: none;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: var(--color-error);
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    border-left: 3px solid var(--color-error);
}

/* Light theme adjustments for error message */
[data-theme="light"] .form-error {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.1);
}

/* Dark theme adjustments for error message */
[data-theme="dark"] .form-error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-glow);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Contact Page Specific */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

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

.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    border-color: var(--amber);
    transform: translateY(-2px);
}

.contact-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--amber-dark), var(--amber));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

/* ---- Contact Page — extracted from inline styles ---- */

.contact-hero {
    min-height: 50vh;
    padding: 140px 0 60px;
}

.contact-hero-content {
    max-width: 800px;
}

.contact-section-heading {
    margin-bottom: 2rem;
    font-family: 'Playfair Display', serif;
}

.contact-info-label {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-link {
    font-size: 1.1rem;
    color: var(--amber);
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--amber-light);
}

.contact-address {
    font-style: normal;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Full-width submit button */
.btn-full {
    width: 100%;
}

/* Honeypot — hidden from real users, visible to bots */
.honeypot {
    display: none;
}

/* reCAPTCHA compliance notice (required by Google) */
.recaptcha-notice {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
}

.recaptcha-notice a {
    color: var(--text-muted);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.recaptcha-notice a:hover {
    color: var(--amber);
}

/* Map section layout */
.contact-map-section {
    max-width: 800px;
    margin: 0 auto;
}

.contact-map-description {
    margin-bottom: 2rem;
}

.map-placeholder {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder-inner {
    text-align: center;
    color: var(--text-muted);
}

.map-placeholder-inner svg {
    display: block;
    margin: 0 auto 1rem;
}

.map-placeholder-label {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ============================================
   Promotional Page - Resource Library
   ============================================ */

/* Hero Promotional */
.hero-promotional {
    min-height: 55vh;
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-promotional::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(28, 25, 23, 0.60) 0%,
        rgba(28, 25, 23, 0.65) 50%,
        rgba(28, 25, 23, 0.60) 100%
    );
    z-index: 1;
}

.hero-promotional::after {
    content: '';
    position: absolute;
    top: 20%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(
        circle,
        var(--amber-glow) 0%,
        transparent 70%
    );
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.hero-promotional .hero-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-promotional .hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--amber-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--amber);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-promotional h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
}

.hero-promotional h1 em {
    color: var(--amber-light);
    font-style: italic;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hero-stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--amber-light);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 640px) {
    .hero-promotional {
        padding: 120px 0 60px;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .hero-stat-number {
        font-size: 2rem;
    }
}

/* Document Cards */
.card-document {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
}

.card-document::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--amber-dark),
        var(--amber),
        var(--amber-light)
    );
}

.card-document:hover {
    transform: translateY(-4px);
    border-color: var(--amber);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px var(--amber-glow);
}

.card-document-header {
    display: none;
}

.card-document-body {
    padding: 1.75rem 2rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-document-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.card-document-meta-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-document-meta svg {
    width: 16px;
    height: 16px;
    color: var(--amber);
    flex-shrink: 0;
}

.card-document-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--amber-light);
    background: var(--amber-glow);
    border: 1px solid rgba(217, 119, 6, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    white-space: nowrap;
    flex-shrink: 0;
}

.card-document-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-document-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.card-document-footer {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.document-size {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    padding: 0.5rem 0.875rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border);
}

/* Tabs Navigation */
.doc-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.doc-tab {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    top: 1px;
}

.doc-tab:hover {
    color: var(--amber-light);
}

.doc-tab.active {
    color: var(--amber);
    border-bottom-color: var(--amber);
}

@media (max-width: 640px) {
    .doc-tabs {
        gap: 0.25rem;
    }
    
    .doc-tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Document Grid */
.document-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.document-grid-featured {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

@media (max-width: 1024px) {
    .document-grid,
    .document-grid-featured {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* Section Divider */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    color: var(--amber);
    opacity: 0.5;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--amber),
        transparent
    );
    max-width: 100px;
}

.section-divider svg {
    width: 24px;
    height: 24px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-icon svg {
    width: 36px;
    height: 36px;
    color: var(--amber);
    opacity: 0.5;
}

/* PDF Modal */
.pdf-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.pdf-modal.active {
    opacity: 1;
    visibility: visible;
}

.pdf-modal-container {
    width: 100%;
    max-width: 1200px;
    height: 90vh;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.pdf-modal.active .pdf-modal-container {
    transform: scale(1);
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.pdf-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pdf-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pdf-modal-close:hover {
    color: var(--amber);
    background: var(--amber-glow);
}

.pdf-modal-content {
    flex: 1;
    overflow: hidden;
}

.pdf-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.pdf-modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .pdf-modal {
        padding: 0;
    }
    
    .pdf-modal-container {
        height: 100vh;
        max-width: 100%;
        border-radius: 0;
    }
}

/* Search Container */
.doc-search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.doc-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.doc-search-icon {
    position: absolute;
    left: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.doc-search-input {
    width: 100%;
    padding: 1rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.doc-search-input:focus {
    outline: none;
    border-color: var(--amber);
    box-shadow: 0 0 0 3px var(--amber-glow);
}

.doc-search-input::placeholder {
    color: var(--text-muted);
}

.doc-search-clear {
    position: absolute;
    right: 1rem;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.doc-search-clear:hover {
    color: var(--amber);
    background: var(--amber-glow);
}

.doc-search-stats {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Highlight search matches */
.search-highlight {
    background: var(--amber-glow);
    color: var(--amber-light);
    padding: 0 0.25rem;
    border-radius: 3px;
}

/* Card animations */
@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-document.animate-in {
    animation: cardEnter 0.4s ease forwards;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-secondary) 25%,
        var(--bg-elevated) 50%,
        var(--bg-secondary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Keyboard focus improvements */
.doc-tab:focus-visible,
.doc-search-input:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .card-document,
    .card-document.animate-in,
    .skeleton {
        animation: none;
        transition: none;
    }
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

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

/* Print styles for documents */
@media print {
    .navbar,
    .footer,
    .doc-tabs,
    .doc-search-container,
    .pdf-modal-footer {
        display: none !important;
    }
    
    .card-document {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-document {
        border-width: 2px;
    }
    
    .doc-tab.active {
        border-bottom-width: 3px;
    }
}

/* ============================================
   Sponsors Grid — Auto-loaded thumbnails
   ============================================ */

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.sponsor-item {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sponsor-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--amber);
}

.sponsor-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.sponsor-item:hover img {
    transform: scale(1.05);
}

/* Skeleton loading */
.sponsor-skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 25%,
        var(--bg-elevated) 50%,
        var(--bg-card) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

/* Empty state */
.sponsors-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1rem;
}

@media (max-width: 768px) {
    .sponsors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

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

/* ============================================
   Footer Enhancements
   ============================================ */

/* Footer amber gradient top border */
.footer {
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--amber-dark), var(--amber), var(--amber-light), var(--amber), var(--amber-dark));
    border-image-slice: 1;
}

/* Newsletter section - compact */
.footer-newsletter {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem;
}

.footer-newsletter p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.footer-newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.footer-newsletter-form input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.footer-newsletter-form input:focus {
    outline: none;
    border-color: var(--amber);
}

.footer-newsletter-form button {
    padding: 0.5rem 1rem;
    background: var(--amber);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.footer-newsletter-form button:hover {
    background: var(--amber-light);
}

/* Recent events section - compact horizontal layout */
.footer-event-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-event-item {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.375rem 0;
}

.footer-event-date {
    font-size: 0.6875rem;
    color: var(--amber-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: 85px;
}

.footer-event-title {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    line-height: 1.4;
}

.footer-event-title:hover {
    color: var(--amber);
}

/* View All Calendar Link */
.footer-event-viewall {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.footer-event-viewall-link {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-style: italic;
}

.footer-event-viewall-link:hover {
    color: var(--amber-light);
}

/* Loading state for dynamic events */
.footer-event-list.loading {
    opacity: 0.6;
}

/* Enhanced social icons - compact */
.footer-social {
    display: flex;
    gap: 0.5rem;
}

.footer-social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social-link:hover {
    background: var(--amber);
    border-color: var(--amber);
    color: white;
    transform: translateY(-2px);
}

.footer-social-link svg {
    width: 16px;
    height: 16px;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--amber);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--amber-light);
    transform: translateY(-2px);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
    
    .footer-newsletter-form {
        flex-direction: column;
    }
}

/* ============================================
   Cookie Banner
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-banner--visible {
    transform: translateY(0);
}

.cookie-banner-inner {
    background: var(--bg-elevated, #2d2924);
    border-top: 1px solid var(--border-strong, rgba(250,250,249,0.15));
    border-top-color: var(--amber-dark);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* Full-width bar across viewport */
.cookie-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--bg-elevated, #2d2924);
    border-top: 3px solid var(--amber-dark);
    z-index: -1;
}

.cookie-banner-text {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex: 1;
    min-width: 0;
}

.cookie-banner-icon {
    width: 20px;
    height: 20px;
    color: var(--amber);
    flex-shrink: 0;
}

.cookie-banner-text p {
    font-size: 0.875rem;
    color: var(--text-secondary, #a8a29e);
    margin: 0;
    line-height: 1.5;
}

.cookie-banner-text strong {
    color: var(--text-primary, #fafaf9);
    font-weight: 600;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-btn-decline,
.cookie-btn-accept {
    font-size: 0.8125rem;
    padding: 0.5rem 1.25rem;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .cookie-banner-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.25rem 1rem;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   Newsletter Success State
   ============================================ */
.newsletter-success {
    color: var(--amber-light);
    font-size: 0.9375rem;
    font-weight: 500;
    padding: 0.75rem 0;
}

/* ============================================
   Document Library — Pagination
   ============================================ */
.doc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.doc-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.doc-page-btn--disabled,
.doc-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.doc-page-indicator {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    min-width: 10ch;
    text-align: center;
}

.doc-page-indicator strong {
    color: var(--text-primary);
}

/* ============================================
   Button Arrow Icon
   ============================================ */
.btn-arrow {
  margin-left: 0.5rem;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  max-width: 600px;
  margin: 0 auto;
}

.cta-heading {
  margin-bottom: 1rem;
}

.cta-description {
  margin-bottom: 2rem;
  font-size: 1.0625rem;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* CSS End */
/* ============================================
   NOTIFICATION OVERLAY - Success Modal
   ============================================ */

.notification-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.notification-overlay[hidden] {
    display: none;
}

.notification-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    cursor: pointer;
    animation: backdrop-fade 0.3s ease-out;
}

@keyframes backdrop-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.notification-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: notification-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

/* Green accent bar at top */
.notification-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sage-dark), var(--color-success), var(--sage-light));
}

@keyframes notification-in {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notification-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-success);
    animation: icon-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes icon-pop {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    70% {
        transform: scale(1.1) rotate(5deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0);
    }
}

.notification-icon svg {
    width: 36px;
    height: 36px;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: checkmark-draw 0.4s ease-out 0.3s forwards;
}

@keyframes checkmark-draw {
    to {
        stroke-dashoffset: 0;
    }
}

.notification-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    animation: content-fade 0.4s ease-out 0.2s both;
}

.notification-text {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    animation: content-fade 0.4s ease-out 0.3s both;
}

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

.notification-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2.5rem;
    background: var(--amber);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    animation: content-fade 0.4s ease-out 0.4s both;
}

.notification-close-btn:hover {
    background: var(--amber-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--amber-glow);
}

.notification-close-btn:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
}

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

/* Mobile adjustments */
@media (max-width: 480px) {
    .notification-overlay {
        padding: 1rem;
        align-items: flex-end;
    }
    
    .notification-card {
        padding: 2rem 1.5rem;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-width: 100%;
        animation: notification-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    .notification-card::before {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    @keyframes notification-slide-up {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .notification-icon {
        width: 64px;
        height: 64px;
    }
    
    .notification-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .notification-title {
        font-size: 1.5rem;
    }
    
    .notification-close-btn {
        width: 100%;
        padding: 1rem 2rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .notification-backdrop,
    .notification-card,
    .notification-icon,
    .notification-icon svg,
    .notification-title,
    .notification-text,
    .notification-close-btn {
        animation: none;
        transition: none;
    }
    
    .notification-icon svg {
        stroke-dashoffset: 0;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .notification-backdrop {
        background: rgba(0, 0, 0, 0.9);
    }
    
    .notification-card {
        border-width: 2px;
    }
    
    .notification-icon {
        border-width: 3px;
    }
}
