:root {
    --primary: #1a1a1a;
    --secondary: #4a4a4a;
    --light: #fafafa;
    --white: #ffffff;
    --border: #e5e5e5;
    --hover: #288fe9;
    --button-dark: #2c3e50;
    --button-gradient: linear-gradient(135deg, #b8b8b8, #d4d4d4, #e8e8e8, #d4d4d4, #b8b8b8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lexend', sans-serif;
    background: var(--white);
    color: var(--primary);
    line-height: 1.6;
}


/* Hero */
.hero-section {
    background: var(--white);
    padding: 5rem 0 4rem;
    border-bottom: 1px solid var(--border);
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--primary);
    letter-spacing: -1px;
    font-family: 'Comfortaa', cursive;
    min-height: 80px;
}

.hero-section p {
    font-size: 1.05rem;
    color: var(--secondary);
    line-height: 1.7;
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Lexend', sans-serif;
    min-height: 120px;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.typewriter-text {
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    display: inline-block;
    animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary);
    }
}

.hero-description {
    opacity: 0;
}

.hero-description.show {
    opacity: 1;
}

/* Category Tabs */
.category-tabs {
    color: var(--secondary);
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;       /* Center horizontally */
    justify-content: center;   /* Center vertically */
    text-align: center;        /* Center text */
    background: #ffe3e3;    
    padding: 40px 0;
}

.tab-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem 1rem;
    margin: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s ease;
}

.tab-card:hover{
    border: 5px solid white;
    transform: translateY(-2px);
}

.category-tabs .row > div:nth-child(1) .tab-card:hover {
    background-color:rgb(255, 210, 210);
}
.category-tabs .row > div:nth-child(2) .tab-card:hover {
    background-color:rgb(255, 248, 210);
}
.category-tabs .row > div:nth-child(3) .tab-card:hover {
    background-color:rgb(210, 255, 236);
}
.category-tabs .row > div:nth-child(4) .tab-card:hover {
    background-color:rgb(210, 255, 248);
}
.category-tabs .row > div:nth-child(5) .tab-card:hover {
    background-color:rgb(223, 210, 255);
}
.category-tabs .row > div:nth-child(6) .tab-card:hover {
    background-color: #fffdc1;
}

/* .tab-card.active {
    color: var(--white);
} */

.tab-card i {
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
    transition: color 0.4s ease;
}

.tab-card p {
    margin: 0;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--primary);
    transition: color 0.4s ease;
}

.tab-card.active p {
    color: var(--white);
}



/* Individual tab colors */
.category-tabs .row > div:nth-child(1) .tab-card {color: #FF4757; }
.category-tabs .row > div:nth-child(2) .tab-card {color: #f0bb00; }
.category-tabs .row > div:nth-child(3) .tab-card {color: #27ae60; }
.category-tabs .row > div:nth-child(4) .tab-card {color: #3498db; }
.category-tabs .row > div:nth-child(5) .tab-card {color: #9b59b6; }
.category-tabs .row > div:nth-child(6) .tab-card {color: #e67e22; }


.category-tabs .row > div:nth-child(1) .tab-card.active {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #ffffff;
}

.category-tabs .row > div:nth-child(2) .tab-card.active {
    background: #f39c12;
    border-color: #f39c12;
    color: #ffffff;
}

.category-tabs .row > div:nth-child(3) .tab-card.active {
    background: #27ae60;
    border-color: #27ae60;
    color: #ffffff;
}

.category-tabs .row > div:nth-child(4) .tab-card.active {
    background: #3498db;
    border-color: #3498db;
    color: #ffffff;
}

.category-tabs .row > div:nth-child(5) .tab-card.active {
    background: #9b59b6;
    border-color: #9b59b6;
    color: #ffffff;
}

.category-tabs .row > div:nth-child(6) .tab-card.active {
    background: #e67e22;
    border-color: #e67e22;
    color: #ffffff;
}

/* Category Grid */
.category-grid {
    padding: 3rem 0;
    background: var(--light);
}

.category-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: all 0.2s;
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.category-card h5 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-family: 'Montserrat', sans-serif;
}

.category-card h5 i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.category-card select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 1.2rem;
    background: var(--white);
    color: var(--primary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.category-card select:focus {
    outline: none;
    border-color: var(--primary);
}

.info-bar {
    display: flex;
    justify-content: space-between;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
}

.info-item {
    text-align: center;
    flex: 1;
}

.info-item small {
    display: block;
    color: var(--secondary);
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

        .badge-update {
            background: linear-gradient(135deg, #00b894, #00cec9);
            color: white;
            font-size: 'Lexend', sans-serif;
            padding: 0.3rem 0.8rem;
            border-radius: 5px;
            font-size: 0.75rem;
        }

        .badge-premium {
            background: linear-gradient(135deg, #fdcb6e, #e17055);
            color: white;
            font-size: 'Lexend', sans-serif;
            padding: 0.3rem 0.8rem;
            border-radius: 5px;
            font-size: 0.75rem;
        }

        .badge-status {
            background: linear-gradient(135deg, #6c5ce7, #a29bfe);
            color: white;
            font-size: 'Lexend', sans-serif;
            padding: 0.3rem 0.8rem;
            border-radius: 5px;
            font-size: 0.75rem;
        }

/* About */
.about-section {
    background: var(--white);
    padding: 5rem 0;
    border-bottom: 1px solid var(--border);
}

.about-section h2 {
    color: var(--primary);
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
    font-family: 'Comfortaa', cursive;
}

.about-section p {
    color: var(--secondary);
    line-height: 1.7;
    font-family: 'Lexend', sans-serif;
}

.about-section .list-unstyled li {
    color: var(--secondary);
    margin-bottom: 0.8rem;
}

.about-section .list-unstyled li i {
    color: var(--primary);
    margin-right: 0.8rem;
}

/* Contact */
.contact-section {
    background: var(--light);
    padding: 5rem 0;
}

.contact-section h2 {
    color: var(--primary);
    font-weight: 700;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    font-family: 'Comfortaa', cursive;
}

.contact-section .lead,h4 {
    color: var(--secondary);
    font-family: 'Lexend', sans-serif;
}

.contact-section .card {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 50%, #e8f0ff 100%);
}

.contact-section .form-label {
    /* color: var(--primary); */
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.contact-section .form-control {
    border: 1px solid var(--border);
    background: var(--white);
    padding: 0.75rem;
    border-radius: 4px;
    color: var(--primary);
    transition: all 0.2s;
}

.contact-section .form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: none;
}

.contact-info-card {
    background: var(--button-dark);
    border: none;
}



/* Responsive */
@media (max-width: 577px) {
     #home.hero-section {
        display: none;
    }

    .tab-card {
        margin: 0.5rem 0;
    }
    
    .info-bar {
        flex-direction: row;
        gap: 0.8rem;
    }
    .about-section h2 {
        font-size: 1.5rem;
    }
    .about-section p {
        font-size: 0.9rem;
    }
}

/* ======================Folder Icon ===================================
/* Folder Icon Styling */
.folder-icon {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 10px;
    vertical-align: middle;
}

.category-card h5 .folder-icon,
.category-card h5 i {
    margin-right: 10px;
    font-size: 1.2em;
}

/* Ensure consistent icon sizes across different levels */
.subject-card .folder-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.chapter-item .folder-icon {
    width: 40px;
    height: 40px;
}

/* Responsive icons */
@media (max-width: 768px) {
    .folder-icon {
        width: 40px;
        height: 40px;
    }
    
    .subject-card .folder-icon {
        width: 50px;
        height: 50px;
    }
    
    .chapter-item .folder-icon {
        width: 35px;
        height: 35px;
    }
}



/* =========================================================
   🌐 RESPONSIVENESS & LAYOUT FIXES
   Optimized for mobile, tablet, and large desktop
   ========================================================= */

/* Small devices (phones, up to 576px) */
@media (max-width: 576px) {
    body {
        font-size: 15px;
        line-height: 1.5;
    }

    .category-tabs h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .tab-card {
        width: 100%;
        margin: 0.5rem 0;
    }

    .category-card {
        padding: 1.2rem;
    }

    .info-bar {
        flex-direction: row;
        align-items: center;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    footer {
        text-align: center;
    }
}

/* Medium devices (tablets, 577px to 992px) */
@media (min-width: 577px) and (max-width: 992px) {
    .tab-card {
        margin: 0.5rem;
        flex: 1 1 calc(50% - 1rem);
    }

    .category-grid {
        padding: 2rem 1rem;
    }

    .category-card {
        margin-bottom: 1rem;
    }
}

/* Large devices (desktops, 993px and up) */
@media (min-width: 993px) {
    .category-tabs {
        padding: 4rem 0;
    }
}


.tab-card, .category-card, .navbar-nav .nav-link {
    transition: all 0.3s ease-in-out;
}

/* Consistent shadow for interactive cards */
.tab-card:hover, .category-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}


/* =========================================================
   ⚡ PERFORMANCE & UX ENHANCEMENTS
   ========================================================= */

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fdfbfb, #ebedee);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

#preloader .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #d1d1d1;
    border-top-color: var(--hover);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

#preloader p {
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    color: var(--primary);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hide preloader when done */
body.loaded #preloader {
    opacity: 0;
    pointer-events: none;
}

/* Typewriter fade-in */
.typewriter-text {
    display: inline-block;
    overflow: hidden;
    border-right: 3px solid var(--hover);
    white-space: nowrap;
    animation: typing 3s steps(30, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink {
    50% { border-color: transparent; }
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}


