/**
 * Theme Name: Bedtime Tales
 * Theme URI: https://bedtimestorieskid.com/
 * Author: Bedtime Tales
 * Description: Fully block-editor driven theme. Add, remove and reorder every homepage section from WP Admin with zero coding. Built for bedtimestorieskid.com.
 * Version: 2.1.0
 * Requires at least: 6.0
 * Requires PHP: 7.4
 * License: GNU General Public License v2 or later
 * Text Domain: bedtime-tales
 * Tags: blog, kids, full-site-editing, custom-blocks
 */

/* ============================================================
   GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400;600;700;800&family=Nunito:wght@400;600;700;800&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
    --bt-sky:         #1A0533;
    --bt-sky2:        #2D1B69;
    --bt-purple:      #7B2FBE;
    --bt-purple-dark: #5B21B6;
    --bt-lavender:    #EDE9FE;
    --bt-moon:        #FFD166;
    --bt-cream:       #FFF8F0;
    --bt-cloud:       #F0E6FF;
    --bt-ink:         #1A0533;
    --bt-body:        #374151;
    --bt-muted:       #6B7280;
    --bt-border:      #E5E7EB;
    --bt-white:       #ffffff;
    --bt-max-width:   1600px;
    --bt-radius-sm:   8px;
    --bt-radius-md:   16px;
    --bt-radius-lg:   24px;
    --bt-radius-xl:   50px;
    --bt-shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
    --bt-shadow-md:   0 4px 20px rgba(0,0,0,0.09);
    --bt-shadow-lg:   0 12px 40px rgba(123,47,190,0.15);
    --bt-transition:  all 0.25s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: var(--bt-body);
    background: var(--bt-cream);
    margin: 0; padding: 0;
    -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4,h5,h6 {
    font-family: 'Baloo 2', cursive;
    color: var(--bt-ink);
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 0.75em;
}
h1 { font-size: clamp(30px,5vw,52px); font-weight: 800; }
h2 { font-size: clamp(22px,3.5vw,38px); font-weight: 800; }
h3 { font-size: clamp(17px,2.5vw,22px); font-weight: 700; }
p  { margin-top: 0; margin-bottom: 1em; }
a  { color: var(--bt-purple); text-decoration: none; transition: var(--bt-transition); }
a:hover { color: var(--bt-purple-dark); }
img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   GLOBAL CONTAINER
   ============================================================ */
.bt-container {
    max-width: var(--bt-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 40px;
    padding-right: 40px;
    width: 100%;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#bt-navbar {
    background: var(--bt-sky);
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 2px solid rgba(255,209,102,0.2);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.bt-navbar-inner {
    max-width: var(--bt-max-width);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 24px;
}
.bt-logo a { display:flex; align-items:center; gap:10px; text-decoration:none; }
.bt-logo img { max-height:44px; width:auto; }
.bt-logo-text { font-family:'Baloo 2',cursive; font-size:22px; font-weight:800; color:#fff; }
.bt-logo-moon { font-size:26px; animation: bt-glow 3s ease-in-out infinite; }
@keyframes bt-glow {
    0%,100% { filter: drop-shadow(0 0 6px #FFD166); }
    50%      { filter: drop-shadow(0 0 18px #FFD166); }
}
#bt-primary-nav { display:flex; align-items:center; flex:1; }
#bt-primary-nav ul { list-style:none; margin:0; padding:0; display:flex; align-items:center; gap:4px; }
#bt-primary-nav ul li { position:relative; }
#bt-primary-nav ul li a {
    color: rgba(255,255,255,0.85);
    font-size:14px; font-weight:700;
    padding:8px 14px; border-radius:var(--bt-radius-sm);
    display:block; white-space:nowrap;
    transition: var(--bt-transition); text-decoration:none;
}
#bt-primary-nav ul li a:hover,
#bt-primary-nav ul li.current-menu-item > a,
#bt-primary-nav ul li.current-menu-ancestor > a {
    color: var(--bt-moon); background: rgba(255,209,102,0.1);
}
#bt-primary-nav ul li.menu-item-has-children > a::after { content:' ▾'; font-size:10px; opacity:0.7; }
#bt-primary-nav ul li ul {
    visibility:hidden; opacity:0; pointer-events:none;
    position:absolute; top:calc(100% + 4px); left:0;
    min-width:230px; background:var(--bt-white);
    border-radius:var(--bt-radius-md);
    box-shadow:0 8px 32px rgba(0,0,0,0.14);
    padding:8px; display:flex; flex-direction:column; gap:2px;
    border:1px solid var(--bt-border); z-index:200;
    transform:translateY(8px);
    transition:opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
#bt-primary-nav ul li:hover > ul,
#bt-primary-nav ul li.bt-dropdown-open > ul {
    visibility:visible; opacity:1; pointer-events:all; transform:translateY(0);
}
#bt-primary-nav ul li ul li a { color:var(--bt-ink); font-size:13px; font-weight:600; padding:9px 14px; }
#bt-primary-nav ul li ul li a:hover { color:var(--bt-purple); background:var(--bt-lavender); }
#bt-primary-nav ul li ul li.menu-item-has-children > a::after { content:' ›'; }
#bt-primary-nav ul li ul li ul { top:0; left:calc(100% + 4px); }

.bt-nav-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.bt-search-toggle {
    background:none; border:none; color:rgba(255,255,255,0.8);
    cursor:pointer; padding:8px; border-radius:var(--bt-radius-sm);
    font-size:18px; transition:var(--bt-transition);
    display:flex; align-items:center;
}
.bt-search-toggle:hover { color:var(--bt-moon); background:rgba(255,255,255,0.08); }
.bt-mobile-toggle {
    display:none; background:none; border:none;
    color:#fff; font-size:24px; cursor:pointer; padding:8px;
}

/* Search overlay */
.bt-search-overlay {
    display:none; position:fixed; inset:0;
    background:rgba(26,5,51,0.92); z-index:9999;
    align-items:center; justify-content:center;
}
.bt-search-overlay.active { display:flex; }
.bt-search-box { width:90%; max-width:640px; position:relative; }
.bt-search-box form {
    display:flex; align-items:center; background:var(--bt-white);
    border-radius:var(--bt-radius-xl); overflow:hidden; padding:6px 6px 6px 24px;
}
.bt-search-box input[type="search"] {
    flex:1; border:none; outline:none; font-family:'Nunito',sans-serif;
    font-size:18px; color:var(--bt-ink); background:transparent; padding:10px 0;
}
.bt-search-box button {
    background:var(--bt-purple); color:#fff; border:none;
    padding:12px 24px; border-radius:var(--bt-radius-xl);
    font-family:'Baloo 2',cursive; font-weight:700; font-size:15px; cursor:pointer;
}
.bt-search-close {
    position:absolute; top:-50px; right:0;
    background:none; border:none; color:#fff; font-size:32px; cursor:pointer;
}

/* Mobile menu */
.bt-mobile-menu {
    display:none; position:fixed; top:0; left:0; width:100%; height:100%;
    background:var(--bt-sky); z-index:9998;
    padding:80px 30px 30px; overflow-y:auto; flex-direction:column;
}
.bt-mobile-menu.open { display:flex; }
.bt-mobile-close { position:absolute; top:18px; right:20px; background:none; border:none; color:#fff; font-size:28px; cursor:pointer; }
.bt-mobile-nav { list-style:none; margin:0; padding:0; }
.bt-mobile-nav li a {
    display:block; color:#fff; font-family:'Baloo 2',cursive;
    font-size:20px; font-weight:700; padding:14px 0;
    border-bottom:1px solid rgba(255,255,255,0.1); text-decoration:none;
}
.bt-mobile-nav li ul { list-style:none; padding:0 0 0 16px; margin:0; display:block !important; }
.bt-mobile-nav li ul li a { font-size:15px; color:rgba(255,255,255,0.75); padding:10px 0; }

/* ============================================================
   BLOCK SHARED STYLES
   ============================================================ */
.bt-block { padding: 72px 0; }
.bt-block-inner { max-width:var(--bt-max-width); margin:0 auto; padding:0 40px; }
.bt-section-tag {
    display:inline-flex; align-items:center; gap:8px;
    font-size:11px; font-weight:800; letter-spacing:1.2px; text-transform:uppercase;
    color:var(--bt-purple); margin-bottom:10px;
}
.bt-section-tag::before { content:''; width:24px; height:2px; background:var(--bt-purple); border-radius:2px; }
.bt-section-tag.centered { justify-content:center; }
.bt-section-tag.centered::before { display:none; }
.bt-section-tag.centered::after { content:''; width:24px; height:2px; background:var(--bt-purple); border-radius:2px; }
.bt-block-title { font-size:clamp(24px,3vw,36px); color:var(--bt-ink); margin-bottom:10px; }
.bt-block-title span { color:var(--bt-purple); }
.bt-block-sub { font-size:16px; color:var(--bt-muted); max-width:540px; line-height:1.7; }

.bt-btn-primary {
    display:inline-flex; align-items:center; gap:8px;
    background:var(--bt-moon); color:var(--bt-sky);
    font-family:'Baloo 2',cursive; font-weight:700; font-size:16px;
    padding:14px 30px; border-radius:var(--bt-radius-xl); border:none;
    cursor:pointer; transition:transform 0.25s, box-shadow 0.25s; text-decoration:none;
}
.bt-btn-primary:hover { transform:translateY(-3px); box-shadow:0 8px 28px rgba(255,209,102,0.5); color:var(--bt-sky); }
.bt-btn-outline {
    display:inline-flex; align-items:center; gap:8px;
    background:transparent; color:#fff;
    font-family:'Baloo 2',cursive; font-weight:700; font-size:16px;
    padding:14px 30px; border-radius:var(--bt-radius-xl);
    border:2px solid rgba(255,255,255,0.4);
    cursor:pointer; transition:var(--bt-transition); text-decoration:none;
}
.bt-btn-outline:hover { border-color:#fff; background:rgba(255,255,255,0.1); color:#fff; }

/* ============================================================
   HERO BLOCK
   ============================================================ */
.bt-hero-block {
    background:linear-gradient(160deg, var(--bt-sky) 0%, var(--bt-sky2) 55%, #3D1A78 100%);
    min-height:540px; padding:70px 40px;
    display:flex; align-items:center; position:relative; overflow:hidden;
}
.bt-hero-inner {
    max-width:var(--bt-max-width); margin:0 auto; width:100%;
    display:flex; align-items:center; justify-content:space-between; gap:60px;
}
.bt-hero-stars { position:absolute; inset:0; pointer-events:none; }
.bt-star-dot { position:absolute; background:#fff; border-radius:50%; animation:bt-twinkle var(--d,2s) ease-in-out infinite var(--delay,0s); }
@keyframes bt-twinkle { 0%,100%{opacity:.2;transform:scale(1)} 50%{opacity:1;transform:scale(1.5)} }
.bt-hero-content { flex:1; max-width:580px; position:relative; z-index:2; }
.bt-hero-badge {
    display:inline-flex; align-items:center; gap:6px;
    background:rgba(255,209,102,0.15); border:1px solid rgba(255,209,102,0.4);
    color:var(--bt-moon); font-size:12px; font-weight:800;
    letter-spacing:0.8px; text-transform:uppercase;
    padding:5px 16px; border-radius:var(--bt-radius-xl); margin-bottom:20px;
}
.bt-hero-block h1 { color:#fff; margin-bottom:20px; }
.bt-hero-block h1 span { color:var(--bt-moon); }
.bt-hero-desc { color:rgba(255,255,255,0.78); font-size:17px; line-height:1.7; margin-bottom:36px; max-width:500px; }
.bt-hero-btns { display:flex; gap:14px; flex-wrap:wrap; }
.bt-hero-visual { flex:0 0 320px; position:relative; z-index:2; display:flex; align-items:center; justify-content:center; }
.bt-moon-circle {
    width:260px; height:260px; border-radius:50%;
    background:radial-gradient(circle at 35% 35%, #FFE9A0, #FFD166 60%, #F5A623);
    display:flex; align-items:center; justify-content:center; font-size:100px;
    animation:bt-float 6s ease-in-out infinite;
    box-shadow:0 0 60px rgba(255,209,102,0.35);
}
@keyframes bt-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-18px)} }
.bt-bubble {
    position:absolute; background:var(--bt-white); border-radius:var(--bt-radius-md);
    padding:10px 16px; font-family:'Baloo 2',cursive; font-size:13px; font-weight:700;
    color:var(--bt-ink); box-shadow:var(--bt-shadow-md); white-space:nowrap;
    display:flex; align-items:center; gap:6px;
}
.bt-bubble-dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
.bt-bubble-1 { top:10px; right:-20px; animation:bt-pop-in 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.3s both; }
.bt-bubble-2 { bottom:60px; right:-30px; animation:bt-pop-in 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.6s both; }
.bt-bubble-3 { bottom:10px; left:-20px; animation:bt-pop-in 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.9s both; }
@keyframes bt-pop-in { from{opacity:0;transform:scale(0.6)} to{opacity:1;transform:scale(1)} }

/* ============================================================
   STATS BLOCK
   ============================================================ */
.bt-stats-block { background:var(--bt-white); border-bottom:1px solid var(--bt-border); box-shadow:var(--bt-shadow-sm); padding:0; }
.bt-stats-inner { max-width:var(--bt-max-width); margin:0 auto; padding:28px 40px; display:flex; justify-content:space-around; align-items:center; flex-wrap:wrap; gap:20px; }
.bt-stat-item { text-align:center; }
.bt-stat-num { font-family:'Baloo 2',cursive; font-size:30px; font-weight:800; color:var(--bt-purple); display:block; }
.bt-stat-label { font-size:13px; color:var(--bt-muted); font-weight:600; display:block; }

/* ============================================================
   SEO BAR BLOCK
   ============================================================ */
.bt-seobar-block { background:var(--bt-lavender); border-bottom:2px solid rgba(123,47,190,0.15); }
.bt-seobar-inner { max-width:var(--bt-max-width); margin:0 auto; padding:12px 40px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.bt-seo-label { font-size:12px; font-weight:800; color:var(--bt-purple-dark); text-transform:uppercase; letter-spacing:0.5px; }
.bt-seo-tag { font-size:12px; font-weight:700; color:var(--bt-purple-dark); background:rgba(123,47,190,0.12); padding:4px 12px; border-radius:var(--bt-radius-xl); text-decoration:none; transition:var(--bt-transition); }
.bt-seo-tag:hover { background:var(--bt-purple); color:#fff; }

/* ============================================================
   CATEGORY GRID BLOCK
   ============================================================ */
.bt-catgrid-block { background:var(--bt-cloud); }
.bt-cat-grid { display:flex; flex-wrap:wrap; gap:14px; margin-top:32px; }
.bt-cat-chip {
    display:inline-flex; align-items:center; gap:10px;
    padding:12px 22px; border-radius:var(--bt-radius-xl);
    font-family:'Baloo 2',cursive; font-size:15px; font-weight:700;
    cursor:pointer; transition:transform 0.2s, box-shadow 0.2s;
    text-decoration:none; border:2px solid transparent;
}
.bt-cat-chip:hover { transform:translateY(-3px); box-shadow:var(--bt-shadow-md); }
.bt-chip-emoji { font-size:20px; }
.bt-chip-purple  { background:#EDE9FE; color:#5B21B6; }
.bt-chip-coral   { background:#FEE2E2; color:#B91C1C; }
.bt-chip-mint    { background:#D1FAE5; color:#065F46; }
.bt-chip-amber   { background:#FEF3C7; color:#92400E; }
.bt-chip-pink    { background:#FCE7F3; color:#9D174D; }
.bt-chip-blue    { background:#DBEAFE; color:#1E40AF; }
.bt-chip-orange  { background:#FFEDD5; color:#9A3412; }
.bt-chip-teal    { background:#CCFBF1; color:#134E4A; }

/* ============================================================
   STORY CARDS BLOCK
   ============================================================ */
.bt-stories-block { background:var(--bt-white); }
.bt-age-filter { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:36px; }
.bt-age-btn {
    padding:8px 20px; border-radius:var(--bt-radius-xl); border:2px solid var(--bt-border);
    font-family:'Baloo 2',cursive; font-size:14px; font-weight:700;
    cursor:pointer; background:var(--bt-white); color:var(--bt-ink);
    transition:var(--bt-transition); text-decoration:none; display:inline-block;
}
.bt-age-btn:hover, .bt-age-btn.active { background:var(--bt-purple); color:#fff; border-color:var(--bt-purple); }
.bt-story-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; }
.bt-story-card {
    border-radius:var(--bt-radius-lg); overflow:hidden;
    background:var(--bt-white); border:1px solid var(--bt-border);
    box-shadow:var(--bt-shadow-sm); transition:transform 0.3s, box-shadow 0.3s;
    display:flex; flex-direction:column; text-decoration:none; color:inherit;
    animation:bt-slide-up 0.5s ease both;
}
.bt-story-card:hover { transform:translateY(-8px); box-shadow:var(--bt-shadow-lg); color:inherit; }
@keyframes bt-slide-up { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:translateY(0)} }
.bt-card-thumb { width:100%; height:180px; overflow:hidden; position:relative; background:var(--bt-lavender); flex-shrink:0; }
.bt-card-thumb img { width:100%; height:100%; object-fit:cover; transition:transform 0.4s ease; }
.bt-story-card:hover .bt-card-thumb img { transform:scale(1.06); }
.bt-card-thumb-fallback { width:100%; height:100%; display:flex; align-items:center; justify-content:center; font-size:64px; }
.bt-card-age-badge { position:absolute; top:10px; right:10px; background:rgba(26,5,51,0.7); backdrop-filter:blur(4px); color:#fff; font-size:11px; font-weight:700; padding:3px 10px; border-radius:var(--bt-radius-xl); }
.bt-card-body { padding:16px 18px 18px; display:flex; flex-direction:column; flex:1; }
.bt-card-cat { font-size:11px; font-weight:800; letter-spacing:0.6px; text-transform:uppercase; color:var(--bt-purple); margin-bottom:5px; }
.bt-card-title { font-family:'Baloo 2',cursive; font-size:16px; font-weight:700; color:var(--bt-ink); line-height:1.35; margin-bottom:8px; }
.bt-card-excerpt { font-size:13px; color:var(--bt-muted); line-height:1.5; margin-bottom:12px; flex:1; }
.bt-card-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; }
.bt-card-read-time { font-size:11px; color:#9CA3AF; }
.bt-card-cta { font-family:'Baloo 2',cursive; font-size:12px; font-weight:700; color:var(--bt-purple); display:flex; align-items:center; gap:4px; }
.bt-card-cta::after { content:'→'; }

/* ============================================================
   WHY BLOCK
   ============================================================ */
.bt-why-block { background:var(--bt-sky); }
.bt-why-block .bt-section-tag { color:var(--bt-moon); }
.bt-why-block .bt-section-tag::before { background:var(--bt-moon); }
.bt-why-block .bt-block-title { color:#fff; }
.bt-why-block .bt-block-title span { color:var(--bt-moon); }
.bt-why-block .bt-block-sub { color:rgba(255,255,255,0.6); }
.bt-why-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; margin-top:48px; }
.bt-why-card { background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.12); border-radius:var(--bt-radius-lg); padding:36px 28px; transition:background 0.3s, transform 0.3s; }
.bt-why-card:hover { background:rgba(255,255,255,0.13); transform:translateY(-4px); }
.bt-why-icon { font-size:48px; display:block; margin-bottom:18px; }
.bt-why-card h3 { font-family:'Baloo 2',cursive; font-size:20px; font-weight:800; color:#fff; margin-bottom:10px; }
.bt-why-card p { font-size:14px; color:rgba(255,255,255,0.68); line-height:1.7; margin:0; }

/* ============================================================
   AGE BROWSER BLOCK
   ============================================================ */
.bt-agebrowser-block { background:var(--bt-white); }
.bt-age-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:16px; margin-top:36px; }
.bt-age-card {
    background:var(--bt-cloud); border-radius:var(--bt-radius-lg); padding:24px 10px;
    text-align:center; cursor:pointer; transition:all 0.3s;
    border:2px solid transparent; text-decoration:none; display:block;
}
.bt-age-card:hover { border-color:var(--bt-purple); transform:translateY(-5px); background:var(--bt-lavender); }
.bt-age-emoji { font-size:30px; display:block; margin-bottom:8px; }
.bt-age-num { font-family:'Baloo 2',cursive; font-size:38px; font-weight:800; color:var(--bt-purple); line-height:1; display:block; }
.bt-age-label { font-size:12px; color:var(--bt-muted); font-weight:700; margin-top:4px; display:block; }

/* ============================================================
   FAQ BLOCK
   ============================================================ */
.bt-faq-block { background:var(--bt-cloud); }
.bt-faq-block .bt-section-tag.centered { color:var(--bt-purple); }
.bt-faq-list { max-width:860px; margin:0 auto; display:flex; flex-direction:column; gap:14px; }
.bt-faq-item { background:var(--bt-white); border-radius:var(--bt-radius-lg); border:1px solid var(--bt-border); overflow:hidden; box-shadow:var(--bt-shadow-sm); transition:box-shadow 0.25s; }
.bt-faq-item:hover { box-shadow:var(--bt-shadow-md); }
.bt-faq-item.bt-faq-open { border-color:var(--bt-purple); box-shadow:0 0 0 2px rgba(123,47,190,0.15); }
.bt-faq-question { width:100%; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; background:none; border:none; cursor:pointer; text-align:left; font-family:'Baloo 2',cursive; font-size:17px; font-weight:700; color:var(--bt-ink); line-height:1.4; transition:color 0.2s, background 0.2s; }
.bt-faq-question:hover { color:var(--bt-purple); background:rgba(123,47,190,0.03); }
.bt-faq-item.bt-faq-open .bt-faq-question { color:var(--bt-purple); }
.bt-faq-q-text { flex:1; }
.bt-faq-icon { flex-shrink:0; width:32px; height:32px; border-radius:50%; background:var(--bt-lavender); color:var(--bt-purple); font-size:20px; line-height:32px; text-align:center; transition:background 0.25s, transform 0.35s, color 0.25s; display:flex; align-items:center; justify-content:center; }
.bt-faq-item.bt-faq-open .bt-faq-icon { background:var(--bt-purple); color:#fff; transform:rotate(45deg); }
.bt-faq-answer { max-height:0; overflow:hidden; transition:max-height 0.4s cubic-bezier(0.4,0,0.2,1); }
.bt-faq-answer:not([hidden]) { max-height:600px; }
.bt-faq-answer[hidden] { display:block !important; max-height:0; }
.bt-faq-answer-inner { padding:16px 24px 24px; font-size:15px; line-height:1.75; color:var(--bt-body); border-top:1px solid var(--bt-border); }
.bt-faq-answer-inner p { margin-bottom:0.8em; }
.bt-faq-answer-inner p:last-child { margin-bottom:0; }

/* ============================================================
   NEWSLETTER BLOCK
   ============================================================ */
.bt-newsletter-block { background:linear-gradient(135deg, var(--bt-purple), #4F46E5); text-align:center; }
.bt-newsletter-block .bt-block-title { color:#fff; }
.bt-newsletter-block .bt-block-sub { color:rgba(255,255,255,0.78); margin:0 auto 32px; }
.bt-nl-form { display:flex; gap:12px; max-width:500px; margin:0 auto; }
.bt-nl-input { flex:1; padding:14px 22px; border-radius:var(--bt-radius-xl); border:none; font-family:'Nunito',sans-serif; font-size:15px; outline:none; color:var(--bt-ink); }
.bt-nl-btn { background:var(--bt-moon); color:var(--bt-sky); font-family:'Baloo 2',cursive; font-weight:700; font-size:15px; padding:14px 26px; border-radius:var(--bt-radius-xl); border:none; cursor:pointer; transition:transform 0.2s, box-shadow 0.2s; white-space:nowrap; }
.bt-nl-btn:hover { transform:translateY(-2px); box-shadow:0 6px 20px rgba(255,209,102,0.5); }
.bt-nl-note { font-size:12px; color:rgba(255,255,255,0.45); margin-top:14px; }

/* ============================================================
   CUSTOM CONTENT BLOCK
   ============================================================ */
.bt-custom-block { background:var(--bt-white); }
.bt-custom-block .bt-block-sub { max-width:100%; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.bt-single-wrap { max-width:var(--bt-max-width); margin:0 auto; padding:48px 40px; display:grid; grid-template-columns:1fr 340px; gap:48px; align-items:start; }
.bt-single-cats { margin-bottom:12px; display:flex; gap:8px; flex-wrap:wrap; }
.bt-single-cat { font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:0.6px; color:var(--bt-purple); background:var(--bt-lavender); padding:4px 14px; border-radius:var(--bt-radius-xl); text-decoration:none; transition:var(--bt-transition); }
.bt-single-cat:hover { background:var(--bt-purple); color:#fff; }
.bt-single-title { font-size:clamp(24px,4vw,42px); color:var(--bt-ink); margin-bottom:16px; line-height:1.2; }
.bt-single-meta { display:flex; align-items:center; gap:16px; font-size:14px; color:var(--bt-muted); flex-wrap:wrap; margin-bottom:24px; }
.bt-single-featured { width:100%; border-radius:var(--bt-radius-lg); overflow:hidden; margin-bottom:36px; box-shadow:var(--bt-shadow-md); }
.bt-single-featured img { width:100%; height:auto; display:block; }
.bt-single-content { font-size:17px; line-height:1.85; color:#374151; }
.bt-single-content p { margin-bottom:1.4em; }
.bt-single-content h2,.bt-single-content h3 { margin-top:1.8em; margin-bottom:0.6em; }
.bt-single-content blockquote { border-left:4px solid var(--bt-purple); padding:16px 20px; background:var(--bt-lavender); border-radius:0 var(--bt-radius-md) var(--bt-radius-md) 0; margin:2em 0; font-style:italic; color:var(--bt-purple-dark); }
.bt-post-nav { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-top:48px; padding-top:32px; border-top:1px solid var(--bt-border); }
.bt-post-nav-item { background:var(--bt-lavender); border-radius:var(--bt-radius-md); padding:16px 20px; text-decoration:none; transition:var(--bt-transition); }
.bt-post-nav-item:hover { background:var(--bt-purple); }
.bt-post-nav-item:hover .bt-nav-label,.bt-post-nav-item:hover .bt-nav-title { color:#fff; }
.bt-nav-label { font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:0.6px; color:var(--bt-purple); margin-bottom:4px; display:block; }
.bt-nav-title { font-family:'Baloo 2',cursive; font-size:15px; font-weight:700; color:var(--bt-ink); line-height:1.3; }
.bt-post-nav-next { text-align:right; }
.bt-post-tags { margin-top:28px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.bt-tag { font-size:12px; font-weight:700; padding:4px 14px; border-radius:var(--bt-radius-xl); background:var(--bt-cloud); color:var(--bt-ink); text-decoration:none; transition:var(--bt-transition); }
.bt-tag:hover { background:var(--bt-purple); color:#fff; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.bt-sidebar { position:sticky; top:90px; }
.bt-widget { background:var(--bt-white); border:1px solid var(--bt-border); border-radius:var(--bt-radius-lg); padding:24px; margin-bottom:24px; }
.bt-widget-title { font-family:'Baloo 2',cursive; font-size:18px; font-weight:800; color:var(--bt-ink); margin-bottom:16px; padding-bottom:12px; border-bottom:2px solid var(--bt-lavender); }
.bt-sidebar-story { display:flex; gap:12px; align-items:flex-start; margin-bottom:14px; padding-bottom:14px; border-bottom:1px solid var(--bt-border); text-decoration:none; color:inherit; transition:var(--bt-transition); }
.bt-sidebar-story:last-child { margin-bottom:0; padding-bottom:0; border-bottom:none; }
.bt-sidebar-story:hover .bt-sidebar-story-title { color:var(--bt-purple); }
.bt-sidebar-thumb { width:70px; height:55px; border-radius:var(--bt-radius-sm); overflow:hidden; flex-shrink:0; background:var(--bt-lavender); }
.bt-sidebar-thumb img { width:100%; height:100%; object-fit:cover; }
.bt-sidebar-story-title { font-family:'Baloo 2',cursive; font-size:14px; font-weight:700; color:var(--bt-ink); line-height:1.3; margin-bottom:3px; }
.bt-sidebar-story-cat { font-size:11px; color:var(--bt-muted); font-weight:600; }
.bt-sidebar-cats { list-style:none; margin:0; padding:0; }
.bt-sidebar-cats li { margin-bottom:8px; }
.bt-sidebar-cats li a { display:flex; justify-content:space-between; align-items:center; font-size:14px; font-weight:600; color:var(--bt-ink); text-decoration:none; padding:8px 12px; border-radius:var(--bt-radius-sm); transition:var(--bt-transition); }
.bt-sidebar-cats li a:hover { background:var(--bt-lavender); color:var(--bt-purple); }
.bt-cat-count { font-size:12px; color:var(--bt-muted); background:var(--bt-cloud); padding:2px 8px; border-radius:var(--bt-radius-xl); }

/* ============================================================
   ARCHIVE / SEARCH
   ============================================================ */
.bt-archive-wrap { max-width:var(--bt-max-width); margin:0 auto; padding:48px 40px; }
.bt-archive-header { background:linear-gradient(135deg,var(--bt-sky),var(--bt-sky2)); border-radius:var(--bt-radius-lg); padding:48px 40px; margin-bottom:48px; position:relative; overflow:hidden; }
.bt-archive-header h1 { color:#fff; margin-bottom:10px; }
.bt-archive-header p { color:rgba(255,255,255,0.7); font-size:16px; margin:0; }
.bt-archive-header .bt-moon-deco { position:absolute; right:40px; top:50%; transform:translateY(-50%); font-size:80px; opacity:0.3; }
.bt-archive-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:24px; margin-bottom:48px; }
.bt-pagination { display:flex; justify-content:center; align-items:center; gap:8px; padding:20px 0; }
.bt-pagination a,.bt-pagination span { display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:var(--bt-radius-sm); font-family:'Baloo 2',cursive; font-size:14px; font-weight:700; text-decoration:none; transition:var(--bt-transition); border:2px solid var(--bt-border); color:var(--bt-ink); background:var(--bt-white); }
.bt-pagination a:hover,.bt-pagination span.current { background:var(--bt-purple); color:#fff; border-color:var(--bt-purple); }
.bt-pagination .prev,.bt-pagination .next { width:auto; padding:0 16px; }
.bt-no-results { text-align:center; padding:80px 40px; }
.bt-no-results-icon { font-size:80px; margin-bottom:20px; display:block; }

/* ============================================================
   PAGE TEMPLATE
   ============================================================ */
.bt-page-wrap { max-width:var(--bt-max-width); margin:0 auto; padding:48px 40px; }
.bt-page-hero { background:linear-gradient(135deg,var(--bt-sky),var(--bt-sky2)); border-radius:var(--bt-radius-lg); padding:56px 48px; margin-bottom:48px; text-align:center; position:relative; overflow:hidden; }
.bt-page-hero h1 { color:#fff; margin-bottom:12px; }
.bt-page-hero p { color:rgba(255,255,255,0.7); font-size:17px; max-width:540px; margin:0 auto; }
.bt-page-hero::before { content:'🌙'; position:absolute; font-size:120px; opacity:0.08; right:40px; top:50%; transform:translateY(-50%); }
.bt-page-content { background:var(--bt-white); border-radius:var(--bt-radius-lg); padding:48px; border:1px solid var(--bt-border); font-size:17px; line-height:1.85; color:var(--bt-body); }
.bt-page-content h2 { color:var(--bt-ink); margin-top:1.6em; }
.bt-page-content h2:first-child { margin-top:0; }

/* ============================================================
   404
   ============================================================ */
.bt-404-wrap { max-width:640px; margin:80px auto; padding:0 40px; text-align:center; }
.bt-404-icon { font-size:100px; display:block; margin-bottom:24px; animation:bt-float 4s ease-in-out infinite; }
.bt-404-wrap h1 { font-size:clamp(60px,10vw,120px); color:var(--bt-purple); line-height:1; margin-bottom:8px; }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.bt-breadcrumbs { max-width:var(--bt-max-width); margin:0 auto; padding:16px 40px; font-size:13px; color:var(--bt-muted); }
.bt-breadcrumbs a { color:var(--bt-purple); text-decoration:none; }
.bt-sep { margin:0 6px; }

/* ============================================================
   FOOTER
   ============================================================ */
#bt-footer { background:var(--bt-sky); color:rgba(255,255,255,0.7); padding:60px 0 0; }
.bt-footer-inner { max-width:var(--bt-max-width); margin:0 auto; padding:0 40px; }
.bt-footer-grid { display:grid; grid-template-columns:2.5fr 1fr 1fr 1fr; gap:48px; padding-bottom:48px; border-bottom:1px solid rgba(255,255,255,0.1); }
.bt-footer-brand p { font-size:14px; color:rgba(255,255,255,0.5); line-height:1.7; max-width:300px; margin-top:14px; }
.bt-footer-col h4 { font-family:'Baloo 2',cursive; font-size:15px; font-weight:800; color:#fff; margin-bottom:16px; }
.bt-footer-col ul { list-style:none; margin:0; padding:0; }
.bt-footer-col ul li { margin-bottom:10px; }
.bt-footer-col ul li a { font-size:14px; color:rgba(255,255,255,0.5); text-decoration:none; transition:var(--bt-transition); }
.bt-footer-col ul li a:hover { color:var(--bt-moon); }
.bt-footer-bottom { max-width:var(--bt-max-width); margin:0 auto; padding:20px 40px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:10px; }
.bt-footer-bottom p { font-size:12px; color:rgba(255,255,255,0.35); margin:0; }
.bt-footer-nav { display:flex; gap:20px; }
.bt-footer-nav a { font-size:12px; color:rgba(255,255,255,0.35); text-decoration:none; }
.bt-footer-nav a:hover { color:var(--bt-moon); }

/* ============================================================
   SCROLL TO TOP
   ============================================================ */
.bt-scroll-top { position:fixed; bottom:30px; right:30px; width:48px; height:48px; background:var(--bt-purple); color:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:20px; cursor:pointer; border:none; box-shadow:0 4px 16px rgba(123,47,190,0.4); transition:var(--bt-transition); opacity:0; pointer-events:none; z-index:999; text-decoration:none; }
.bt-scroll-top.visible { opacity:1; pointer-events:all; }
.bt-scroll-top:hover { background:var(--bt-purple-dark); transform:translateY(-3px); color:#fff; }

/* ============================================================
   SEARCH FORM
   ============================================================ */
.bt-search-form { display:flex; align-items:center; gap:8px; }
.bt-search-input { flex:1; padding:10px 16px; border:1px solid var(--bt-border); border-radius:var(--bt-radius-xl); font-family:'Nunito',sans-serif; font-size:14px; outline:none; color:var(--bt-ink); transition:var(--bt-transition); }
.bt-search-input:focus { border-color:var(--bt-purple); box-shadow:0 0 0 3px rgba(123,47,190,0.12); }
.bt-search-form button { background:var(--bt-purple); color:#fff; border:none; padding:10px 16px; border-radius:var(--bt-radius-xl); cursor:pointer; font-size:15px; transition:var(--bt-transition); }
.bt-search-form button:hover { background:var(--bt-purple-dark); }

/* ============================================================
   COMMENTS
   ============================================================ */
.bt-comments-wrap { margin-top:48px; padding-top:40px; border-top:1px solid var(--bt-border); }
.comment-list { list-style:none; padding:0; margin:0; }
.comment { margin-bottom:24px; }
.comment-body { background:var(--bt-cloud); border-radius:var(--bt-radius-md); padding:20px 24px; }
.comment-author { font-weight:700; color:var(--bt-ink); font-size:15px; }
.comment-meta { font-size:12px; color:var(--bt-muted); margin-bottom:10px; }
.comment-form input[type="text"],.comment-form input[type="email"],.comment-form textarea { width:100%; padding:12px 16px; border:1px solid var(--bt-border); border-radius:var(--bt-radius-sm); font-family:'Nunito',sans-serif; font-size:15px; color:var(--bt-ink); outline:none; transition:var(--bt-transition); margin-bottom:16px; background:var(--bt-white); }
.comment-form input:focus,.comment-form textarea:focus { border-color:var(--bt-purple); box-shadow:0 0 0 3px rgba(123,47,190,0.12); }
.comment-form textarea { min-height:140px; resize:vertical; }
.comment-form .submit { background:var(--bt-purple); color:#fff; font-family:'Baloo 2',cursive; font-weight:700; font-size:15px; padding:12px 30px; border:none; border-radius:var(--bt-radius-xl); cursor:pointer; transition:var(--bt-transition); }
.comment-form .submit:hover { background:var(--bt-purple-dark); transform:translateY(-2px); }

/* ============================================================
   BLOCK EDITOR STYLES
   ============================================================ */
.editor-styles-wrapper { font-family:'Nunito',sans-serif !important; background:var(--bt-cream) !important; }
.editor-styles-wrapper h1,.editor-styles-wrapper h2,.editor-styles-wrapper h3 { font-family:'Baloo 2',cursive !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width:1280px) {
    .bt-story-grid { grid-template-columns:repeat(3,1fr); }
    .bt-archive-grid { grid-template-columns:repeat(3,1fr); }
    .bt-age-grid { grid-template-columns:repeat(4,1fr); }
}
@media (max-width:1024px) {
    .bt-hero-inner { flex-direction:column; text-align:center; }
    .bt-hero-visual { display:none; }
    .bt-hero-content { max-width:100%; }
    .bt-hero-btns { justify-content:center; }
    .bt-why-grid { grid-template-columns:repeat(2,1fr); }
    .bt-single-wrap { grid-template-columns:1fr; }
    .bt-sidebar { position:static; }
    .bt-footer-grid { grid-template-columns:1fr 1fr; gap:32px; }
}
@media (max-width:768px) {
    .bt-navbar-inner { padding:0 20px; }
    #bt-primary-nav { display:none; }
    .bt-mobile-toggle { display:block; }
    .bt-block { padding:48px 0; }
    .bt-block-inner { padding:0 20px; }
    .bt-story-grid { grid-template-columns:repeat(2,1fr); }
    .bt-archive-grid { grid-template-columns:repeat(2,1fr); }
    .bt-age-grid { grid-template-columns:repeat(4,1fr); }
    .bt-why-grid { grid-template-columns:1fr; }
    .bt-single-wrap { padding:24px 20px; }
    .bt-archive-wrap { padding:24px 20px; }
    .bt-page-wrap { padding:24px 20px; }
    .bt-page-content { padding:28px 24px; }
    .bt-footer-grid { grid-template-columns:1fr; gap:24px; }
    .bt-footer-inner { padding:0 20px; }
    .bt-footer-bottom { padding:20px; flex-direction:column; text-align:center; }
    .bt-hero-block { padding:48px 20px; min-height:auto; }
    .bt-nl-form { flex-direction:column; }
    .bt-post-nav { grid-template-columns:1fr; }
    .bt-faq-question { font-size:15px; padding:16px 18px; }
    .bt-faq-answer-inner { padding:12px 18px 18px; }
    .bt-breadcrumbs { padding:12px 20px; }
    .bt-stats-inner { padding:20px; }
    .bt-seobar-inner { padding:10px 20px; }
}
@media (max-width:480px) {
    .bt-story-grid { grid-template-columns:1fr; }
    .bt-archive-grid { grid-template-columns:1fr; }
    .bt-age-grid { grid-template-columns:repeat(3,1fr); }
}

.screen-reader-text { border:0; clip:rect(1px,1px,1px,1px); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute; width:1px; }
