:root {
    --primary: #c41e3a;
    --primary-dark: #9a1830;
    --secondary: #1a1a2e;
    --accent: #0f3460;
    --light: #f8f9fa;
    --gold: #d4af37;
}

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

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #2d2d2d;
    line-height: 1.65;
    overflow-x: hidden;
    font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 700;
}

/* ========== TOP BAR ========== */
.top-bar {
    background: var(--secondary);
    color: #fff;
    font-size: 0.82rem;
    padding: 7px 0;
    letter-spacing: 0.2px;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: var(--gold);
}

/* ========== TOP NEWS MARQUEE ========== */
.marquee-section {
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 9px 0;
    overflow: hidden;
}

.marquee-content {
    display: flex;
    animation: marquee 35s linear infinite;
    white-space: nowrap;
}

.marquee-content span {
    padding-right: 55px;
    font-weight: 500;
    font-size: 0.9rem;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========== NAVBAR ========== */
.navbar {
    background: #fff !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 6px 0;
    transition: all 0.3s ease;
}

.navbar.sticky-top {
    z-index: 1030;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 !important;
    margin-right: 8px;
}

.navbar-brand img {
    height: 58px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Hide extra brand text - logo already has text */
.brand-text {
    display: none;
}

.navbar-nav {
    gap: 1px;
}

.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .nav-link {
    color: var(--secondary) !important;
    font-weight: 600;
    font-size: 0.84rem;
    padding: 10px 11px !important;
    position: relative;
    transition: color 0.25s;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.25s;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 45%;
}

/* ===== COURSES DROPDOWN - HOVER OPEN ===== */
.dropdown-menu {
    border: none;
    box-shadow: 0 14px 45px rgba(0,0,0,0.13);
    border-radius: 10px;
    padding: 8px 0;
    min-width: 360px;
    max-height: 520px;
    overflow-y: auto;
    margin-top: 0 !important;
    border-top: 3px solid var(--primary);
}

.dropdown-item {
    padding: 10px 18px;
    font-size: 0.84rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    white-space: normal;
    line-height: 1.35;
}

.dropdown-item:hover {
    background: rgba(196, 30, 58, 0.07);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 22px;
}

.dropdown-item i {
    width: 20px;
    color: var(--primary);
    font-size: 0.9rem;
}

/* Desktop: open dropdown on hover */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
        animation: fadeInDown 0.22s ease;
    }
    
    .navbar-nav .dropdown > .dropdown-toggle::after {
        transition: transform 0.2s;
    }
    
    .navbar-nav .dropdown:hover > .dropdown-toggle::after {
        transform: rotate(180deg);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-admission {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    border: none;
    border-radius: 50px;
    padding: 8px 18px !important;
    font-weight: 600;
    font-size: 0.82rem !important;
    box-shadow: 0 4px 14px rgba(196, 30, 58, 0.28);
    transition: all 0.3s;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.btn-admission:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(196, 30, 58, 0.4);
    color: white !important;
}

.btn-admission::after {
    display: none !important;
}

/* ========== HERO CAROUSEL ========== */
.hero-carousel .carousel-item {
    min-height: 480px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-carousel .carousel-item.slide-1 {
    background: linear-gradient(135deg, rgba(26,26,46,0.92), rgba(196,30,58,0.72)), 
                linear-gradient(45deg, #1a1a2e, #0f3460);
}

.hero-carousel .carousel-item.slide-2 {
    background: linear-gradient(135deg, rgba(15,52,96,0.92), rgba(26,26,46,0.88)), 
                linear-gradient(45deg, #0f3460, #16213e);
}

.hero-carousel .carousel-item.slide-3 {
    background: linear-gradient(135deg, rgba(154,24,48,0.9), rgba(26,26,46,0.92)), 
                linear-gradient(45deg, #9a1830, #1a1a2e);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 75px 0;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.22;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.hero-content .highlight {
    color: var(--gold);
}

.hero-content p {
    font-size: 1.05rem;
    opacity: 0.94;
    margin-bottom: 26px;
    max-width: 560px;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    gap: 26px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.stat-item .number {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
}

.stat-item .label {
    font-size: 0.8rem;
    opacity: 0.9;
}

.carousel-indicators {
    bottom: 18px;
}

.carousel-indicators [data-bs-target] {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.45);
    border: none;
}

.carousel-indicators .active {
    background-color: var(--gold);
}

.carousel-control-prev,
.carousel-control-next {
    width: 48px;
    opacity: 0.75;
}

/* ========== SECTION TITLES ========== */
.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    position: relative;
    display: inline-block;
    margin-bottom: 12px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.section-title p {
    color: #666;
    font-size: 0.98rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ========== ABOUT ========== */
.about-section {
    padding: 70px 0;
    background: #fff;
}

.about-card {
    background: var(--light);
    border-radius: 12px;
    padding: 24px;
    height: 100%;
    border-left: 4px solid var(--primary);
    transition: transform 0.3s, box-shadow 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.07);
}

.about-card i {
    font-size: 1.9rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.about-card h4 {
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
    font-size: 1.05rem;
}

/* ========== DIRECTOR ========== */
.director-section {
    padding: 70px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef0f3 100%);
}

.director-img-wrapper {
    position: relative;
    text-align: center;
}

.director-img {
    width: 250px;
    height: 290px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border: 5px solid white;
    background: #ddd;
}

.director-badge {
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 6px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.director-message {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05);
    position: relative;
}

.director-message::before {
    content: '"';
    font-size: 5rem;
    color: rgba(196, 30, 58, 0.09);
    position: absolute;
    top: 6px;
    left: 16px;
    font-family: Georgia, serif;
    line-height: 1;
}

.director-message p {
    font-style: italic;
    color: #555;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    font-size: 0.95rem;
}

.director-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.05rem;
}

/* ========== COURSES ========== */
.courses-section {
    padding: 70px 0;
    background: #fff;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #eee;
}

.course-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 16px 36px rgba(0,0,0,0.1);
}

.course-card .card-img-top {
    height: 140px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.6rem;
}

.course-card .card-body {
    padding: 20px;
}

.course-card .duration {
    display: inline-block;
    background: rgba(196, 30, 58, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 11px;
    border-radius: 50px;
    margin-bottom: 8px;
}

.course-card h5 {
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 7px;
    font-size: 1rem;
}

.course-card p {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

.btn-course {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    border-radius: 50px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-course:hover {
    background: var(--primary);
    color: white;
}

/* ========== WHY US ========== */
.why-section {
    padding: 70px 0;
    background: var(--secondary);
    color: white;
}

.why-item {
    text-align: center;
    padding: 22px 16px;
}

.why-item i {
    font-size: 2.4rem;
    color: var(--gold);
    margin-bottom: 14px;
}

.why-item h4 {
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.why-item p {
    opacity: 0.85;
    font-size: 0.9rem;
}

/* ========== BRANCHES MARQUEE (above footer) ========== */
.branches-section {
    padding: 50px 0 40px;
    background: #f4f5f7;
    overflow: hidden;
}

.branches-section .section-title {
    margin-bottom: 30px;
}

.branches-marquee-wrapper {
    overflow: hidden;
    width: 100%;
}

.branches-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: branchesScroll 40s linear infinite;
}

.branches-track:hover {
    animation-play-state: paused;
}

@keyframes branchesScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.branch-card {
    width: 220px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    flex-shrink: 0;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
}

.branch-card .branch-img {
    height: 120px;
    background: linear-gradient(135deg, #1a1a2e, #0f3460);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.2rem;
}

.branch-card .branch-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.branch-card .branch-info {
    padding: 14px 12px;
    text-align: center;
}

.branch-card .branch-info h6 {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.branch-card .branch-info p {
    font-size: 0.78rem;
    color: #777;
    margin: 0;
    line-height: 1.35;
}

/* ========== CTA ========== */
.cta-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-weight: 800;
    margin-bottom: 10px;
    font-size: 1.9rem;
}

.cta-section .btn {
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 700;
    font-size: 0.98rem;
    margin-top: 16px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.cta-section .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 26px rgba(0,0,0,0.2);
    color: var(--primary);
}

/* ========== FOOTER ========== */
.footer {
    background: #0d0d1a;
    color: #bbb;
    padding: 50px 0 16px;
}

.footer h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    padding-bottom: 9px;
    font-size: 1rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--primary);
}

.footer a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer a:hover {
    color: var(--gold);
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer-bottom {
    border-top: 1px solid #222;
    margin-top: 30px;
    padding-top: 16px;
    text-align: center;
    font-size: 0.85rem;
}

.social-icons a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    background: #1a1a2e;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-right: 7px;
    transition: all 0.3s;
}

.social-icons a:hover {
    background: var(--primary);
    color: white;
}

/* ========== SCROLL TOP ========== */
.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s;
}

.scroll-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ========== RESPONSIVE ========== */

/* Mobile navbar collapse panel */
@media (max-width: 991.98px) {
    .navbar {
        padding: 8px 0;
    }

    .navbar-brand img {
        height: 48px;
        max-width: 200px;
        object-fit: contain;
    }

    .navbar-toggler {
        border: 1px solid #ddd;
        border-radius: 6px;
        padding: 6px 10px;
        box-shadow: none;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.15);
        outline: none;
    }

    .navbar-toggler-icon {
        width: 1.2em;
        height: 1.2em;
    }

    .navbar-collapse {
        background: #fff;
        border-radius: 10px;
        margin-top: 12px;
        padding: 8px 0 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        border: 1px solid #eee;
        max-height: 75vh;
        overflow-y: auto;
    }

    .navbar-nav {
        gap: 0;
        padding: 0 6px;
    }

    .navbar-nav .nav-item {
        border-bottom: 1px solid #f0f0f0;
    }

    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }

    .navbar-nav .nav-link {
        font-size: 0.95rem !important;
        padding: 13px 16px !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        font-weight: 600;
        color: #222 !important;
        border-radius: 6px;
    }

    .navbar-nav .nav-link::after {
        display: none !important; /* no underline on mobile */
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link.active {
        color: var(--primary) !important;
        background: rgba(196, 30, 58, 0.06);
    }

    /* Dropdown on mobile - full width nested */
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: none; /* disable hover on mobile */
    }

    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        min-width: 100% !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 4px 0 8px 0 !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border-top: none !important;
        background: #f8f9fa !important;
        transform: none !important;
    }

    .navbar-nav .dropdown-menu.show {
        display: block !important;
    }

    .dropdown-item {
        padding: 11px 16px 11px 28px !important;
        font-size: 0.88rem !important;
        font-weight: 500;
        color: #444 !important;
        border-left: none !important;
        border-bottom: 1px solid #eee;
        white-space: normal;
        line-height: 1.4;
    }

    .dropdown-item:last-child {
        border-bottom: none;
    }

    .dropdown-item:hover,
    .dropdown-item:active {
        background: rgba(196, 30, 58, 0.08) !important;
        color: var(--primary) !important;
        padding-left: 32px !important;
    }

    .dropdown-item i {
        width: 18px;
        font-size: 0.85rem;
        margin-right: 6px;
    }

    /* Enquiry button full width on mobile */
    .btn-admission {
        display: block !important;
        text-align: center;
        margin: 10px 12px 4px !important;
        padding: 12px 18px !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
    }

    .btn-admission::after {
        display: none !important;
    }

    .hero-content h1 {
        font-size: 1.85rem;
    }

    .director-img {
        width: 200px;
        height: 240px;
        margin-bottom: 26px;
    }
}

@media (max-width: 767.98px) {
    .top-bar {
        font-size: 0.75rem;
        text-align: center;
    }

    .top-bar .col-md-5 {
        margin-top: 4px;
    }

    .hero-carousel .carousel-item {
        min-height: 400px;
    }

    .hero-content {
        padding: 45px 0;
    }

    .hero-content h1 {
        font-size: 1.55rem;
    }

    .hero-content p {
        font-size: 0.95rem;
    }

    .hero-stats {
        gap: 14px;
    }

    .stat-item .number {
        font-size: 1.35rem;
    }

    .stat-item .label {
        font-size: 0.72rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .branch-card {
        width: 170px;
    }

    .navbar-brand img {
        height: 42px;
        max-width: 170px;
    }

    .marquee-content span {
        font-size: 0.82rem;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 38px;
        max-width: 150px;
    }

    .hero-content h1 {
        font-size: 1.4rem;
    }

    .cta-section h2 {
        font-size: 1.45rem;
    }

    .btn-admission {
        margin: 8px 8px 4px !important;
    }
}
