/********** Template CSS **********/
:root {
    --primary: #0A2342; /* Royal Blue */
    --primary-light: #173b6c;
    --gold: #D4AF37;
    --gold-light: #f3d46a;
    --light: #F0F4F8;
    --dark: #05101f;
    --text-muted: #6c757d;
}

body {
    font-family: 'Inter', sans-serif;
    color: #444;
    background-color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .brand-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

p {
    font-size: 1.05rem;
}

.text-primary {
    color: var(--primary) !important;
}

.text-gold {
    color: var(--gold) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-light-blue {
    background-color: #f8fbff !important;
}

/* Standardized Buttons */
.btn {
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 50px;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    box-shadow: 0 8px 20px rgba(10, 35, 66, 0.3);
    transform: translateY(-2px);
    color: #fff;
}

.btn-gold {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--dark);
}

.btn-gold:hover {
    background-color: #c49c2a;
    border-color: #c49c2a;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-2px);
    color: var(--dark);
}

.btn-blue {
    background: rgba(10, 35, 66, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    backdrop-filter: blur(10px);
}

.btn-blue:hover {
    background: var(--primary);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(10, 35, 66, 0.4);
    color: #fff;
}

/* Spinner */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/* Navbar */
.navbar {
    padding: 1rem 0 !important;
}

.navbar .navbar-nav .nav-link {
    padding: 10px 15px;
    color: var(--primary);
    font-weight: 500;
    outline: none;
    position: relative;
    transition: 0.3s;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--gold);
}

.navbar .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15px;
    right: 15px;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navbar .navbar-nav .nav-link:hover::after,
.navbar .navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        padding: 10px 0;
    }
    .navbar .navbar-nav .nav-link::after {
        display: none;
    }
}

.sticky-top.navbar-light {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
}

/* Hero Header */
.hero-header {
    margin-bottom: 6rem;
}

.hero-bg {
    height: 90vh; /* Better proportion */
    min-height: 600px;
    position: relative;
}

.hero-bg img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Fix: Soft dark overlay instead of harsh yellow */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 35, 66, 0.65); /* Soft, professional blue/dark overlay */
}

.hero-content {
    z-index: 10;
}

.motto-badge {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: var(--gold-light);
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

/* Animations */
.slide-up-anim {
    animation: slideUp 1s ease forwards;
    opacity: 0;
    transform: translateY(40px);
}

.delay-1 {
    animation-delay: 0.3s;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Common Spacing */
.section-padding {
    padding-top: 6rem;
    padding-bottom: 6rem;
}

.section-subtitle {
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 1rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.shadow-soft {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

/* Vision & Mission */
.vm-card {
    transition: 0.4s ease;
    border-bottom: 4px solid transparent;
}

.vm-card:hover {
    transform: translateY(-8px);
    border-bottom-color: var(--gold);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* School Life */
.life-item {
    border-radius: 12px;
}

.life-item img {
    transition: 0.5s ease;
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.life-item:hover img {
    transform: scale(1.08);
}

.life-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 35, 66, 0.8) 0%, rgba(10, 35, 66, 0) 50%);
    opacity: 0.9;
    transition: 0.5s;
}

.life-item:hover .life-overlay {
    background: linear-gradient(to top, rgba(10, 35, 66, 0.9) 0%, rgba(10, 35, 66, 0.2) 60%);
}

/* Features (Why Choose Us) */
.feature-card {
    transition: 0.4s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.06);
    border-color: rgba(212, 175, 55, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    transition: 0.4s ease;
}

.feature-card:hover .feature-icon {
    background-color: var(--primary) !important;
    color: var(--gold) !important;
    transform: scale(1.1);
}

.feature-card:hover .feature-icon i {
    color: var(--gold) !important;
}

/* Programs */
.program-card {
    transition: 0.4s ease;
    border-radius: 16px;
}

.program-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transition: 0.4s ease;
}

.program-card:hover {
    transform: translateY(-8px);
    background-color: var(--gold) !important;
}

.program-card:hover::after {
    transform: scale(2);
    background: rgba(10, 35, 66, 0.05);
}

.program-card:hover i,
.program-card:hover h3 {
    color: var(--primary) !important;
}

/* Gallery */
.gallery-card {
    border-radius: 12px;
}

.gallery-card img {
    transition: 0.5s ease;
    height: 250px;
    object-fit: cover;
}

.gallery-card:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 35, 66, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.5s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

/* Testimonial */
.testimonial-carousel .owl-dots {
    margin-top: 30px;
    text-align: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 12px;
    height: 12px;
    background: #e2e8f0;
    border-radius: 12px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 24px;
    background: var(--gold);
}

/* WOW.js Custom Animations */
.wow-slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.wow-slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.wow-fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.wow-fade-in.visible {
    opacity: 1;
}

/* Back to top */
.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    background: var(--gold);
    color: var(--primary);
    border: none;
}

.back-to-top:hover {
    background: var(--primary);
    color: var(--gold);
}

/* Form Contact */
.contact-form-wrapper {
    border-radius: 16px;
}

.contact-form-wrapper .form-control {
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.contact-form-wrapper .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(212, 175, 55, 0.25);
    border-color: var(--gold) !important;
}

/* Contact Section Cards */
.bg-light-tint {
    background-color: #f8fafc !important; /* Very light neutral tint */
}

.contact-card {
    transition: 0.4s ease;
    border: 1px solid rgba(0,0,0,0.03);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(212, 175, 55, 0.3);
}

/* Footer Improvements */
.bg-dark-navy {
    background-color: #0f172a !important; /* Deep navy background */
}

.footer {
    padding-top: 5rem;
}

.footer .btn-link {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,0.6);
    font-weight: 400;
    transition: 0.3s;
    text-decoration: none;
}

.footer .btn-link:hover {
    color: var(--gold);
    letter-spacing: 1px;
}

.btn-social {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-color: rgba(255,255,255,0.2);
    transition: 0.3s;
}

.btn-social:hover {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--dark);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: rgba(0,0,0,0.2);
}

/* Fix: Curriculum hover style for h4 headers */
.program-card:hover h4 {
    color: var(--primary) !important;
}

/* ==========================================================================
   INTERACTIVE SCHOOL BUS SCENERY & ANIMATIONS
   ========================================================================== */

/* Scenery Container */
.school-bus-scenery-container {
    border: 4px solid rgba(10, 35, 66, 0.08);
    position: relative;
    width: 100%;
    box-shadow: inset 0 0 100px rgba(10, 35, 66, 0.05);
}

/* Clouds & Sun */
.cloud-scenery {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.scenery-sun {
    position: absolute;
    top: 30px;
    right: 60px;
    width: 50px;
    height: 50px;
    background: #FFF9E6;
    border-radius: 50%;
    box-shadow: 0 0 30px #fdf6e2, 0 0 60px rgba(253, 246, 226, 0.4);
}

.scenery-cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 100px;
    filter: blur(1px);
}

.scenery-cloud::before,
.scenery-cloud::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
}

.cloud-1 {
    width: 100px;
    height: 30px;
    top: 40px;
    left: 10%;
    animation: floatCloud 25s linear infinite;
}
.cloud-1::before { width: 50px; height: 50px; top: -25px; left: 15px; }
.cloud-1::after { width: 40px; height: 40px; top: -15px; left: 45px; }

.cloud-2 {
    width: 120px;
    height: 35px;
    top: 80px;
    left: 55%;
    animation: floatCloud 18s linear infinite reverse;
}
.cloud-2::before { width: 60px; height: 60px; top: -30px; left: 20px; }
.cloud-2::after { width: 45px; height: 45px; top: -18px; left: 55px; }

@keyframes floatCloud {
    0% { transform: translateX(0); }
    50% { transform: translateX(30px); }
    100% { transform: translateX(0); }
}

/* Tree Silhouettes */
.tree-silhouette-1,
.tree-silhouette-2 {
    position: absolute;
    bottom: 70px;
    background: rgba(71, 85, 105, 0.08);
    border-radius: 50% 50% 0 0;
    z-index: 1;
}

.tree-silhouette-1 {
    width: 60px;
    height: 100px;
    left: 15%;
}

.tree-silhouette-2 {
    width: 80px;
    height: 120px;
    left: 45%;
}

/* Detailed School Bus Styling */
.school-bus {
    position: absolute;
    bottom: 25px;
    left: -250px; /* Initially offscreen */
    width: 220px;
    height: 90px;
    z-index: 10;
    cursor: pointer;
}

/* Driving Animation Loop controlled by active class */
.school-bus.drive-active {
    animation: driveStopGo 16s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}

/* Bus Body Structure */
.bus-body-group {
    position: relative;
    width: 100%;
    height: 100%;
}

.bus-main-body {
    position: absolute;
    bottom: 12px;
    left: 15px;
    width: 190px;
    height: 60px;
    background: #FFC107; /* Warm School Bus Yellow */
    border-radius: 8px 18px 4px 4px;
    box-shadow: inset -5px -5px 15px rgba(0,0,0,0.1), 0 8px 15px rgba(0,0,0,0.1);
    border: 2px solid #D4AF37;
}

.bus-front-hood {
    position: absolute;
    bottom: 0;
    right: -24px;
    width: 26px;
    height: 40px;
    background: #FFC107;
    border-radius: 0 10px 5px 0;
    border: 2px solid #D4AF37;
    border-left: none;
}

.front-grille {
    position: absolute;
    bottom: 8px;
    right: 2px;
    width: 6px;
    height: 18px;
    background: #2D3748;
    border-radius: 2px;
}

/* Glowing Headlight */
.headlight-glow {
    position: absolute;
    top: 8px;
    right: -4px;
    width: 8px;
    height: 10px;
    background: #FFF;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFF, 0 0 20px #FFEB3B;
}

.school-bus.drive-active .headlight-glow {
    animation: blinkLight 2s infinite;
}

@keyframes blinkLight {
    0%, 100% { box-shadow: 0 0 5px #FFF, 0 0 10px #FFEB3B; }
    50% { box-shadow: 0 0 20px #FFF, 0 0 40px #FFEB3B, 0 0 65px rgba(255,235,59,0.6); }
}

/* Bus Bumpers */
.bus-bumper {
    position: absolute;
    bottom: -2px;
    width: 10px;
    height: 6px;
    background: #475569;
    border-radius: 3px;
}
.bus-bumper.front { right: -27px; }
.bus-bumper.back { left: -4px; }

/* Stripes & Label */
.bus-stripe-accent {
    position: absolute;
    top: 30px;
    left: 0;
    width: 100%;
    height: 12px;
    background: var(--primary); /* Royal Blue Stripe */
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
}

.bus-label {
    position: absolute;
    top: 30px;
    left: 10px;
    width: 170px;
    height: 12px;
    color: #FFF;
    font-size: 7.5px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: 'Outfit', sans-serif;
    text-align: center;
    line-height: 12px;
    z-index: 5;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3);
}

/* Windows & Kids */
.bus-windows {
    position: absolute;
    top: 5px;
    left: 8px;
    width: 170px;
    height: 20px;
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
}

.bus-window {
    width: 32px;
    height: 18px;
    background: #E2E8F0;
    border: 2px solid #475569;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.waving-child {
    font-size: 11px;
    display: inline-block;
    transform-origin: bottom center;
}

.school-bus.drive-active .waving-child {
    animation: childWave 1.5s ease-in-out infinite alternate;
}

@keyframes childWave {
    0% { transform: rotate(-8deg); }
    100% { transform: rotate(8deg); }
}

/* Swing Out STOP Sign */
.stop-sign-arm {
    position: absolute;
    top: 14px;
    left: -18px;
    width: 22px;
    height: 22px;
    transform: rotateY(90deg); /* Hidden flat by default */
    transform-origin: right center;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 15;
}

/* Hexagon STOP sign */
.stop-sign-hexagon {
    width: 100%;
    height: 100%;
    background: #DC2626;
    color: #FFF;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 6.5px;
    text-align: center;
    line-height: 22px;
    border-radius: 4px;
    border: 1.5px solid #FFF;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
}

/* Wheels styling */
.bus-wheels {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 24px;
    z-index: 12;
}

.bus-wheel {
    position: absolute;
    width: 26px;
    height: 26px;
    background: #1E293B; /* Rubber */
    border-radius: 50%;
    border: 3.5px solid #334155;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.wheel-left { left: 40px; }
.wheel-right { right: 30px; }

.wheel-spoke {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: #E2E8F0; /* Alloy rim */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 2px dashed #B8860B; /* Accent cap spots */
}

.bus-wheel.spinning {
    animation: rotateWheel 0.6s linear infinite;
}

@keyframes rotateWheel {
    100% { transform: rotate(360deg); }
}

/* Exhaust & Puffing Smoke */
.bus-exhaust {
    position: absolute;
    bottom: 12px;
    left: -2px;
    width: 15px;
    height: 6px;
}

.smoke-puff {
    position: absolute;
    left: -15px;
    bottom: 2px;
    width: 10px;
    height: 10px;
    background: rgba(148, 163, 184, 0.6);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.school-bus.drive-active .smoke-puff {
    animation: puffUp 1.2s ease-out infinite;
}

@keyframes puffUp {
    0% { transform: translate(0, 0) scale(0.6); opacity: 0.8; }
    50% { transform: translate(-15px, -8px) scale(1.2); opacity: 0.4; }
    100% { transform: translate(-30px, -15px) scale(1.6); opacity: 0; }
}

/* Speech Bubble / Horn pop */
.honk-speech-bubble {
    position: absolute;
    top: -38px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    transform-origin: bottom center;
    background: #FFF;
    color: var(--primary);
    border: 2.5px solid var(--gold);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    white-space: nowrap;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 20;
}

.honk-speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: #FFF transparent;
    display: block;
    width: 0;
}

.honk-speech-bubble::before {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 11px 11px 0;
    border-style: solid;
    border-color: var(--gold) transparent;
    display: block;
    width: 0;
    z-index: -1;
}

.honk-speech-bubble.honk-active {
    transform: translateX(-50%) scale(1);
}

/* Main Loop Animation for Bus: Drive in -> Stop & fold STOP sign -> Drive away */
@keyframes driveStopGo {
    /* 0%: Start offscreen left */
    0% {
        left: -250px;
    }
    /* 0% to 20%: Bus drives to middle of the lane */
    20% {
        left: calc(50% - 110px);
    }
    /* 20% to 75%: Bus is STOPPED */
    75% {
        left: calc(50% - 110px);
    }
    /* 75% to 90%: Accelerates and drives offscreen right */
    90%, 100% {
        left: 105%;
    }
}

