/* =========================================
   FIRST TECH – THEME TOGGLE + GLOBAL THEME
   File: theme-toggle.css
   Notes:
   - Theme is controlled by: html[data-theme="dark|light"]
========================================= */

/* -------------------------
   Toggle container (header)
-------------------------- */
.ft-theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
}

/* Light header still stays dark, but toggle looks cleaner */
html[data-theme="light"] .ft-theme-toggle {
    border-color: rgba(255, 255, 255, .18);
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .08));
}

/* -------------------------
   Toggle buttons
-------------------------- */
.ft-theme-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    transition: background-color .18s ease, box-shadow .18s ease, transform .15s ease;
}

.ft-theme-btn:hover {
    background: rgba(255, 255, 255, .10);
}

.ft-theme-btn:active {
    transform: translate3d(0, 1px, 0);
}

.ft-theme-btn[data-theme="dark"] {
    color: #ffffff;
}

/* moon */
.ft-theme-btn[data-theme="light"] {
    color: #FFD43B;
}

/* sun */

/* Active state (more visible) */
.ft-theme-btn.is-active {
    background: linear-gradient(135deg, rgba(88, 150, 255, .45), rgba(47, 109, 255, .45));
    box-shadow: 0 0 0 1px rgba(122, 183, 255, .55), 0 8px 18px rgba(66, 133, 244, .35);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}

/* Mobile compact sizing (DO NOT change header height) */
@media (max-width: 768px) {
    .ft-theme-toggle {
        gap: 4px;
        padding: 4px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
    }

    .ft-theme-btn {
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
}

/* =========================================
   GLOBAL THEME SWITCH
   Goal:
   - Dark mode: full site dark.
   - Light mode: header + footer stay dark, content becomes a white card.
========================================= */

/* Dark is the default */
html[data-theme="dark"] body,
html:not([data-theme="light"]) body {
    background: #0B111C !important;
    background: linear-gradient(0deg, rgba(11, 17, 28, 1) 0%, rgba(23, 41, 55, 1) 100%) !important;
    color: rgba(255, 255, 255, .92);
}

/* Light mode: keep outside area dark */
html[data-theme="light"] body {
    color: rgba(0, 0, 0, .92);
}

/* The content wrapper stays transparent/dark */
html[data-theme="light"] .ct-site-content {
    background: transparent !important;
}

/* The real inner container becomes the white card */
html[data-theme="light"] .ct-site-content .ct-container {
    background: #ffffff !important;
    border-radius: 26px !important;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .14), 0 6px 16px rgba(0, 0, 0, .08) !important;
    max-width: 1180px !important;
    margin: 26px auto !important;
    padding: clamp(22px, 3vw, 44px) !important;
}

/* Force readable text colors inside the card */
html[data-theme="light"] .ct-site-content .ct-container,
html[data-theme="light"] .ct-site-content .ct-container p,
html[data-theme="light"] .ct-site-content .ct-container li,
html[data-theme="light"] .ct-site-content .ct-container span,
html[data-theme="light"] .ct-site-content .ct-container h2,
html[data-theme="light"] .ct-site-content .ct-container h3,
html[data-theme="light"] .ct-site-content .ct-container h4,
html[data-theme="light"] .ct-site-content .ct-container h5,
html[data-theme="light"] .ct-site-content .ct-container h6 {
    color: rgba(0, 0, 0, .92);
}

/* Links inside the card */
html[data-theme="light"] .ct-site-content .ct-container a {
    color: #0B63F6;
}

html[data-theme="light"] .ct-site-content .ct-container a:hover {
    color: #084FC4;
}

/* Mobile */
@media (max-width: 768px) {
    html[data-theme="light"] .ct-site-content .ct-container {
        max-width: 100% !important;
        margin: 16px 14px !important;
        border-radius: 20px !important;
        padding: 18px !important;
    }
}

/* Optional: if Blocksy adds a white background on main containers, force it off */
html[data-theme="light"] #content,
html[data-theme="light"] .site-content,
html[data-theme="light"] main,
html[data-theme="light"] .content-area {
    background: transparent !important;
}

/* Keep HERO readable in Light theme (avoid global text overrides) */
html[data-theme="light"] .ft-hero,
html[data-theme="light"] .ft-hero * {
    color: rgba(255, 255, 255, .96) !important;
}

html[data-theme="light"] .ft-hero .ft-btn--ghost {
    color: rgba(255, 255, 255, .96) !important;
}


/* =========================
   Exclusions: do NOT force light content colors inside the hero
   ========================= */
html[data-theme="light"] .ct-site-content .ct-container .ft-hero,
html[data-theme="light"] .ct-site-content .ct-container .ft-hero * {
    color: inherit;
    /* real colors are defined in style.css with !important */
}