/* General Body and Fonts */
body {
    font-family: 'Inter', sans-serif;
    color: #343a40; /* Darker text for a professional feel */
    background-color: #f0f2f5; /* A slightly darker light background */
    padding-top: 90px; /* Adjust for fixed navbar height */
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* Custom Colors (adjust as needed for a vibrant but professional look) */
:root {
    --bs-primary: #006aff; /* A more vibrant, slightly darker primary blue */
    --bs-primary-rgb: 0, 106, 255;
    --bs-primary-light: #4c96ff; /* Lighter primary for icons on dark backgrounds */
    --bs-primary-subtle: #e6f0ff; /* Lighter shade for subtle backgrounds */
    --bs-secondary: #5a6268; /* Slightly darker secondary */
    --bs-dark: #212529;
    --bs-light: #f8f9fa;
    --bs-success: #28a745;
    --bs-success-subtle: #d4edda;
    --bs-info: #17a2b8;
    --bs-info-subtle: #d1ecf1;
    --bs-warning: #ffc107;
    --bs-warning-subtle: #fff3cd;
    --bs-danger: #dc3545;
    --bs-danger-subtle: #f8d7da;
    --bs-dark-subtle: #ced4da; /* For Computer Science */
    --bs-secondary-subtle: #e2e3e5; /* For History */

    --section-padding-y: 6rem; /* Standard vertical padding for sections */
}

/* Navbar Enhancements */
.navbar {
    background-color: #ffffff !important; /* Ensure white background */
    border-bottom: 1px solid rgba(0, 0, 0, 0.08); /* Subtle border */
    z-index: 1030; /* Ensure navbar is above other content */
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    color: var(--bs-dark);
    font-size: 1.6rem; /* Slightly larger brand text */
    font-weight: 700;
}

.navbar-brand img {
    margin-right: 0.75rem;
    border-radius: 50%; /* Make logo round if desired */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* Subtle shadow for logo */
}

.navbar-nav .nav-link {
    color: var(--bs-secondary);
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--bs-primary);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--bs-primary);
    font-weight: 600;
}

.navbar-nav .nav-link.active::after,
.navbar-nav .nav-link:hover::after {
    width: 70%;
}


.navbar .btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1.25rem;
}

.navbar .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Hero Section with Video Background */
.hero-video-background {
    position: relative;
    width: 100%;
    height: 100vh; /* Full viewport height */
    overflow: hidden;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); /* Text shadow for readability */
    padding-top: 0; /* Remove padding as content is centered */
    padding-bottom: 0;
}

.hero-video-background .hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translateX(-50%) translateY(-50%);
    background-size: cover;
    filter: brightness(0.4) grayscale(0.2); /* Darken and slightly desaturate video */
}

.hero-video-background .hero-content {
    position: relative;
    z-index: 1;
    padding-top: 5rem; /* Space for navbar */
    padding-bottom: 3rem;
    max-width: 900px; /* Constrain content width */
}

.hero-section h1 {
    font-size: 3.8rem; /* Larger, more impactful heading */
    line-height: 1.1;
    color: #ffffff;
    font-weight: 800;
}

.hero-section p.lead {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
}

.search-form {
    margin-top: 2rem;
}

.search-form .input-group-lg .form-control {
    border-top-left-radius: 2.5rem !important; /* More rounded */
    border-bottom-left-radius: 2.5rem !important;
    padding: 1.2rem 1.8rem; /* More generous padding */
    border: none;
    font-size: 1.1rem;
}

.search-form .input-group-lg .btn-primary {
    border-top-right-radius: 2.5rem !important; /* More rounded */
    border-bottom-right-radius: 2.5rem !important;
    font-weight: 600;
    min-width: 180px;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    transition: all 0.3s ease;
    padding: 1.2rem 1.8rem;
    font-size: 1.1rem;
}

.search-form .input-group-lg .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}

.stats-grid {
    padding-top: 3rem; /* More padding */
    margin-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2); /* Lighter separator for dark background */
}

.stats-grid h4 {
    font-size: 2.2rem; /* Larger stats numbers */
    color: var(--bs-primary-light); /* Lighter primary for contrast */
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stats-grid small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    display: block; /* Ensure small text is block for spacing */
}

/* Partners Section */
.partners-section {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.partners-section h5 {
    color: var(--bs-secondary);
    font-size: 1rem;
    letter-spacing: 0.1em; /* More prominent letter spacing */
    text-transform: uppercase;
    font-weight: 600;
}

.partner-logo {
    opacity: 0.6;
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    height: 60px; /* Slightly larger height for logos */
    object-fit: contain;
    filter: grayscale(100%);
    padding: 0.5rem; /* Add padding for better visual spacing */
}

.partner-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.1);
}


/* How It Works Section */
.how-it-works-section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
    background-color: #f8f9fa; /* Slightly off-white background */
}

.how-it-works-section h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--bs-dark);
}

.how-it-works-section p.lead {
    font-size: 1.25rem;
    color: var(--bs-secondary);
}

.how-it-works-section .card {
    border: none; /* Remove border */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-radius: 1.25rem; /* More rounded corners */
    background-color: #fff;
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.08); /* Initial subtle shadow */
}

.how-it-works-section .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1.5rem 3rem rgba(0,0,0,.15) !important; /* More pronounced shadow on hover */
}

.how-it-works-section .icon-wrapper {
    width: 75px; /* Larger icons */
    height: 75px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.8rem;
    background-color: var(--bs-primary-subtle);
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,0.08); /* Shadow for icon background */
}

.how-it-works-section .icon-wrapper i {
    color: var(--bs-primary);
    font-size: 2.5rem; /* Larger icons */
}

.how-it-works-section h5 {
    color: var(--bs-dark);
    font-size: 1.35rem; /* Larger heading */
    font-weight: 700;
}

.how-it-works-section .card p.small {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--bs-secondary);
}

.how-it-works-section .btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
}

.how-it-works-section .btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Sample Subjects Section */
.sample-subjects-section {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
    background-color: #ffffff;
}

.sample-subjects-section h2 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--bs-dark);
}

.sample-subjects-section p.lead {
    font-size: 1.25rem;
    color: var(--bs-secondary);
}

.subject-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1.25rem;
    background-color: #fff;
    color: inherit;
    display: block;
    box-shadow: 0 0.25rem 0.75rem rgba(0,0,0,.04); /* Lighter shadow for subject cards */
}

.subject-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 1rem 2rem rgba(0,0,0,.08) !important;
}

.subject-card .icon-wrapper {
    width: 70px; /* Slightly larger icons */
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.2rem 0.6rem rgba(0,0,0,0.05);
}

.subject-card .icon-wrapper i {
    font-size: 2.2rem;
}

.subject-card h5 {
    color: var(--bs-dark);
    font-weight: 700;
    font-size: 1.25rem;
}

.sample-subjects-section .btn-outline-primary {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    font-weight: 700;
    transition: all 0.3s ease;
    padding: 0.8rem 2.5rem;
    font-size: 1.1rem;
}

.sample-subjects-section .btn-outline-primary:hover {
    background-color: var(--bs-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* CTA Section */
.cta-section {
    background: var(--bs-primary); /* Primary blue background for CTA */
    padding: var(--section-padding-y) 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M100 0L0 100V0h100zM0 0v100h100L0 0z" fill="%23ffffff" fill-opacity="0.1"/%3E%3C/svg%3E'); /* Subtle white pattern */
    background-size: 200px;
    opacity: 0.6;
    z-index: 0;
}

.cta-section h2 {
    font-size: 3.2rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    color: #ffffff;
}

.cta-section p.lead {
    font-size: 1.4rem;
    opacity: 0.9;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.cta-section .btn-light { /* Using btn-light for strong contrast */
    color: var(--bs-primary);
    background-color: white;
    border-color: white;
    font-weight: 700;
    transition: all 0.3s ease;
    padding: 1rem 3rem;
    font-size: 1.2rem;
}

.cta-section .btn-light:hover {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.cta-image {
    max-width: 450px; /* Adjust size as needed */
    border-radius: 1.5rem;
    box-shadow: 0 1rem 2rem rgba(0,0,0,0.2);
    margin-left: 2rem; /* Add some margin to separate from text */
}

/* Footer */
.footer {
    background-color: #1a1a1a !important;
    color: rgba(255, 255, 255, 0.7);
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}

.footer h6 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.footer .list-unstyled li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 2.2; /* More spacing for readability */
    font-size: 0.95rem;
}

.footer .list-unstyled li a:hover {
    color: var(--bs-primary);
}

.footer .social-links a {
    font-size: 1.6rem; /* Slightly larger social icons */
    color: rgba(255, 255, 255, 0.7);
    margin-right: 1rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.footer .social-links a:hover {
    color: var(--bs-primary);
    transform: translateY(-3px);
}

.footer .navbar-brand span {
    color: white;
}

/* Utility Classes */
.letter-spacing-1 {
    letter-spacing: 0.1em;
}

.py-6 {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}
.mb-6 {
    margin-bottom: var(--section-padding-y);
}
.mt-6 {
    margin-top: var(--section-padding-y);
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    body {
        padding-top: 70px; /* Adjust for smaller fixed nav */
    }
    .hero-video-background {
        height: 80vh; /* Adjust height for smaller screens */
    }
    .hero-video-background .hero-content {
        padding-top: 4rem;
        padding-bottom: 2rem;
    }
    .hero-section h1 {
        font-size: 2.8rem;
    }
    .hero-section p.lead {
        font-size: 1.1rem;
    }
    .search-form .input-group-lg .form-control,
    .search-form .input-group-lg .btn-primary {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    .stats-grid {
        padding-top: 2rem;
        margin-top: 2rem;
    }
    .stats-grid h4 {
        font-size: 1.8rem;
    }
    .stats-grid small {
        font-size: 0.85rem;
    }
    .navbar-collapse {
        margin-top: 1rem;
        text-align: center;
    }
    .navbar .btn {
        width: 100%;
        margin-top: 0.75rem;
    }
    .partners-section .partner-logo {
        height: 45px;
        margin-bottom: 1rem;
    }
    .how-it-works-section h2,
    .sample-subjects-section h2 {
        font-size: 2.2rem;
    }
    .how-it-works-section p.lead,
    .sample-subjects-section p.lead {
        font-size: 1rem;
    }
    .how-it-works-section .card,
    .subject-card {
        margin-bottom: 1.5rem;
    }
    .cta-section h2 {
        font-size: 2.5rem;
    }
    .cta-section p.lead {
        font-size: 1.1rem;
    }
    .cta-section .btn-light {
        width: 100%;
        margin-bottom: 1.5rem;
        margin-right: 0 !important;
    }
    .cta-image {
        display: none !important;
    }
    .py-6, .mb-6, .mt-6 {
        padding-top: 4rem;
        padding-bottom: 4rem;
        margin-bottom: 4rem;
        margin-top: 4rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img {
        width: 50px;
        height: 50px;
    }
    .navbar-brand {
        font-size: 1.3rem;
    }
    .hero-video-background {
        height: 90vh;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section p.lead {
        font-size: 0.95rem;
    }
    .search-form .input-group-lg .form-control,
    .search-form .input-group-lg .btn-primary {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    .stats-grid h4 {
        font-size: 1.5rem;
    }
    .stats-grid small {
        font-size: 0.8rem;
    }
    .partners-section .partner-logo {
        height: 35px;
    }
    .how-it-works-section h2,
    .sample-subjects-section h2 {
        font-size: 1.8rem;
    }
    .cta-section h2 {
        font-size: 2rem;
    }
    .cta-section p.lead {
        font-size: 1rem;
    }
}

/* Animate.css overrides for duration/delay (optional, if you want to fine-tune) */
.animate__animated.animate__fadeInDown { --animate-duration: 1s; }
.animate__animated.animate__fadeInUp { --animate-duration: 1s; }
.animate__animated.animate__zoomIn { --animate-duration: 0.8s; }
.animate__animated.animate__fadeInRight { --animate-duration: 1s; }

.animate__delay-1s { animation-delay: 0.5s; } /* Reduce delay for quicker feedback */
.animate__delay-2s { animation-delay: 1s; }
.animate__delay-3s { animation-delay: 1.5s; }