/* Modern Autism MythBusters Stylesheet - Colorful & Engaging */
:root {
  /* Main brand colors */
  --primary: #2c616d;
  --primary-dark: #1e454e;
  --primary-light: #4a8a99;

  /* Accent colors for vibrancy */
  --accent: #e85d04;
  --accent-light: #ff8534;

  /* Section colors - each audience gets their own identity */
  --color-parents: #8B4513;
  --color-parents-light: #D2691E;
  --color-teachers: #4169E1;
  --color-teachers-light: #6495ED;
  --color-autistics: #228B22;
  --color-autistics-light: #32CD32;
  --color-classmates: #FF6347;
  --color-classmates-light: #FF7F7F;
  --color-general: #9932CC;
  --color-general-light: #BA55D3;
  --color-about: #696969;
  --color-about-light: #808080;
  --color-home: #2c616d;
  --color-home-light: #4a8a99;

  /* Rainbow accent bar */
  --rainbow: linear-gradient(90deg,
    #FF6B6B 0%,
    #FFE66D 20%,
    #4ECDC4 40%,
    #45B7D1 60%,
    #96CEB4 80%,
    #DDA0DD 100%
  );

  --text: #333;
  --text-light: #666;
  --bg: #f8f9fa;
  --white: #fff;
  --border: #e0e0e0;
  --max-width: 1100px;
  --shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 5px 10px rgba(0,0,0,0.05);
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Rainbow accent bar at top */
body::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--rainbow);
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

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

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo::before {
  content: '🧩';
  font-size: 1.8rem;
}

.logo:hover {
  opacity: 0.9;
}

.tagline {
  font-size: 0.85rem;
  opacity: 0.85;
  display: none;
  font-weight: 400;
}

@media (min-width: 768px) {
  .tagline { display: inline; }
}

/* Navigation */
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
  margin: 0;
}

.nav-item > a {
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  display: block;
}

.nav-item > a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.nav-item.active > a {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.3);
}

/* Dropdown arrow indicator */
.nav-item.has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.7em;
  opacity: 0.8;
}

/* Dropdown menu */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 220px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  z-index: 200;
}

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

.dropdown li {
  margin: 0;
}

.dropdown a {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.15s ease;
}

.dropdown a:hover {
  background: var(--bg);
  color: var(--primary);
}

/* Section-specific nav colors on hover */
.nav-item > a[href*="parents"]:hover { background: var(--color-parents); }
.nav-item > a[href*="teachers"]:hover { background: var(--color-teachers); }
.nav-item > a[href*="autistics"]:hover { background: var(--color-autistics); }
.nav-item > a[href*="classmates"]:hover { background: var(--color-classmates); }
.nav-item > a[href*="general-public"]:hover { background: var(--color-general); }
.nav-item > a[href*="about"]:hover { background: var(--color-about); }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  nav {
    display: none;
    width: 100%;
    flex-direction: column;
  }
  nav.open { display: flex; }
  .nav-list {
    flex-direction: column;
    width: 100%;
  }
  .dropdown {
    position: static;
    box-shadow: none;
    background: rgba(255,255,255,0.1);
    border-radius: 0;
  }
  .dropdown a {
    color: var(--white);
    padding-left: 2rem;
  }
  .dropdown a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
  }
  .has-dropdown .dropdown {
    display: block;
  }
}

/* Main content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  main.with-sidebar {
    grid-template-columns: 1fr 300px;
  }
}

article {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--primary);
}

/* Section-specific article borders */
.section-parents article { border-top-color: var(--color-parents); }
.section-teachers article { border-top-color: var(--color-teachers); }
.section-autistics article { border-top-color: var(--color-autistics); }
.section-classmates article { border-top-color: var(--color-classmates); }
.section-general-public article { border-top-color: var(--color-general); }
.section-about article { border-top-color: var(--color-about); }

h1 {
  font-size: 2.25rem;
  color: var(--primary);
  margin: 0 0 1.5rem;
  line-height: 1.3;
  font-weight: 700;
}

/* Section-specific h1 colors */
.section-parents h1 { color: var(--color-parents); }
.section-teachers h1 { color: var(--color-teachers); }
.section-autistics h1 { color: var(--color-autistics); }
.section-classmates h1 { color: var(--color-classmates); }
.section-general-public h1 { color: var(--color-general); }

h2 {
  font-size: 1.5rem;
  color: var(--primary-dark);
  margin: 2rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--border);
  display: inline-block;
}

h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin: 1.5rem 0 0.75rem;
  font-weight: 600;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

/* WordPress image alignment classes */
.alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
}

.alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
}

.aligncenter {
  display: block;
  margin: 1rem auto;
}

/* Clear floats after paragraphs with floated images */
article p::after {
  content: '';
  display: table;
  clear: both;
}

blockquote, .quote {
  border-left: 4px solid var(--primary);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--bg);
  font-style: italic;
}

ul, ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

li {
  margin: 0.5rem 0;
}

/* Sidebar */
aside {
  background: linear-gradient(180deg, var(--white) 0%, #f8f9fa 100%);
  padding: 1.75rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  height: fit-content;
  border: 1px solid var(--border);
}

aside h3 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 1rem;
}

aside p {
  font-size: 0.95rem;
  line-height: 1.8;
}

aside i, aside em {
  color: var(--text-light);
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

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

/* Sub-navigation */
.subnav {
  background: linear-gradient(135deg, var(--bg) 0%, #e8f4f8 100%);
  padding: 1.5rem;
  border-radius: 10px;
  margin: 2rem 0;
  border-left: 4px solid var(--primary);
}

.section-parents .subnav { border-left-color: var(--color-parents); background: linear-gradient(135deg, #fff9f5 0%, #fff3e6 100%); }
.section-teachers .subnav { border-left-color: var(--color-teachers); background: linear-gradient(135deg, #f5f8ff 0%, #e6efff 100%); }
.section-autistics .subnav { border-left-color: var(--color-autistics); background: linear-gradient(135deg, #f5fff5 0%, #e6ffe6 100%); }
.section-classmates .subnav { border-left-color: var(--color-classmates); background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%); }
.section-general-public .subnav { border-left-color: var(--color-general); background: linear-gradient(135deg, #faf5ff 0%, #f3e6ff 100%); }

.subnav h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
}

.subnav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.subnav li {
  margin: 0;
}

.subnav a {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--white);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.subnav a:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
  color: var(--primary);
}

/* AdSense */
.ad-container {
  background: var(--bg);
  padding: 1rem;
  margin: 2rem 0;
  text-align: center;
  border-radius: 4px;
  min-height: 100px;
}

.ad-container::before {
  content: 'Advertisement';
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

/* Footer */
footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0d2b33 100%);
  color: var(--white);
  padding: 3rem 1.5rem;
  margin-top: 4rem;
  text-align: center;
  position: relative;
}

footer::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--rainbow);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

footer p {
  margin: 0.5rem 0;
  opacity: 0.9;
}

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

footer a:hover {
  text-decoration: underline;
}

/* Hero section for homepage */
.hero {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.hero h1 {
  font-size: 2.75rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Print */
@media print {
  .header, footer, .ad-container, nav { display: none; }
  main { max-width: 100%; }
  article { box-shadow: none; }
}
