/* =========================================================
   SEFTON HOMEPAGE DARK MODE + HEADER TOGGLE v85
   Public homepage only. Light mode unchanged.
   ========================================================= */

/* -----------------------------
   DARK MODE: STORY / VALUES
   ----------------------------- */
html[data-theme="dark"] .classic-story,
html[data-theme="dark"] .story-premium,
html[data-theme="dark"] .classic-vision,
html[data-theme="dark"] .classic-values,
html[data-theme="dark"] .classic-serve{
    background:#07151c !important;
    color:#eef5f7 !important;
}

html[data-theme="dark"] .story-premium-copy,
html[data-theme="dark"] .story-premium-points article,
html[data-theme="dark"] .classic-story .story-points article,
html[data-theme="dark"] .classic-vision .feature-card,
html[data-theme="dark"] .classic-values .value-card,
html[data-theme="dark"] .classic-serve .credentials{
    background:#0d2028 !important;
    border-color:#2c434d !important;
    color:#eef5f7 !important;
    box-shadow:0 14px 32px rgba(0,0,0,.18) !important;
}

html[data-theme="dark"] .story-premium-points article.story-point-gold,
html[data-theme="dark"] .classic-vision .feature-card.gold-border{
    border-color:#b6903d !important;
}

html[data-theme="dark"] .story-premium-copy h2,
html[data-theme="dark"] .story-premium-points h3,
html[data-theme="dark"] .classic-story h2,
html[data-theme="dark"] .classic-story h3,
html[data-theme="dark"] .classic-vision h2,
html[data-theme="dark"] .classic-vision h3,
html[data-theme="dark"] .classic-values h2,
html[data-theme="dark"] .classic-values h3,
html[data-theme="dark"] .classic-serve h2,
html[data-theme="dark"] .classic-serve h3{
    color:#f3f8f9 !important;
}

html[data-theme="dark"] .story-premium-copy p,
html[data-theme="dark"] .story-premium-points p,
html[data-theme="dark"] .story-premium-points small,
html[data-theme="dark"] .classic-story p,
html[data-theme="dark"] .classic-vision p,
html[data-theme="dark"] .classic-values p,
html[data-theme="dark"] .classic-serve p{
    color:#aabac0 !important;
}

html[data-theme="dark"] .story-premium .eyebrow,
html[data-theme="dark"] .classic-story .eyebrow,
html[data-theme="dark"] .classic-vision .eyebrow,
html[data-theme="dark"] .classic-values .eyebrow,
html[data-theme="dark"] .classic-serve .eyebrow{
    color:#e1bc60 !important;
}

html[data-theme="dark"] .story-point-icon,
html[data-theme="dark"] .square-icon,
html[data-theme="dark"] .service-emoji{
    background:#142a34 !important;
    border-color:#3b5059 !important;
    color:#e7edf0 !important;
}

html[data-theme="dark"] .story-point-icon svg,
html[data-theme="dark"] .square-icon svg,
html[data-theme="dark"] .service-emoji svg{
    stroke:currentColor !important;
}

/* Make vision/mission cards readable on mobile */
html[data-theme="dark"] .classic-vision .feature-card{
    min-height:auto !important;
}

html[data-theme="dark"] .classic-vision .feature-card h3{
    opacity:1 !important;
}

html[data-theme="dark"] .classic-vision .feature-card p{
    opacity:1 !important;
}

/* Story cards that were staying cream/white */
html[data-theme="dark"] .story-premium-points article,
html[data-theme="dark"] .classic-story .story-points article{
    min-height:auto !important;
}

html[data-theme="dark"] .story-premium-points article h3,
html[data-theme="dark"] .classic-story .story-points article h3{
    opacity:1 !important;
}

html[data-theme="dark"] .story-premium-points article p,
html[data-theme="dark"] .classic-story .story-points article p{
    opacity:1 !important;
}

/* -----------------------------
   PUBLIC HEADER THEME BUTTON
   ----------------------------- */
header .navbar > .sefton-theme-toggle,
header .topbar > .sefton-theme-toggle,
header .top-actions > .sefton-theme-toggle{
    position:static !important;
    top:auto !important;
    right:auto !important;
    bottom:auto !important;
    left:auto !important;
    width:42px !important;
    height:42px !important;
    flex:0 0 42px !important;
    margin:0 10px !important;
    z-index:auto !important;
    border-radius:12px !important;
    box-shadow:none !important;
}

/* On the public navbar keep it directly before the logo/brand. */
header .navbar > .sefton-theme-toggle{
    order:-1;
}

@media(max-width:850px){
    header .navbar{
        display:flex !important;
        align-items:center !important;
    }

    header .navbar > .sefton-theme-toggle{
        width:40px !important;
        height:40px !important;
        flex-basis:40px !important;
        margin-left:10px !important;
        margin-right:8px !important;
    }
}
