/* assets/css/extended/custom.css - FINAL 100% WORKING TORONTO 12:35 AM VERSION */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800&family=Lato:wght@400;500;600&display=swap');

/* === ROOT VARIABLES === */
:root {
    --ojakee-teal: #00D4C8;
    --ojakee-teal-dark: #00b8a3;
    --primary: #357ABD;
    --accent: #F88C70;
    --accent-dark: #F46A50;
    --secondary: #446C8F;
    --soft-purple: #A385E0;

    /* RAINBOW SERIES PASTELS */
    --series-sleep: #E3F2FD;
    --series-feeding: #FFF0F5;
    --series-play: #E8F5E8;
    --series-tantrum: #FFF8E1;
    --series-screen: #F3E5F5;
    --series-winter: #E1F5FE;

    /* NEW SERIES COLORS */
    --series-data-driven-parenting-analytics: #E0F2FF;
    --series-financial-literacy-for-families: #FFE5F0;
    --series-child-development-psychology: #E0FFE0;
    --series-digital-wellness-screen-time: #F0E6FF;
    --series-ai-technology-in-education: #FFF0CC;

    /* PaperMod core - REQUIRED */
    --primary-color: #357ABD;
    --text-color: #2d3748;
    --background-color: #FAFBFC;
    --theme: var(--background-color);
    --entry: #ffffff;
    --content: var(--text-color);
    --secondary: #555555;
    --tertiary: #dddddd;
    --border: #dddddd;
    --card-icon-bg: #f1f5f9;

    /* Layout */
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 212, 200, 0.18);
    --transition: all 0.3s ease;
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === DARK MODE === */
:root[data-theme="dark"],
body[data-theme="dark"] {
    --background-color: #0f172a;
    --theme: #0f172a;
    --entry: #1e293b;
    --text-color: #e2e8f0;
    --content: #e2e8f0;
    --primary: #e2e8f0;
    --secondary: #94a3b8;
    --tertiary: #334155;
    --border: #334155;
    --card-icon-bg: #2d3748;
    --series-sleep: #1e3a5f;
    --series-feeding: #4a1c3d;
    --series-play: #1e4028;
    --series-tantrum: #4a3a1c;
    --series-screen: #3a1c4a;
    --series-winter: #1c3a4a;

    /* NEW SERIES DARK MODE COLORS */
    --series-data-driven-parenting-analytics: #1b2f4c;
    --series-financial-literacy-for-families: #4c2b3a;
    --series-child-development-psychology: #2b4c2b;
    --series-digital-wellness-screen-time: #402f4c;
    --series-ai-technology-in-education: #4c3f2b;
}

/* === BASE === */
body {
    background: var(--theme);
    color: var(--text-color);
    font-family: 'Lato', sans-serif;
    line-height: 1.7;
    padding-bottom: 80px;
}

/* === NAVBAR === */
.navbar,
.header {
    background: var(--entry);
    border-bottom: 5px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--accent), var(--ojakee-teal)) 1;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    padding: 0.9rem 1.4rem;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* === LOGO === */
.site-name,
.logo {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--ojakee-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 8px 12px;
    border-radius: 12px;
    transition: var(--transition-slow);
}

.site-name:hover,
.logo:hover {
    transform: scale(1.05);
}

/* === MENU LINKS === */
.nav a,
.menu-item a {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    padding: 0.8rem 1.2rem !important;
    border-radius: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.nav a:hover,
.menu-item a:hover {
    background: linear-gradient(135deg, rgba(0, 212, 200, 0.15), rgba(248, 140, 112, 0.15));
    color: var(--ojakee-teal);
}

/* TRY OUR APP BUTTON — PERFECTLY FLUSH WITH MENU, TORONTO 12:38 AM FINAL */
/* TRY OUR APP BUTTON — TEXT BASELINE LOCKED, TORONTO 12:40 AM FINAL */
a[href="https://ojakee.com"],
.menu-item a[href="https://ojakee.com"],
.nav a[href="https://ojakee.com"] {
    all: unset !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    line-height: 1 !important;

    /* FORCE SAME VERTICAL ALIGNMENT AS TEXT */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 40px !important;
    padding: 0 24px !important;
    margin: 0 6px !important;

    background: linear-gradient(135deg, var(--ojakee-teal), var(--ojakee-teal-dark)) !important;
    color: white !important;
    border-radius: 50px !important;
    box-shadow: 0 6px 20px rgba(0, 212, 200, 0.35) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;

    /* THE MAGIC LINE — locks text to baseline */
    vertical-align: middle !important;
    position: relative !important;
    top: 0 !important;
}

/* Hover stays flush */
a[href="https://ojakee.com"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 12px 28px rgba(0, 212, 200, 0.45) !important;
}

/* Force navbar to treat it like plain text links */
.navbar,
.header .menu,
.nav {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 16px !important;
    flex-wrap: wrap !important;
}

/* === RAINBOW POST CARDS === */
.post-entry,
.post-single {
    background: var(--entry);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 40px;
    border-top: 6px solid var(--ojakee-teal);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Series auto-color */
.post-entry[data-series="sleep"],
.post-entry .post-title a[href*="/series/sleep"] {
    border-top-color: #4A90E2;
    background: linear-gradient(135deg, #f8fbff, var(--series-sleep));
}

.post-entry[data-series="feeding"] {
    border-top-color: #FF6B9D;
    background: linear-gradient(135deg, #fffafc, var(--series-feeding));
}

.post-entry[data-series="play"] {
    border-top-color: #7ED321;
    background: linear-gradient(135deg, #fafffa, var(--series-play));
}

.post-entry[data-series="tantrum"] {
    border-top-color: #FFB800;
    background: linear-gradient(135deg, #fffdf5, var(--series-tantrum));
}

.post-entry[data-series="screen"] {
    border-top-color: #9B59B6;
    background: linear-gradient(135deg, #fbfaff, var(--series-screen));
}

.post-entry[data-series="winter"] {
    border-top-color: var(--ojakee-teal);
    background: linear-gradient(135deg, #f5fffe, var(--series-winter));
}

/* NEW SERIES RULES FOR INDIVIDUAL POSTS (if data-series is available) - MAX SPECIFICITY */
.post-entry[data-series="data-driven-parenting-analytics"] {
    border-top-color: #2196F3 !important;
    background: linear-gradient(135deg, #f0f9ff, var(--series-data-driven-parenting-analytics)) !important;
}

.post-entry[data-series="financial-literacy-for-families"] {
    border-top-color: #E91E63 !important;
    background: linear-gradient(135deg, #fdf0ff, var(--series-financial-literacy-for-families)) !important;
}

.post-entry[data-series="child-development-psychology"] {
    border-top-color: #4CAF50 !important;
    background: linear-gradient(135deg, #f0fff0, var(--series-child-development-psychology)) !important;
}

.post-entry[data-series="digital-wellness-screen-time"] {
    border-top-color: #9C27B0 !important;
    background: linear-gradient(135deg, #f8f0ff, var(--series-digital-wellness-screen-time)) !important;
}

.post-entry[data-series="ai-technology-in-education"] {
    border-top-color: #FF9800 !important;
    background: linear-gradient(135deg, #fff8f0, var(--series-ai-technology-in-education)) !important;
}

/* Fallback: Add color classes to be more flexible */
.post-entry.series-data-driven-parenting-analytics,
.post-entry.type-data-driven-parenting-analytics,
div[data-series="data-driven-parenting-analytics"] {
    border-top-color: #2196F3 !important;
    background: linear-gradient(135deg, #f0f9ff, var(--series-data-driven-parenting-analytics)) !important;
}

.post-entry.series-financial-literacy-for-families,
.post-entry.type-financial-literacy-for-families,
div[data-series="financial-literacy-for-families"] {
    border-top-color: #E91E63 !important;
    background: linear-gradient(135deg, #fdf0ff, var(--series-financial-literacy-for-families)) !important;
}

.post-entry.series-child-development-psychology,
.post-entry.type-child-development-psychology,
div[data-series="child-development-psychology"] {
    border-top-color: #4CAF50 !important;
    background: linear-gradient(135deg, #f0fff0, var(--series-child-development-psychology)) !important;
}

.post-entry.series-digital-wellness-screen-time,
.post-entry.type-digital-wellness-screen-time,
div[data-series="digital-wellness-screen-time"] {
    border-top-color: #9C27B0 !important;
    background: linear-gradient(135deg, #f8f0ff, var(--series-digital-wellness-screen-time)) !important;
}

.post-entry.series-ai-technology-in-education,
.post-entry.type-ai-technology-in-education,
div[data-series="ai-technology-in-education"] {
    border-top-color: #FF9800 !important;
    background: linear-gradient(135deg, #fff8f0, var(--series-ai-technology-in-education)) !important;
}

/* NEW SERIES RULES FOR SERIES LIST PAGES (when viewing all posts in a series) */
.taxonomy-series-data-driven-parenting-analytics .post-entry,
.list-series-data-driven-parenting-analytics .post-entry,
body[data-page-series="data-driven-parenting-analytics"] .post-entry,
body[class*="data-driven-parenting-analytics"] .post-entry {
    border-top-color: #2196F3 !important;
    background: linear-gradient(135deg, #f0f9ff, var(--series-data-driven-parenting-analytics)) !important;
}

.taxonomy-series-financial-literacy-for-families .post-entry,
.list-series-financial-literacy-for-families .post-entry,
body[data-page-series="financial-literacy-for-families"] .post-entry,
body[class*="financial-literacy-for-families"] .post-entry {
    border-top-color: #E91E63 !important;
    background: linear-gradient(135deg, #fdf0ff, var(--series-financial-literacy-for-families)) !important;
}

.taxonomy-series-child-development-psychology .post-entry,
.list-series-child-development-psychology .post-entry,
body[data-page-series="child-development-psychology"] .post-entry,
body[class*="child-development-psychology"] .post-entry {
    border-top-color: #4CAF50 !important;
    background: linear-gradient(135deg, #f0fff0, var(--series-child-development-psychology)) !important;
}

.taxonomy-series-digital-wellness-screen-time .post-entry,
.list-series-digital-wellness-screen-time .post-entry,
body[data-page-series="digital-wellness-screen-time"] .post-entry,
body[class*="digital-wellness-screen-time"] .post-entry {
    border-top-color: #9C27B0 !important;
    background: linear-gradient(135deg, #f8f0ff, var(--series-digital-wellness-screen-time)) !important;
}

.taxonomy-series-ai-technology-in-education .post-entry,
.list-series-ai-technology-in-education .post-entry,
body[data-page-series="ai-technology-in-education"] .post-entry,
body[class*="ai-technology-in-education"] .post-entry {
    border-top-color: #FF9800 !important;
    background: linear-gradient(135deg, #fff8f0, var(--series-ai-technology-in-education)) !important;
}

.post-entry:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

/* === POLLS === */
.ojakee-poll {
    background: linear-gradient(135deg, #fff8f8, #f0fffd);
    border: 5px solid var(--ojakee-teal);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    margin: 50px 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.ojakee-poll::before {
    content: "POLL";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ojakee-teal);
    color: white;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 4px 18px;
    border-radius: 999px;
}

.ojakee-poll h3 {
    color: var(--ojakee-teal);
    font-family: 'Nunito', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.ojakee-poll iframe {
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 212, 200, 0.2);
    min-height: 460px;
    width: 100%;
}

/* Series poll ribbon match */
.post-entry[data-series="sleep"]~.ojakee-poll {
    border-color: #4A90E2;
    background: linear-gradient(135deg, #f8fbff, #e6f3ff);
}

.post-entry[data-series="sleep"]~.ojakee-poll::before {
    background: #4A90E2;
}

/* === MOBILE SHARE + PROGRESS + BACK-TO-TOP === */
@media (max-width: 768px) {
    .share-buttons {
        position: fixed !important;
        left: 12px;
        bottom: 20px;
        z-index: 998;
        background: var(--entry);
        padding-padding: 12px 8px;
        border-radius: 50px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(12px);
    }
}

#reading-progress {
    background: linear-gradient(90deg, var(--ojakee-teal), var(--accent)) !important;
    height: 6px !important;
}

#back-to-top {
    background-color: var(--ojakee-teal);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 212, 200, 0.4);
}

#back-to-top:hover {
    transform: translateY(-4px);
    background-color: var(--accent);
}

/* === FINAL TOUCH === */
::selection {
    background: var(--ojakee-teal);
    color: white;
}

a {
    color: var(--primary-color);
}

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