/* ==========================================================================
   UrbanVital — Modern Banner Template Layout (Blue & Light-Blue Theme)
   Colors: Deep Blue, Royal Navy, Sky Blue, Cyan & Ice Blue Accents
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@300;400;500;600;700&family=Noto+Sans+Thai:wght@300;400;500;600;700&display=swap');

:root {
  /* Blue & Light-Blue Palette */
  --color-navy: #0F2547;
  --color-navy-dark: #09172E;
  --color-navy-card: #15325E;
  --color-blue-primary: #1D63B8;
  --color-teal: #2998E6;         /* Bright Sky Blue interactive primary */
  --color-teal-hover: #1B7EC4;   /* Deeper Sky Blue hover */
  --color-sky-bright: #5CE1E6;   /* Cyan / Light-Blue highlight */
  --color-sky-soft: #8CCBFF;     /* Soft Light Blue for subtitles & doodles */
  --color-amber: #48BFE3;        /* Mapped to bright azure/light-blue accent */
  --color-amber-light: #E3F4FC;  /* Soft ice-blue badge background */
  --color-bg: #F2F7FC;           /* Crisp very light blue-white background */
  --color-text: #1B2E4B;         /* Deep slate-blue body text */
  --color-text-muted: #4A6382;   /* Muted blue-grey text */
  --color-card-bg: #E3EFFA;      /* Light blue card & section background */
  --color-white: #FFFFFF;
  --color-border: #C5DCF2;
  --color-error: #D64545;
  --color-error-bg: #FDECEC;
  --color-success: #1E88E5;
  --color-success-bg: #E3F2FD;

  --font-heading: 'IBM Plex Sans Thai', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Noto Sans Thai', 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 6px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 9999px;

  --shadow-sm: 0 4px 12px rgba(15, 37, 71, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 37, 71, 0.12);
  --shadow-lg: 0 20px 48px rgba(9, 23, 46, 0.22);

  --container-max: 1220px;
  --header-height: 82px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography with proper Thai vowel & tone mark clearance */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-weight: 700;
  line-height: 1.42;
  margin-bottom: 0.75em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.1rem, 4.2vw, 3.25rem);
  line-height: 1.32;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.4;
}

h3 {
  font-size: clamp(1.22rem, 2.2vw, 1.48rem);
}

h4 {
  font-size: 1.15rem;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--color-blue-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color var(--transition);
}

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

/* Keyboard Focus Accessibility */
:focus-visible {
  outline: 3px solid var(--color-sky-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

ul, ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 68px 0;
}

.section-sm {
  padding: 40px 0;
}

.section-alt {
  background-color: var(--color-card-bg);
}

/* Educational Disclaimer Top Bar */
.top-notice {
  background-color: #071326;
  color: #D6E9FF;
  font-size: 0.84rem;
  padding: 8px 0;
  text-align: center;
  border-bottom: 1px solid rgba(92, 225, 230, 0.25);
}

.top-notice p {
  margin: 0;
  line-height: 1.5;
}

.top-notice strong {
  color: var(--color-sky-bright);
}

/* ==========================================================================
   Header & Navigation — Dark Navy Banner Template Style (like reference)
   ========================================================================== */
.site-header {
  background-color: var(--color-navy-dark);
  border-bottom: 1px solid rgba(140, 203, 255, 0.16);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(9, 23, 46, 0.35);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-sky-bright);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.4rem;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.brand-logo:hover {
  color: var(--color-white);
}

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-blue-primary) 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(41, 152, 230, 0.35);
}

.brand-text span {
  display: block;
  font-size: 0.74rem;
  font-weight: 400;
  color: var(--color-sky-soft);
  letter-spacing: 0.04em;
}

/* Desktop Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 6px;
  flex-wrap: wrap;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  color: #E2F0FF;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.94rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition), color var(--transition);
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(41, 152, 230, 0.18);
  color: var(--color-sky-bright);
}

.nav-link.active {
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--color-sky-bright);
}

/* Dropdown menu for Topics */
.dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 270px;
  background: var(--color-navy);
  border: 1px solid rgba(140, 203, 255, 0.25);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  list-style: none;
  display: none;
  z-index: 1001;
}

.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu,
.nav-item.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 10px 14px;
  color: #E2F0FF;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.91rem;
  transition: background-color var(--transition), color var(--transition);
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
  background-color: rgba(41, 152, 230, 0.25);
  color: var(--color-sky-bright);
  font-weight: 600;
}

/* Header Utility Buttons */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(41, 152, 230, 0.16);
  color: #FFFFFF;
  border: 1px solid rgba(92, 225, 230, 0.4);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.search-trigger-btn:hover {
  background-color: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-sky-bright);
}

.mobile-menu-btn {
  display: none;
  background: rgba(41, 152, 230, 0.18);
  border: 1px solid rgba(140, 203, 255, 0.35);
  color: var(--color-white);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ==========================================================================
   Buttons — Crisp Rectangular/Slightly Rounded CTA like the Template
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  line-height: 1.4;
}

.btn-primary {
  background-color: var(--color-teal);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(41, 152, 230, 0.35);
}

.btn-primary:hover {
  background-color: var(--color-teal-hover);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(41, 152, 230, 0.45);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-navy);
  border-color: var(--color-blue-primary);
}

.btn-secondary:hover {
  background-color: var(--color-blue-primary);
  color: var(--color-white);
}

.btn-outline-light {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(140, 203, 255, 0.55);
}

.btn-outline-light:hover {
  background-color: rgba(140, 203, 255, 0.15);
  color: var(--color-sky-bright);
  border-color: var(--color-sky-bright);
}

.btn-amber {
  background-color: var(--color-sky-bright);
  color: var(--color-navy-dark);
}

.btn-amber:hover {
  background-color: #38C6CC;
  color: var(--color-navy-dark);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.88rem;
}

/* Breadcrumb Bar */
.breadcrumb-bar {
  background-color: #0D1F3C;
  border-bottom: 1px solid rgba(140, 203, 255, 0.15);
  padding: 10px 0;
  font-size: 0.86rem;
}

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

.breadcrumb-item {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #9EC5EB;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: #5E87B0;
}

.breadcrumb-item a {
  color: #D6E9FF;
  text-decoration: none;
  font-weight: 500;
}

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

.breadcrumb-item[aria-current="page"] {
  color: var(--color-sky-bright);
  font-weight: 600;
}

/* ==========================================================================
   Hero Section — Exact Reference Template Layout in Deep Blue & Light Blue!
   Image on Left, Bold White Heading + Light Blue Subtitle + Text + CTA on Right,
   and Playful Blue/Light-Blue Hand-Drawn Abstract Shapes around the edges.
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 64px 0 96px;
  background: linear-gradient(135deg, #09172E 0%, #0F2547 55%, #13315C 100%);
  color: var(--color-white);
  overflow: hidden;
  border-bottom: 4px solid var(--color-teal);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 54px;
  align-items: center;
}

/* Photo on the Left (Flush Rectangular Editorial Frame like Reference) */
.hero-image-wrap {
  position: relative;
}

.hero-image-wrap img {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.45);
  border: 3px solid rgba(140, 203, 255, 0.25);
  object-fit: cover;
  filter: contrast(1.04);
}

.hero-floating-card {
  margin-top: 16px;
  background: rgba(21, 50, 94, 0.85);
  backdrop-filter: blur(8px);
  padding: 14px 18px;
  border-radius: 6px;
  border-left: 4px solid var(--color-sky-bright);
  color: #E2F0FF;
}

.hero-floating-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.55;
}

.hero-floating-card strong {
  color: var(--color-sky-bright);
}

/* Text Content on the Right */
.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  color: var(--color-white);
  font-size: clamp(2.35rem, 4.5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.015em;
}

/* Colored Accent Subheading ("Develop Your Art Style" equivalent in Light Blue) */
.hero-kicker-accent {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 2.3vw, 1.65rem);
  font-weight: 700;
  color: var(--color-sky-bright);
  margin-bottom: 18px;
  line-height: 1.4;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #CFE4FA;
  margin-bottom: 28px;
  max-width: 580px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 32px;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid rgba(140, 203, 255, 0.2);
}

.highlight-item {
  font-size: 0.88rem;
  color: #B8D8F8;
}

.highlight-item strong {
  display: block;
  color: var(--color-sky-bright);
  font-size: 0.96rem;
  margin-bottom: 2px;
}

/* Decorative Hand-Drawn Doodle Shapes (Strictly Blue & Light-Blue Palette) */
.banner-deco {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.banner-deco-leaf-right {
  top: 24%;
  right: -12px;
  width: 90px;
  height: 150px;
  opacity: 0.92;
}

.banner-deco-grid-left {
  bottom: -18px;
  left: 4%;
  width: 170px;
  height: 85px;
  opacity: 0.85;
}

.banner-deco-dots {
  bottom: 12px;
  left: 27%;
  width: 130px;
  height: 60px;
  opacity: 0.9;
}

.banner-deco-scribble {
  bottom: -6px;
  left: 48%;
  width: 160px;
  height: 65px;
  opacity: 0.9;
}

.banner-deco-bars {
  bottom: 10px;
  right: 14%;
  width: 140px;
  height: 75px;
  opacity: 0.92;
}

.banner-deco-star {
  bottom: 28px;
  right: 3%;
  width: 82px;
  height: 82px;
  opacity: 0.95;
}

/* Page Header for internal pages (Matching Deep Navy & Light Blue Doodles) */
.page-hero {
  position: relative;
  background: linear-gradient(135deg, #09172E 0%, #0F2547 60%, #163868 100%);
  color: var(--color-white);
  padding: 54px 0 60px;
  border-bottom: 4px solid var(--color-teal);
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 225, 230, 0.22) 0%, rgba(41, 152, 230, 0) 70%);
  pointer-events: none;
}

.page-hero h1 {
  color: var(--color-white);
  margin-bottom: 12px;
}

.page-hero p {
  color: #D6E9FF;
  font-size: 1.12rem;
  max-width: 780px;
  margin-bottom: 0;
}

.page-meta-tag {
  display: inline-block;
  background: rgba(41, 152, 230, 0.22);
  color: var(--color-sky-bright);
  border: 1px solid rgba(92, 225, 230, 0.5);
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Section Headers */
.section-header {
  max-width: 760px;
  margin-bottom: 40px;
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  color: var(--color-blue-primary);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

/* Cards & Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.card-soft {
  background-color: var(--color-card-bg);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}

.card-soft .card-icon {
  background: var(--color-white);
}

.card-tag {
  display: inline-block;
  align-self: flex-start;
  background-color: var(--color-amber-light);
  color: var(--color-blue-primary);
  border: 1px solid #B3DAFF;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--color-text-muted);
  flex-grow: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-blue-primary);
  text-decoration: none;
  margin-top: auto;
  padding-top: 12px;
}

.card-link:hover {
  color: var(--color-teal);
  text-decoration: underline;
}

/* Article Layout with Sticky Table of Contents (TOC) */
.article-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: start;
}

.toc-sidebar {
  position: sticky;
  top: 104px;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.toc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.92rem;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

.toc-link:hover,
.toc-link.active {
  background-color: var(--color-white);
  color: var(--color-blue-primary);
  border-left-color: var(--color-teal);
  font-weight: 600;
}

.article-content {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.article-section {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.article-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Info Callout / Medical Boundary Boxes */
.callout {
  background-color: var(--color-card-bg);
  border-left: 5px solid var(--color-navy);
  padding: 24px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 24px 0;
}

.callout-amber {
  background-color: #E3F2FD;
  border-left-color: var(--color-blue-primary);
}

.callout-teal {
  background-color: #E0F7FA;
  border-left-color: var(--color-teal);
}

.callout-title {
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* Interactive Topic Filter & Search Bar */
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  background: var(--color-white);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  border-color: var(--color-teal);
  color: var(--color-blue-primary);
}

.filter-btn.active {
  background-color: var(--color-navy);
  color: var(--color-white);
  border-color: var(--color-navy);
}

.inline-search-box {
  position: relative;
  min-width: 260px;
  flex-grow: 1;
  max-width: 360px;
}

.inline-search-input {
  width: 100%;
  padding: 10px 16px 10px 40px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  background-color: var(--color-bg);
}

.inline-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

/* Interactive Break Timer Widget (1, 3, 5 minutes) */
.timer-widget {
  background: linear-gradient(135deg, #09172E 0%, #0F2547 55%, #163868 100%);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(92, 225, 230, 0.25);
  margin: 32px 0;
}

.timer-widget h3 {
  color: var(--color-white);
  margin-bottom: 8px;
}

.timer-header-desc {
  color: #CFE4FA;
  margin-bottom: 24px;
}

.timer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.timer-display-box {
  background: rgba(21, 50, 94, 0.65);
  border: 1px solid rgba(140, 203, 255, 0.25);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
}

.timer-presets {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.timer-preset-btn {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-white);
  border: 1px solid rgba(140, 203, 255, 0.3);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.timer-preset-btn:hover {
  background: rgba(41, 152, 230, 0.3);
}

.timer-preset-btn.active {
  background: var(--color-sky-bright);
  color: var(--color-navy-dark);
  border-color: var(--color-sky-bright);
}

.timer-clock {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--color-sky-bright);
  letter-spacing: 0.04em;
  line-height: 1.1;
  margin: 12px 0;
}

.timer-status-text {
  font-size: 0.95rem;
  color: #E2F0FF;
  min-height: 1.6em;
  margin-bottom: 20px;
}

.timer-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-bottom: 24px;
}

.timer-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-teal) 0%, var(--color-sky-bright) 100%);
  transition: width 0.3s linear;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Interactive Daily / Bedtime Routine Checklist */
.checklist-widget {
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
}

.checklist-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.checklist-progress-wrap {
  background: var(--color-white);
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  color: var(--color-navy);
  border: 1px solid var(--color-border);
  font-size: 0.92rem;
}

.checklist-items {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--color-white);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all var(--transition);
}

.checklist-item:hover {
  border-color: var(--color-teal);
}

.checklist-item.completed {
  background-color: #EBF5FF;
  border-color: var(--color-teal);
}

.checklist-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 3px;
  accent-color: var(--color-blue-primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checklist-label {
  flex-grow: 1;
}

.checklist-label strong {
  display: block;
  color: var(--color-navy);
  margin-bottom: 2px;
}

.checklist-item.completed .checklist-label strong {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.checklist-label span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* FAQ Accordion */
.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 20px 24px;
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--color-navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  transition: background-color var(--transition);
}

.faq-question:hover {
  background-color: var(--color-card-bg);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: var(--color-card-bg);
  color: var(--color-blue-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition), background-color var(--transition);
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
  background-color: var(--color-teal);
  color: var(--color-white);
}

.faq-answer {
  padding: 0 24px 20px;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.faq-answer[hidden] {
  display: none;
}

/* Comparison Table */
.table-responsive {
  overflow-x: auto;
  margin: 24px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.comparison-table th {
  background-color: var(--color-navy);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-weight: 600;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table tr:nth-child(even) {
  background-color: #F4F9FE;
}

/* Forms */
.form-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  max-width: 680px;
  margin: 0 auto;
}

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

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

.required-star {
  color: var(--color-error);
  margin-left: 4px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background-color: var(--color-bg);
  transition: border-color var(--transition), background-color var(--transition);
}

.form-control:focus {
  border-color: var(--color-teal);
  background-color: var(--color-white);
  outline: none;
}

.form-control.is-invalid {
  border-color: var(--color-error);
  background-color: var(--color-error-bg);
}

.form-hint {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

.field-error {
  display: none;
  color: var(--color-error);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 6px;
}

.field-error.visible {
  display: block;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--color-card-bg);
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.checkbox-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  accent-color: var(--color-blue-primary);
  flex-shrink: 0;
  cursor: pointer;
}

.form-status-box {
  display: none;
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-weight: 500;
}

.form-status-box.status-loading {
  display: block;
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-teal);
  color: var(--color-navy);
}

.form-status-box.status-error {
  display: block;
  background-color: var(--color-error-bg);
  border: 1px solid var(--color-error);
  color: #7D2323;
}

.form-status-box.status-success {
  display: block;
  background-color: var(--color-success-bg);
  border: 1px solid var(--color-success);
  color: #0D3C61;
}

/* Honeypot anti-spam field */
.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Product Placeholder Frame */
.product-showcase {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: start;
}

.product-image-frame {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.product-image-frame img {
  margin: 0 auto;
  max-height: 420px;
  object-fit: contain;
}

/* Search Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 23, 46, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 20px 20px;
  z-index: 2000;
}

.modal-backdrop.open {
  display: flex;
}

.search-modal {
  background: var(--color-white);
  width: 100%;
  max-width: 680px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.search-modal-header {
  padding: 20px 24px;
  background: var(--color-card-bg);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-border);
}

.search-modal-input {
  flex-grow: 1;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
}

.search-modal-input:focus {
  border-color: var(--color-teal);
  outline: none;
}

.modal-close-btn {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: var(--color-navy);
}

.search-results-container {
  max-height: 60vh;
  overflow-y: auto;
  padding: 20px 24px;
}

.search-result-item {
  display: block;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  text-decoration: none;
  transition: all var(--transition);
}

.search-result-item:hover {
  background-color: var(--color-card-bg);
  border-color: var(--color-teal);
}

.search-result-item h4 {
  margin-bottom: 4px;
  color: var(--color-navy);
}

.search-result-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 1080px;
  margin: 0 auto;
  background: var(--color-white);
  border: 2px solid var(--color-blue-primary);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-lg);
  z-index: 1900;
  display: none;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cookie-banner-text {
  flex: 1 1 520px;
}

.cookie-banner-text h4 {
  margin-bottom: 6px;
}

.cookie-banner-text p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Footer */
.site-footer {
  background-color: var(--color-navy-dark);
  color: #D6E9FF;
  padding: 64px 0 32px;
  margin-top: auto;
  border-top: 4px solid var(--color-teal);
}

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

.site-footer h4 {
  color: var(--color-sky-bright);
  font-size: 1.05rem;
  margin-bottom: 16px;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a,
.footer-links button {
  color: #D6E9FF;
  text-decoration: none;
  font-size: 0.93rem;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--color-sky-bright);
  text-decoration: underline;
}

.footer-disclaimer {
  background: rgba(21, 50, 94, 0.55);
  border: 1px solid rgba(140, 203, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-size: 0.88rem;
  color: #CFE4FA;
  margin-bottom: 28px;
}

.footer-disclaimer strong {
  color: var(--color-sky-bright);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(140, 203, 255, 0.16);
  font-size: 0.88rem;
  color: #8CB4DM;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid,
  .article-layout,
  .timer-grid,
  .product-showcase {
    grid-template-columns: 1fr;
  }

  .toc-sidebar {
    position: static;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .banner-deco {
    opacity: 0.35;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-navy-dark);
    border-bottom: 2px solid var(--color-teal);
    padding: 20px;
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 12px 14px;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: 1px solid rgba(140, 203, 255, 0.18);
    background: var(--color-navy);
    margin-top: 4px;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .hero-highlights,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .article-content,
  .form-card,
  .timer-widget,
  .checklist-widget {
    padding: 24px 20px;
  }

  .section {
    padding: 44px 0;
  }
}
