:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    /* Yellow for login button */
}

body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.hero-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
}

/* Header Redesign */
.header-top {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    z-index: 1050;
}

.header-top .dropdown-menu {
    z-index: 1100;
    /* Ensure it's above sticky navbar which is usually 1020 */
}

.search-container {
    max-width: 600px;
    width: 100%;
}

.search-input {
    border-radius: 4px 0 0 4px;
    border: 1px solid #ced4da;
    border-right: none;
}

.search-input:focus {
    box-shadow: none;
    border-color: #ced4da;
}

.search-btn {
    border-radius: 0 4px 4px 0;
    border: 1px solid #ced4da;
    border-left: none;
    background: #fff;
    color: #6c757d;
}

.contact-info {
    line-height: 1.2;
}

.btn-login-custom {
    background-color: #ffeeb6;
    /* Light yellow */
    color: #000;
    font-weight: 500;
    border: 1px solid #ffeeb6;
    padding: 8px 20px;
}

.btn-login-custom:hover {
    background-color: #ffd75e;
    border-color: #ffd75e;
}

.main-navbar {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-navbar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 10px 15px !important;
}

.main-navbar .nav-link:hover {
    color: var(--primary-color);
}

/* Home Page Expansion Styles */

/* Hero Slider */
.carousel-item {
    height: 400px;
    background-color: #333;
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
    opacity: 0.6;
}

.carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
}

/* Topper Cards */
.topper-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

/* Video Gallery */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Testimonials */
.testimonial-card {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 20px;
}

.testimonial-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

/* Utility Classes for Features */
.icon-square {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
}

.ls-1 {
    letter-spacing: 1px;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
}

.transition-all {
    transition: all 0.3s ease-in-out;
}

/* Mobile Optimizations */
@media (max-width: 768px) {

    /* Top Header */
    .header-top {
        display: none !important;
        /* Hide top bar on mobile if not needed, or stack it */
    }

    /* Typography Scaling */
    h1.display-3 {
        font-size: 2.5rem !important;
        /* Smaller hero title */
    }

    h2 {
        font-size: 1.75rem !important;
    }

    .lead {
        font-size: 1.1rem !important;
    }

    /* Layout & Spacing */
    section.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .container.py-5,
    .container.py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    /* Components */
    .btn-lg {
        width: 100%;
        /* Full width buttons for easier tapping */
        margin-bottom: 10px;
        padding: 12px !important;
    }

    /* Hero Section Icons */
    .hero-section .fa-10x {
        font-size: 5em !important;
        /* Scale down background icons */
        /* Opacity handled by class now, but ensure it overrides if needed */
    }

    /* Decoration fixes for mobile */
    .hero-section .position-absolute.p-5 {
        padding: 1rem !important;
        /* Reduce padding so they stay in corners */
    }

    /* Process Steps */
    .row.g-4.text-center.position-relative .col-lg-3 {
        margin-bottom: 2rem;
    }

    /* Hide decorative connecting lines on mobile if any */
    .d-none.d-lg-block {
        display: none !important;
    }

    /* Cards - App Like Look */
    .card {
        margin-bottom: 15px;
        border-radius: 16px !important;
        /* Softer, more modern corners */
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
        /* Floating effect */
        border: none !important;
    }

    .card-header {
        border-radius: 16px 16px 0 0 !important;
        background-color: #fff !important;
        /* Cleaner look often removes heavy header bg */
        border-bottom: 1px solid #f0f0f0;
        padding: 1.25rem !important;
    }

    /* Form Inputs */
    .input-group-text,
    .form-control,
    .form-select {
        padding: 10px !important;
        /* Larger touch targets */
    }

    /* Adjust Syllabus Icons alignment */
    .d-flex.align-items-center.p-3 {
        flex-direction: column;
        text-align: center;
    }

    .d-flex.align-items-center.p-3 i {
        margin-bottom: 10px;
        margin-right: 0 !important;
    }

    /* --- App-Like Redesign --- */

    /* 1. Bottom Navigation Bar */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 65px;
        background: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1060;
        /* Higher than sticky header */
        padding-bottom: env(safe-area-inset-bottom);
        /* iPhone X+ safe area */
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #6c757d;
        text-decoration: none;
        font-size: 10px;
        width: 25%;
        height: 100%;
    }

    .bottom-nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .bottom-nav-item.active {
        color: var(--primary-color);
        font-weight: 600;
    }

    /* 2. Space for Bottom Nav */
    body {
        padding-bottom: 70px;
        /* Prevent content hiding behind nav */
    }

    /* 3. Hide detailed footer on mobile */
    footer.bg-dark.text-white.py-5 {
        display: none !important;
    }

    /* Keep Copyright strip but adjust padding */
    footer.bg-dark.text-white.py-3.border-top {
        display: block !important;
        margin-bottom: 65px;
        /* Push above nav */
        text-align: center;
    }

    /* 4. Simplified Header */
    .header-top {
        display: none !important;
    }

    .navbar-toggler {
        border: none;
        padding: 0;
    }

    .navbar-brand img {
        height: 40px;
        /* Smaller logo */
    }

    /* Hide the standard mobile menu toggle if we use bottom nav for main nav */
    /* We can keep it for secondary items like "About Us" */
    /* Decoration fixes for mobile */
    .hero-section .position-absolute.p-5 {
        padding: 1rem !important;
        /* Reduce padding so they stay in corners */
    }
}

/* Utilities */
.opacity-10 {
    opacity: 0.1 !important;
}

/* Dashboard App-Like Tweaks */
@media (max-width: 576px) {

    /* Responsive Stats Font */
    .dashboard-stats-number {
        font-size: 1.5rem !important;
        /* Smaller on mobile */
    }
}

.dashboard-stats-number {
    font-size: 2.5rem;
    font-weight: 700;
}

/* Card Hover Animation */
.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:active {
    transform: scale(0.98);
    /* Press effect on mobile */
}

/* Dashboard Tweaks */
.course-thumb-small {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover;
    flex-shrink: 0;
    /* Prevent shrinking in flexbox */
}

/* Ensure Name is Capitalized */
.text-capitalize-css {
    text-transform: capitalize;
}

@media (min-width: 768px) {
    .hover-scale:hover {
        transform: translateY(-5px);
    }
}

/* Ensure edges have gap on mobile */
@media (max-width: 576px) {
    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* Compensate for Row negative margins if needed, 
       but usually container padding > row negative margin is enough. 
       Bootstrap g-4 is 1.5rem (24px gutter, so -12px margin). 
       20px padding - 12px margin = 8px visual gap. 
       Let's make padding 24px to be safe (12px gap).
    */
    .container {
        padding-left: 24px !important;
        padding-right: 24px !important;
    }
}