/* --- 1. GLOBAL SETTINGS & COLORS --- */
:root {
    --primary-color: #b094c5; 
    --primary-light: #e6e1f0; 
    --primary-dark: #8e75a3;
    --dark-grey: #2c2c2c;     
    --light-grey: #f4f4f4;
    --white: #ffffff;
    --black: #1a1a1a;
    --font-header: 'Nunito', sans-serif;
    --font-body: 'Nunito Sans', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: var(--font-body); color: var(--dark-grey); 
    line-height: 1.6; overflow-x: hidden; width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }

/* The base background colors */
.bg-light { background-color: var(--light-grey); }

/* --- 2. TOP BAR & HEADER --- */
.top-bar, .footer-bottom { 
    background: var(--dark-grey); color: #e0e0e0; 
    padding: 10px 0; font-size: 0.85rem; 
    border-bottom: 3px solid var(--primary-light); 
}

.flex-bar { display: flex; justify-content: space-between; align-items: center; }

header { 
    background: var(--white); box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    position: sticky; top: 0; z-index: 1000; width: 100%;
    transition: background-color 0.3s ease;
}

.container { max-width: 1150px; margin: 0 auto; padding: 0 20px; }

.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; }

.logo { display: flex; align-items: center; gap: 15px; }
.logo img { height: 65px !important; width: auto !important; transition: filter 0.3s ease; }

.logo h1, .sub-logo { 
    font-family: var(--font-header); color: var(--primary-color); 
    text-transform: capitalize; font-weight: 800;
}
.logo h1 { font-size: 1.4rem; line-height: 1.1; }
.sub-logo { font-size: 1.1rem; letter-spacing: 1px; }

/* --- navigation --- */
.nav-links { display: flex; gap: 25px; align-items: center; list-style: none; }

.nav-item { 
    position: relative; font-weight: 700; color: var(--black); 
    padding: 5px 0; display: inline-block; cursor: pointer;
}

.nav-item::after {
    content: ''; position: absolute; width: 0; height: 3px;
    bottom: 0; left: 50%; background: var(--primary-color);
    transition: all 0.3s ease; transform: translateX(-50%);
}

.nav-item:hover::after { width: 100%; }
.nav-item:hover { color: var(--primary-color); }

.btn-apply, .btn-white { 
    background: var(--primary-light); color: var(--primary-dark) !important; 
    padding: 10px 22px; border-radius: 30px; font-weight: 800; 
    border: 2px solid var(--primary-color); display: inline-block;
    transition: 0.3s ease;
}
.btn-apply:hover, .btn-white:hover { background: var(--primary-color); color: var(--white) !important; }

.btn-border {
    background: transparent; color: var(--primary-color) !important;
    padding: 10px 22px; border-radius: 30px; font-weight: 800;
    border: 2px solid var(--primary-color); display: inline-block;
    transition: 0.3s ease;
}
.btn-border:hover { background: var(--primary-color); color: var(--white) !important; }

.hamburger { display: none; }

/* --- theme toggle--- */
#theme-toggle {
    background: var(--primary-light) !important;
    color: var(--primary-dark) !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    transition: all 0.3s ease !important;
    margin-left: 10px !important;
}
#theme-toggle:hover {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    transform: scale(1.1) !important;
}

/* --- hero  section--- */
.hero-section { position: relative; height: 550px; overflow: hidden; background: #000; transition: filter 0.3s ease;}

.slide { 
    position: absolute; width: 100%; height: 100%; 
    background-size: cover; background-position: center; 
    opacity: 0; transition: opacity 1s ease-in-out; z-index: 1;
}
.slide.active { opacity: 1; }

.hero-text-layer { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 5; background: rgba(0,0,0,0.4); 
    display: flex; align-items: center; justify-content: center; text-align: center;
}

.hero-content { color: white; max-width: 800px; padding: 0 20px; }
.hero-content h2 { font-size: 3.5rem; margin-bottom: 15px; font-family: var(--font-header); }
.hero-content p { margin-bottom: 35px; font-size: 1.1rem; } 

.prev-btn, .next-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1); color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 50px; height: 50px; border-radius: 50%;
    cursor: pointer; z-index: 20; 
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease;
    outline: none; 
}
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

@media (hover: hover) and (pointer: fine) {
    .prev-btn:hover, .next-btn:hover {
        background: var(--white); color: var(--primary-dark);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.8); 
        transform: translateY(-50%) scale(1.1);
    }
}

.slider-dots {
    position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 12px; z-index: 20;
}
.dot {
    width: 10px; height: 10px; background: transparent;
    border: 2px solid var(--white); border-radius: 50%;
    cursor: pointer; transition: 0.3s ease;
}
.dot.active { background: var(--white); transform: scale(1.2); }

/* --- ABOUT, EVENTS, & ADMISSIONS --- */
.section-padding { padding: 80px 0; }
.grid-2-col { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: center; }
.about-image img { width: 100%; height: 450px; object-fit: cover; border-radius: 20px; transition: filter 0.3s ease; }

.calendar-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 40px; border-bottom: 2px solid var(--light-grey); padding-bottom: 15px;
}
.date-time { font-family: var(--font-header); font-weight: 800; color: var(--primary-color); font-size: 1.1rem; }

.text-link { display: inline-block; position: relative; text-decoration: none; color: inherit; }
.text-link h3 { position: relative; display: inline-block; padding-bottom: 5px; }
.text-link h3::after {
    content: ''; position: absolute; width: 0; height: 3px; bottom: 0; left: 50%;
    background: var(--primary-color); transition: all 0.3s ease; transform: translateX(-50%);
}
.text-link:hover h3::after { width: 100%; }

.events-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.event-card {
    background: var(--white); padding: 40px 30px; border-radius: 20px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); transition: all 0.4s ease; border-top: 8px solid #ddd;
}
.event-card:hover { transform: translateY(-20px); box-shadow: 0 20px 40px rgba(176, 148, 197, 0.2); }
.event-card.highlight { border-top: 8px solid var(--primary-color); }

.cta-section { text-align: center; padding: 60px 20px; background: var(--white); }
.cta-buttons { display: flex; justify-content: center; gap: 20px; margin-top: 30px; flex-wrap: wrap; }

/* --- FOOTER --- */
#contact { background-color: var(--light-grey); padding: 60px 0 20px 0; margin-top: 80px; color: var(--dark-grey); transition: background-color 0.3s ease, color 0.3s ease; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.map-placeholder {
    background-color: #e0e0e0; height: 150px; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; color: var(--primary-dark);
    font-weight: 700; margin-bottom: 15px; border: 2px dashed #ccc;
}
.footer-bottom { 
    background: transparent; color: var(--dark-grey); border-top: 1px solid #d1d1d1; 
    margin-top: 40px; padding-top: 20px; border-bottom: none; transition: background-color 0.3s ease, color 0.3s ease;
}

/* --- LEARNING AREAS SECTION --- */
.curriculum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.curriculum-card {
    background: var(--white); padding: 30px; border-radius: 20px;
    border-left: 5px solid var(--primary-color); box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease, color 0.3s ease;
}
.curriculum-card h3 {
    color: var(--primary-dark); margin-bottom: 20px; font-family: var(--font-header);
    border-bottom: 1px solid var(--primary-light); padding-bottom: 10px;
}
.curriculum-list { list-style: none; }
.curriculum-list li {
    padding: 1px 0; border-bottom: 1px solid #f9f9f9; font-size: 0.95rem;
    display: flex; align-items: flex-start; gap: 10px; transition: border-color 0.3s ease;
}
.curriculum-list li i { color: var(--primary-color); margin-top: 5px; font-size: 0.8rem; }

.info-note {
    margin-top: 40px; background: var(--primary-light); padding: 20px;
    border-radius: 15px; text-align: center; font-weight: 700; color: var(--primary-dark);
}

/* --- SCROLL PROGRESS CIRCLE thingy --- */
.progress-wrap {
    position: fixed; right: 20px; bottom: 20px; height: 46px; width: 46px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; z-index: 999;
    background: var(--white); box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    opacity: 0; visibility: hidden; transform: translateY(15px); transition: all 0.3s ease;
}
.progress-wrap.show { opacity: 1; visibility: visible; transform: translateY(0); }
.progress-wrap svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.progress-wrap svg circle.track { fill: none; stroke: var(--primary-light); stroke-width: 4; }
.progress-wrap svg circle.progress {
    fill: none; stroke: var(--primary-color); stroke-width: 4;
    transition: stroke-dashoffset 0.1s linear;
}
.progress-wrap i { color: var(--primary-dark); font-size: 1.2rem; z-index: 1; }
.progress-wrap:hover { transform: translateY(-5px); box-shadow: 0 6px 20px rgba(176, 148, 197, 0.4); }


@media screen and (max-width: 768px) {
    .flex-bar { flex-direction: column; gap: 8px; text-align: center; }
    .top-bar { font-size: 0.75rem; padding: 10px; }
    .logo img { height: 45px !important; }
    .logo h1 { font-size: 1.1rem; }
    .sub-logo { font-size: 0.9rem; }
    .hamburger { display: block; font-size: 1.5rem; color: var(--primary-color); cursor: pointer; }
    .nav-links { 
        display: none; flex-direction: column; position: absolute; top: 100%; left: 0; 
        width: 100%; background: var(--white); padding: 20px; box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
        text-align: center; gap: 15px; z-index: 1001;
    }
    .nav-links.active { display: flex; }
    .hero-content h2 { font-size: 2.2rem; line-height: 1.1; }
    .hero-content p { font-size: 1rem; }
    .prev-btn, .next-btn { width: 35px; height: 35px; font-size: 1rem; }
    .prev-btn { left: 10px; } .next-btn { right: 10px; }
    .grid-2-col { grid-template-columns: 1fr; text-align: center; }
    .about-image img { height: auto; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .calendar-header { flex-direction: column; text-align: center; align-items: center; gap: 10px; }
}

/* =========================================
               SAFE DARK MODE 
   ========================================= */

[data-theme="dark"] body { background-color: #121212; color: #e0e0e0; }
[data-theme="dark"] header { background-color: #1a1a1a; border-bottom: 1px solid #333; }
[data-theme="dark"] .nav-item { color: #e0e0e0; }
[data-theme="dark"] .logo img { filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3)) brightness(1.1); }
[data-theme="dark"] .about-image img, [data-theme="dark"] .hero-section { filter: brightness(0.85); }
[data-theme="dark"] #theme-toggle { background: #333 !important; color: #ffd700 !important; }

/* Main Content*/
[data-theme="dark"] .event-card, 
[data-theme="dark"] .curriculum-card { 
    background-color: #1e1e1e; color: #e0e0e0; border-top-color: #333;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
}
[data-theme="dark"] .event-card.highlight { border-top-color: var(--primary-color); }
[data-theme="dark"] .curriculum-card h3, [data-theme="dark"] .event-card h3 { color: var(--primary-color); }
[data-theme="dark"] .curriculum-list li { border-bottom-color: #333; }
[data-theme="dark"] .bg-light { background-color: #0a0a0a !important; }

/* Sections */
[data-theme="dark"] .cta-section { background-color: #121212; }
[data-theme="dark"] .info-note { background-color: #2a2035; color: #fff; }

/* Top Bar & Footer Fixes */
[data-theme="dark"] .top-bar { background-color: #000; border-bottom: 3px solid var(--primary-dark); }
[data-theme="dark"] #contact { background-color: #1a1a1a; color: #b0b0b0; }
[data-theme="dark"] .footer-bottom { border-top: 1px solid #333; background: transparent; color: #ffffff; }

/* Mobile Menu Dark Mode */
@media screen and (max-width: 768px) {
    [data-theme="dark"] .nav-links { background-color: #1a1a1a; }
}

/* --- PORTAL LOGIN PAGE --- */
.login-container {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    border-top: 8px solid var(--primary-color);
    transition: background-color 0.3s ease;
}
.login-toggle {
    display: flex;
    background: var(--light-grey);
    border-radius: 30px;
    margin-bottom: 25px;
    overflow: hidden;
}
.toggle-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 700;
    color: var(--dark-grey);
    transition: 0.3s;
}
.toggle-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-radius: 30px;
}
.input-group { margin-bottom: 20px; }
.input-group label {
    display: block; margin-bottom: 8px; font-weight: 700; font-size: 0.9rem;
}
.input-group input {
    width: 100%; padding: 12px 15px; border: 2px solid var(--light-grey);
    border-radius: 10px; outline: none; transition: border-color 0.3s;
    background: var(--white); color: var(--dark-grey);
}
.input-group input:focus { border-color: var(--primary-color); }

/* Portal Dark Mode Overrides */
[data-theme="dark"] .login-container { background: #1e1e1e; border-top-color: var(--primary-dark); }
[data-theme="dark"] .login-toggle { background: #2c2c2c; }
[data-theme="dark"] .toggle-btn { color: #e0e0e0; }
[data-theme="dark"] .input-group input { background: #121212; border-color: #333; color: #fff; }
[data-theme="dark"] .input-group input:focus { border-color: var(--primary-color); }

/* --- DASHBOARD STYLES --- */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.dash-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-top: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}
.dash-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.dash-icon {
    width: 50px; height: 50px;
    border-radius: 10px;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 20px;
}
.dash-card h3 { margin-bottom: 10px; color: var(--dark-grey); }
.dash-card p { margin-bottom: 20px; font-size: 0.95rem; }


[data-theme="dark"] .dash-card { background: #1e1e1e; border-top-color: var(--primary-dark); }
[data-theme="dark"] .dash-card h3 { color: #fff; }
[data-theme="dark"] .dash-icon { filter: brightness(0.8); }

#dynamic-join-btn {
    padding: 15px 40px;
    font-size: 1.3rem;
    font-weight: 800;
    border-radius: 50px;
    display: inline-block;
}

/*Animation pf the about text*/
.hero-content .motto-highlight {
    position: relative;
    display: inline-block;
    color: inherit; 
    transition: color 0.3s ease;
    text-decoration: none !important; 
}

.hero-content .motto-highlight::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%); 
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* The Hover State: Change color and grow the line */
.hero-content .motto-highlight:hover {
    color: var(--primary-color) !important;
}

/*Underline animation completion 80% is the sweetspot right now*/
.hero-content .motto-highlight:hover::after {
    width: 80%;

    /*Size of the about text*/
.about-text p{
    font-weight: 400 !important;
}