/* ---------- Pink/Coral Theme ---------- */

/* --- Theme variables --- */
:root {
  --bg: #FFFBF9;
  --card: #FFFFFF;
  --muted: #6B7280;
  --accent: #FF8DAA;
  --accent-2: #FFD3E0;
  --accent-3: #FFE7F0;
  --text-primary: #111827;
  --text-secondary: #6B7280;
  --text-tertiary: #9CA3AF;
  --border: rgba(17, 24, 39, 0.06);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.06);
  --shadow-accent: 0 8px 18px rgba(255, 141, 170, 0.18);
  --radius: 14px;
  --transition: cubic-bezier(0.28, 0.11, 0.32, 1);
  --max-width: 1100px;
  
  /* Configurable background colors for different sections */
  --bg-body-start: #FFF6F8;
  --bg-body-end: #FFFBF9;
  --bg-hero: rgba(255, 255, 255, 0.8);
  --bg-hero-end: rgba(255, 255, 255, 0.6);
  --bg-name-card-start: #FFF;
  --bg-name-card-end: #FFFBFC;
  --bg-sidebar-start: #FFF;
  --bg-sidebar-end: #FFF8FA;
  --bg-intro-narrative-start: #FFF8FA;
  --bg-intro-narrative-end: #FFFBFC;
  --bg-name-of-day-start: #FFF;
  --bg-name-of-day-end: #FFF8FA;
  --bg-faq-section-start: #FFFBF9;
  --bg-faq-section-end: #FFF6F8;
  --bg-footer-start: #FFF;
  --bg-footer-end: #FFF6F8;
  --bg-related-links: rgba(255, 255, 255, 0.8);
  --bg-related-links-end: rgba(255, 255, 255, 0.6);
  --bg-letter-content-start: #FFF8FA;
  --bg-letter-content-end: #FFFBFC;
  
  /* Gender-specific color schemes */
  /* Boy (Blue) color scheme */
  --boy-accent: #60A5FA;
  --boy-accent-2: #DBEAFE;
  --boy-accent-3: #EFF6FF;
  --boy-shadow: 0 8px 18px rgba(96, 165, 250, 0.18);
  
  /* Girl (Pink) color scheme */
  --girl-accent: #FF8DAA;
  --girl-accent-2: #FFD3E0;
  --girl-accent-3: #FFE7F0;
  --girl-shadow: 0 8px 18px rgba(255, 141, 170, 0.18);
  
  /* Unisex (Purple) color scheme */
  --unisex-accent: #A78BFA;
  --unisex-accent-2: #E9D5FF;
  --unisex-accent-3: #F5F3FF;
  --unisex-shadow: 0 8px 18px rgba(167, 139, 250, 0.18);
  
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color-scheme: light;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg-body-start) 0%, var(--bg-body-end) 60%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 24px;
  display: flex;
  justify-content: center;
  font-size: 16px;
  line-height: 1.4;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.015em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 1.75rem;
  font-weight: 600;
}

/* Container */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header */
header.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

/* Header wrap container for baby-names pages */
header.site-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Header content container for baby-names pages */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}

/* Main navigation for baby-names pages */
.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--transition);
  padding: 8px 12px;
  border-radius: 8px;
}

.main-nav a:hover {
  color: var(--accent);
  background: var(--accent-3);
}

.main-nav a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #FFA3C1 60%, #FFD3E0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(255, 141, 170, 0.18);
  flex: 0 0 64px;
}

.logo svg {
  width: 48px;
  height: 48px;
}

.brand h1 {
  font-size: 18px;
  margin: 0;
  line-height: 1;
}

.brand p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* Tagline visibility - show full version by default */
.tagline-full {
  display: inline;
}

.tagline-mobile {
  display: none;
}

nav .btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s var(--transition);
}

nav .btn:hover {
  background: var(--card);
  border-color: var(--accent);
  color: var(--accent);
}

/* HERO */
.hero {
  background: linear-gradient(180deg, var(--bg-hero), var(--bg-hero-end));
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
}

.hero-left h2 {
  margin: 0 0 8px 0;
  font-size: 22px;
}

.hero-left p {
  margin: 0 0 16px;
  color: var(--muted);
}

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.search {
  flex: 1;
  display: flex;
  gap: 12px;
  background: var(--card);
  padding: 8px 16px;
  border-radius: 16px;
  align-items: center;
  border: 2px solid var(--accent);
  box-shadow: 0 4px 20px rgba(255, 141, 170, 0.15);
  transition: all 0.3s var(--transition);
  position: relative;
  overflow: hidden;
}

.search::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 141, 170, 0.05) 0%, rgba(255, 255, 255, 0.1) 100%);
  pointer-events: none;
}

.search:hover {
  border-color: #FF7A9A;
  box-shadow: 0 6px 25px rgba(255, 141, 170, 0.25);
  transform: translateY(-1px);
}

.search:focus-within {
  border-color: #FF7A9A;
  box-shadow: 0 6px 25px rgba(255, 141, 170, 0.3), 0 0 0 4px rgba(255, 141, 170, 0.1);
  transform: translateY(-1px);
}

.search svg {
  color: var(--accent);
  opacity: 0.8;
  z-index: 1;
}

.search input {
  border: 0;
  outline: 0;
  padding: 14px 8px;
  font-size: 17px;
  background: transparent;
  width: 100%;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-primary);
  z-index: 1;
}

.search input::placeholder {
  color: var(--text-secondary);
  font-weight: 400;
}

/* Filters */
.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Length Filter */
.length-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.length-filter .filter-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-right: 4px;
}

.length-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.length-chip {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--transition);
  font-family: inherit;
  color: var(--text-primary);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.length-chip:hover {
  border-color: var(--accent);
  background: var(--accent-3);
  transform: translateY(-1px);
}

.length-chip:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 141, 170, 0.2);
}

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

.length-chip.active {
  background: linear-gradient(90deg, var(--accent) 0%, #FFB0CB 100%);
  color: white;
  border: 0;
  box-shadow: var(--shadow-accent);
}

.length-chip.active:hover {
  background: linear-gradient(90deg, #FF7A9A 0%, #FFA0BB 100%);
  transform: translateY(-1px);
}

.length-chip:active {
  transform: scale(0.98);
}

/* Responsive adjustments for length filter */
@media (max-width: 768px) {
  .length-filter {
    margin-bottom: 10px;
  }
  
  .length-chips {
    gap: 6px;
  }
  
  .length-chip {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .length-filter .filter-label {
    width: 100%;
    margin-bottom: 4px;
  }
  
  .length-chips {
    gap: 6px;
  }
  
  .length-chip {
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* Letter Grid */
.letter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.letter-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--transition);
  font-family: inherit;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.letter-btn:hover {
  border-color: var(--accent);
  background: var(--accent-3);
  transform: translateY(-1px);
}

.letter-btn:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 141, 170, 0.2);
}

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

.letter-btn.active {
  background: linear-gradient(90deg, var(--accent) 0%, #FFB0CB 100%);
  color: white;
  border: 0;
  box-shadow: var(--shadow-accent);
}

.letter-btn.active:hover {
  background: linear-gradient(90deg, #FF7A9A 0%, #FFA0BB 100%);
  transform: translateY(-1px);
}

.letter-btn:active {
  transform: scale(0.98);
}

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

/* Ensure touch targets on mobile */
@media (max-width: 768px) {
  .letter-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px 14px;
  }
  
  .letter-grid {
    gap: 6px;
  }
}

/* Extra small screens */
@media (max-width: 360px) {
  .letter-grid {
    gap: 4px;
  }
  
  .letter-btn {
    min-width: 40px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
  }
}

.filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 8px;
  /* Ensure proper spacing and prevent overlap */
  min-height: 40px;
}

/* Prevent overlap by ensuring clear button doesn't get squeezed */
.filter-row #clear-filters {
  flex-shrink: 0;
  white-space: nowrap;
  min-width: 100px;
}

/* Constrain dropdown to prevent it from expanding too much */
.filter-row .filter-group-inline select {
  max-width: 250px;
}

.filter-group-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group-inline label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-group-inline select {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.filter-group-inline select:hover {
  border-color: var(--accent);
}

.filter-group-inline select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 141, 170, 0.1);
}

/* Footer */
footer {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
}

/* Chips & Buttons */
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--transition);
  font-family: inherit;
  text-decoration: none !important;
  color: var(--text-primary);
  display: inline-block;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--accent);
  background: var(--accent-3);
  text-decoration: none !important;
}

.chip.active {
  background: linear-gradient(90deg, var(--accent) 0%, #FFB0CB 100%);
  color: white;
  border: 0;
  box-shadow: var(--shadow-accent);
  text-decoration: none !important;
}

.chip:active {
  transform: scale(0.98);
}

/* Mobile responsive chips */
@media (max-width: 768px) {
  .chip {
    font-size: 13px;
    padding: 6px 10px;
    margin: 2px;
  }
}

@media (max-width: 480px) {
  .chip {
    font-size: 12px;
    padding: 5px 8px;
    margin: 1px;
  }
  
  .filters .wrap {
    gap: 4px !important;
  }
}

/* Popular/Trending buttons in main filters */
.filters .chip[data-type="popular"],
.filters .chip[data-type="trending"] {
  background: linear-gradient(135deg, var(--card) 0%, var(--accent-3) 100%);
  border: 1px solid var(--accent-2);
  color: var(--accent);
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.filters .chip[data-type="popular"]:hover,
.filters .chip[data-type="trending"]:hover {
  background: linear-gradient(135deg, var(--accent-3) 0%, var(--accent-2) 100%);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-accent);
}

.filters .chip[data-type="popular"].active,
.filters .chip[data-type="trending"].active {
  background: linear-gradient(135deg, var(--accent) 0%, #FFB0CB 100%);
  color: white;
  border: 0;
  box-shadow: var(--shadow-accent);
}

.filters .chip[data-type="popular"]:active,
.filters .chip[data-type="trending"]:active {
  transform: scale(0.98) translateY(0);
}

.tag {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #FFF5F8;
  border: 1px solid var(--border);
  display: inline-block;
}

/* MAIN GRID */
.main-grid {
  display: block;
  margin-top: 18px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.names-card {
  background: var(--card);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

/* Loading Indicator */
.loading-indicator {
  text-align: center;
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--accent-3);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-progress {
  margin-top: 1rem;
  font-size: 14px;
  color: var(--text-secondary);
}

.progress-bar {
  width: 100%;
  max-width: 300px;
  height: 4px;
  background-color: var(--accent-3);
  border-radius: 2px;
  margin: 1rem auto;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Error Message */
.error-message {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  color: #c53030;
  font-weight: 400;
  font-size: 14px;
  grid-column: 1 / -1;
}

/* Results Grid */
.grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px;
  width: 100%;
}

@media (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

/* Name Card */
.name-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--bg-name-card-start) 0%, var(--bg-name-card-end) 100%);
  border: 1px solid var(--border);
  transition: all 0.25s var(--transition);
  overflow: hidden;
  min-width: 0;
}

.name-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(255, 141, 170, 0.12);
  border-color: var(--accent);
}

.name-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.name-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  flex-wrap: wrap;
}

.name-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* Name Title Link Styles */
.name-title-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s var(--transition);
}

.name-title-link:hover {
  color: var(--accent);
}

.name-title-link:hover .name-title {
  color: var(--accent);
}

.name-title-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Name Pronunciation Styles */
.name-pronunciation {
  font-size: 13px;
  color: #374151;
  font-style: italic;
  margin-bottom: 8px;
  padding: 4px 8px;
  background: #F3F4F6;
  border-radius: 6px;
  display: inline-block;
  font-weight: 500;
}

/* Name Badge Styles */
.name-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.badge-icon {
  font-size: 12px;
  line-height: 1;
}

.badge-label {
  line-height: 1;
}

/* Popular Badge */
.badge-popular {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E;
  border: 1px solid #FCD34D;
}

/* Trending Badge */
.badge-trending {
  background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
  color: #1E40AF;
  border: 1px solid #93C5FD;
}

/* Unique Badge */
.badge-unique {
  background: linear-gradient(135deg, #E9D5FF 0%, #D8B4FE 100%);
  color: #6B21A8;
  border: 1px solid #C084FC;
}

/* Classic Badge */
.badge-classic {
  background: linear-gradient(135deg, #FED7AA 0%, #FDBA74 100%);
  color: #9A3412;
  border: 1px solid #FB923C;
}

.favorite-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: all 0.2s var(--transition);
  flex-shrink: 0;
}

.favorite-btn:hover {
  transform: scale(1.1);
  background: var(--accent-3);
}

/* Gender-specific favorite button hover states (non-active) */
.favorite-btn.gender-boy:hover {
  background: var(--boy-accent-3);
}

.favorite-btn.gender-girl:hover {
  background: var(--girl-accent-3);
}

.favorite-btn.gender-unisex:hover {
  background: var(--unisex-accent-3);
}

/* Default active state (fallback for names without gender class) */
.favorite-btn.active {
  background: linear-gradient(90deg, #FFE7F0, #FFD3E0);
  border: 0;
  animation: heartBeat 0.3s ease;
}

/* Gender-specific favorite button active states - these override the default */
.favorite-btn.active.gender-boy {
  background: linear-gradient(90deg, var(--boy-accent-3), var(--boy-accent-2)) !important;
  border: 0;
}

.favorite-btn.active.gender-girl {
  background: linear-gradient(90deg, var(--girl-accent-3), var(--girl-accent-2)) !important;
  border: 0;
}

.favorite-btn.active.gender-unisex {
  background: linear-gradient(90deg, var(--unisex-accent-3), var(--unisex-accent-2)) !important;
  border: 0;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.name-card-body {
  color: var(--text-secondary);
}

.name-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* Gender badge styling */
.gender-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Boy gender badge */
.gender-badge.gender-boy {
  background-color: #1E40AF;
  color: #FFFFFF;
  border: 1px solid #1E40AF;
}

/* Girl gender badge */
.gender-badge.gender-girl {
  background-color: #BE185D;
  color: #FFFFFF;
  border: 1px solid #BE185D;
}

/* Unisex gender badge */
.gender-badge.gender-unisex {
  background-color: #7C3AED;
  color: #FFFFFF;
  border: 1px solid #7C3AED;
}

.name-separator {
  color: var(--text-tertiary);
}

.name-origin {
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
}

.name-meaning {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 6px 0 0 0;
}

/* Sidebar */
.sidebar .collection {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--bg-sidebar-start), var(--bg-sidebar-end));
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.collection h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
  grid-column: 1 / -1;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.empty-state .suggestions-list {
  text-align: left;
  max-width: 500px;
  margin: 1.5rem auto;
  padding-left: 1.5rem;
}

.empty-state .suggestions-list li {
  margin-bottom: 0.75rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

#clear-filters-suggestion {
  margin-top: 1.5rem;
}

/* Error State */
.error-state {
  text-align: center;
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

.error-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #c53030;
}

.error-state p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}

/* Favorites Panel */
.favorites-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: -2px 0 32px rgba(0, 0, 0, 0.15);
  transition: right 0.3s var(--transition);
  z-index: 1000;
  overflow-y: auto;
  border-left: 1px solid var(--border);
  /* Force hardware acceleration for smoother animation */
  transform: translateZ(0);
  will-change: right;
}

.favorites-panel.active {
  right: 0 !important;
}

.favorites-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  position: sticky;
  top: 0;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.favorites-header h2 {
  font-size: 18px;
  color: var(--text-primary);
  margin: 0;
}

.btn-close {
  background: var(--card);
  color: var(--text-primary);
  font-size: 24px;
  padding: 0;
  width: 36px;
  height: 36px;
  line-height: 1;
  border-radius: 50%;
  border: 1px solid var(--border);
  transition: all 0.2s var(--transition);
  cursor: pointer;
}

.btn-close:hover {
  background: var(--accent-3);
  border-color: var(--accent);
}

.favorites-list {
  padding: 1rem;
}

.empty-favorites {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-secondary);
}

.empty-favorites p:first-child {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.favorite-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, var(--bg-name-card-start), var(--bg-name-card-end));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.2s var(--transition);
}

.favorite-card:hover {
  background: #FFF;
  box-shadow: 0 4px 12px rgba(255, 141, 170, 0.12);
  transform: translateY(-1px);
  border-color: var(--accent);
}

.favorite-card-content {
  flex: 1;
}

.favorite-card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

/* Favorite Name Link Styles */
.favorite-name-link {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s var(--transition);
}

.favorite-name-link:hover {
  color: var(--accent);
}

.favorite-name-link:hover h4 {
  color: var(--accent);
}

.favorite-name-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.favorite-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.remove-favorite-btn {
  background: transparent;
  color: var(--text-tertiary);
  font-size: 24px;
  padding: 4px 8px;
  line-height: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s var(--transition);
  cursor: pointer;
}

.remove-favorite-btn:hover {
  color: #c53030;
  background: #fff5f5;
  border-color: #feb2b2;
  transform: scale(1.05);
}

/* Utility Classes */
[hidden] {
  display: none !important;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  body {
    padding: 16px;
  }
  
  .hero {
    padding: 16px;
  }
  
  .hero-left h2 {
    font-size: 20px;
  }
  
  .brand h1 {
    font-size: 16px;
  }
  
  .brand p {
    font-size: 11px;
  }
  
  .logo {
    width: 48px;
    height: 48px;
  }
  
  .logo svg {
    width: 28px;
    height: 28px;
  }
  
  /* Enhanced mobile search bar */
  .search {
    padding: 10px 16px;
    border-radius: 14px;
    box-shadow: 0 3px 15px rgba(255, 141, 170, 0.2);
  }
  
  .search input {
    padding: 12px 8px;
    font-size: 16px;
  }
  
  .search:focus-within {
    box-shadow: 0 4px 20px rgba(255, 141, 170, 0.35), 0 0 0 3px rgba(255, 141, 170, 0.15);
  }
}

/* Sticky Search Bar */
.sticky-search-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  z-index: 100;
  padding: 12px 24px;
  transform: translateY(-100%);
  transition: transform 0.3s var(--transition);
}

.sticky-search-container.visible {
  transform: translateY(0);
}

.sticky-search-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sticky-search-content .search {
  flex: 1;
  margin: 0;
}

.sticky-search-content .filters {
  display: flex;
  gap: 6px;
  margin: 0;
}

.sticky-search-content .chip {
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}

/* Mobile responsive for sticky search */
@media (max-width: 768px) {
  .sticky-search-container {
    padding: 10px 16px;
  }
  
  .sticky-search-content {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  
  .sticky-search-content .filters {
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .sticky-search-content .chip {
    padding: 4px 8px;
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .sticky-search-container {
    padding: 8px 12px;
  }
  
  .sticky-search-content .search {
    font-size: 14px;
  }
}

/* Body padding when sticky search is active */
body.sticky-search-active {
  padding-top: 80px;
}

/* Ensure filter elements remain properly positioned when sticky search is active */
body.sticky-search-active .filter-row {
  z-index: 5;
}

body.sticky-search-active .filter-row select,
body.sticky-search-active .filter-row #clear-filters {
  z-index: 10;
}

@media (max-width: 768px) {
  body.sticky-search-active {
    padding-top: 100px;
  }
}

@media (max-width: 480px) {
  body.sticky-search-active {
    padding-top: 90px;
  }
}

/* Search Bar Enhancements */
@keyframes searchPulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(255, 141, 170, 0.15);
  }
  50% {
    box-shadow: 0 4px 20px rgba(255, 141, 170, 0.25);
  }
}

.search.pulse {
  animation: searchPulse 2s ease-in-out infinite;
}

/* Search icon enhancement */
.search svg {
  transition: all 0.3s var(--transition);
}

.search:hover svg,
.search:focus-within svg {
  color: #FF7A9A;
  opacity: 1;
  transform: scale(1.1);
}

/* Search placeholder enhancement */
.search input:focus::placeholder {
  opacity: 0.6;
  transform: translateX(4px);
  transition: all 0.3s var(--transition);
}

/* Add a subtle glow effect */
.search::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--accent), #FFB0CB, var(--accent));
  border-radius: 18px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s var(--transition);
}

.search:focus-within::after {
  opacity: 0.3;
}

/* Accessibility */

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Skip to main content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s var(--transition);
}

.skip-to-content:focus {
  top: 0;
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

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

/* Utility Classes */
[hidden] {
  display: none !important;
}

/* Skeleton Loading States */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  grid-column: 1 / -1;
}

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

.skeleton-card {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--bg-name-card-start) 0%, var(--bg-name-card-end) 100%);
  border: 1px solid var(--border);
  animation: pulse 1.5s ease-in-out infinite;
}

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

.skeleton-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 20px;
  width: 60%;
  background: var(--accent-3);
  border-radius: 4px;
}

.skeleton-icon {
  height: 32px;
  width: 32px;
  background: var(--accent-3);
  border-radius: 8px;
}

.skeleton-meta {
  height: 16px;
  width: 40%;
  background: var(--accent-3);
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text {
  height: 14px;
  width: 100%;
  background: var(--accent-3);
  border-radius: 4px;
  margin-bottom: 6px;
}

.skeleton-text:last-child {
  width: 80%;
}

/* ---------- Landing Page Enhancements ---------- */

/* Introductory Narrative */
.intro-narrative {
  margin: 0 0 20px 0;
  padding: 16px;
  background: linear-gradient(180deg, var(--bg-intro-narrative-start), var(--bg-intro-narrative-end));
  border-radius: 12px;
  border: 1px solid var(--border);
}

.intro-narrative p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Name of the Day Card */
.name-of-day-card {
  margin: 0 0 14px 0;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--bg-name-of-day-start) 0%, var(--bg-name-of-day-end) 100%);
  border-radius: 10px;
  border: 1px solid var(--accent-2);
  box-shadow: var(--shadow-sm);
}

.notd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 8px;
}

.notd-header h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.notd-date {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.notd-content {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.notd-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Name of the Day Card Link Styles */
.notd-card-link {
  color: inherit;
  text-decoration: none !important;
  display: block;
  border-radius: 10px;
  transition: all 0.2s var(--transition);
}

.notd-card-link:hover {
  text-decoration: none !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.notd-card-link:hover .notd-name {
  color: var(--accent);
}

.notd-card-link:focus {
  outline: none;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 10px;
}

.notd-card-link:active {
  transform: translateY(0);
}

/* Ensure no underlines on any child elements */
.notd-card-link *,
.notd-card-link *:hover,
.notd-card-link *:focus,
.notd-card-link *:active,
.notd-card-link *:visited {
  text-decoration: none !important;
}

.notd-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
}

.notd-gender {
  text-transform: capitalize;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: #374151;
  color: #FFFFFF;
}

.notd-separator {
  color: var(--text-tertiary);
}

.notd-origin {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
}

.notd-meaning {
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
  margin: 0;
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
  .intro-narrative {
    padding: 14px;
    margin: 0 0 16px 0;
  }
  
  .intro-narrative p {
    font-size: 14px;
  }
  
  .name-of-day-card {
    padding: 10px;
    margin: 0 0 12px 0;
  }
  
  .notd-name {
    font-size: 15px;
  }
  
  .notd-meaning {
    font-size: 11px;
  }
}

/* ---------- FAQ Section ---------- */

/* 5.1 FAQ Section Styles */
.faq-section {
  padding: 60px 24px;
  background: linear-gradient(180deg, var(--bg-faq-section-start) 0%, var(--bg-faq-section-end) 100%);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text-primary);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 5.2 FAQ Item Styles */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--transition);
}

.faq-item:hover {
  box-shadow: var(--shadow-md);
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-primary);
  user-select: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: var(--accent);
}

/* 5.3 FAQ Interaction Styles */
.faq-question:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.faq-icon {
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  transition: transform 0.2s var(--transition);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px 24px 24px;
  color: var(--text-secondary);
  line-height: 1.6;
  animation: fadeIn 0.2s ease-in;
}

.faq-answer p {
  margin: 0 0 12px 0;
}

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

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

/* 5.4 FAQ Link Styles */
.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}

.faq-answer a:hover {
  color: var(--text-primary);
}

.faq-answer a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Responsive adjustments for FAQ section */
@media (max-width: 768px) {
  .faq-section {
    padding: 40px 16px;
  }
  
  .faq-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
  }
  
  .faq-question {
    padding: 16px 20px;
    font-size: 1rem;
  }
  
  .faq-answer {
    padding: 0 20px 20px 20px;
  }
}

/* ---------- Footer Styles ---------- */

/* 6.1 Footer Structure Styles */
.site-footer {
  background: linear-gradient(180deg, var(--bg-footer-start) 0%, var(--bg-footer-end) 100%);
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
  margin-top: 60px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Footer for static pages */
body.static-page-body .site-footer {
  margin-top: auto;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* 6.2 Footer Navigation Styles */
.footer-nav {
  margin-bottom: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  justify-content: center;
}

.footer-links li {
  margin: 0;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s var(--transition);
}

/* 6.3 Footer Interaction Styles */
.footer-links a:hover {
  color: var(--accent);
}

.footer-links a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  color: var(--accent);
}

.footer-copyright {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* 6.4 Footer Responsive Styles */
@media (max-width: 768px) {
  .footer-links {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 8px 16px !important;
  }
  
  .footer-links a {
    font-size: 14px;
  }
  
  .site-footer {
    padding: 24px 16px 16px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .footer-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .footer-links {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px 12px !important;
  }
  
  .footer-links a {
    font-size: 13px;
  }
}

/* ========================================
   7. Letter Content Styles
   ======================================== */

/* 7.1 Letter Content Container */
.letter-content {
  margin: 32px 0;
  padding: 0;
  /* Ensure full width regardless of parent container */
  width: 100%;
  display: block;
  clear: both;
  /* Break out of grid if accidentally placed inside */
  grid-column: 1 / -1;
}

/* 7.2 Letter Heading */
.letter-heading {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* 7.3 Letter Intro Paragraph */
.letter-intro {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0;
  max-width: 800px;
}

/* 7.4 Responsive Styles for Letter Content */
@media (max-width: 768px) {
  .letter-content {
    margin: 24px 0;
  }
  
  .letter-heading {
    font-size: 1.75rem;
    margin-bottom: 12px;
  }
  
  .letter-intro {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .letter-content {
    margin: 20px 0;
  }
  
  .letter-heading {
    font-size: 1.5rem;
  }
  
  .letter-intro {
    font-size: 0.875rem;
  }
}

/* 7.5 Semantic HTML Optimization */
/* Ensure proper spacing when letter content appears before results */
.letter-content + #results {
  margin-top: 32px;
}

/* Fix for letter-content appearing outside .wrap - force it to display correctly */
body > .letter-content {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  margin-top: 32px;
  margin-bottom: 32px;
}

@media (max-width: 768px) {
  .letter-content + #results {
    margin-top: 24px;
  }
}

/* ========================================
   8. BREADCRUMB NAVIGATION
   ======================================== */

/* 8.1 Breadcrumb Container */
#breadcrumb-container {
  margin: 0 0 24px 0;
  display: none; /* Hidden by default, shown on letter pages */
}

.breadcrumbs {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}

/* 8.2 Breadcrumb List */
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.breadcrumbs li {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* 8.3 Breadcrumb Links */
.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s var(--transition);
  padding: 4px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}

.breadcrumbs a:hover {
  color: var(--accent);
  background: var(--accent-3);
}

.breadcrumbs a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 8.4 Breadcrumb Separators */
.breadcrumbs li:not(:last-child)::after {
  content: '›';
  margin-left: 8px;
  color: var(--text-tertiary);
  font-size: 1rem;
  font-weight: 400;
}

/* 8.5 Current Page (Last Item) */
.breadcrumbs li:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.breadcrumbs li:last-child span {
  padding: 4px 8px;
}

/* 8.6 Responsive Breadcrumbs */
@media (max-width: 768px) {
  #breadcrumb-container {
    margin: 0 0 16px 0;
  }
  
  .breadcrumbs {
    padding: 10px 14px;
  }
  
  .breadcrumbs li {
    font-size: 0.8125rem;
  }
  
  .breadcrumbs li:not(:last-child)::after {
    margin-left: 6px;
  }
}

@media (max-width: 480px) {
  .breadcrumbs {
    padding: 8px 12px;
  }
  
  .breadcrumbs ol {
    gap: 4px;
  }
  
  .breadcrumbs li {
    font-size: 0.75rem;
  }
  
  .breadcrumbs a {
    padding: 2px 6px;
  }
  
  .breadcrumbs li:last-child span {
    padding: 2px 6px;
  }
  
  .breadcrumbs li:not(:last-child)::after {
    margin-left: 4px;
    font-size: 0.875rem;
  }
}

/* 8.7 Accessibility - ARIA labels are handled in HTML */

/* 8.8 Print Styles */
@media print {
  .breadcrumbs {
    border: 1px solid #000;
    box-shadow: none;
  }
  
  .breadcrumbs a {
    color: #000;
    text-decoration: underline;
  }
}

/* ========================================
   9. Related Links Component
   ======================================== */

/* 9.1 Related Links Section */
.related-links {
  margin-top: 32px;
  padding: 24px;
  background: linear-gradient(180deg, var(--bg-related-links), var(--bg-related-links-end));
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.related-links h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

/* 9.2 Related Links Grid */
.related-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

/* 9.3 Related Link Item */
.related-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.related-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-3) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.2s var(--transition);
}

.related-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}

.related-link:hover::before {
  opacity: 1;
}

.related-link:active {
  transform: translateY(0);
}

/* 9.4 Related Link Icon */
.related-link-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  z-index: 1;
}

/* 9.5 Related Link Label */
.related-link-label {
  flex: 1;
  font-weight: 500;
  font-size: 0.9375rem;
  z-index: 1;
}

/* 9.6 Related Link Arrow */
.related-link-arrow {
  font-size: 1.125rem;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.2s var(--transition);
  z-index: 1;
}

.related-link:hover .related-link-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* 9.7 Responsive Design */
@media (max-width: 768px) {
  .related-links {
    padding: 20px;
    margin-top: 24px;
  }
  
  .related-links h3 {
    font-size: 1.125rem;
    margin-bottom: 16px;
  }
  
  .related-links-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .related-link {
    padding: 12px 14px;
  }
  
  .related-link-icon {
    font-size: 1.25rem;
  }
  
  .related-link-label {
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .related-links {
    padding: 16px;
    margin-top: 20px;
  }
  
  .related-links h3 {
    font-size: 1rem;
    margin-bottom: 12px;
  }
  
  .related-link {
    padding: 10px 12px;
    gap: 10px;
  }
  
  .related-link-icon {
    font-size: 1.125rem;
  }
  
  .related-link-label {
    font-size: 0.8125rem;
  }
}

/* 9.8 Accessibility */
.related-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.related-link:focus:not(:focus-visible) {
  outline: none;
}

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

/* 9.9 Print Styles */
@media print {
  .related-links {
    border: 1px solid #000;
    box-shadow: none;
    page-break-inside: avoid;
  }
  
  .related-link {
    border: 1px solid #000;
    box-shadow: none;
  }
  
  .related-link::before {
    display: none;
  }
  
  .related-link-arrow {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   Letter-Specific FAQ Styles
   ============================================ */

/* FAQ Container */
#letter-faq-container {
  margin: 48px 0;
  padding: 32px;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* FAQ Title */
.letter-faq-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin: 0 0 24px 0;
  line-height: 1.3;
}

/* FAQ List */
.letter-faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* FAQ Item (details element) */
.letter-faq-item {
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: 8px;
  background: var(--bg-primary, #fff);
  transition: all 0.2s ease;
}

.letter-faq-item:hover {
  border-color: var(--primary-color, #ff6b9d);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.1);
}

.letter-faq-item[open] {
  border-color: var(--primary-color, #ff6b9d);
  background: var(--bg-secondary, #fafafa);
}

/* FAQ Question (summary element) */
.letter-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary, #1a1a1a);
  transition: color 0.2s ease;
}

/* Remove default marker */
.letter-faq-question::-webkit-details-marker {
  display: none;
}

.letter-faq-question::marker {
  display: none;
}

.letter-faq-question:hover {
  color: var(--primary-color, #ff6b9d);
}

.letter-faq-question:focus {
  outline: 2px solid var(--primary-color, #ff6b9d);
  outline-offset: 2px;
}

.letter-faq-question-text {
  flex: 1;
  padding-right: 16px;
}

/* FAQ Icon */
.letter-faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color, #ff6b9d);
  transition: transform 0.2s ease;
}

/* Show plus icon when closed */
.letter-faq-item:not([open]) .faq-icon-open {
  display: none;
}

.letter-faq-item:not([open]) .faq-icon-closed {
  display: block;
}

/* Show minus icon when open */
.letter-faq-item[open] .faq-icon-closed {
  display: none;
}

.letter-faq-item[open] .faq-icon-open {
  display: block;
}

/* FAQ Answer */
.letter-faq-answer {
  padding: 0 20px 20px 20px;
  color: var(--text-secondary, #666);
  font-size: 15px;
  line-height: 1.6;
  animation: fadeIn 0.3s ease;
}

.letter-faq-answer p {
  margin: 0;
}

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

/* Responsive Styles */
@media (max-width: 768px) {
  #letter-faq-container {
    margin: 32px 0;
    padding: 24px 16px;
  }
  
  .letter-faq-title {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .letter-faq-question {
    padding: 14px 16px;
    font-size: 15px;
  }
  
  .letter-faq-answer {
    padding: 0 16px 16px 16px;
    font-size: 14px;
  }
}

/* Accessibility: High Contrast Mode */
@media (prefers-contrast: high) {
  .letter-faq-item {
    border-width: 2px;
  }
  
  .letter-faq-question:focus {
    outline-width: 3px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .letter-faq-item,
  .letter-faq-question,
  .letter-faq-icon {
    transition: none;
  }
  
  .letter-faq-answer {
    animation: none;
  }
}

/* ========================================
   Sorting Controls
   ======================================== */

.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.sort-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}

.sort-select {
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-primary);
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s var(--transition);
  outline: none;
  min-height: 36px;
}

.sort-select:hover {
  border-color: var(--accent);
  background-color: var(--accent-3);
}

.sort-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 141, 170, 0.2);
}

.sort-select option {
  padding: 8px;
  background-color: var(--card);
  color: var(--text-primary);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .sort-controls {
    gap: 6px;
    margin-bottom: 10px;
  }
  
  .sort-label {
    font-size: 13px;
  }
  
  .sort-select {
    font-size: 13px;
    padding: 7px 10px;
  }
}

@media (max-width: 480px) {
  .sort-controls {
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .sort-label {
    width: 100%;
    font-size: 12px;
  }
  
  .sort-select {
    width: 100%;
    font-size: 12px;
    padding: 6px 10px;
  }
}

/* Keyboard accessibility */
.sort-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================
   Related Links Styles
   ============================================ */

/* Related Links Section */
.related-links {
  margin: 48px 0;
  padding: 32px;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.related-links h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin: 0 0 24px 0;
  line-height: 1.3;
}

/* Related Links Grid */
.related-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Related Link Button */
.related-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-primary, #fff);
  border: 2px solid var(--border-color, #e5e5e5);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary, #1a1a1a);
  width: 100%;
}

.related-link:hover {
  border-color: var(--primary-color, #ff6b9d);
  background: var(--bg-secondary, #fafafa);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.15);
}

.related-link:active {
  transform: translateY(0);
}

.related-link:focus {
  outline: 2px solid var(--primary-color, #ff6b9d);
  outline-offset: 2px;
}

/* Related Link Icon */
.related-link-icon {
  font-size: 24px;
  flex-shrink: 0;
  line-height: 1;
}

/* Related Link Label */
.related-link-label {
  flex: 1;
  font-weight: 600;
}

/* Related Link Arrow */
.related-link-arrow {
  font-size: 18px;
  color: var(--primary-color, #ff6b9d);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.related-link:hover .related-link-arrow {
  transform: translateX(4px);
}

/* Responsive Styles */
@media (max-width: 768px) {
  .related-links {
    margin: 32px 0;
    padding: 24px 16px;
  }
  
  .related-links h3 {
    font-size: 20px;
    margin-bottom: 20px;
  }
  
  .related-links-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .related-link {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .related-link-icon {
    font-size: 20px;
  }
}

/* Accessibility: High Contrast Mode */
@media (prefers-contrast: high) {
  .related-link {
    border-width: 3px;
  }
  
  .related-link:focus {
    outline-width: 3px;
  }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .related-link,
  .related-link-arrow {
    transition: none;
  }
  
  .related-link:hover {
    transform: none;
  }
}

/* ============================================
   Letter-Specific Content Styles
   ============================================ */

/* Letter Content Container */
.letter-content {
  margin: 0 0 20px 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

/* Letter Heading */
.letter-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin: 0 0 8px 0;
  line-height: 1.2;
}

/* Letter Intro Paragraph */
.letter-intro {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary, #666);
  margin: 0;
  text-align: left;
  max-width: 100%;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .letter-content {
    margin-bottom: 16px;
  }
  
  .letter-heading {
    font-size: 20px;
    margin-bottom: 6px;
  }
  
  .letter-intro {
    font-size: 13px;
    line-height: 1.5;
  }
}


/* ---------- Static Pages Styles ---------- */

/* Override body styles for static pages */
body.static-page-body {
  padding: 0;
  margin: 0;
  background: linear-gradient(180deg, var(--bg-body-start) 0%, var(--bg-body-end) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden !important;
  box-sizing: border-box;
  position: relative;
}

/* Prevent horizontal scroll on all static page children */
body.static-page-body * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure html element doesn't cause overflow */
html {
  overflow-x: hidden !important;
  max-width: 100vw;
}

/* Static Page Header */
.static-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  margin: 0;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.static-header-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

.static-header .brand {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.static-header .logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #FFA3C1 60%, #FFD3E0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(255, 141, 170, 0.18);
  flex: 0 0 48px;
}

.static-header .logo svg {
  width: 28px;
  height: 28px;
}

.static-header .brand h1 {
  font-size: 18px;
  margin: 0;
  line-height: 1;
}

.static-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.static-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--transition);
  padding: 8px 12px;
  border-radius: 8px;
}

.static-nav a:hover {
  color: var(--accent);
  background: var(--accent-3);
}

.static-nav a.active {
  color: var(--accent);
  background: var(--accent-3);
}

.static-nav a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .static-header {
    padding: 12px 16px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .static-header-content {
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .static-nav {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .static-nav a {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  .static-header .logo {
    width: 44px;
    height: 44px;
  }
  
  .static-header .logo svg {
    width: 26px;
    height: 26px;
  }
  
  .static-header .brand h1 {
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Static Page Layout */
.static-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: calc(100vh - 200px);
  width: 100%;
  box-sizing: border-box;
}

.static-page article {
  background: var(--card);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.static-page h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.static-page h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.static-page h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.static-page p {
  line-height: 1.7;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.static-page ul, .static-page ol {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--text-secondary);
}

.static-page li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.static-page a {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s var(--transition);
}

.static-page a:hover {
  color: var(--text-primary);
}

.static-page a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.static-page section {
  margin-bottom: 32px;
}

.static-page .hero-image {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius);
  margin: 24px auto;
  display: block;
  box-shadow: var(--shadow-md);
}

.static-page .last-updated {
  font-size: 14px;
  color: var(--text-tertiary);
  font-style: italic;
  margin-bottom: 24px;
}

.static-page .related-links {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* Legal Page Specific Styles */
.legal-page h2 {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.legal-page h2:first-of-type {
  margin-top: 24px;
  padding-top: 0;
  border-top: none;
}

/* Contact Form Styles */
.contact-form {
  margin: 32px 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.form-group .required {
  color: var(--accent);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 16px;
  background: var(--card);
  color: var(--text-primary);
  transition: all 0.2s var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 141, 170, 0.1);
}

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

/* Honeypot field - hidden from users */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.privacy-note {
  font-size: 13px;
  color: var(--text-tertiary);
  font-style: italic;
  margin: 16px 0;
}

.btn-primary {
  background: linear-gradient(90deg, #E85A7B 0%, #F06B8C 100%);
  color: white !important;
  border: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s var(--transition);
  font-family: inherit;
  box-shadow: 0 4px 14px rgba(232, 90, 123, 0.3);
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #D64A6B 0%, #E85A7B 100%);
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(232, 90, 123, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  color: white !important;
}

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

.btn-primary:visited {
  color: white !important;
}

.form-message {
  margin-top: 20px;
  padding: 16px;
  border-radius: 10px;
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #86EFAC;
}

.form-message.error {
  display: block;
  background: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

.alternative-contact {
  margin-top: 40px;
  padding: 24px;
  background: var(--accent-3);
  border-radius: var(--radius);
  border: 1px solid var(--accent-2);
}

.alternative-contact h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

/* Contact Page Styles */
.contact-info {
  margin: 32px 0;
}

.email-cta {
  text-align: center;
  margin: 24px 0;
}

.email-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  color: white !important;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  justify-content: center;
}

.contact-info-section {
  margin: 32px 0;
}

.contact-card {
  display: flex;
  gap: 20px;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  transition: all 0.2s var(--transition);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

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

.contact-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.contact-details {
  width: 100%;
  overflow-x: hidden;
}

.contact-details h3 {
  margin: 0 0 8px 0;
  font-size: 1.1rem;
  color: var(--text-primary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.contact-details p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.contact-card.primary-contact {
  background: linear-gradient(135deg, var(--accent-3) 0%, var(--card) 100%);
  border-color: var(--accent-2);
}

.location-text,
.business-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.email-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  transition: color 0.2s var(--transition);
  word-break: break-all;
  overflow-wrap: break-word;
  max-width: 100%;
}

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

.response-time {
  margin: 32px 0;
  padding: 20px;
  background: var(--accent-3);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

.response-time h2 {
  margin-top: 0;
  font-size: 1.1rem;
  border: none;
  padding: 0;
}

.response-time p {
  margin: 8px 0 0 0;
}

.privacy-note-section {
  margin-top: 32px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: var(--radius);
  font-size: 14px;
}

.privacy-note-section p {
  margin: 0;
}

/* Mobile responsive styles for contact page */
@media (max-width: 768px) {
  .email-cta {
    margin: 20px 0;
  }
  
  .email-cta .btn-primary {
    font-size: 1rem;
    padding: 12px 20px;
    width: auto;
    max-width: 100%;
  }
  
  .contact-info-section {
    margin: 24px 0;
  }
  
  .contact-card {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 20px 16px;
    align-items: center;
  }
  
  .contact-icon {
    font-size: 2rem;
  }
  
  .contact-details {
    width: 100%;
  }
  
  .contact-details h3 {
    font-size: 1.1rem;
  }
  
  .email-link {
    font-size: 1rem;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  .location-text,
  .business-name {
    font-size: 1.05rem;
  }
  
  .response-time {
    padding: 18px;
  }
  
  .response-time h2 {
    font-size: 1.05rem;
  }
  
  .privacy-note-section {
    padding: 14px;
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .email-cta .btn-primary {
    font-size: 0.9375rem;
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  
  .contact-card {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 18px 14px;
  }
  
  .contact-icon {
    font-size: 1.75rem;
  }
  
  .contact-details h3 {
    font-size: 1rem;
  }
  
  .email-link {
    font-size: 0.9375rem;
    word-break: break-word;
    overflow-wrap: break-word;
    display: block;
  }
  
  .location-text,
  .business-name {
    font-size: 1rem;
  }
  
  .response-time {
    padding: 16px;
  }
  
  .response-time h2 {
    font-size: 1rem;
  }
  
  .privacy-note-section {
    padding: 12px;
    font-size: 13px;
  }
  
  .contact-info-section {
    margin: 20px 0;
  }
}

@media (max-width: 480px) {
  .email-cta .btn-primary {
    font-size: 0.875rem;
    padding: 10px 14px;
    width: calc(100% - 24px);
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .contact-card {
    padding: 16px 12px;
    gap: 10px;
  }
  
  .contact-icon {
    font-size: 1.5rem;
  }
  
  .contact-details h3 {
    font-size: 0.95rem;
  }
  
  .email-link {
    font-size: 0.875rem;
  }
  
  .location-text,
  .business-name {
    font-size: 0.95rem;
  }
  
  .response-time {
    padding: 14px;
  }
  
  .response-time h2 {
    font-size: 0.95rem;
  }
  
  .privacy-note-section {
    padding: 10px;
    font-size: 12px;
  }
}

/* Responsive adjustments for static pages */
@media (max-width: 768px) {
  body.static-page-body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  .static-page {
    padding: 24px 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .static-page article {
    padding: 24px 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .static-page h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  .static-page h2 {
    font-size: 1.35rem;
    margin-top: 1.5rem;
  }
  
  .static-page h3 {
    font-size: 1.1rem;
  }
  
  .static-page p {
    font-size: 0.9375rem;
    line-height: 1.6;
  }
  
  .static-page ul,
  .static-page ol {
    padding-left: 20px;
  }
  
  .static-page li {
    font-size: 0.9375rem;
    margin-bottom: 6px;
  }
  
  .static-page section {
    margin-bottom: 24px;
  }
  
  .static-page .related-links {
    margin-top: 24px;
    padding-top: 16px;
  }
  
  .static-page .last-updated {
    font-size: 13px;
  }
  
  /* Legal page specific */
  .legal-page h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 480px) {
  body.static-page-body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }
  
  .static-page {
    padding: 16px 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .static-page article {
    padding: 16px 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }
  
  .static-page h1 {
    font-size: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .static-page h2 {
    font-size: 1.2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .static-page h3 {
    font-size: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .static-page p,
  .static-page li {
    font-size: 0.875rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* ---------- Pagination Controls ---------- */
.pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, var(--card) 0%, var(--accent-3) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  min-height: 44px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent) 0%, #FFB0CB 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s var(--transition);
  box-shadow: var(--shadow-accent);
}

.pagination-btn:hover:not(.disabled) {
  background: linear-gradient(90deg, #FF7A9A 0%, #FFA0BB 100%);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(255, 141, 170, 0.25);
}

.pagination-btn:active:not(.disabled) {
  transform: scale(0.98);
}

.pagination-btn.disabled {
  background: var(--border);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

.pagination-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 150px;
}

.pagination-page {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.pagination-count {
  font-size: 13px;
  color: var(--muted);
}



/* Responsive pagination */
@media (max-width: 768px) {
  .pagination-controls {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
  }
  
  .pagination-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .pagination-info {
    order: -1;
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
  }
  
  .pagination-page,
  .pagination-count {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .pagination-controls {
    gap: 8px;
  }
  
  .pagination-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 40px;
  }
  
}

/* ========================================
   Mobile Viewport Overflow Fixes
   ======================================== */

/* Prevent filter overlap - force vertical layout on medium screens */
@media (min-width: 769px) and (max-width: 1200px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .filter-group-inline {
    max-width: 100%;
  }
  
  .filter-group-inline select {
    max-width: 100%;
  }
  
  #clear-filters {
    align-self: flex-start;
    min-width: auto;
  }
}

/* CSS class for JavaScript-based overlap prevention */
.filter-row.force-vertical {
  flex-direction: column !important;
  align-items: stretch !important;
}

.filter-row.force-vertical .filter-group-inline {
  max-width: 100% !important;
}

.filter-row.force-vertical #clear-filters {
  align-self: flex-start !important;
  margin-top: 8px;
}

/* Ensure filter elements have proper z-index to avoid conflicts with sticky search */
.filter-row {
  position: relative;
  z-index: 5;
}

.filter-row select {
  position: relative;
  z-index: 10;
}

.filter-row #clear-filters {
  position: relative;
  z-index: 10;
}

/* Force wrap on smaller desktop screens to prevent overlap */
@media (min-width: 769px) and (max-width: 950px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .filter-group-inline {
    max-width: 100%;
  }
  
  .filter-group-inline select {
    max-width: 100%;
  }
  
  #clear-filters {
    align-self: flex-start;
    min-width: auto;
  }
}

/* Fix origin dropdown overflow on tablet */
@media (max-width: 768px) {
  .filter-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .filter-group-inline select {
    max-width: calc(100vw - 150px);
    font-size: 14px;
  }
}

/* Fix origin dropdown overflow on mobile */
@media (max-width: 480px) {
  .filter-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .filter-group-inline {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }
  
  .filter-group-inline label {
    font-size: 13px;
  }
  
  .filter-group-inline select {
    width: 100%;
    max-width: 100%;
    font-size: 14px;
    padding: 10px 12px;
    box-sizing: border-box;
  }
  
  #origin-filter {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  #clear-filters {
    width: 100%;
    justify-content: center;
  }
}

/* Fix favorites panel overflow on mobile */
@media (max-width: 480px) {
  .favorites-panel {
    width: 100vw !important;
    max-width: 100vw !important;
    right: -100vw !important;
  }
  
  .favorites-panel.active {
    right: 0 !important;
  }
  
  .favorites-header {
    padding: 1rem;
  }
  
  .favorites-header h2 {
    font-size: 16px;
  }
  
  .favorites-list {
    padding: 0.75rem;
  }
  
  .favorite-card {
    padding: 10px;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
  }
  
  .favorite-card-content {
    flex: 1;
    min-width: 0; /* Allows text to shrink and wrap */
  }
  
  .favorite-card h4 {
    font-size: 15px;
    word-break: break-word;
    line-height: 1.3;
  }
  
  .favorite-meta {
    font-size: 12px;
    word-break: break-word;
    line-height: 1.2;
  }
  
  .remove-favorite-btn {
    flex-shrink: 0; /* Prevents button from shrinking */
    margin-left: 8px;
    font-size: 20px; /* Slightly smaller on mobile */
    padding: 6px 8px; /* Slightly more padding for easier touch */
    min-width: 36px; /* Ensure minimum touch target size */
    min-height: 36px; /* Ensure minimum touch target size */
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ========================================
   CRITICAL: Mobile Overflow Prevention
   ======================================== */

/* Prevent horizontal scroll on all mobile devices */
@media (max-width: 768px) {
  html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
  
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
  
  body.static-page-body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }
  
  /* Ensure all direct children don't overflow */
  body.static-page-body > * {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  
  /* Specific fixes for common overflow culprits */
  .static-header,
  .static-page,
  .static-page article,
  .site-footer,
  .footer-container,
  .contact-card,
  .contact-details,
  .email-cta,
  .btn-primary {
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
  
  /* Ensure text doesn't cause overflow */
  h1, h2, h3, h4, h5, h6, p, a, span, div {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
  }
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
  /* Compact header layout */
  header.site-header {
    gap: 8px !important;
  }
  
  /* Show shorter tagline on mobile to prevent wrapping */
  .brand p {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  
  .tagline-full {
    display: none !important;
  }
  
  .tagline-mobile {
    display: inline !important;
  }
  
  /* Smaller logo on mobile */
  .logo {
    width: 56px !important;
    height: 56px !important;
    flex: 0 0 56px !important;
  }
  
  .logo svg {
    width: 40px !important;
    height: 40px !important;
  }
  
  /* Compact favorites button */
  nav .btn {
    padding: 8px 10px !important;
    font-size: 13px !important;
    gap: 4px !important;
    min-width: auto !important;
  }
  
  nav .btn span {
    font-size: 14px !important;
  }
  
  /* Compact favorite button on mobile */
  .favorite-btn {
    padding: 6px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
  }
  
  /* Reduce gap in name card header on mobile */
  .name-card-header {
    gap: 8px !important;
  }
  
  /* Ensure name title group takes available space */
  .name-title-group {
    gap: 6px !important;
  }
  
  /* Minimal footer fix for mobile only */
  body {
    padding-bottom: 40px !important;
  }
}

/* Extra aggressive fix for very small screens */
@media (max-width: 480px) {
  * {
    max-width: 100vw !important;
  }
  
  /* Extra compact favorite button on very small screens */
  .favorite-btn {
    padding: 4px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
  }
  
  /* Further reduce gaps on very small screens */
  .name-card-header {
    gap: 6px !important;
  }
  
  .name-title-group {
    gap: 4px !important;
  }
  
  html, body {
    overflow-x: hidden !important;
    position: relative !important;
  }
  
  /* Even smaller tagline on very small screens */
  .brand p {
    font-size: 9px !important;
  }
  
  /* Smaller header on mobile */
  .brand h1 {
    font-size: 16px !important;
  }
  
  /* Minimal footer spacing for small screens */
  body {
    padding-bottom: 60px !important;
  }
}

/* Expandable Intro Narrative */
.intro-narrative {
  margin: 16px 0;
  background: linear-gradient(135deg, var(--bg-intro-narrative-start) 0%, var(--bg-intro-narrative-end) 100%);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.intro-preview p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

.intro-full {
  animation: expandIn 0.3s ease-out;
}

.intro-full[hidden] {
  display: none;
}

.intro-full p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

.expand-btn, .collapse-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  transition: all 0.2s var(--transition);
  font-family: inherit;
}

.expand-btn:hover, .collapse-btn:hover {
  color: #FF7A9A;
  transform: translateX(2px);
}

.expand-btn:focus, .collapse-btn:focus {
  outline: none;
  color: #FF7A9A;
  box-shadow: 0 0 0 2px rgba(255, 141, 170, 0.2);
  border-radius: 4px;
}

.expand-icon, .collapse-icon {
  transition: transform 0.2s var(--transition);
}

.expand-btn:hover .expand-icon {
  transform: translateY(1px);
}

.collapse-btn:hover .collapse-icon {
  transform: translateY(-1px);
}

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

/* Mobile adjustments for intro narrative */
@media (max-width: 768px) {
  .intro-narrative {
    margin: 12px 0;
    padding: 14px;
  }
  
  .intro-preview p, .intro-full p {
    font-size: 14px;
  }
  
  .expand-btn, .collapse-btn {
    font-size: 13px;
    padding: 6px 0;
  }
}

@media (max-width: 480px) {
  .intro-narrative {
    margin: 10px 0;
    padding: 12px;
  }
  
  .intro-preview p, .intro-full p {
    font-size: 13px;
    line-height: 1.4;
  }
}
/* ========================================
   Missing CSS Classes for Seasonal Pages
   ======================================== */

/* Compatibility aliases for seasonal pages using incorrect class names */
.name-header {
  /* Alias for .name-card-header - used in seasonal pages */
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 12px;
}

.name-details {
  /* Alias for .name-card-body - used in seasonal pages */
  color: var(--text-secondary);
}

/* Header compatibility for seasonal pages */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1;
}

.main-nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s var(--transition);
  padding: 8px 12px;
  border-radius: 8px;
}

.main-nav a:hover {
  color: var(--accent);
  background: var(--accent-3);
}

.main-nav a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Footer compatibility for seasonal pages */
.site-footer .wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
  width: 100%;
}

.footer-section {
  flex: 1;
}

.footer-section h3,
.footer-section h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px 0;
}

.footer-section p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s var(--transition);
}

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

.footer-bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  width: 100%;
}

.footer-bottom p {
  color: var(--text-tertiary);
  font-size: 13px;
  margin: 0;
}

/* Responsive adjustments for header and footer */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  
  .main-nav ul {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-nav a {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  .logo-text {
    font-size: 16px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
  
  .footer-section h3,
  .footer-section h4 {
    font-size: 1rem;
  }
}

/* Main Content Container */
.main-content {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

/* Ensure proper vertical layout for baby-names pages */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

/* Page Header */
.page-header {
  margin-bottom: 24px;
  text-align: center;
  padding: 20px 0;
}

.page-header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.page-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.page-stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.stat {
  font-size: 14px;
  color: var(--text-secondary);
}

.stat strong {
  color: var(--accent);
  font-weight: 600;
}

/* Related Categories Section */
.related-categories {
  margin-top: 48px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.related-categories h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 24px 0;
  text-align: center;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.category-card {
  display: block;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: all 0.2s var(--transition);
  box-shadow: var(--shadow-sm);
}

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

.category-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px 0;
}

.category-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

/* Responsive adjustments for related categories */
@media (max-width: 768px) {
  .related-categories {
    margin-top: 32px;
    padding: 24px 0;
  }
  
  .related-categories h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .category-card {
    padding: 16px;
  }
  
  .category-card h3 {
    font-size: 1rem;
  }
  
  .category-card p {
    font-size: 0.8125rem;
  }
}

/* Names Grid Layout */
.names-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
}

@media (max-width: 768px) {
  .names-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

/* Responsive adjustments for missing classes */
@media (max-width: 768px) {
  .main-content {
    padding: 0 16px;
  }
  
  .page-header {
    margin-bottom: 20px;
    padding: 16px 0;
  }
  
  .page-header h1 {
    font-size: 1.875rem;
    margin-bottom: 10px;
  }
  
  .page-description {
    font-size: 0.9375rem;
    margin-bottom: 12px;
  }
  
  .names-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
}

@media (max-width: 640px) {
  .names-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 0 12px;
  }
  
  .page-header {
    margin-bottom: 16px;
    padding: 12px 0;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  
  .page-description {
    font-size: 0.875rem;
    margin-bottom: 10px;
  }
  
  .page-stats {
    gap: 12px;
  }
  
  .stat {
    font-size: 13px;
  }
}

/* ========================================
   SEASONAL PAGES RESPONSIVE DESIGN FIXES
   ======================================== */

/* Mobile-specific CSS rules for seasonal page layouts */
@media (max-width: 768px) {
  /* Seasonal page header adjustments */
  .page-header {
    padding: 16px 0;
    margin-bottom: 20px;
  }
  
  .page-header h1 {
    font-size: 1.875rem;
    margin-bottom: 10px;
    line-height: 1.2;
  }
  
  .page-description {
    font-size: 0.9375rem;
    margin-bottom: 12px;
    padding: 0 8px;
  }
  
  .page-stats {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stat {
    font-size: 13px;
  }
  
  /* Names grid responsive behavior */
  .names-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
  
  /* Name card mobile optimizations */
  .name-card {
    padding: 14px;
    border-radius: 10px;
  }
  
  .name-card-header {
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .name-title {
    font-size: 15px;
  }
  
  .name-gender {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .name-meaning {
    font-size: 12px;
    line-height: 1.4;
  }
  
  .name-meta {
    font-size: 12px;
  }
  
  .name-origin {
    font-size: 12px;
  }
  
  /* Header and navigation mobile fixes */
  .site-header .wrap {
    padding: 0 16px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  
  .logo-link {
    gap: 10px;
  }
  
  .logo-icon {
    width: 36px;
    height: 36px;
  }
  
  .logo-text {
    font-size: 16px;
  }
  
  .main-nav ul {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-nav a {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  /* Related categories mobile adjustments */
  .related-categories {
    margin-top: 32px;
    padding: 24px 0;
  }
  
  .related-categories h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .category-card {
    padding: 16px;
  }
  
  .category-card h3 {
    font-size: 1rem;
  }
  
  .category-card p {
    font-size: 0.8125rem;
  }
}

@media (max-width: 640px) {
  /* Single column layout for names grid on small screens */
  .names-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Adjust name cards for single column */
  .name-card {
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  /* Extra small screen adjustments */
  .main-content {
    padding: 0 12px;
  }
  
  .page-header {
    padding: 12px 0;
    margin-bottom: 16px;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  
  .page-description {
    font-size: 0.875rem;
    margin-bottom: 10px;
    padding: 0 4px;
  }
  
  .page-stats {
    gap: 8px;
  }
  
  .stat {
    font-size: 12px;
  }
  
  /* Compact name cards for very small screens */
  .name-card {
    padding: 12px;
  }
  
  .name-card-header {
    gap: 8px;
    margin-bottom: 8px;
  }
  
  .name-title {
    font-size: 14px;
  }
  
  .name-gender {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .name-meaning {
    font-size: 11px;
  }
  
  .name-meta {
    font-size: 11px;
  }
  
  .name-origin {
    font-size: 11px;
  }
  
  /* Header mobile optimizations */
  .site-header .wrap {
    padding: 0 12px;
  }
  
  .header-content {
    gap: 10px;
  }
  
  .logo-link {
    gap: 8px;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  
  .logo-text {
    font-size: 15px;
  }
  
  .main-nav ul {
    gap: 8px;
  }
  
  .main-nav a {
    font-size: 12px;
    padding: 5px 8px;
  }
  
  /* Footer adjustments for small screens */
  .site-footer .wrap {
    padding: 0 12px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-section h3,
  .footer-section h4 {
    font-size: 0.95rem;
  }
  
  .footer-section p {
    font-size: 0.875rem;
  }
  
  .footer-section a {
    font-size: 13px;
  }
}

/* Landscape orientation fixes for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
  .page-header {
    padding: 12px 0;
    margin-bottom: 16px;
  }
  
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .names-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
  }
  
  .name-card {
    padding: 12px;
  }
}

/* High DPI screen adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .name-card {
    border-width: 0.5px;
  }
  
  .logo-icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Accessibility improvements for seasonal pages */
@media (prefers-reduced-motion: reduce) {
  .name-card {
    transition: none;
  }
  
  .name-card:hover {
    transform: none;
  }
  
  .category-card {
    transition: none;
  }
  
  .category-card:hover {
    transform: none;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .name-card {
    border-width: 2px;
  }
  
  .name-gender {
    border: 1px solid;
  }
  
  .category-card {
    border-width: 2px;
  }
}

/* Dark mode considerations (if implemented in future) */
@media (prefers-color-scheme: dark) {
  /* Placeholder for future dark mode support */
}

/* Print styles for seasonal pages */
@media print {
  .site-header,
  .site-footer,
  .related-categories {
    display: none;
  }
  
  .page-header {
    margin-bottom: 20px;
  }
  
  .names-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .name-card {
    border: 1px solid #000;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ===
=====================================
   Page Navigation Controls
   ======================================== */

.page-navigation {
  margin: 32px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.page-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #FF8DAA 0%, #FFB3C6 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  min-width: 120px;
}

.page-nav-btn:hover {
  background: linear-gradient(90deg, #FF7A9A 0%, #FFA0BB 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 141, 170, 0.3);
}

.page-nav-btn:active {
  transform: scale(0.98);
}

.nav-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.page-nav-next .nav-label {
  align-items: flex-end;
}

.nav-direction {
  font-size: 11px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav-page-name {
  font-size: 13px;
  font-weight: 700;
}

.nav-arrow {
  font-size: 16px;
  font-weight: bold;
}

.page-nav-current {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.current-page-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.page-indicator {
  display: flex;
  gap: 6px;
  align-items: center;
}

.page-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.2s ease;
}

.page-dot.active {
  background: linear-gradient(90deg, #FF8DAA 0%, #FFB3C6 100%);
  transform: scale(1.2);
}

/* Responsive page navigation */
@media (max-width: 768px) {
  .page-navigation {
    margin: 24px auto;
    padding: 0 16px;
  }
  
  .page-nav-controls {
    flex-direction: column;
    gap: 16px;
    padding: 16px;
  }
  
  .page-nav-btn {
    width: 100%;
    justify-content: center;
    min-width: auto;
    padding: 14px 20px;
  }
  
  .nav-label {
    align-items: center;
  }
  
  .page-nav-next .nav-label {
    align-items: center;
  }
  
  .current-page-label {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .page-navigation {
    margin: 20px auto;
    padding: 0 12px;
  }
  
  .page-nav-controls {
    gap: 12px;
    padding: 12px;
  }
  
  .page-nav-btn {
    padding: 12px 16px;
    font-size: 13px;
  }
  
  .nav-direction {
    font-size: 10px;
  }
  
  .nav-page-name {
    font-size: 12px;
  }
  
  .nav-arrow {
    font-size: 14px;
  }
  
  .current-page-label {
    font-size: 14px;
  }
  
  .page-dot {
    width: 6px;
    height: 6px;
  }
}

/* Hide page navigation on letter pages and other specific pages */
body[data-page-type="letter"] .page-navigation,
body[data-page-type="name-detail"] .page-navigation,
body[data-page-type="origin"] .page-navigation,
body[data-page-type="popular"] .page-navigation {
  display: none;
}
/* Show More Button Styles - Match Landing Page Read More Style */
.show-more-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-left: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
  vertical-align: baseline;
}

.show-more-btn:hover {
  color: #FF7A9A;
  background: rgba(255, 141, 170, 0.1);
  text-decoration: none;
}

.show-more-btn:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  background: rgba(255, 141, 170, 0.1);
}

.show-more-btn:active {
  transform: scale(0.98);
  background: rgba(255, 141, 170, 0.15);
}

/* Responsive adjustments for show more button */
@media (max-width: 768px) {
  .show-more-btn {
    font-size: 13px;
    margin-left: 3px;
    padding: 3px 6px;
  }
}

@media (max-width: 480px) {
  .show-more-btn {
    font-size: 12px;
    margin-left: 2px;
    padding: 2px 4px;
    margin-top: 2px;
  }
}
/* Seasonal & Cultural Names Section */
.seasonal-names-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%);
    margin: 2rem 0;
}

.seasonal-names-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.seasonal-names-section .section-description {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.seasonal-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-group h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    border-bottom: 2px solid #FF8DAA;
    padding-bottom: 0.5rem;
}

.category-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-link {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #FF8DAA;
}

.category-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left-color: #e74c3c;
}

.link-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.link-desc {
    font-size: 0.9rem;
    color: #666;
}

@media (max-width: 768px) {
    .seasonal-categories {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .seasonal-names-section h2 {
        font-size: 2rem;
    }
}

/* ========================================
   SEASONAL PAGES RESPONSIVE DESIGN FIXES
   ======================================== */

/* Mobile-specific CSS rules for seasonal page layouts */
@media (max-width: 768px) {
  /* Seasonal page header adjustments */
  .page-header {
    padding: 16px 0;
    margin-bottom: 20px;
  }
  
  .page-header h1 {
    font-size: 1.875rem;
    margin-bottom: 10px;
    line-height: 1.2;
  }
  
  .page-description {
    font-size: 0.9375rem;
    margin-bottom: 12px;
    padding: 0 8px;
  }
  
  .page-stats {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .stat {
    font-size: 13px;
  }
  
  /* Names grid responsive behavior */
  .names-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
  }
  
  /* Name card mobile optimizations */
  .name-card {
    padding: 14px;
    border-radius: 10px;
  }
  
  .name-card-header {
    gap: 10px;
    margin-bottom: 10px;
  }
  
  .name-title {
    font-size: 15px;
  }
  
  .name-gender {
    font-size: 11px;
    padding: 3px 8px;
  }
  
  .name-meaning {
    font-size: 12px;
    line-height: 1.4;
  }
  
  .name-meta {
    font-size: 12px;
  }
  
  .name-origin {
    font-size: 12px;
  }
  
  /* Header and navigation mobile fixes */
  .site-header .wrap {
    padding: 0 16px;
  }
  
  .header-content {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  
  .logo-link {
    gap: 10px;
  }
  
  .logo-icon {
    width: 36px;
    height: 36px;
  }
  
  .logo-text {
    font-size: 16px;
  }
  
  .main-nav ul {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .main-nav a {
    font-size: 13px;
    padding: 6px 10px;
  }
  
  /* Related categories mobile adjustments */
  .related-categories {
    margin-top: 32px;
    padding: 24px 0;
  }
  
  .related-categories h2 {
    font-size: 1.25rem;
    margin-bottom: 20px;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .category-card {
    padding: 16px;
  }
  
  .category-card h3 {
    font-size: 1rem;
  }
  
  .category-card p {
    font-size: 0.8125rem;
  }
}

@media (max-width: 640px) {
  /* Single column layout for names grid on small screens */
  .names-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  /* Adjust name cards for single column */
  .name-card {
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  /* Extra small screen adjustments */
  .main-content {
    padding: 0 12px;
  }
  
  .page-header {
    padding: 12px 0;
    margin-bottom: 16px;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }
  
  .page-description {
    font-size: 0.875rem;
    margin-bottom: 10px;
    padding: 0 4px;
  }
  
  .page-stats {
    gap: 8px;
  }
  
  .stat {
    font-size: 12px;
  }
  
  /* Compact name cards for very small screens */
  .name-card {
    padding: 12px;
  }
  
  .name-card-header {
    gap: 8px;
    margin-bottom: 8px;
  }
  
  .name-title {
    font-size: 14px;
  }
  
  .name-gender {
    font-size: 10px;
    padding: 2px 6px;
  }
  
  .name-meaning {
    font-size: 11px;
  }
  
  .name-meta {
    font-size: 11px;
  }
  
  .name-origin {
    font-size: 11px;
  }
  
  /* Header mobile optimizations */
  .site-header .wrap {
    padding: 0 12px;
  }
  
  .header-content {
    gap: 10px;
  }
  
  .logo-link {
    gap: 8px;
  }
  
  .logo-icon {
    width: 32px;
    height: 32px;
  }
  
  .logo-text {
    font-size: 15px;
  }
  
  .main-nav ul {
    gap: 8px;
  }
  
  .main-nav a {
    font-size: 12px;
    padding: 5px 8px;
  }
  
  /* Footer adjustments for small screens */
  .site-footer .wrap {
    padding: 0 12px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }
  
  .footer-section h3,
  .footer-section h4 {
    font-size: 0.95rem;
  }
  
  .footer-section p {
    font-size: 0.875rem;
  }
  
  .footer-section a {
    font-size: 13px;
  }
}

/* Landscape orientation fixes for mobile devices */
@media (max-width: 768px) and (orientation: landscape) {
  .page-header {
    padding: 12px 0;
    margin-bottom: 16px;
  }
  
  .page-header h1 {
    font-size: 1.75rem;
  }
  
  .names-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
  }
  
  .name-card {
    padding: 12px;
  }
}

/* High DPI screen adjustments */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .name-card {
    border-width: 0.5px;
  }
  
  .logo-icon {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Enhanced accessibility improvements for seasonal pages */
@media (prefers-reduced-motion: reduce) {
  .name-card {
    transition: none;
  }
  
  .name-card:hover {
    transform: none;
  }
  
  .category-card {
    transition: none;
  }
  
  .category-card:hover {
    transform: none;
  }
}

/* Enhanced high contrast mode support */
@media (prefers-contrast: high) {
  .name-card {
    border-width: 2px;
  }
  
  .name-gender {
    border: 1px solid;
  }
  
  .category-card {
    border-width: 2px;
  }
}

/* Enhanced print styles for seasonal pages */
@media print {
  .site-header,
  .site-footer,
  .related-categories {
    display: none;
  }
  
  .page-header {
    margin-bottom: 20px;
  }
  
  .names-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .name-card {
    border: 1px solid #000;
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Touch-friendly improvements for seasonal pages */
@media (hover: none) and (pointer: coarse) {
  /* Touch device optimizations */
  .name-card {
    padding: 16px;
  }
  
  .category-card {
    padding: 18px;
  }
  
  .main-nav a {
    padding: 10px 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Seasonal pages specific responsive grid enhancements */
.names-grid {
  /* Ensure proper grid behavior on all screen sizes */
  display: grid;
  width: 100%;
  box-sizing: border-box;
}

/* Prevent horizontal scroll on seasonal pages */
@media (max-width: 768px) {
  .main-content,
  .wrap,
  .names-grid,
  .page-header,
  .related-categories {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }
}

/* Ensure proper spacing and alignment on all seasonal pages */
@media (max-width: 480px) {
  body {
    overflow-x: hidden;
  }
  
  .wrap {
    padding: 0 12px;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .main-content {
    width: 100%;
    max-width: 100%;
  }
}