/* =====================================================
   ARMIGIL CONSULTING — SHARED STYLE SHEET
   Supports Light & Dark Mode with CSS Custom Properties
   ===================================================== */

/* ============ COLOR PALETTES ============ */
/* Light Mode (default) */
:root {
  /* Brand Colors */
  --navy:         #1B2E48;
  --navy-light:   #2A4570;
  --navy-darker:  #14233A;
  --gold:         #C8A97D;
  --gold-light:   #DCC4A6;
  
  /* Neutral Colors */
  --white:        #FFFFFF;
  --off-white:    #F7F5F1;
  --gray:         #6B7280;
  --gray-light:   #9CA3AF;
  --gray-border:  #E4E0D9;
  
  /* Text Colors */
  --text-primary: #1B2E48;
  --text-secondary: #4B5563;
  --text-muted:   #6B7280;
  
  /* Layout */
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans:  -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --max-width: 1200px;
  --max-width-prose: 720px;
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
  
  /* Spacing Scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
}

/* Dark Mode Palette */
[data-theme="dark"] {
  /* Brand Colors - adjusted for dark background */
  --navy:         #E4E0D9;
  --navy-light:   #DCC4A6;
  --navy-darker:  #1F2937;
  --gold:         #C8A97D;
  --gold-light:   #E8D4B8;
  
  /* Neutral Colors */
  --white:        #1F2937;
  --off-white:    #2D3748;
  --gray:         #9CA3AF;
  --gray-light:   #CBD5E0;
  --gray-border:  #4A5568;
  
  /* Text Colors */
  --text-primary: #E4E0D9;
  --text-secondary: #CBD5E0;
  --text-muted:   #9CA3AF;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--white);
  transition: background-color var(--transition), color var(--transition);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }

a {
  color: var(--navy);
  text-decoration: none;
  transition: color var(--transition);
}

[data-theme="dark"] a {
  color: var(--gold);
}

a:hover {
  color: var(--gold);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Enhanced transitions for interactive elements */
a,
button,
.btn,
.theme-toggle,
.nav-link,
.main-nav a,
.brand,
.section-title,
.eyebrow,
.card,
.post-card,
.service-card,
.related-card,
.article-body blockquote,
.article-body code,
.article-body pre,
.tag-list a {
  transition: 
    color 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease,
    transform 0.2s ease,
    box-shadow 0.3s ease,
    opacity 0.3s ease;
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============ UTILITY CLASSES ============ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.section {
  padding-block: var(--space-xl);
}

.section--alt {
  background: var(--off-white);
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-sm);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 60ch;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  border: 2px solid var(--navy);
  background: transparent;
  color: var(--navy);
}

[data-theme="dark"] .btn {
  border-color: var(--gold);
  color: var(--text-primary);
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

[data-theme="dark"] .btn--primary {
   background: var(--gold) !important;
  color: var(--navy-darker) !important;
  border: 2px solid (--gold) !important;
}

.btn--primary:hover {
  background: var(--gold-light) !important;
  color: #132033 !important;
  border: 2px solid #FFFFFF !important;
}

[data-theme="dark"] .btn--primary:hover {
  background: var(--gold-light);
  color: var(--navy);
}

.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

[data-theme="dark"] .btn--outline {
  border-color: var(--gold);
  color: var(--text-primary);
}

.btn--outline:hover {
  background: var(--navy);
  color: var(--white);
}

[data-theme="dark"] .btn--outline:hover {
  background: var(--gold);
  color: var(--navy);
}

/* ============ BUTTON HOVER WITH RIPPLE EFFECT ============ */

.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}


/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: var(--space-sm) var(--space-md);
  z-index: 2000;
  border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
  left: 0;
}

/* Theme Toggle Button */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 50%;
  cursor: pointer;
  color: var(--gold-light);
  font-size: 1.2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

/* ============ THEME TOGGLE WITH ROTATION ANIMATION ============ */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 2px solid var(--gold);
  border-radius: 50%;
  cursor: pointer;
  color: var(--gold-light);
  font-size: 1.2rem;
  transition: 
    all 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.3s ease;
}

/* Rotate animation on click */
@keyframes rotateIcon {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============ HERO SECTION FADE-IN ANIMATION ============ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.page-banner,
.article-hero {
  animation: fadeInUp 0.6s ease-out;
}

.hero h1,
.page-banner h1,
.article-hero h1 {
  animation-delay: 0.1s;
}

.hero p,
.page-banner p,
.article-hero__meta {
  animation-delay: 0.2s;
}

/* ============ LOADING ANIMATIONS FOR GRID ITEMS ============ */

.services-grid > *,
.posts-grid > *,
.related-posts-grid > *,
.approach-grid > * {
  animation: fadeInUp 0.5s ease-out both;
}

.services-grid > *:nth-child(1) { animation-delay: 0.05s; }
.services-grid > *:nth-child(2) { animation-delay: 0.1s; }
.services-grid > *:nth-child(3) { animation-delay: 0.15s; }

.posts-grid > *:nth-child(odd) { animation-delay: 0.05s; }
.posts-grid > *:nth-child(even) { animation-delay: 0.1s; }



.theme-toggle:active {
  animation: rotateIcon 0.5s ease;
  transform: scale(0.9);
}

.theme-toggle:hover {
  background: var(--gold);
  color: var(--navy-darker);
  transform: rotate(15deg) scale(1.05);
}


.theme-toggle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Icon sizing */
.theme-toggle svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hide icons by default, show one based on theme */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }



/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy-darker);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-block: 0.75rem;
  gap: var(--space-sm);
}

/* Enhanced shadow on scroll (can be triggered via JS if desired) */
.site-header.scrolled {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  background: var(--navy-darker);
}

/* ============ BRAND LOGO (IMAGE-BASED) ============ */

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.3s ease;
  line-height: 0; /* Prevents extra space below inline images */
}

.brand:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.35));
}

[data-theme="dark"] .brand:hover {
  filter: drop-shadow(0 0 16px rgba(200, 169, 125, 0.4));
}

/* Logo image base styles */
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
}

/* Light mode: show light logo, hide dark logo */
.brand-logo--light {
  display: block;
}

.brand-logo--dark {
  display: none;
}

/* Dark mode: swap logos */
[data-theme="dark"] .brand-logo--light {
  display: none;
}

[data-theme="dark"] .brand-logo--dark {
  display: block;
}

/* Smooth crossfade on theme switch */
.brand-logo {
  transition: opacity 0.3s ease;
}

/* Responsive: shrink logo slightly on smaller screens */
@media (max-width: 768px) {
  .brand-logo {
    height: 38px;
  }
}

@media (max-width: 400px) {
  .brand-logo {
    height: 32px;
  }
}

/* ============ NAVIGATION LINKS WITH ANIMATION ============ */

.main-nav {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
  opacity: 0.85;
}

/* Focus state with enhanced visibility */
.main-nav a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
  opacity: 1;
  background-color: rgba(200, 169, 125, 0.1);
  border-radius: 4px;
}

/* Dark Mode - Gold/light links on navy header */
[data-theme="dark"] .main-nav a {
  color: var(--gold-light);
  opacity: 0.9;
}

[data-theme="dark"] .main-nav a:hover {
  color: var(--gold);
  opacity: 1;
  text-shadow: 0 0 8px rgba(200, 169, 125, 0.5);
}

/* Hover state for all themes */
/* Smooth fade-in when hovering */
.main-nav a:hover {
  color: var(--gold-light);
  opacity: 1;
}

/* Active/current page link - always gold */
.main-nav a[aria-current="page"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
  opacity: 1;
}

/* Animated underline effect for hover and active states */
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  width: 100%;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ============ PAGE BANNER ============ */
.page-banner {
  background: linear-gradient(135deg, var(--navy-darker) 0%, var(--navy-light) 100%);
  color: var(--white);
  text-align: center;
  padding-block: var(--space-lg);
}

.page-banner h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--space-sm);
  color: var(--white);
}

.page-banner p {
  color: var(--gold-light);
  font-size: 1.15rem;
  max-width: 55ch;
  margin-inline: auto;
}

/* ============ HERO SECTION ============ */
.hero {
  background: linear-gradient(135deg, var(--navy-darker) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding-block: var(--space-xl);
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.15;
  margin-bottom: var(--space-sm);
  color: var(--white);
}

.hero p {
  font-size: 1.2rem;
  color: var(--gold-light);
  max-width: 55ch;
  margin-inline: auto;
  margin-bottom: var(--space-md);
}

.btn-group {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn--primary {
  background: var(--gold); 
  color: var(--navy-darker);
  border-color: var(--gold);
}

.hero .btn--primary:hover {
  background: var(--gold-light);
  color: var(--navy-darker);
}

.hero .btn--outline {
  border-color: var(--gold);
  color: var(--gold-light);
}

.hero .btn--outline:hover {
  background: var(--gold);
  color: var(--navy-darker);
}

/* ============ CARD HOVER EFFECTS WITH SCALE & GLOW ============ */

.service-card,
.post-card,
.related-card {
  position: relative;
  overflow: hidden;
}

.service-card::before,
.post-card::before,
.related-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(200, 169, 125, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.service-card:hover::before,
.post-card:hover::before,
.related-card:hover::before {
  opacity: 1;
}

.service-card:hover,
.post-card:hover,
.related-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--gold);
}

/* ============ SERVICE CARDS ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.service-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--gold);
}

.service-card__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--navy-darker);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: var(--space-sm);
}

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.service-card > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.service-list {
  list-style: none;
  flex-grow: 1;
}

.service-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}

.service-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.85rem;
}

.service-list strong {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
}

/* ============ APPROACH SECTION ============ */
.approach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.approach-item {
  text-align: center;
  padding: var(--space-md);
}

.approach-item__num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  opacity: 0.5;
  margin-bottom: var(--space-xs);
}

.approach-item h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.approach-item p {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ============ CTA / CONTACT ============ */
.cta {
  background: var(--navy-darker);
  color: var(--white);
  text-align: center;
}

.cta h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  margin-bottom: var(--space-sm);
  color: var(--white);
}

.cta p {
  color: var(--gold-light);
  margin-bottom: var(--space-md);
  font-size: 1.1rem;
}

.contact-info {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-md);
  font-size: 0.95rem;
  color: var(--gold-light);
}

.contact-info a {
  color: var(--gold-light);
  transition: color var(--transition);
}

.contact-info a:hover {
  color: var(--gold);
}

/* ============ LEAD MAGENT SECTION DARK MODE FIXES ============ */

.cta {
  padding: var(--space-xl) 0;
}

[data-theme="dark"] .cta {
  background: var(--navy);
}

/* Section text colors in dark mode */
[data-theme="dark"] .cta .eyebrow {
  color: var(--gold) !important;
}

[data-theme="dark"] .cta .section-title {
  color: var(--off-white) !important;
}

[data-theme="dark"] .cta > p:not(.btn) {
  color: var(--off-white) !important;
}

[data-theme="dark"] .cta p:last-of-type {
  color: var(--gray) !important;
}

/* Button base styles */
.cta .btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
}

/* Primary button — Download PDF */
.cta .btn--primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  transition: all 0.2s ease;
}

.cta .btn--primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  color: var(--navy);
}

.cta .btn--primary:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

/* ============ PRIMARY BUTTON — DARK MODE ============ */

/* Normal state — Pure white border */
[data-theme="dark"] .cta .btn--primary {
  background: var(--gold) !important;
  border: 2px solid var(--gold) !important;
  color: var(--navy-darker) !important;
}

/* Hover state — Light gold border, darker text */
[data-theme="dark"] .cta .btn--primary:hover {
  background: var(--gold) !important;
  border: 2px solid var(--gold) !important;
  color: #132033 !important; /* Explicit navy-darker hex */
}

/* Outline button — Schedule Consultation */
.cta .btn--outline {
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  transition: all 0.2s ease;
}

.cta .btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold);
  color: var(--gold);
}

.cta .btn--outline:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* CRITICAL: Dark mode override for outline button */
[data-theme="dark"] .cta .btn--outline {
  background: var(--navy);
  border: 2px solid var(--white);
  color: var(--white);
}

[data-theme="dark"] .cta .btn--outline:hover {
  background: var(--blue) !important;  /* Medium dark blue */
  border-color: var(--white) !important;
  color: var(--white) !important;
}

/* Focus states */
.cta .btn--primary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.cta .btn--outline:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

[data-theme="dark"] .cta .btn--primary:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Ensure button wrapper has centering */
.cta .btn-wrapper {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.cta .btn {
  min-width: 180px;
}

/* Small text disclaimer */
.cta p[style*="font-size: 0.88rem"] {
  font-size: 0.9rem;
  color: var(--off-white);
   margin-top: var(--space-sm);
}

[data-theme="dark"] .cta p[style*="font-size: 0.88rem"] {
  color: var(--navy-light);
}

/* ============ BLOG & POST STYLES ============ */
.featured-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: center;
  margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
  .featured-post {
    grid-template-columns: 1fr;
  }
}

/* ============ REDUCED MOTION SUPPORT ============ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .main-nav a::after,
  .btn::after,
  .theme-toggle:active {
    animation: none !important;
    transition: none !important;
  }
  
  .service-card:hover,
  .post-card:hover,
  .related-card:hover {
    transform: none !important;
  }
}

.featured-post__image {
  border-radius: var(--radius-lg);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  
}


/* ============ DARK MODE SPECIFIC GLOW EFFECTS ============ */

[data-theme="dark"] .main-nav a:hover {
  text-shadow: 0 0 8px rgba(200, 169, 125, 0.6);
}


[data-theme="dark"] .theme-toggle:hover {
  box-shadow: 0 0 20px rgba(200, 169, 125, 0.4);
}


.featured-post__image span {
  border-radius: 6px;  /* Your preferred value */
  overflow: hidden;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--gold);
  opacity: 1;
}

[data-theme="dark"] .featured-post__image span img {
  filter: brightness(0.75);
}

.featured-post__category,
.post-card__category,
.related-card__category,
.article-hero__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}

.featured-post h2,
.featured-post h2 a {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.featured-post__excerpt {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: var(--space-sm);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-md);
}

.post-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--gold);
}

.post-card__image {
  background: linear-gradient(135deg, var(--off-white), var(--gray-border));
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .post-card__image {
  background: linear-gradient(135deg, var(--navy-darker), var(--off-white));
}

.post-card__image span {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold);
  opacity: 0.5;
}

.post-card__body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-card h3,
.post-card h3 a {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.post-card__excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: var(--space-sm);
}

.post-meta {
  display: flex;
  gap: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
  align-items: center;
  flex-wrap: wrap;
}

.post-meta__author {
  font-weight: 600;
  color: var(--text-primary);
}

.post-meta__dot {
  color: var(--gold);
}

/* Card title links */
.post-card h3 a,
.related-card h3 a,
.featured-post h2 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

[data-theme="dark"] .post-card h3 a,
[data-theme="dark"] .related-card h3 a,
[data-theme="dark"] .featured-post h2 a {
  color: var(--text-primary);
}

.post-card h3 a:hover,
.related-card h3 a:hover,
.featured-post h2 a:hover {
  color: var(--gold);
}

/* Contact info links */
.contact-item a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact-item a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* Inline body text links (paragraphs, lists, notes) */
.article-body p a,
.article-body li a,
.article-body blockquote a,
.form-note a,
.checkbox-label a,
.tag-list a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(200, 169, 125, 0.4);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

[data-theme="dark"] .article-body p a,
[data-theme="dark"] .article-body li a,
[data-theme="dark"] .form-note a,
[data-theme="dark"] .checkbox-label a,
[data-theme="dark"] .tag-list a {
  color: var(--gold);
  text-decoration-color: rgba(200, 169, 125, 0.5);
}

/* Category badge links (pill-shaped) */
.featured-post__category,
.post-card__category,
.article-hero__category,
.related-card__category {
  color: var(--gold);
  text-decoration: none;
  background: rgba(200, 169, 125, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
}

/* Newsletter Section */
.newsletter {
  background: var(--off-white);
  text-align: center;
}

.newsletter form {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  max-width: 480px;
  margin-inline: auto;
  flex-wrap: wrap;
}

.newsletter input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.8rem 1.2rem;
  border: 2px solid var(--gray-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text-primary);
  transition: border-color var(--transition);
}

.newsletter input[type="email"]:focus {
  outline: none;
  border-color: var(--gold);
}

/* Article Hero */
.article-hero {
  background: linear-gradient(135deg, var(--navy-darker) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding-block: var(--space-lg);
}

.article-hero .container {
  max-width: var(--max-width-prose);
}

.article-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  color: var(--white);
}

.article-hero__meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--gold-light);
}

.article-hero__meta strong {
  color: var(--white);
  font-weight: 600;
}

/* Article Body */
.article-body {
  max-width: var(--max-width-prose);
  margin-inline: auto;
  padding-block: var(--space-lg) var(--space-xl);
}

.article-body p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.article-body ul,
.article-body ol {
  margin-bottom: var(--space-md);
  padding-left: 1.5rem;
}

.article-body li {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.article-body strong {
  color: var(--text-primary);
}

.article-body blockquote {
  border-left: 4px solid var(--gold);
  padding: var(--space-sm) var(--space-md);
  margin-block: var(--space-md);
  background: var(--off-white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-primary);
}

[data-theme="dark"] .article-body blockquote {
  background: var(--navy-darker);
}

.article-body code {
  background: var(--off-white);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
}

.article-body pre {
  background: var(--navy-darker);
  color: var(--gold-light);
  padding: var(--space-md);
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: var(--space-md);
  border: 1px solid var(--gray-border);
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 0.9rem;
}



/* Article Footer */
.article-footer {
  max-width: var(--max-width-prose);
  margin-inline: auto;
  padding-bottom: var(--space-lg);
}

.tag-list {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.tag-list a {
  font-size: 0.82rem;
  padding: 0.3rem 0.8rem;
  background: var(--off-white);
  border-radius: 50px;
  color: var(--text-primary);
  border: 1px solid var(--gray-border);
  transition: all var(--transition);
}

.tag-list a:hover {
  background: var(--gold);
  color: var(--navy-darker);
  border-color: var(--gold);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.back-link:hover {
  color: var(--gold);
}

/* Author Bio */
.author-bio {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  background: var(--off-white);
  border-radius: var(--radius);
  padding: var(--space-md);
  flex-wrap: wrap;
  border: 1px solid var(--gray-border);
}

[data-theme="dark"] .author-bio {
  background: var(--navy-darker);
}

.author-bio__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--navy-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
  flex-shrink: 0;
}

.author-bio__name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
}

.author-bio__role {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.author-bio__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Related Posts */
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.related-card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: var(--space-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--gold);
}

.related-card h3,
.related-card h3 a {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.related-card time {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============ FOOTER ============ */

.site-footer {
  background: var(--off-white);
  padding: var(--space-md) 0;
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid var(--gray-border);
  color: var(--text-secondary);
}

[data-theme="dark"] .site-footer.container {
  background: var(--navy);
  border-top-color: var(--gray);
  color: var(--off-white);
}

.site-footer.container a {
  color: inherit;
  text-decoration: none;
}

[data-theme="dark"] .site-footer.container a {
  color: var(--off-white);
}


[data-theme="dark"] .site-footer.container a:hover {
  color: var(--gold-light);
}

.site-footer.container a:not(:last-child)::after {
  content: " · ";
  margin: 0 0.25rem;
  opacity: 0.5;
}

/* ============ FOOTER LINK HOVER STATES ============ */


.site-footer.container a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

/* Hover state — light mode */
.site-footer.container a:hover {
  color: var(--gold);
  text-decoration: underline;
}

/* Hover state — dark mode */
[data-theme="dark"] .site-footer.container a:hover {
  color: var(--gold-light); /* Lighter gold for better dark mode contrast */
  text-decoration: underline;
}

/* Focus state for accessibility */
.site-footer.container a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Active state (clicked) */
.site-footer.container a:active {
  color: var(--gold-light);
}

/* Ensure contrast stays high in all modes */
@media (prefers-reduced-motion: no-preference) {
  .site-footer.container a {
    transition: all 0.2s ease;
  }
}

/* ============ RESPONSIVE QUERIES ============ */
@media (max-width: 768px) {
  .site-header__inner {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  .main-nav ul {
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-nav a {
    font-size: 0.88rem;
  }
  
  .section {
    padding-block: var(--space-lg);
  }
  
  .author-bio {
    flex-direction: column;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ CONTACT FORM STYLES ============ */

/* Form Wrapper - Two Column Layout */
.contact-form-wrapper {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: var(--space-lg);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-form-wrapper {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Sidebar / Contact Info */
.contact-info-sidebar {
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--gray-border);
}

[data-theme="dark"] .contact-info-sidebar {
  background: var(--navy-darker);
}

.contact-info-sidebar h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.contact-details {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--gray-border);
}

[data-theme="dark"] .contact-details {
  border-color: var(--gray);
}

.contact-item {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-item__icon {
  width: 44px;
  height: 44px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

[data-theme="dark"] .contact-item__icon {
  background: var(--gold);
  color: var(--navy);
}

.contact-item h3 {
  font-size: 1rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.contact-item a,
.contact-item address {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.5;
}

.contact-item a:hover {
  color: var(--gold);
}

.contact-hours {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--gray-border);
}

[data-theme="dark"] .contact-hours {
  border-color: var(--gray);
}

.contact-hours h3 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.contact-hours dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-xs) var(--space-md);
  font-size: 0.88rem;
}

.contact-hours dt {
  color: var(--text-primary);
  font-weight: 600;
}

.contact-hours dd {
  color: var(--text-secondary);
  margin: 0;
}

/* ============ FORM STYLES ============ */

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Form Status Message */
.form-status {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  font-weight: 500;
}

.form-status.success {
  background: #DCFCE7;
  color: #166534;
  border: 1px solid #86EFAC;
}

.form-status.error {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

[data-theme="dark"] .form-status.success {
  background: #064E3B;
  color: #A7F3D0;
  border-color: #065F46;
}

[data-theme="dark"] .form-status.error {
  background: #7F1D1D;
  color: #FECACA;
  border-color: #991B1B;
}

/* Fieldsets */
.form-fieldset {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin: 0;
}

[data-theme="dark"] .form-fieldset {
  border-color: var(--gray);
}

.form-fieldset legend {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  padding-inline: var(--space-xs);
}

.form-fieldset--narrow {
  padding: var(--space-sm) var(--space-md);
}

/* Form Groups */
.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.form-group label small {
  font-weight: 400;
  color: var(--text-muted);
}

.required {
  color: #DC2626;
}

[data-theme="dark"] .required {
  color: #F87171;
}

/* Input Styling */
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--gray-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: var(--off-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 169, 125, 0.2);
}

.form-group input[aria-invalid="true"],
.form-group select[aria-invalid="true"],
.form-group textarea[aria-invalid="true"] {
  border-color: #DC2626;
}

[data-theme="dark"] .form-group input[aria-invalid="true"],
[data-theme="dark"] .form-group select[aria-invalid="true"],
[data-theme="dark"] .form-group textarea[aria-invalid="true"] {
  border-color: #F87171;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Error Messages */
.error-message {
  display: block;
  font-size: 0.82rem;
  color: #DC2626;
  margin-top: var(--space-xs);
}

[data-theme="dark"] .error-message {
  color: #F87171;
}

/* Full Width Fields */
.form-full-width {
  grid-column: 1 / -1;
}

/* Form Row (for 2-column fields) */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 500px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Checkbox Styling */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-xs);
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--navy);
  cursor: pointer;
}

[data-theme="dark"] .checkbox-label input[type="checkbox"] {
  accent-color: var(--gold);
}

/* Honeypot Field (hidden from users, catches bots) */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--gray-border);
}

[data-theme="dark"] .form-actions {
  border-color: var(--gray);
}

.btn--large {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
}

.btn-loading {
  display: none;
}

.btn.loading .btn-text { display: none; }
.btn.loading .btn-loading { display: inline-block; }

/* Form Note */
.form-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: var(--space-sm);
  line-height: 1.6;
}

.form-note .required {
  color: inherit;
}

/* ============ INLINE TEXT LINKS ============ */

/* Base link style within body text, form labels, paragraphs */
.article-body p a,
.article-body li a,
.article-body blockquote a,
.form-note a,
.checkbox-label a,
.contact-item a,
.contact-hours a,
.tag-list a,
.author-bio a,
.form-group label a,
.form-group small a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(200, 169, 125, 0.4);
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

[data-theme="dark"] .article-body p a,
[data-theme="dark"] .article-body li a,
[data-theme="dark"] .article-body blockquote a,
[data-theme="dark"] .form-note a,
[data-theme="dark"] .checkbox-label a,
[data-theme="dark"] .contact-item a,
[data-theme="dark"] .contact-hours a,
[data-theme="dark"] .form-group label a,
[data-theme="dark"] .form-group small a {
  color: var(--gold);
  text-decoration-color: rgba(200, 169, 125, 0.5);
}

/* Hover state — full underline, brighter color */
.article-body p a:hover,
.article-body li a:hover,
.article-body blockquote a:hover,
.form-note a:hover,
.checkbox-label a:hover,
.contact-item a:hover,
.contact-hours a:hover,
.form-group label a:hover,
.form-group small a:hover {
  color: var(--navy);
  text-decoration-color: var(--gold);
}

[data-theme="dark"] .article-body p a:hover,
[data-theme="dark"] .article-body li a:hover,
[data-theme="dark"] .article-body blockquote a:hover,
[data-theme="dark"] .form-note a:hover,
[data-theme="dark"] .checkbox-label a:hover,
[data-theme="dark"] .contact-item a:hover,
[data-theme="dark"] .contact-hours a:hover,
[data-theme="dark"] .form-group label a:hover,
[data-theme="dark"] .form-group small a:hover {
  color: var(--gold-light);
  text-decoration-color: var(--gold-light);
}

/* Focus state — visible ring for keyboard users */
.article-body p a:focus-visible,
.article-body li a:focus-visible,
.checkbox-label a:focus-visible,
.form-note a:focus-visible,
.contact-item a:focus-visible,
.form-group label a:focus-visible,
.form-group small a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
  text-decoration: none;
}

/* ============ DATA TABLE STYLES ============ */

/* Container with overflow for responsive scrolling */
.table-container {
  margin: var(--space-md) 0;
  position: relative;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .table-scroll {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Caption / Title above table */
.data-table-caption {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: var(--space-sm) var(--space-md);
  background: var(--off-white);
  border-bottom: 2px solid var(--gray-border);
  margin: 0;
}

[data-theme="dark"] .data-table-caption {
  background: var(--navy-darker);
  border-color: var(--gray);
}

/* Core table styling */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 600px; /* Ensures readable cell width on scroll */
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-border);
  vertical-align: middle;
}

[data-theme="dark"] .data-table th,
[data-theme="dark"] .data-table td {
  border-bottom-color: var(--gray);
}

/* Header row styling */
.data-table thead tr {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: #FFFFFF !important; /* Force pure white - independent of --white variable */
}

[data-theme="dark"] .data-table thead tr {
  background: linear-gradient(135deg, #0D111A, #1F2937);
  color: var(--off-white); 
}

.data-table thead th {
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table tbody tr {
  background: var(--white);
  transition: background-color 0.2s ease;
}

[data-theme="dark"] .data-table tbody tr {
  background: var(--off-white);
}

/* Alternating row striping */
.data-table tbody tr:nth-child(even) {
  background: var(--off-white);
}

[data-theme="dark"] .data-table tbody tr:nth-child(even) {
  background: var(--off-white);
}

/* Hover effect on rows */
.data-table tbody tr:hover {
  background: rgba(200, 169, 125, 0.08);
  cursor: pointer;
}

[data-theme="dark"] .data-table tbody tr:hover {
  background: rgba(200, 169, 125, 0.12);
}

/* Sticky first column */
.sticky-col {
  position: sticky;
  left: 0;
  background: inherit;
  color: var(--text-primary);
  z-index: 2;
  font-weight: 600;
  min-width: 180px;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .sticky-col {
  color: #FFFFFF !important; /* Force white for dark mode */
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
}

/* Header sticky column override */
.data-table thead .sticky-col {
  color: #FFFFFF !important;
  background: inherit !important;
  z-index: 3;
}

/* Cost badge styling */
.cost-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cost-low {
  background: #DCFCE7;
  color: #166534;
}

[data-theme="dark"] .cost-low {
  background: #064E3B;
  color: #A7F3D0;
}

.cost-medium {
  background: #FEF3C7;
  color: #92400E;
}

[data-theme="dark"] .cost-medium {
  background: #78350F;
  color: #FDE68A;
}

.cost-high {
  background: #FEE2E2;
  color: #991B1B;
}

[data-theme="dark"] .cost-high {
  background: #7F1D1D;
  color: #FECACA;
}

/* Summary row styling */
.table-summary-row {
  background: linear-gradient(90deg, rgba(200, 169, 125, 0.15), transparent);
  border-top: 2px solid var(--gold);
}

[data-theme="dark"] .table-summary-row {
  background: linear-gradient(90deg, rgba(200, 169, 125, 0.2), transparent);
}

.table-summary-row td,
.table-summary-row th {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 1rem;
}

[data-theme="dark"] .table-summary-row td,
[data-theme="dark"] .table-summary-row th {
  color: #FFFFFF !important; /* Force white in dark mode */
}

/* Focus states for keyboard navigation */
.data-table th:focus-visible,
.data-table td:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: -3px;
}

.data-table tbody tr:focus-within {
  box-shadow: inset 0 0 0 2px var(--gold);
}

/* Table note below table */
.table-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: var(--space-xs);
  padding-left: var(--space-sm);
  border-left: 3px solid var(--gold);
}

[data-theme="dark"] .table-note {
  border-left-color: var(--gold);
}

/* ============ RESPONSIVE TABLE MODIFICATIONS ============ */

/* Mobile view: convert table to cards */
@media (max-width: 600px) {
  .table-scroll {
    border: none;
    box-shadow: none;
  }
  
  .data-table {
    min-width: auto;
    display: block;
  }
  
  .data-table thead {
    display: none;
  }
  
  .data-table tbody {
    display: block;
  }
  
  .data-table tr {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    margin-bottom: var(--space-sm);
    padding: var(--space-sm);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  [data-theme="dark"] .data-table tr {
    background: var(--white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  
  .data-table td {
    display: block;
    padding: 0.5rem 0;
    border: none;
    text-align: right;
    position: relative;
    padding-left: 50%;
  }
  
  .data-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 0;
    width: 45%;
    padding-right: var(--space-xs);
    white-space: nowrap;
    font-weight: 600;
    color: var(--text-primary);
  }
  
  .data-table .sticky-col {
    position: static;
    background: transparent !important;
    box-shadow: none;
    min-width: auto;
  }
  
  .data-table .sticky-col strong {
    display: block;
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
  }
  
  .table-summary-row {
    background: var(--off-white);
    border-top: 2px solid var(--gold);
  }
  
  .data-table-caption {
    font-size: 1rem;
    text-align: center;
  }
}

/* ============ ACCESSIBILITY ENHANCEMENTS ============ */

/* Screen reader only helper text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .data-table tbody tr {
    transition: none;
  }
  
  .data-table tbody tr:hover {
    background: inherit;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .data-table thead tr {
    background: #000;
    color: #FFF;
  }
  
  .data-table tbody tr {
    border: 2px solid #000;
  }
  
  .cost-badge {
    color: #166534; /* Explicit color, not dependent on --white */
    border: 2px solid currentColor;
  }
  
}

[data-theme="dark"] .cost-low {
  color: #A7F3D0;
}

[data-theme="dark"] .cost-medium {
  color: #FDE68A;
}

[data-theme="dark"] .cost-high {
  color: #FECACA;
}

.checkmark {
  color: #166534;
  font-weight: 700;
  font-size: 1.2rem;
}
[data-theme="dark"] .checkmark { color: #A7F3D0; }

.cross {
  color: #991B1B;
  font-weight: 700;
  font-size: 1.2rem;
}
[data-theme="dark"] .cross { color: #FECACA; }

.partial {
  color: #92400E;
  font-weight: 700;
  font-size: 1.2rem;
}
[data-theme="dark"] .partial { color: #FDE68A; }

/* ============ PRIVACY POLICY PAGE STYLES ============ */

/* Last updated date in page banner */
.page-banner p:last-of-type {
  font-size: 0.9rem;
  color: var(--gold-light);
  font-style: italic;
  margin-top: var(--space-xs);
}

[data-theme="dark"] .page-banner p:last-of-type {
  color: var(--gold);
}

/* Section headings in privacy policy body */
.article-body section h2 {
  color: var(--text-primary);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--gray-border);
}

[data-theme="dark"] .article-body section h2 {
  border-bottom-color: var(--gray);
}

/* Section headings (H3) in privacy policy body */
.article-body section h3 {
  color: var(--text-primary);
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  font-size: 1.1rem;
}

/* Lists within privacy policy sections */
.article-body section ul {
  margin-bottom: var(--space-md);
  padding-left: 1.5rem;
}

.article-body section ul li {
  margin-bottom: var(--space-xs);
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Strong text in lists (bolded purposes) */
.article-body section strong {
  color: var(--text-primary);
}

/* Contact details within privacy policy */
.contact-details {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

@media (max-width: 500px) {
  .contact-details {
    flex-direction: column;
  }
}
/* ============ ACCESSIBILITY STATEMENT — COMPACT CONTACT ============ */

.contact-details--compact {
  background: var(--off-white);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

[data-theme="dark"] .contact-details--compact {
  background: var(--navy-darker);
  border-color: var(--gold);
}

.contact-cta-box h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.contact-cta-box > p:first-of-type {
  color: var(--text-secondary);
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto var(--space-md) auto;
}

/* ============ ACCESSIBILITY STATEMENT STYLES ============ */

.statement-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-md) 0;
  font-size: 0.95rem;
}

.statement-table th {
  background: var(--navy);
  color: var(--white);
  padding: 0.75rem;
  text-align: left;
  font-weight: 700;
}

.statement-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--gray-border);
  vertical-align: top;
  line-height: 1.5;
}

.statement-table tr:nth-child(even) {
  background: var(--off-white);
}

[data-theme="dark"] .statement-table tr:nth-child(even) {
  background: var(--navy-darker);
}

[data-theme="dark"] .statement-table td {
  border-bottom-color: var(--gray);
}

.statement-table th[scope="col"] {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Responsive table */
@media (max-width: 600px) {
  .statement-table thead {
    display: none;
  }

  .statement-table,
  .statement-table tbody,
  .statement-table tr,
  .statement-table td {
    display: block;
    width: 100%;
  }

  .statement-table tr {
    margin-bottom: var(--space-sm);
    border: 1px solid var(--gray-border);
    border-radius: var(--radius);
    padding: var(--space-xs);
  }

  .statement-table td {
    border-bottom: none;
    padding: 0.5rem 0;
  }

  .statement-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gold);
    margin-bottom: 0.25rem;
  }
}

/* Compact contact box for accessibility statement */
.contact-details--compact {
  background: var(--off-white);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--space-lg);
}

[data-theme="dark"] .contact-details--compact {
  background: var(--navy-darker);
  border-color: var(--gold);
}

.contact-cta-box h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  text-align: center;
}

.contact-cta-box > p:first-of-type {
  color: var(--text-secondary);
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto var(--space-md) auto;
}

/* Narrow container for statement page */
.container--narrow {
  max-width: 760px;
}
/* ============ OUTLINE BUTTON HOVER — DARK MODE (Navy text on gold) ============ */

[data-theme="dark"] .cta .btn--outline:hover,
[data-theme="dark"] .contact-form .btn--outline:hover,
[data-theme="dark"] form .btn--outline:hover,
[data-theme="dark"] .btn--outline:hover {
  background: var(--gold) !important;
  border-color: #FFFFFF !important;
  color: #132033 !important; /* Dark navy text on gold background */
}

[data-theme="dark"] .cta .btn--outline:focus-visible,
[data-theme="dark"] .contact-form .btn--outline:focus-visible {
  outline: 3px solid var(--gold) !important;
  outline-offset: 2px;
}

/* ============ MOBILE MENU OVERRIDE (MUST BE AT END OF FILE) ============ */
/* ============ MOBILE MENU TOGGLE ============ */
/* ============ MOBILE MENU (FINAL) ============ */
/* ============ MOBILE MENU (FINAL CORRECTED) ============ */

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--gold);
  z-index: 1003;
}

.mobile-menu-toggle svg {
  width: 24px;
  height: 24px;
  display: block;
}

.mobile-menu-toggle .icon-close {
  display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.mobile-menu-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

/* Desktop Layout (≥769px) */
@media (min-width: 769px) {
  .mobile-menu-toggle {
    display: none !important;
  }

  .site-header__inner {
    justify-content: space-between !important;
    align-items: center;
  }

  /* Logo stays on left */
  .brand {
    margin-right: var(--space-lg);
  }

  /* Nav links in middle */
  .main-nav {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: var(--space-md);
    flex: 1;
    justify-content: flex-end;
  }

  .main-nav ul {
    display: flex;
    flex-direction: row;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .main-nav li {
    display: inline-block;
  }

  .main-nav a {
    display: inline-block;
    padding: 0.25rem 0;
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.85;
    position: relative;
  }

  .main-nav a:hover,
  .main-nav a[aria-current="page"] {
    opacity: 1;
    color: var(--gold-light);
  }

  /* Nav link underline animation */
  .main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .main-nav a:hover::after,
  .main-nav a[aria-current="page"]::after {
    width: 100%;
  }

  /* Theme toggle on right */
  .header-actions {
    display: flex;
    align-items: center;
    margin-left: var(--space-md);
    margin-right: var(--space-md);
  }

  .header-actions .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 2px solid var(--gold);
    border-radius: 50%;
    cursor: pointer;
    color: var(--gold);
    font-size: 1.2rem;
  }
}

/* Mobile Layout (≤768px) */
@media (max-width: 768px) {

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-header {
    position: sticky;
    top: 0;
    z-index: 1002;
    width: 100%;
  }

  .site-header__inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-block: 0.5rem;
    flex-wrap: nowrap;
    width: 100%;
  }

  /* Show header actions in mobile */
  .header-actions {
    display: flex;
    align-items: center;
    margin-left: auto; /* Pushes to the right */
    margin-right: 0.35rem;
  }

  /* Theme toggle styling in mobile */
  .header-actions .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid var(--gold);
    border-radius: 50%;
    cursor: pointer;
    color: var(--gold);
    font-size: 1.1rem;
  }

  .header-actions .theme-toggle svg {
    width: 20px;
    height: 20px;
  }

  /* Theme toggle icon visibility */
  .header-actions .theme-toggle .icon-sun {
    display: none;
  }

  .header-actions .theme-toggle .icon-moon {
    display: block;
  }

  [data-theme="dark"] .header-actions .theme-toggle .icon-sun {
    display: block;
  }

  [data-theme="dark"] .header-actions .theme-toggle .icon-moon {
    display: none;
  }

  /* Nav becomes slide-out panel */
  .main-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--navy-darker);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    margin: 0;
    display: block !important;
    max-height: calc(100vh - 56px);
    padding: 0;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
  }

  .main-nav ul {
    display: block;
    padding: 0;
    margin: 0;
    width: 100%;
  }

  .main-nav li {
    width: 100%;
    display: block;
  }

  .main-nav a {
    display: block;
    padding: 1rem var(--space-md);
    color: var(--white);
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
  }

  .main-nav a:hover {
    background: rgba(200, 169, 125, 0.1);
    color: var(--gold);
  }

  .main-nav > ul > li:last-child > a {
    border-bottom: none;
  }

  /* Explicit positioning for mobile */
  .brand {
    flex-shrink: 0;
  }

  /* Hamburger on far right */
  .mobile-menu-toggle {
    flex-shrink: 0;
    order: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .main-nav {
    transition: none;
  }
}

/* ============ CUSTOM FORM STYLING ============ */

.custom-form-wrapper {
  max-width: 500px;
  margin-inline: auto;
}

.custom-form-wrapper form {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: stretch;
}

.custom-form-wrapper .form-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.custom-form-wrapper input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.85rem 1.2rem;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-sans);
  background: var(--white);
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.custom-form-wrapper input[type="email"]:focus {
  outline: none;
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(200, 169, 125, 0.3);
}

.custom-form-wrapper input[type="email"]::placeholder {
  color: var(--text-muted);
}

.custom-form-wrapper button[type="submit"] {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: 2px solid var(--gold);
  background: var(--gold) !important;
  color: var(--navy-darker) !important;
  transition: all 0.2s ease;
  min-width: 180px;
}

.custom-form-wrapper button[type="submit"]:hover {
  background: var(--gold-light) !important;
  color: var(--navy-darker) !important;
  transform: translateY(-2px);
}

.custom-form-wrapper button[type="submit"]:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

.custom-form-wrapper button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Dark mode overrides */
[data-theme="dark"] .custom-form-wrapper input[type="email"] {
  background: var(--off-white);
  border-color: var(--gold);
  color: var(--text-primary);
}

/* Form note/disclaimer */
.form-disclaimer {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive: stack on mobile */
@media (max-width: 500px) {
  .custom-form-wrapper .form-row {
    flex-direction: column;
  }
  
  .custom-form-wrapper input[type="email"] {
    min-width: 100%;
  }
  
  .custom-form-wrapper button[type="submit"] {
    width: 100%;
  }
}




/* Dark mode: make small text readable */
[data-theme="dark"] .cta p[style*="font-size: 0.88rem"] {
  color: var(--off-white) !important;
  opacity: 1 !important;
}

/* Dark mode: make secondary CTA text visible */
[data-theme="dark"] .cta p[style*="color: var(--gold-light)"] {
  color:#1B2E48 !important;
  opacity: 1 !important;
}

/* Dark mode: divider line needs to be visible (darker) on light BG */
[data-theme="dark"] .cta div[style*="border-top: 1px solid"],
[data-theme="dark"] .cta [style*="border-top: 1px solid rgba(255, 255, 255, 0.1)"] {
  border-color: var(--gray-border) !important; /* Light gray, visible on light BG */
  opacity: 1 !important;
}