/* Baby Toy Guide — base styles */
:root {
  --color-bg: #fffaf5;
  --color-bg-alt: #fff2e8;
  --color-primary: #ff8a65;
  --color-primary-dark: #e6633a;
  --color-secondary: #6bb8a2;
  --color-text: #3a2e2a;
  --color-text-light: #6b5d57;
  --color-border: #f0ddd0;
  --color-white: #ffffff;
  --radius: 14px;
  --max-width: 1100px;
  --shadow: 0 4px 16px rgba(58, 46, 42, 0.08);
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.65;
}

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

a { color: var(--color-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
}
.logo span { color: var(--color-primary-dark); }
.logo svg { flex-shrink: 0; }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.main-nav a {
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--color-bg-alt);
  display: inline-block;
}
nav.main-nav a:hover,
nav.main-nav a.active {
  color: #fff;
  background: var(--color-primary);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  nav.main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; gap: 4px; padding: 10px 0; }
  .nav-toggle { display: inline-block; }
  .site-header .container { flex-wrap: wrap; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--color-bg-alt), var(--color-bg));
  padding: 56px 0 46px;
  border-bottom: 1px solid var(--color-border);
}
.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 14px;
  line-height: 1.2;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-text-light);
  max-width: 640px;
  margin: 0 0 22px;
}
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.btn:hover { background: var(--color-primary-dark); text-decoration: none; }
.btn-outline {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary-dark);
}

/* Sections */
main { display: block; }
section { padding: 48px 0; }
section.alt { background: var(--color-white); }
h2.section-title {
  font-size: 1.7rem;
  margin: 0 0 8px;
}
p.section-sub {
  color: var(--color-text-light);
  margin: 0 0 30px;
  max-width: 680px;
}

/* Card grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { color: var(--color-text-light); margin: 0 0 14px; flex-grow: 1; }
.card a.card-link { font-weight: 700; }

/* Age badge */
.age-badge {
  display: inline-block;
  background: var(--color-secondary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* Article layout */
.article-header {
  background: var(--color-bg-alt);
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--color-border);
}
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 14px;
}
.breadcrumbs a { color: var(--color-text-light); }
.article-header h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.6vw, 2.3rem); }
.article-meta {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.article-body {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 20px;
}
.article-body h2 { margin-top: 2.2em; font-size: 1.4rem; }
.article-body h3 { margin-top: 1.6em; font-size: 1.15rem; }
.article-body p { margin: 1em 0; }
.article-body ul, .article-body ol { padding-left: 1.3em; }
.article-body li { margin: 0.4em 0; }

.callout {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-primary);
  padding: 16px 20px;
  border-radius: 8px;
  margin: 24px 0;
}
.callout strong { color: var(--color-primary-dark); }

.checklist {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.checklist li { list-style: none; padding-left: 1.6em; position: relative; margin: 0.6em 0; }
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-secondary);
  font-weight: 800;
}

table.compare {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}
table.compare th, table.compare td {
  border: 1px solid var(--color-border);
  padding: 10px 12px;
  text-align: left;
}
table.compare th { background: var(--color-bg-alt); }

.faq-item { border-bottom: 1px solid var(--color-border); padding: 16px 0; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item[open] summary { color: var(--color-primary-dark); }

/* Ad slots */
.ad-slot {
  margin: 32px auto;
  max-width: 760px;
  text-align: center;
  padding: 10px;
}
.ad-slot .ad-label {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-light);
  margin-bottom: 6px;
}
.ad-slot ins, .ad-slot .ad-placeholder {
  display: block;
  min-height: 90px;
  background: repeating-linear-gradient(45deg, #f7ede4, #f7ede4 10px, #fbf3ec 10px, #fbf3ec 20px);
  border: 1px dashed var(--color-border);
  border-radius: 8px;
}

/* Related / internal links */
.related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}
.related h2 { font-size: 1.2rem; }
.related ul { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.related li a {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: #2f2622;
  color: #e8dcd4;
  padding: 40px 0 24px;
  margin-top: 40px;
}
.site-footer a { color: #f2c9b3; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
.footer-grid h4 { margin: 0 0 10px; color: #fff; font-size: 0.95rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  font-size: 0.82rem;
  color: #b9aca4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
}

/* Cookie / consent banner */
#consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2f2622;
  color: #f3ece7;
  padding: 16px 20px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
#consent-banner.show { display: flex; }
#consent-banner p { margin: 0; font-size: 0.88rem; max-width: 600px; }
#consent-banner .btn { padding: 8px 18px; font-size: 0.85rem; }

/* ---- Magazine-style visual system: illustrated hero media, cards, byline ---- */

.hero-media {
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: #fff;
}
.hero-media.lg { aspect-ratio: 21 / 8; font-size: 5.5rem; }
.hero-media.sm { aspect-ratio: 16 / 10; font-size: 2.6rem; border-radius: var(--radius) var(--radius) 0 0; }
.hero-media::before, .hero-media::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}
.hero-media::before { width: 40%; height: 80%; top: -20%; right: -8%; }
.hero-media::after { width: 26%; height: 50%; bottom: -18%; left: -6%; }
.hero-media span { position: relative; z-index: 1; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15)); }

.grad-pregnancy { background: linear-gradient(135deg, #ffb199, #ff8a65); }
.grad-health    { background: linear-gradient(135deg, #7fd8c9, #4fa89a); }
.grad-behavior  { background: linear-gradient(135deg, #d3b3ec, #f2b6c6); }
.grad-food      { background: linear-gradient(135deg, #ffd77a, #ff9f6e); }
.grad-newborn   { background: linear-gradient(135deg, #a8d8ea, #6fb7d4); }
.grad-infant    { background: linear-gradient(135deg, #9fe0c4, #4fa89a); }
.grad-toddler   { background: linear-gradient(135deg, #ffb199, #ff6f61); }
.grad-safety    { background: linear-gradient(135deg, #b8c6d1, #6bb8a2); }
.grad-news      { background: linear-gradient(135deg, #e0cdb8, #ff8a65); }
.grad-brand     { background: linear-gradient(120deg, #ff8a65, #ffb199 45%, #6bb8a2); }

/* Card thumbnails (bleed to card edges) */
.card { position: relative; }
.card .card-thumb {
  margin: -24px -24px 16px;
  width: calc(100% + 48px);
}
.card .icon.thumb-fallback { display: none; }

/* Featured hero (homepage) */
.featured-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  align-items: center;
}
.featured-hero .hero-media { aspect-ratio: 4/3; }
@media (max-width: 780px) {
  .featured-hero { grid-template-columns: 1fr; }
  .featured-hero .hero-media { order: -1; }
}
.featured-tag {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* Byline / trust badge */
.byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 0;
}
.byline .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.byline .byline-info { font-size: 0.85rem; color: var(--color-text-light); line-height: 1.5; }
.byline .byline-info strong { color: var(--color-text); }
.reviewed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eaf6f2;
  color: #2f7a63;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-top: 5px;
}

/* Newsletter band */
.newsletter-band {
  background: linear-gradient(135deg, var(--color-secondary), #3f8f7f);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 32px;
  text-align: center;
  margin: 44px 0;
}
.newsletter-band h2 { margin: 0 0 8px; color: #fff; }
.newsletter-band p { color: rgba(255,255,255,0.92); margin: 0 auto 20px; max-width: 480px; }
.newsletter-band .btn { background: #fff; color: var(--color-secondary); }
.newsletter-band .btn:hover { background: #f0f0f0; }

/* Related articles with thumbnails */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.related-grid .rel-card {
  display: block;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-weight: 600;
}
.related-grid .rel-card:hover { text-decoration: none; box-shadow: 0 8px 20px rgba(58,46,42,0.12); }
.related-grid .rel-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  color: #fff;
}
.related-grid .rel-title { padding: 12px 14px; color: var(--color-text); font-size: 0.92rem; }

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.text-center { text-align: center; }
