/* --- Premium Aligned Brilliant Styling Sheet Config --- */
:root {
    --white: #ffffff;
    --black: #111111;
    --dark-grey: #222222;
    --light-grey: #f4f5f6;
    --border-color: #e5e7eb;
    --muted-text: #52525b;
    
    --brilliant-blue: #2563eb;
    --brilliant-green: #16a34a;
    --brilliant-orange: #ea580c;
    --brilliant-red: #dc2626;
    --brilliant-yellow: #ca8a04;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--white); color: var(--black); line-height: 1.65; -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
.hidden { display: none !important; }

/* --- Top Navigation Bar --- */
.brilliant-navbar {
    height: 64px; background-color: var(--white); border-bottom: 2px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center; padding: 0 2rem;
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
}
.nav-left { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
/* Add this to your stylesheet */
.nav-left-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* --- KiteLearn Brand Logo Core Sizing --- */
.logo-kite-svg {
    width: 26px;
    height: 26px;
    color: var(--brilliant-blue); /* Inherits your clean branding blue accent */
    display: inline-block;
    vertical-align: middle;
    transition: transform 0.2s ease;
}

/* Subtle hover interaction to make the interface feel responsive and premium */
.nav-left:hover .logo-kite-svg {
    transform: rotate(5deg) translateY(-1px);
}

.logo-text {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
    color: var(--black);
}

/* --- Premium Clean Brand Footer Styles --- */
.app-brand-footer {
    border-top: 2px solid var(--border-color);
    background-color: var(--white);
    margin-top: 8rem;
    padding: 4rem 2rem 2rem 2rem;
    width: 100%;
}

.footer-inner-container {
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 3rem;
}

.footer-brand-column {
    max-width: 360px;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-logo-text {
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--black);
}

.footer-brand-tagline {
    font-size: 0.9rem;
    color: var(--muted-text);
    line-height: 1.6;
}

.footer-links-column {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links-column h4 {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--black);
    margin-bottom: 0.5rem;
}

.footer-links-column a {
    font-size: 0.9rem;
    color: var(--muted-text);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.1s ease;
}

.footer-links-column a:hover {
    color: var(--brilliant-blue);
}

.footer-copyright-bar {
    max-width: 1060px;
    margin: 3rem auto 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--muted-text);
    font-weight: 500;
}

/* Responsive Grid Adaptation for Footer Layout Elements */
@media (max-width: 768px) {
    .app-brand-footer {
        margin-top: 5rem;
        padding-top: 3rem;
    }
    .footer-inner-container {
        flex-direction: column;
        gap: 2rem;
    }
    .footer-brand-column {
        max-width: 100%;
    }
}

/* Fixed & Centered Modal Backdrop Layer */
#certificate-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.6); /* Premium dark slate overlay */
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

/* Hide utility state */
#certificate-modal-backdrop.hidden {
    display: none !important;
}

/* Beautiful Certificate Card Design Frame */
.certificate-card {
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    box-sizing: border-box;
}

/* Inner decorative border line */
.cert-inner-border {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 3rem 2rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Close action marker */
.cert-close-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}
.cert-close-btn:hover {
    color: #334155;
}

/* Decorative top emblem icon */
.cert-badge {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Header Text elements styling formatting mapping rules */
.cert-subtitle {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.cert-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.02em;
    text-align: center;
}

.cert-description {
    font-size: 0.975rem;
    color: #64748b;
    line-height: 1.6;
    text-align: center;
    max-width: 440px;
    margin: 0 auto 2rem auto;
}

.cert-divider {
    width: 60px;
    height: 2px;
    background-color: #cbd5e1;
    margin-bottom: 2rem;
}

/* Clean generic footer configuration modules layout */
.cert-footer {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 400px;
}

.cert-footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-footer-value {
    font-size: 1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.25rem;
}

.cert-footer-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 500;
}
.logo-symbol { font-size: 1.6rem; color: var(--brilliant-blue); font-weight: 900; }
.logo-text { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.nav-right { display: flex; align-items: center; gap: 0.5rem; }

/* Mobile Menu Hamburg Icon Style */
.mobile-menu-trigger {
    background: none; border: none; font-size: 1.5rem; font-weight: bold;
    cursor: pointer; color: var(--black); padding: 0.25rem 0.5rem; display: none;
}

/* --- Premium Control Buttons UI System --- */
.brilliant-btn-primary {
    background-color: var(--black); color: var(--white); border: none; padding: 0.85rem 2rem;
    font-size: 1rem; font-weight: 700; border-radius: 12px; cursor: pointer; transition: 0.1s;
    border-bottom: 4px solid #000000; white-space: nowrap;
}
.brilliant-btn-primary:hover { background-color: var(--dark-grey); transform: translateY(-1px); }
.brilliant-btn-primary:active { transform: translateY(2px); border-bottom-width: 0px; }

.brilliant-btn-secondary {
    background-color: var(--white); color: var(--black); border: 2px solid var(--border-color);
    padding: 0.85rem 2rem; font-size: 1rem; font-weight: 700; border-radius: 12px; cursor: pointer;
    border-bottom: 4px solid var(--border-color); transition: 0.1s; white-space: nowrap;
}
.brilliant-btn-secondary:hover { border-color: var(--black); background-color: var(--light-grey); }
.brilliant-btn-secondary:active { transform: translateY(2px); border-bottom-width: 0px; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; border-radius: 8px; }
.full-width-btn { width: 100%; margin-top: 1rem; }

/* --- STATE 1 & 2 CONTENT ARCHITECTURE LAYOUTS --- */
.view-panel { margin-top: 64px; padding-bottom: 6rem; width: 100%; }
.brilliant-hero { text-align: center; max-width: 760px; margin: 5rem auto 3rem auto; padding: 0 1.5rem; }
.hero-badge { color: var(--brilliant-blue); font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.brilliant-hero h1 { font-size: 3.4rem; font-weight: 900; line-height: 1.15; letter-spacing: -0.04em; margin-bottom: 1.5rem; }
.highlight-text { color: var(--brilliant-blue); }
.hero-description { font-size: 1.2rem; color: var(--muted-text); margin-bottom: 2rem; }

.curriculum-view-section, .dashboard-hub-container { max-width: 1060px; margin: 4rem auto 0 auto; padding: 0 1.5rem; width: 100%; }
.section-title { font-size: 1.6rem; font-weight: 900; margin-bottom: 2rem; text-align: center; }

/* --- DYNAMIC RESUME BANNER ELEMENT --- */
.resume-learning-card {
    background-color: var(--white); border: 2px solid var(--black); border-bottom-width: 6px;
    padding: 2rem; border-radius: 16px; margin-bottom: 3.5rem; display: flex;
    justify-content: space-between; align-items: center; gap: 2rem; width: 100%;
}
.resume-text-left h3 { font-size: 1.4rem; font-weight: 900; margin-bottom: 0.3rem; }
.resume-text-left p { color: var(--muted-text); font-size: 1rem; }

.dashboard-header-block { margin-bottom: 2rem; }
.dashboard-header-block h2 { font-size: 1.75rem; font-weight: 900; letter-spacing: -0.02em; }
.dashboard-header-block p { color: var(--muted-text); font-size: 1.05rem; margin-top: 0.25rem; }

/* --- CARD PATH ELEMENT STRUCTURE GRID --- */
.brilliant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.5rem; width: 100%; }
.brilliant-card {
    background: var(--white); border: 2px solid var(--border-color); padding: 2.2rem 2rem;
    border-radius: 16px; cursor: pointer; transition: 0.15s ease-out; border-bottom: 5px solid var(--border-color);
    display: flex; flex-direction: column; justify-content: space-between;
}
.brilliant-card:hover { border-color: var(--black); transform: translateY(-2px); }
.brilliant-card h3 { font-size: 1.25rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: -0.02em; }
.brilliant-card p { font-size: 0.95rem; color: var(--muted-text); line-height: 1.55; margin-bottom: 1.5rem; }
.card-meta-row { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.chapter-badge { font-size: 0.8rem; font-weight: 700; color: var(--black); background-color: var(--light-grey); padding: 0.25rem 0.65rem; border-radius: 6px; }

.mod-blue:hover { border-bottom-color: var(--brilliant-blue); }
.mod-green:hover { border-bottom-color: var(--brilliant-green); }
.mod-orange:hover { border-bottom-color: var(--brilliant-orange); }
.mod-red:hover { border-bottom-color: var(--brilliant-red); }
.mod-yellow:hover { border-bottom-color: var(--brilliant-yellow); }

/* --- STATE 3: THE FOCUS TEXTBOOK ENVIRONMENT WORKSPACE --- */
.platform-container { display: flex; margin-top: 64px; height: calc(100vh - 64px); position: relative; width: 100%; }
.sidebar-guide { width: 310px; background-color: var(--white); border-right: 2px solid var(--border-color); overflow-y: auto; padding: 2rem 1.2rem; flex-shrink: 0; }
.sidebar-meta-context { margin-bottom: 2rem; border-bottom: 2px solid var(--border-color); padding-bottom: 1.2rem; }
.back-link-btn { background: none; border: none; color: var(--muted-text); font-weight: 700; font-size: 0.85rem; cursor: pointer; margin-bottom: 0.8rem; }
.back-link-btn:hover { color: var(--black); }
.active-mod-lbl { font-size: 1.1rem; font-weight: 900; letter-spacing: -0.01em; color: var(--black); }

.sidebar-lessons-ul { list-style: none; }
.sidebar-lessons-li {
    font-size: 0.95rem; padding: 0.6rem 0.8rem; border-radius: 8px; cursor: pointer;
    color: var(--muted-text); margin-top: 0.25rem; font-weight: 600; transition: 0.1s;
}
.sidebar-lessons-li:hover { background-color: var(--light-grey); color: var(--black); }
.sidebar-lessons-li.node-active { background-color: var(--light-grey); color: var(--brilliant-blue); font-weight: 700; border-left: 4px solid var(--brilliant-blue); border-radius: 0 8px 8px 0; }

.reading-viewport-frame { flex: 1; overflow-y: auto; padding: 4rem 3rem; display: flex; justify-content: center; background-color: var(--white); width: 100%; }
.reading-max-width { width: 100%; max-width: 80%; }

/* Textbook Reading Typography Content Styling Scales */
.lesson-super { font-size: 0.8rem; font-weight: 800; color: var(--brilliant-blue); text-transform: uppercase; letter-spacing: 0.05em; }
.lesson-title-heading { font-size: 2.4rem; font-weight: 900; line-height: 1.2; margin: 0.4rem 0 1.2rem 0; letter-spacing: -0.03em; }
.lesson-meta-bar { display: flex; gap: 1rem; font-size: 0.9rem; color: var(--muted-text); margin-bottom: 3rem; border-bottom: 2px solid var(--border-color); padding-bottom: 1rem; }
.reader-p { font-size: 1.15rem; color: var(--black); margin-bottom: 1.5rem; line-height: 1.75; }

/* Interactive Option Quiz Box Blocks */
.reader-quiz-container { background-color: var(--white); border: 2px solid var(--black); padding: 2rem; border-radius: 16px; margin: 3rem 0; border-bottom-width: 6px; }
.quiz-question-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 1.2rem; }
.quiz-choice-row {
    background: var(--white); border: 2px solid var(--border-color); padding: 1rem 1.2rem;
    border-radius: 12px; margin-top: 0.6rem; cursor: pointer; font-weight: 600; font-size: 1rem;
    border-bottom-width: 4px; transition: 0.1s;
}
.quiz-choice-row:hover { border-color: var(--black); background-color: var(--light-grey); }
.reading-pagination-row { display: flex; justify-content: space-between; margin-top: 5rem; padding-top: 2rem; border-top: 2px solid var(--border-color); gap: 1rem; }

/* --- ONBOARDING DIALOG WINDOW MODAL OVERLAYS --- */
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 1rem; }
.modal-box { background: var(--white); padding: 3rem 2rem; border-radius: 16px; width: 100%; max-width: 440px; position: relative; border: 2px solid var(--black); border-bottom-width: 6px; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--muted-text); }
.modal-box h3 { font-size: 1.6rem; font-weight: 900; margin-bottom: 0.5rem; }
.modal-sub { font-size: 0.95rem; color: var(--muted-text); margin-bottom: 1.5rem; }
.modal-box input { width: 100%; padding: 0.85rem 1rem; border-radius: 10px; border: 2px solid var(--border-color); margin-bottom: 1rem; font-size: 1rem; outline: none; background: var(--light-grey); }
.modal-box input:focus { border-color: var(--black); background: var(--white); }
.center-text { text-align: center; }
.badge-icon { font-size: 3rem; margin-bottom: 1rem; }

/* --- MOBILE & TABLET RESPONSIVE COMPONENT ENGINE MEDIA QUERIES --- */
@media (max-width: 900px) {
    .brilliant-navbar { padding: 0 1rem; }
    .logo-text { font-size: 1.1rem; }
    .mobile-menu-trigger { display: inline-block; }

    .brilliant-hero h1 { font-size: 2.2rem; }
    .brilliant-hero p { font-size: 1rem; }
    
    .resume-learning-card { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.5rem; }
    .resume-learning-card button { width: 100%; }

    /* Convert Sidebar Guide panel spine view into a Slide-Out Mobile Overlay Drawer */
    .sidebar-guide {
        position: absolute; top: 0; left: 0; height: 100%; width: 280px;
        z-index: 990; transform: translateX(-100%); transition: transform 0.25s ease-in-out;
        box-shadow: 4px 0 15px rgba(0,0,0,0.05);
    }
    .sidebar-guide.drawer-open { transform: translateX(0); }

    /* Dark Mobile Curtain Shader Trigger */
    .sidebar-overlay-curtain {
        position: absolute; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.3); z-index: 950;
    }

    .reading-viewport-frame { padding: 2.5rem 1.25rem; }
    .lesson-title-heading { font-size: 1.85rem; }
    .reader-p { font-size: 1.05rem; }
    .reader-quiz-container { padding: 1.25rem; }
}
