/* ==========================================================================
   TRIVIATHEMES.COM — Complete Stylesheet
   A static trivia directory site
   Version: 1.0.0
   ========================================================================== */


/* ==========================================================================
   Section 1: CSS Reset + Base
   ========================================================================== */

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

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary -- Electric Purple */
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  /* Accent -- Hot Pink */
  --pink: #EC4899;
  --pink-light: #F9A8D4;
  --pink-dark: #BE185D;
  /* Secondary -- Bright Orange */
  --orange: #F97316;
  --orange-light: #FDBA74;
  --orange-dark: #C2410C;
  /* Tertiary -- Teal */
  --teal: #14B8A6;
  --teal-light: #5EEAD4;
  --teal-dark: #0F766E;
  /* Highlight -- Yellow */
  --yellow: #FACC15;
  --yellow-light: #FDE68A;
  --yellow-dark: #CA8A04;
  /* Supporting */
  --cream: #FEFCE8;
  --warm-gray: #F8F7F4;
  --cool-gray: #F1F5F9;
  --dark: #1E1B4B;
  --text: #1E293B;
  --text-light: #64748B;
  --white: #ffffff;
  /* Utility */
  --shadow-sm: 0 2px 8px rgba(124,58,237,0.06);
  --shadow-md: 0 4px 20px rgba(124,58,237,0.10);
  --shadow-lg: 0 8px 40px rgba(124,58,237,0.14);
  --radius: 14px;
  --radius-lg: 24px;
  --max-width: 1280px;
  --content-width: 820px;

  /* Category Card Color Variables (overridden per card) */
  --card-accent: var(--primary);
  --card-bg: #F5F3FF;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background-color: var(--white);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ==========================================================================
   Section 2: Typography
   ========================================================================== */

h1, h2, h3, h4 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  color: var(--text);
}

p:last-child {
  margin-bottom: 0;
}

ul, ol {
  font-family: 'Inter', sans-serif;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.75;
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: 0.35rem;
}

strong {
  font-weight: 600;
  color: var(--dark);
}

em {
  font-style: italic;
  color: var(--text-light);
}

a {
  color: var(--primary);
  transition: color 0.2s ease, background-color 0.2s ease;
}

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

a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

blockquote {
  font-family: 'Poppins', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  font-style: italic;
  color: var(--text-light);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--cool-gray);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ==========================================================================
   Section 3: Layout
   ========================================================================== */

.main {
  padding: 2rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.article-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

.page-wide {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ==========================================================================
   Section 4: Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
}

.site-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 1.625rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.site-logo .logo-trivia {
  color: var(--primary);
}

.site-logo .logo-themes {
  color: var(--pink);
}

.site-logo:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 0.25rem 0;
}

.site-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 2px solid var(--cool-gray);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  position: relative;
  transition: background-color 0.2s ease;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 2px;
  background-color: var(--text);
  left: 0;
  transition: transform 0.2s ease;
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] span {
  background-color: transparent;
}

.nav-toggle[aria-expanded="true"] span::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ==========================================================================
   Section 5: Breadcrumb
   ========================================================================== */

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--text-light);
  padding-top: 1.5rem;
  padding-bottom: 0.75rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.breadcrumb li {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.breadcrumb li:not(:last-child)::after {
  content: '/';
  margin: 0 0.5rem;
  color: var(--text-light);
  opacity: 0.5;
}

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

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

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

/* ==========================================================================
   Section 6: Hero Section
   ========================================================================== */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--pink) 100%);
  padding: 60px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.hero p {
  color: rgba(255,255,255,0.92);
  font-size: 1.125rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero .btn-primary {
  background-color: var(--white);
  color: var(--primary);
  font-size: 1.0625rem;
  font-weight: 600;
  padding: 0.875rem 2.25rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.hero .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  background-color: var(--cream);
  color: var(--primary);
  text-decoration: none;
}

/* ==========================================================================
   Section 7: Category Grid
   ========================================================================== */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-grid > li {
  margin: 0;
}

.category-grid-small {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-grid-small > li {
  margin: 0;
}

/* ==========================================================================
   Section 8: Category Card
   ========================================================================== */

.category-card {
  background-color: var(--card-bg);
  border-left: 4px solid var(--card-accent);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, transparent 60%);
  pointer-events: none;
  border-radius: inherit;
}

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

.category-card:active {
  transform: translateY(-2px);
}

.category-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.category-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

.card-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
  display: block;
  position: relative;
  z-index: 1;
}

.card-count {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--card-accent);
  background-color: rgba(255,255,255,0.8);
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: auto;
  align-self: flex-start;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(4px);
}

/* Category Card Color Classes (12 total) */
.card-purple  { --card-accent: #7C3AED; --card-bg: #F5F3FF; }
.card-pink    { --card-accent: #EC4899; --card-bg: #FDF2F8; }
.card-orange  { --card-accent: #F97316; --card-bg: #FFF7ED; }
.card-teal    { --card-accent: #14B8A6; --card-bg: #F0FDFA; }
.card-yellow  { --card-accent: #EAB308; --card-bg: #FEFCE8; }
.card-red     { --card-accent: #EF4444; --card-bg: #FEF2F2; }
.card-blue    { --card-accent: #3B82F6; --card-bg: #EFF6FF; }
.card-indigo  { --card-accent: #6366F1; --card-bg: #EEF2FF; }
.card-emerald { --card-accent: #10B981; --card-bg: #ECFDF5; }
.card-amber   { --card-accent: #F59E0B; --card-bg: #FFFBEB; }
.card-rose    { --card-accent: #F43F5E; --card-bg: #FFF1F2; }
.card-cyan    { --card-accent: #06B6D4; --card-bg: #ECFEFF; }


/* ==========================================================================
   Section 9: Questions Box
   ========================================================================== */

.questions-box {
  background-color: var(--cool-gray);
  border-radius: var(--radius);
  padding: 28px;
  margin: 2rem 0;
}

.q-item {
  background-color: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

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

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

.q-item strong {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.5;
}

.q-item details {
  margin-top: 4px;
}

.q-item summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.875rem;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  user-select: none;
  padding: 0.25rem 0;
}

.q-item summary::-webkit-details-marker {
  display: none;
}

.q-item summary::before {
  content: '>';
  display: inline-block;
  font-weight: 700;
  transition: transform 0.2s ease;
  font-size: 0.8125rem;
}

.q-item summary:hover {
  color: var(--pink);
  text-decoration: underline;
}

.q-item details[open] summary::before {
  transform: rotate(90deg);
}

.q-item details[open] summary {
  color: var(--pink);
  margin-bottom: 8px;
}

.q-item .answer-text {
  padding: 12px 16px;
  background-color: var(--cool-gray);
  border-radius: 10px;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.65;
  margin-top: 4px;
}

/* ==========================================================================
   Section 10: MC Options & True/False
   ========================================================================== */

.mc-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.mc-options label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 12px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  font-size: 0.9375rem;
  color: var(--text);
}

.mc-options label:hover {
  border-color: var(--primary-light);
  background-color: #FAF5FF;
  box-shadow: var(--shadow-sm);
}

.mc-options input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex-shrink: 0;
  margin: 0;
  cursor: pointer;
}

.mc-options label.correct {
  border-color: #10B981;
  background-color: #ECFDF5;
  color: #065F46;
}

.mc-options label.incorrect {
  border-color: #EF4444;
  background-color: #FEF2F2;
  color: #991B1B;
}

.tf-question {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tf-question span {
  font-weight: 500;
}

.tf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border: 2px solid #E2E8F0;
  border-radius: 999px;
  background-color: var(--white);
  color: var(--text);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 64px;
}

.tf-btn:hover {
  border-color: var(--primary);
  background-color: #FAF5FF;
  color: var(--primary);
}

.tf-btn.correct-reveal {
  border-color: #10B981;
  background-color: #ECFDF5;
  color: #065F46;
}

.tf-btn.incorrect-reveal {
  border-color: #EF4444;
  background-color: #FEF2F2;
  color: #991B1B;
}

/* ==========================================================================
   Section 11: CTA Banner
   ========================================================================== */

.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--pink) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: var(--white);
  margin: 3rem auto;
  max-width: var(--max-width);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.cta-banner > * {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  color: var(--white);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-banner p {
  color: rgba(255,255,255,0.92);
  font-size: 1.0625rem;
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

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

.cta-banner .btn-primary:hover {
  background-color: var(--cream);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.cta-banner-alt {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
}

.cta-banner-alt .btn-primary {
  color: var(--teal-dark);
}

.cta-banner-alt p {
  color: rgba(255,255,255,0.95);
}

/* ==========================================================================
   Section 12: Quick Answer Box
   ========================================================================== */

.quick-answer {
  background-color: var(--cream);
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 1.5rem 0;
  position: relative;
}

.quick-answer-label {
  display: inline-block;
  background-color: var(--yellow);
  color: var(--dark);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.quick-answer p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.65;
}

.quick-answer strong {
  color: var(--yellow-dark);
}

/* ==========================================================================
   Section 13: Category Stats Bar
   ========================================================================== */

.category-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1.5rem 0;
}

.category-stats .stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--cool-gray);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.category-stats .stat .stat-number {
  font-weight: 700;
  color: var(--primary);
}

.category-stats .stat .stat-label {
  color: var(--text-light);
}

/* ==========================================================================
   Section 14: Table of Contents
   ========================================================================== */

.toc {
  background-color: var(--cool-gray);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 2rem 0;
}

.toc h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toc li {
  margin: 0;
}

.toc a {
  display: block;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  border-left: 3px solid transparent;
}

.toc a:hover {
  background-color: rgba(124,58,237,0.08);
  color: var(--primary);
  border-left-color: var(--primary);
  text-decoration: none;
}

/* ==========================================================================
   Section 15: Sister Link Box
   ========================================================================== */

.sister-link {
  background: linear-gradient(135deg, var(--orange) 0%, var(--pink) 100%);
  border-radius: var(--radius);
  padding: 32px;
  margin: 2rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.sister-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 80% 80%, rgba(255,255,255,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.sister-link > * {
  position: relative;
  z-index: 1;
}

.sister-link-text h3 {
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.sister-link-text p {
  color: rgba(255,255,255,0.92);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

.sister-link-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  color: var(--dark);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  background-color: var(--cream);
  color: var(--dark);
  text-decoration: none;
}

/* ==========================================================================
   Section 16: Related Categories
   ========================================================================== */

.related-categories {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid #E2E8F0;
}

.related-categories h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
}

/* ==========================================================================
   Section 17: How It Works Section
   ========================================================================== */

.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 3rem 0;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius);
  background-color: var(--white);
  border: 1px solid #E2E8F0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--pink) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 32px;
  line-height: 1;
}

.step-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ==========================================================================
   Section 18: Blog Cards
   ========================================================================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 2rem 0;
}

.blog-card {
  background-color: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid #E2E8F0;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.blog-card-image {
  width: 100%;
  height: 180px;
  background-color: var(--warm-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  line-height: 1;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-content {
  padding: 20px 24px 24px;
}

.blog-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.blog-card p {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.blog-card .read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.blog-card .read-more:hover {
  color: var(--pink);
  text-decoration: none;
}

.blog-card .read-more::after {
  content: '>';
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.blog-card .read-more:hover::after {
  transform: translateX(3px);
}

/* ==========================================================================
   Section 19: Sample Questions Section
   ========================================================================== */

.sample-questions {
  margin: 2.5rem 0;
}

.sample-questions h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.sample-questions .q-item {
  padding: 16px 20px;
  margin-bottom: 12px;
}

.sample-questions .q-item strong {
  font-size: 0.9375rem;
  margin-bottom: 8px;
}

.sample-questions .q-item summary {
  font-size: 0.8125rem;
}

.sample-questions .q-item .answer-text {
  font-size: 0.875rem;
  padding: 10px 14px;
}

/* ==========================================================================
   Section 20: Footer
   ========================================================================== */

.site-footer {
  background-color: var(--dark);
  padding: 60px 20px 32px;
  margin-top: 4rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand h3 {
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  color: #94A3B8;
  font-size: 0.875rem;
  line-height: 1.65;
  max-width: 280px;
}

.footer-links h4 {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

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

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #94A3B8;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: #64748B;
  font-size: 0.8125rem;
  margin: 0;
}

/* ==========================================================================
   Section 21: Buttons
   ========================================================================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  line-height: 1.4;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: var(--primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  border: 2px solid var(--primary);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  line-height: 1.4;
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-white {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  color: var(--dark);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  line-height: 1.4;
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  background-color: var(--cream);
  color: var(--dark);
  text-decoration: none;
}

/* ==========================================================================
   Section 22: Scroll Reveal Animations
   ========================================================================== */

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

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ==========================================================================
   Section 23: Reading Progress Bar
   ========================================================================== */

#progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--pink) 100%);
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ==========================================================================
   Section 24: Back to Top Button
   ========================================================================== */

#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
  z-index: 9998;
  padding: 0;
}

#back-to-top::before {
  content: '';
  width: 14px;
  height: 14px;
  border-top: 3px solid var(--white);
  border-right: 3px solid var(--white);
  transform: translateY(3px) rotate(-45deg);
  display: block;
}

#back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

#back-to-top:active {
  transform: translateY(0);
}

/* ==========================================================================
   Section 25: Category Filter Bar
   ========================================================================== */

.filter-bar {
  margin-bottom: 20px;
  max-width: 500px;
}

.filter-bar input {
  width: 100%;
  padding: 12px 18px;
  border: 2px solid #E2E8F0;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: var(--text);
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.filter-bar input::placeholder {
  color: #94A3B8;
}

.filter-bar input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.1);
}

/* ==========================================================================
   Section 26: Print Styles
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .cta-banner,
  .sister-link,
  #back-to-top,
  #progress-bar,
  .filter-bar,
  .nav-toggle {
    display: none !important;
  }

  body {
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  h1, h2, h3, h4 {
    color: #000;
    page-break-after: avoid;
  }

  p {
    orphans: 3;
    widows: 3;
  }

  .q-item {
    break-inside: avoid;
    border-left: 3px solid #7C3AED;
  }

  .q-item details,
  .q-item summary {
    display: block !important;
  }

  .q-item details .answer-text {
    display: block !important;
    padding: 8px 0;
  }

  .category-card {
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .hero {
    background: #f5f5f5 !important;
    color: #000;
  }

  .hero h1,
  .hero p {
    color: #000;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .main,
  .article-content {
    max-width: 100%;
    padding: 0;
  }

  .questions-box,
  .toc,
  .quick-answer {
    background: #f5f5f5 !important;
    border: 1px solid #ddd;
  }
}

/* ==========================================================================
   Section 27: Dark Mode
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --text: #E2E8F0;
    --text-light: #94A3B8;
    --dark: #F1F5F9;
    --white: #0F172A;
  }

  body {
    background-color: #0F172A;
    color: var(--text);
  }

  .site-header {
    background-color: #1E293B;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  }

  .site-nav a {
    color: #CBD5E1;
  }

  .site-nav a:hover {
    color: var(--primary-light);
  }

  .category-card {
    background-color: #1E293B;
    border-left-color: var(--card-accent);
  }

  .category-card h3 {
    color: #F1F5F9;
  }

  .category-card p {
    color: #94A3B8;
  }

  .q-item {
    background-color: #1E293B;
    border-left-color: var(--primary-light);
  }

  .q-item strong {
    color: #F1F5F9;
  }

  .q-item .answer-text {
    background-color: #334155;
    color: #E2E8F0;
  }

  .questions-box,
  .toc {
    background-color: #1E293B;
  }

  .toc a {
    color: #CBD5E1;
  }

  .toc a:hover {
    background-color: rgba(124,58,237,0.15);
    color: var(--primary-light);
  }

  .quick-answer {
    background-color: #1E1B00;
  }

  .blog-card,
  .step-card {
    background-color: #1E293B;
    border-color: #334155;
  }

  .blog-card p,
  .step-card p {
    color: #94A3B8;
  }

  .mc-options label {
    border-color: #334155;
    background-color: #1E293B;
    color: #E2E8F0;
  }

  .mc-options label:hover {
    border-color: var(--primary-light);
    background-color: rgba(124,58,237,0.1);
  }

  .related-categories {
    border-top-color: #334155;
  }

  .category-stats .stat {
    background-color: #1E293B;
    color: #E2E8F0;
  }

  .filter-bar input {
    background-color: #1E293B;
    border-color: #334155;
    color: #E2E8F0;
  }

  .filter-bar input:focus {
    border-color: var(--primary-light);
  }

  .site-footer {
    background-color: #020617;
  }

  .footer-brand p,
  .footer-links a {
    color: #64748B;
  }

  .footer-links a:hover {
    color: #CBD5E1;
  }

  .footer-bottom {
    border-top-color: rgba(255,255,255,0.08);
  }

  .footer-bottom p {
    color: #475569;
  }
}

/* ==========================================================================
   Section 28: Responsive (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
  /* Typography */
  h1 {
    font-size: clamp(1.625rem, 6vw, 2.25rem);
  }

  h2 {
    font-size: clamp(1.25rem, 4.5vw, 1.625rem);
  }

  /* Layout */
  .main {
    padding: 1.5rem 1rem;
  }

  .article-content {
    padding: 1.25rem 1rem;
  }

  .page-wide {
    padding: 0 1rem;
  }

  /* Hero */
  .hero {
    padding: 40px 16px;
  }

  .hero h1 {
    font-size: clamp(1.625rem, 6vw, 2.25rem);
  }

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

  /* Grids */
  .category-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .category-grid-small {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .how-it-works {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Header / Navigation */
  .header-inner {
    padding: 0.75rem 1rem;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 12px 1rem 16px;
    box-shadow: var(--shadow-md);
    border-top: 1px solid #E2E8F0;
    z-index: 999;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav li {
    width: 100%;
  }

  .site-nav a {
    display: block;
    padding: 10px 0;
    font-size: 1rem;
    border-bottom: 1px solid #F1F5F9;
  }

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

  .nav-cta {
    margin-top: 8px;
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Category Card */
  .category-card {
    padding: 20px;
  }

  .card-icon {
    font-size: 40px;
  }

  /* Questions */
  .questions-box {
    padding: 20px;
  }

  .q-item {
    padding: 16px;
  }

  /* CTA Banner */
  .cta-banner {
    padding: 36px 24px;
    margin: 2rem 1rem;
  }

  /* Sister Link */
  .sister-link {
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
  }

  .sister-link-buttons {
    margin-left: 0;
    width: 100%;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 36px;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  /* How It Works */
  .step-card {
    padding: 24px 20px;
  }

  .step-icon {
    width: 60px;
    height: 60px;
    font-size: 28px;
  }

  /* Breadcrumb */
  .breadcrumb {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 1rem;
    font-size: 0.75rem;
  }

  /* Stats */
  .category-stats {
    gap: 8px;
  }

  .category-stats .stat {
    padding: 6px 12px;
    font-size: 0.75rem;
  }

  /* TOC */
  .toc {
    padding: 20px;
  }

  .toc a {
    padding: 8px 10px;
    font-size: 0.8125rem;
  }

  /* Back to Top */
  #back-to-top {
    width: 44px;
    height: 44px;
    bottom: 16px;
    right: 16px;
  }

  /* MC Options */
  .mc-options label {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
}

/* Small mobile refinements */
@media (max-width: 480px) {
  .hero {
    padding: 32px 14px;
  }

  .hero .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .cta-banner {
    padding: 28px 18px;
    margin: 1.5rem 0.5rem;
  }

  .cta-banner h2 {
    font-size: 1.25rem;
  }

  .cta-banner p {
    font-size: 0.9375rem;
  }

  .category-card {
    padding: 18px;
  }

  .questions-box {
    padding: 16px;
  }

  .sister-link {
    padding: 20px;
  }

  .footer-grid {
    gap: 24px;
  }

  .site-footer {
    padding: 40px 16px 24px;
  }
}

/* ==========================================================================
   End of Stylesheet
   ========================================================================== */
