/* =============================================
   Child Safe ME — Shared Styles
   Single source of truth for all pages
   ============================================= */

/* ===== RESET & VARIABLES ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #FCCC04;
  --gold-light: #FEE566;
  --gold-dark: #D4A903;
  --navy: #1B2864;
  --navy-light: #2A3D8F;
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --warm-white: #F7F6F3;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-name: 'DM Serif Display', Georgia, serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

/* ===== BASE ===== */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

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

main { display: block; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.9rem;
  border-radius: 6px;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
}

/* ===== NAVIGATION ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s ease;
}

nav.scrolled { box-shadow: 0 1px 20px rgba(0,0,0,0.06); }

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo img { height: 44px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  letter-spacing: 0.02em;
  transition: color 0.2s;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active { color: var(--navy); }

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 6px;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover { background: var(--navy-light); transform: translateY(-1px); }
.nav-cta::after { display: none !important; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--gray-700);
  margin: 6px 0;
  transition: all 0.3s;
}

/* ===== PAGE HEADER (blog, blog posts, privacy) ===== */
.page-header {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-height) + 72px);
  padding-bottom: 36px;
  background:
    radial-gradient(circle at top right, rgba(252, 204, 4, 0.16), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, var(--warm-white) 100%);
  border-bottom: 1px solid var(--gray-200);
}

.page-header::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(27, 40, 100, 0.15) 50%, transparent 100%);
}

.page-header .container {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.14;
  margin-bottom: 18px;
}

.page-header p {
  max-width: 720px;
  font-size: 1.02rem;
  color: var(--gray-600);
  line-height: 1.8;
}

.page-header.is-centered .container { text-align: center; }

.page-header.is-centered {
  padding-top: calc(var(--nav-height) + 28px);
}

.page-header.is-centered .gold-line {
  margin-left: auto;
  margin-right: auto;
}

.page-header.is-centered .breadcrumbs ol {
  justify-content: center;
}

.page-header.is-centered p {
  margin-left: auto;
  margin-right: auto;
}

.page-header.is-centered .article-meta {
  justify-content: center;
}

.breadcrumbs {
  margin-bottom: 22px;
}

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

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  font-size: 0.82rem;
  color: var(--gray-500);
}

.breadcrumbs li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--gray-400);
}

.breadcrumbs a {
  color: var(--gray-600);
  transition: color 0.2s ease;
}

.breadcrumbs a:hover { color: var(--navy); }

.breadcrumbs [aria-current="page"] {
  color: var(--navy);
  font-weight: 600;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}

.page-kicker::before {
  content: '';
  width: 28px;
  height: 1px;
  background: rgba(27, 40, 100, 0.3);
}

.page-header-nav {
  margin-top: 32px;
}

.page-header-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.page-header-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border: 1px solid rgba(27, 40, 100, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.page-header-nav a:hover {
  transform: translateY(-1px);
  border-color: rgba(252, 204, 4, 0.8);
  background: rgba(252, 204, 4, 0.18);
}

/* ===== SHARED UI ELEMENTS ===== */
.gold-line {
  width: 40px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin-bottom: 24px;
}

.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 10px 28px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
}

.section-header {
  max-width: 760px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-header .gold-line {
  margin-left: auto;
  margin-right: auto;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.8;
}

/* ===== BLOG ARTICLE STYLES ===== */
.article-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 12px;
}

.article-meta-item::after {
  content: '•';
  margin-left: 24px;
  color: var(--gray-300);
}

.article-meta-item:last-child::after { display: none; }

.article-content {
  max-width: 800px;
  padding-top: 28px;
  padding-bottom: 40px;
}

.article-content p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 20px;
}

.article-content h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-top: 40px;
  margin-bottom: 16px;
}

.article-content h2:first-of-type { margin-top: 32px; }

.article-content ul {
  list-style: none;
  margin-bottom: 20px;
  padding-left: 0;
}

.article-content ul li {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.article-content ul li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 11px;
}

.article-content a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-content a:hover { color: var(--navy-light); }

.article-content ol,
.policy-content ol {
  list-style: none;
  margin-bottom: 24px;
  padding-left: 0;
  counter-reset: article-counter;
}

.article-content ol li,
.policy-content ol li {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
  padding-left: 32px;
  position: relative;
  margin-bottom: 12px;
  counter-increment: article-counter;
}

.article-content ol li::before,
.policy-content ol li::before {
  content: counter(article-counter);
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  color: var(--navy);
}

.article-back {
  font-size: 0.9rem;
  color: var(--navy);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 32px;
  transition: color 0.2s;
}

.article-back::before { content: '←'; }
.article-back:hover { color: var(--navy-light); }

.article-cta {
  background: var(--warm-white);
  border-radius: 8px;
  padding: 48px 40px;
  margin-top: 40px;
  text-align: center;
}

.article-cta h3 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.article-cta p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.related-posts {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-200);
}

.related-posts h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}

.related-posts > p {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
  margin-bottom: 24px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.related-post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid rgba(27, 40, 100, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 246, 243, 0.94) 100%);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.related-post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(252, 204, 4, 0.45);
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.08);
}

.related-post-meta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.related-post-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gray-900);
}

.related-post-card p {
  flex-grow: 1;
  margin: 0;
  font-size: 0.92rem;
  color: var(--gray-600);
  line-height: 1.7;
}

.related-post-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
}

.related-post-link::after { content: '→'; }

.policy-content {
  max-width: 800px;
  padding-bottom: 96px;
}

.policy-content h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-top: 40px;
  margin-bottom: 16px;
}

.policy-content h2:first-of-type { margin-top: 32px; }

.policy-content p,
.policy-content ul li {
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.8;
}

.policy-content p { margin-bottom: 16px; }

.policy-content ul {
  list-style: none;
  margin-bottom: 20px;
  padding-left: 0;
}

.policy-content ul li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.policy-content ul li::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 11px;
}

.policy-content a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.policy-content a:hover { color: var(--navy-light); }

.policy-content .update-date {
  font-size: 0.85rem;
  color: var(--gray-400);
  font-style: italic;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--gray-200);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 96px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 32px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 246, 243, 0.92) 100%);
  border: 1px solid rgba(27, 40, 100, 0.08);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(17, 24, 39, 0.08);
  border-color: rgba(252, 204, 4, 0.45);
}

.blog-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.blog-card-date::after {
  content: '•';
  margin-left: 16px;
  color: var(--gray-300);
}

.blog-card h3 {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--gray-900);
  margin-bottom: 14px;
}

.blog-card p {
  flex-grow: 1;
  font-size: 0.95rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 24px;
}

.blog-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
  transition: color 0.2s ease;
}

.blog-card-cta:hover { color: var(--navy-light); }

.blog-card-cta::after { content: '→'; }

/* ===== FOOTER ===== */
footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 56px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}

.footer-brand-accent { color: var(--gold); }

.footer-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--gray-400);
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.8rem;
}

/* ===== RESPONSIVE — SHARED ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--white);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--gray-100);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .page-header {
    padding-top: calc(var(--nav-height) + 56px);
    padding-bottom: 28px;
  }

  .page-header.is-centered {
    padding-top: calc(var(--nav-height) + 20px);
  }

  .page-header h1 { font-size: clamp(1.9rem, 8vw, 2.5rem); }

  .page-header-nav ul { justify-content: flex-start; }

  .breadcrumbs ol {
    gap: 6px;
  }

  .section-header {
    text-align: left;
    margin-bottom: 32px;
  }

  .section-header .gold-line {
    margin-left: 0;
    margin-right: 0;
  }

  .section-header h2 { font-size: 2rem; }

  .article-meta-item::after { display: none; }

  .article-cta { padding: 32px 24px; }

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

  .related-posts-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }

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