/* --- Import Premium Modern Geometric Font --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* --- High-End Frosted Glass & Ambient Gradient Variables --- */
:root {
    /* Deep High-Contrast Font Colors for Perfect Readability over the mesh */
    --text-main: #0b1329;        /* Deep luxury midnight slate */
    --text-muted: #334155;       /* Sharp medium slate for reading body text */
    --accent: #2563eb;           /* Electric Cobalt Blue */
    --accent-hover: #1d4ed8;     
    --success: #065f46;          
    
    /* Translucent Glass Blueprint */
    --bg-glass: rgba(255, 255, 255, 0.45); 
    --bg-glass-hover: rgba(255, 255, 255, 0.75);
    
    /* Luxury Blurred Shadows */
    --glass-blur: blur(24px) saturate(190%);
    --shadow-soft: 0 8px 32px 0 rgba(15, 23, 42, 0.03);
    --shadow-lux: 0 30px 60px -15px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.03);
    
    /* Global Radius Foundations */
    --radius-md: 22px;
    --radius-lg: 36px;
    --transition-elastic: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Global Canvas with Dynamic Moving Mesh Background --- */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

html, body {
    scroll-behavior: smooth;
    color: var(--text-main);
    letter-spacing: -0.02em;
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        radial-gradient(at 0% 0%, rgba(219, 234, 254, 0.6) 0px, transparent 50%), 
        radial-gradient(at 100% 0%, rgba(243, 232, 255, 0.6) 0px, transparent 50%), 
        radial-gradient(at 100% 100%, rgba(254, 226, 226, 0.4) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(236, 254, 240, 0.4) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(255, 255, 255, 0.8) 0px, transparent 80%);
    z-index: -1;
    will-change: transform;
    animation: ambientRotate 25s linear infinite;
    transform-origin: center center;
}

/* --- Smooth GPU-friendly Rotation Animation --- */
@keyframes ambientRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* --- Frosted Floating Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 8%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    z-index: 708;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-soft);
    animation: slideDown 0.8s var(--transition-smooth);
}

.logo {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text-main);
    transition: var(--transition-elastic);
}

.logo:hover {
    transform: scale(1.05);
    color: var(--accent);
}

nav {
    display: flex;
    gap: 36px;
    align-items: center;
}

nav a {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    position: relative;
    padding: 8px 16px;
    border-radius: 12px;
}

nav a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-soft);
}

.hamburger {
    display: none;
    color: var(--text-main);
    font-size: 26px;
    cursor: pointer;
}

/* --- Premium Interactive Hero Section --- */
.hero {
    text-align: center;
    padding: 160px 50px 80px; /* Enhanced top offset to clear floating navbar */
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -1.5px; /* Clean modern tight spacing */
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-main);
    background: linear-gradient(135deg, #0b1329 30%, #1e3a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeUpIn 0.8s var(--transition-smooth) forwards;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 36px;
    line-height: 1.6;
    font-weight: 500;
    opacity: 0;
    animation: fadeUpIn 0.8s var(--transition-smooth) 0.2s forwards;
}

.hero-buttons {
    display: flex;
    gap: 18px;
    justify-content: center;
    opacity: 16;
    animation: fadeUpIn 0.8s var(--transition-smooth) 0.4s forwards;
}

/* --- Glassmorphic Tool Cards Container --- */
.tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 30px;
    padding: 40px 10%;
}

.tool-card {
    padding: 44px 32px;
    border-radius: 24px;
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
    
    /* --- Base State --- */
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); 
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 
        0 4px 6px -1px rgba(15, 23, 42, 0.02),
        0 10px 30px -10px rgba(15, 23, 42, 0.04);
    
    will-change: transform, box-shadow;
    transition: 
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.tool-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #2dbeb1 0%, #0c142b 100%);
    opacity: 0;
    z-index: -1;
    will-change: opacity;
    transition: opacity 0.4s ease;
}

.tool-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(37, 235, 216, 0.4);
    box-shadow: 
        0 12px 24px -10px rgba(37, 99, 235, 0.15),
        0 30px 60px -15px rgba(37, 99, 235, 0.3);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-card h3 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    color: var(--text-main);
    transition: color 0.3s ease;
}

.tool-card:hover h3 {
    color: #ffffff;
}

.tool-card p {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.tool-card:hover p {
    color: rgba(255, 255, 255, 0.8);
}

/* --- High-End Buttons --- */
.btn, .btns {
    padding: 16px 38px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: inline-block;
    border: none;
    outline: none;
    transition: var(--transition-elastic);
}

.btn {
    background: var(--text-main);
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(11, 19, 41, 0.12);
}

.btn:hover {
    background: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.25);
}

.btns {
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-main) !important;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
}

.btns:hover {
    background: #ffffff;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lux);
}

/* --- Interactive Input Systems --- */
.searchsection {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.searchbox input {
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.7);
    outline: none;
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 560px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
}

.searchbox input:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent);
    transform: scale(1.02);
    box-shadow: var(--shadow-lux);
}

/* --- Clean Subsections --- */
.marquee {
    width: 100%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px);
    padding: 16px 0;
    white-space: nowrap;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.marquee p {
    display: inline-block;
    animation: marquee-anim 32s linear infinite;
    padding-left: 100%;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 12.5px;
}

@keyframes marquee-anim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.quotes {
    text-align: center;
    padding: 44px 32px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg);
    max-width: 760px;
    margin: 40px auto;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow-soft);
}

/* --- Core Copy & SEO Blocks --- */
.seo-section, .faq-section, .seo-article, .seo-admission, .sgpa-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 50px 24px; 
    line-height: 1.85;
}

.seo-article h1, .seo-admission h1, .seo-section h1, .faq-section h2, .sgpa-section h2 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.25;
    color: var(--text-main);
    margin-bottom: 24px;
}

.seo-article h2, .seo-admission h2, .seo-section h2, .sgpa-section h3 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-top: 36px;
    margin-bottom: 16px;
    padding-left: 16px;
    color: var(--text-main);
    border-left: 4px solid var(--accent);
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.seo-article h2:hover, .seo-admission h2:hover, .seo-section h2:hover, .sgpa-section h3:hover {
    padding-left: 22px;
    color: var(--accent);
}

.seo-section p, .seo-article p, .seo-admission p, .sgpa-section p, .faq-item p {
    font-size: 15.5px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.faq-item {
    margin: 20px 0;
    padding: 24px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.faq-item:hover {
    background: var(--bg-glass-hover);
    box-shadow: var(--shadow-lux);
    transform: translateX(4px);
}

/* --- Interactive Stat Matrices --- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    padding: 40px 8%;
}

.stat-card {
    padding: 36px 20px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition-elastic);
}

.stat-card:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow-lux);
}

.stat-card h2 {
    font-size: 44px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 4px;
}

.subject-row input {
    padding: 14px 20px;
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 14px;
    color: var(--text-main);
    font-weight: 600;
    outline: none;
    transition: var(--transition-smooth);
}

/* --- Global Reveal System --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.categories.reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* --- Entry Animations Keyframes --- */
@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes fadeUpIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Premium Footer --- */
.footer {
    text-align: center;
    padding: 60px 20px;
    background: rgba(247, 247, 247, 0.3);
    backdrop-filter: var(--glass-blur);
    border-top: 1px solid rgba(221, 212, 212, 0.4);
}

.fl {
    margin: 20px 0;
}

.fl a {
    color: var(--text-muted);
    margin: 0 14px;
    font-size: 14px;
    font-weight: 700;
}

.fl a:hover {
    color: var(--accent);
}


/* ==========================================================================
   unified advanced mobile system (screens under 768px)
   ========================================================================== */
@media (max-width: 768px) {
    /* --- Navigation Side Drawer Mechanics --- */
    nav {
        position: fixed;
        top: 70px;
        right: -100%; 
        height: calc(100vh - 70px);
        width: 85%;
        max-width: 300px;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 32px 20px;
        align-items: flex-start;
        border-left: 1px solid rgba(15, 23, 42, 0.06);
        will-change: right;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
    }
    
    nav.active { 
        right: 0; 
        box-shadow: -10px 0 40px rgba(11, 19, 41, 0.12);
    }

    nav a {
        width: 100%;
        padding: 12px 16px;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 700;
        color: var(--text-main);
        display: block;
    }
    
    .hamburger { 
        display: block; 
        padding: 10px;
    }
    
    /* --- Fluid Typography Scaling --- */
    .hero {
        padding: 130px 20px 50px;
    }
    
    .hero h1 { 
        font-size: 32px; 
        letter-spacing: -0.5px;
        margin-bottom: 16px;
    }
    
    .hero p { 
        font-size: 15.5px; 
        line-height: 1.5;
        margin-bottom: 28px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 12px;
        width: 100%;
        max-width: 300px;
        margin: 32px auto 0;
    }

    .btn, .btns {
        width: 100%;
        text-align: center;
        padding: 14px 24px;
    }

    /* --- Smart swipeable or ultra-compact tools grid layout --- */
    .tools {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 18px;
        padding: 20px 24px 30px; /* Reclaims massive horizontal screen space */
        scrollbar-width: none; /* Hides basic scrollbar on Firefox */
    }

    .tools::-webkit-scrollbar {
        display: none; /* Hides bulky scrollbar on Chrome, Safari, Opera */
    }

    /* --- High-Comfort Mobile Cards --- */
    .tool-card {
        flex: 0 0 85%; /* Keeps cards perfectly sized and hints at a sequential trail */
        scroll-snap-align: start;
        padding: 28px 20px;
        border-radius: 20px;
        text-align: left; /* Swapped to left alignment for easier reading while swiping */
    }

    .tool-card h3 {
        font-size: 19px;
        margin-bottom: 8px;
    }

    .tool-card p {
        font-size: 14px;
        line-height: 1.5;
    }

    .tool-card:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
    }

    /* --- Other Section Adjustments --- */
    .stats {
        grid-template-columns: 1fr 1fr; /* 2 columns on mobile instead of stacking long single columns */
        gap: 16px;
        padding: 30px 20px;
    }

    .stat-card {
        padding: 24px 12px;
    }

    .stat-card h2 {
        font-size: 32px;
    }

    .seo-article h1, .seo-admission h1, .seo-section h1, .faq-section h2, .sgpa-section h2 {
        font-size: 26px;
    }

    .seo-article h2, .seo-admission h2, .seo-section h2, .sgpa-section h3 {
        font-size: 20px;
    }
}

/* --- Micro-Phone Overrides (Screens under 400px) --- */
@media (max-width: 400px) {
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 14px; }
    
    .tools {
        padding: 16px 16px 24px;
        gap: 14px;
    }

    .tool-card {
        flex: 0 0 88%;
        padding: 24px 16px;
        border-radius: 16px;
    }

    .tool-card h3 { font-size: 18px; }
    
    .tool-card:hover {
        transform: none; /* Disables motions entirely on ultra-low viewports */
    }

    .stats {
        grid-template-columns: 1fr; /* Stacks layout back safely to 1 column for extremely tiny widths */
    }
}
@media (max-width: 768px) {
    /* --- Add this right here to tame the Categories block --- */
    .categories {
        padding-top: 20px !important;    /* Crushes giant top empty space gaps */
        padding-bottom: 20px !important; /* Crushes giant bottom empty space gaps */
        margin-top: 10px !important;     /* Minimizes outer spacing friction */
        margin-bottom: 10px !important;  
        height: auto !important;         /* Prevents desktop min-heights from stretching it */
    }

    /* If your categories section has an inner heading/title stretching things out: */
    .categories h2, .categories h1 {
        font-size: 24px !important;
        margin-bottom: 16px !important;
        margin-top: 0 !important;
    }

    /* If your categories are wrapped in a layout grid/container that's stacking vertically: */
    .categories-container, .categories-grid {
        display: flex !important;
        flex-direction: column;
        gap: 12px !important;            /* Tightens the space between internal elements */
    }
}

/* --- Also apply it to the Micro-Phone layer --- */
@media (max-width: 400px) {
    .categories {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
    }
    
    .categories h2 {
        font-size: 20px !important;
    }
}
