/*
 * EIMS Nursing College Stylesheet
 * Crimson Red theme with Gold accents — distinct identity from AHS.
 */

:root {
    --primary-color: #c0003c;
    --primary-dark: #8b0028;
    --primary-light: #d4174f;
    --accent-color: #f5a623;

    --text-color: #2d2d2d;
    --text-light: #5a5a5a;
    --bg-light: #fff5f8;
    --bg-gray: #fce8ef;
    --white: #ffffff;

    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 12px rgba(192, 0, 60, 0.07);
    --shadow: 0 4px 18px rgba(192, 0, 60, 0.10);
    --shadow-hover: 0 12px 35px rgba(192, 0, 60, 0.20);

    --font-main: 'Nunito', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    /* Offset for sticky header */
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.7;
    background-color: var(--white);
    letter-spacing: 0.01em;
    /* overflow-x: hidden; Removed to restore mobile position:sticky headers */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Base Utility Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.ms-3 {
    margin-left: 1rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.section-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 5px 16px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(192, 0, 60, 0.25);
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    max-width: 700px;
    margin-bottom: 40px;
}

.section-header.text-center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(192, 0, 60, 0.30);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, #f0b84a 100%);
    border-color: transparent;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(245, 166, 35, 0.40);
    color: var(--white);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
    border-radius: 50px;
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 50px;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-link {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
}

.btn-link i {
    margin-left: 8px;
    font-size: 0.85em;
    transition: var(--transition);
}

.btn-link:hover i {
    transform: translateX(5px);
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-contact span {
    margin-right: 20px;
}

.top-contact i {
    margin-right: 5px;
    color: var(--accent-color);
}

.top-links a {
    color: var(--white);
    margin-left: 20px;
}

.top-links a:hover {
    color: var(--accent-color);
}

/* Sticky Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1005;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    max-width: 100%;
    min-height: 150px;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 1px;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    background: none;
    border: none;
    cursor: pointer;
}

/* Navigation & Mega Menu */

/* Desktop: nav spans full header width, links centered */
.nav {
    position: fixed;
    top: 0;
    left: 120px; /* Avoid logo area */
    right: 0;
    height: auto;
    min-height: 150px;
    display: flex;
    justify-content: center;
    /* align nav links across the header */
    align-items: center;
    background: transparent;
    z-index: 1006;
    pointer-events: none;
    /* let clicks pass through to logo/header beneath */
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 24px;
    max-width: 100%;
    margin-left: 0;
    padding-right: 0px;
    padding-left: 0px;
    padding-top: 15px;
    padding-bottom: 15px;
    pointer-events: auto;
    /* re-enable clicks (parent nav has pointer-events:none) */
}

.nav-item {
    margin: 0;
    position: relative;
}

.nav-link {
    color: var(--text-color);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 8px 0;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-link i {
    font-size: 0.75rem;
    margin-left: 6px;
    transition: var(--transition);
}

.nav-item:hover .nav-link {
    color: var(--primary-color);
}

.nav-item:hover .nav-link i {
    transform: rotate(180deg);
}

/* Hover-based Mega Dropdown */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-20%) translateY(20px);
    background-color: var(--white);
    min-width: 450px;
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
    padding: 25px;
    display: flex;
    gap: 30px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    pointer-events: none;
    border-top: 3px solid var(--primary-color);
}

.mega-menu.single-col {
    min-width: 250px;
    width: 250px;
}

.nav-item.has-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-20%) translateY(0);
    pointer-events: auto;
}

.mega-menu-col {
    flex: 1;
}

.mega-menu-col h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bg-gray);
}

.mega-menu-col ul li {
    margin-bottom: 8px;
}

.mega-menu-col ul li a {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: var(--transition);
    display: block;
}

.mega-menu-col ul li a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* About Us wide mega-menu */
.mega-menu.about-menu {
    min-width: 260px;
    width: 260px;
    padding: 18px 0;
    left: 0;
    transform: translateX(0) translateY(20px);
}
.nav-item.has-dropdown:hover .mega-menu.about-menu {
    transform: translateX(0) translateY(0);
}
.about-menu .mega-menu-col {
    width: 100%;
}
.about-menu .mega-menu-col ul li {
    margin-bottom: 0;
    position: relative;
}
.about-menu .mega-menu-col ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 22px;
    font-size: 0.88rem;
    color: var(--text-color);
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
}
.about-menu .mega-menu-col ul li a:hover,
.about-menu .mega-menu-col ul li.has-sub:hover > a {
    background: rgba(192,0,60,0.07);
    color: var(--primary-color);
    transform: none;
}
.about-menu .mega-menu-col ul li a i.sub-arrow {
    font-size: 0.7rem;
    color: #bbb;
    transition: color 0.2s;
}
.about-menu .mega-menu-col ul li.has-sub:hover > a i.sub-arrow {
    color: var(--primary-color);
}

.mega-menu.course-admission-menu {
    min-width: 290px;
    width: 290px;
}

.mega-menu.core-members-menu {
    min-width: 230px;
    width: 230px;
}

.mega-menu.academics-menu {
    min-width: 300px;
    width: 300px;
}

.mega-menu.facilities-menu {
    min-width: 300px;
    width: 300px;
}

.mega-menu.research-menu {
    min-width: 280px;
    width: 280px;
}

.mega-menu.affiliations-menu {
    min-width: 190px;
    width: 190px;
}

.mega-menu.training-placement-menu {
    min-width: 310px;
    width: 310px;
}

.mega-menu.feedback-menu {
    min-width: 240px;
    width: 240px;
}

/* Sub-dropdown flyout */
.has-sub > .sub-dropdown {
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    min-width: 210px;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.13);
    border-top: 3px solid var(--primary-color);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: all 0.25s ease;
    z-index: 200;
    pointer-events: none;
}
.has-sub:hover > .sub-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}
.sub-dropdown li a {
    padding: 9px 20px !important;
    font-size: 0.86rem !important;
    color: var(--text-color) !important;
    display: block !important;
    justify-content: unset !important;
}
.sub-dropdown li a:hover {
    background: rgba(192,0,60,0.07) !important;
    color: var(--primary-color) !important;
    transform: none !important;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1538108149393-fbbd81895907?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    /* fixed causes rendering bugs on iOS Safari – use scroll instead */
    background-attachment: scroll;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(139, 0, 40, 0.50) 0%, rgba(192, 0, 60, 0.40) 60%, rgba(0, 0, 0, 0.30) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: var(--white);
    max-width: 800px;
}

.hero-content h1 {
    font-size: clamp(1.6rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    animation: slideInLeft 0.9s ease;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: clamp(0.9rem, 2.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 35px;
    animation: slideInLeft 0.9s ease 0.2s;
    animation-fill-mode: backwards;
}

.hero-actions {
    animation: slideInLeft 0.9s ease 0.4s;
    animation-fill-mode: backwards;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    background-color: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
}

.feature-item h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-item p {
    font-size: 0.9rem;
    margin: 0;
}

.about-image-wrapper {
    position: relative;
}

.about-img {
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(192, 0, 60, 0.40);
    text-align: center;
    border: 5px solid var(--white);
}

.experience-badge .num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Cards (Courses & Facilities) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-bottom: 3px solid var(--accent-color);
}

.course-card .card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.course-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .card-img img {
    transform: scale(1.05);
}

.duration-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-card .card-body {
    padding: 25px;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.facility-card {
    padding: 35px 20px;
}

.facility-card .icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(192, 0, 60, 0.07), rgba(245, 166, 35, 0.07));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.facility-card:hover .icon-wrapper {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-color: var(--accent-color);
    transform: rotate(5deg) scale(1.1);
}

.facility-card .icon-wrapper i {
    font-size: 2.2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.facility-card:hover .icon-wrapper i {
    color: var(--white);
}

/* Call to Action Section */
.cta {
    background-color: var(--bg-gray);
    position: relative;
}

.cta-inner {
    background-color: var(--white);
    padding: 60px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%230b3c5d" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z" /%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

/* Footer Section */
.footer {
    background: linear-gradient(160deg, #6a001c 0%, var(--primary-dark) 60%, #1a0008 100%);
    color: rgba(255, 255, 255, 0.82);
    padding-top: 70px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer h3:not(.footer-logo)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
    border-radius: 2px;
}

.footer-logo {
    font-size: 2rem !important;
    letter-spacing: 1px;
}

.footer-text {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links a i {
    font-size: 0.8rem;
    margin-right: 8px;
    color: var(--accent-color);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.contact-info i {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-top: 4px;
}

.footer-bottom {
    background-color: #1a0008;
    padding: 20px 0;
    font-size: 0.9rem;
    border-top: 2px solid rgba(245, 166, 35, 0.25);
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    margin: 0;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    margin-left: 15px;
}

.footer-legal a:hover {
    color: var(--white);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(192, 0, 60, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(192, 0, 60, 0); }
}

/* Responsive Design */
@media (min-width: 769px) and (max-width: 1280px) {
    .nav-list {
        gap: 0 10px;
        max-width: 760px;
    }

    .nav-link {
        font-size: 0.72rem;
    }
}

@media (min-width: 1281px) and (max-width: 1500px) {
    .nav-list {
        gap: 0 12px;
        max-width: 900px;
    }

    .nav-link {
        font-size: 0.76rem;
    }
}

@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }
}

/* Tablet: 768px–1024px adjustments */
@media (max-width: 900px) {
    .hero {
        height: 480px;
    }

    .section {
        padding: 60px 0;
    }
}

/* ============================================
   RIGHT-SIDE SLIDING DRAWER — Mobile Nav
   ============================================ */

/* Overlay backdrop — no blur (bleeds into nav regardless of DOM position in Chrome) */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(139, 0, 40, 0.55);
    z-index: 1008;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
}

/* Drawer header is mobile-only — hide on desktop */
.drawer-header {
    display: none;
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    .logo {
        position: relative;
        z-index: 998;
    }

    .mobile-menu-toggle {
        position: relative;
        z-index: 1010;
        display: block;
        padding: 8px;
        border-radius: 6px;
        transition: background 0.2s ease;
    }

    .mobile-menu-toggle:hover {
        background: rgba(11, 60, 93, 0.08);
    }

    /* Animate hamburger → X */
    .mobile-menu-toggle .fa-bars,
    .mobile-menu-toggle .fa-times {
        transition: all 0.25s ease;
    }

    .mobile-menu-toggle.active .fa-bars {
        display: none;
    }

    .mobile-menu-toggle .fa-times {
        display: none;
    }

    .mobile-menu-toggle.active .fa-times {
        display: inline-block;
    }

    /* ---- Top-Down Dropdown Nav ---- */
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 0;
        height: auto;
        min-height: 0; /* Override desktop min-height */
        background-color: var(--white);
        box-shadow: 0 8px 30px rgba(192, 0, 60, 0.20);
        z-index: 1009;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
        isolation: isolate;
    }

    .nav.active {
        max-height: 100dvh;
    }

    /* Drawer top header strip */
    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(192, 0, 60, 0.15);
        background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
        flex-shrink: 0;
    }

    .drawer-close {
        background: rgba(255, 255, 255, 0.15);
        border: none;
        color: var(--white);
        width: 34px;
        height: 34px;
        border-radius: 50%;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s ease;
        flex-shrink: 0;
    }

    .drawer-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

    /* Scrollable nav list area */
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        padding: 8px 0 30px;
        margin-left: 0;
        padding-right: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        flex: 1;
        max-height: calc(100dvh - 60px);
    }

    .nav-item {
        width: 100%;
        margin: 0;
    }

    .nav-link {
        padding: 14px 20px;
        border-bottom: 1px solid var(--bg-light);
        width: 100%;
        justify-content: space-between;
        font-size: 0.92rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        color: var(--primary-color) !important;
        text-transform: uppercase;
    }

    .nav-link:hover {
        background: rgba(192, 0, 60, 0.05);
        color: var(--primary-color);
    }

    .mega-menu {
        position: static;
        width: 100%;
        min-width: auto;
        transform: none;
        box-shadow: none;
        padding: 8px 0 8px 16px;
        flex-direction: column;
        gap: 2px;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        border-top: none;
        background: rgba(11, 60, 93, 0.03);
    }

    .nav-item.has-dropdown:hover .mega-menu {
        display: none;
        /* hover disabled on mobile */
    }

    /* Hero */
    .hero {
        height: 420px;
    }

    .hero-control {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
        opacity: 0.7;
    }

    .hero:hover .hero-control {
        opacity: 1;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image-wrapper {
        margin-top: 40px;
        order: -1;
    }

    .experience-badge {
        right: 0;
        padding: 15px 20px;
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .facilities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .cta-inner {
        padding: 30px 15px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-outline-primary.ms-3 {
        margin-left: 0 !important;
        margin-top: 15px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-grid .footer-col img {
        max-width: 200px;
    }
}

@media (max-width: 576px) {

    .card-grid,
    .facilities-grid,
    .about-features {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .section {
        padding: 40px 0;
    }

    .hero {
        height: 380px;
    }

    .container {
        padding: 0 15px;
    }

    .news-ticker-label {
        padding: 0 12px;
        font-size: 0.75rem;
        letter-spacing: 0;
    }

    .news-ticker-wrap {
        font-size: 0.8rem;
    }
}

/* Very small phones: 320px–400px */
@media (max-width: 400px) {
    .hero {
        height: 320px;
    }

    .logo img {
        height: 55px !important;
    }

    .mobile-menu-toggle {
        font-size: 1.3rem;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .card-grid,
    .facilities-grid {
        grid-template-columns: 1fr;
    }

    .experience-badge .num {
        font-size: 1.8rem;
    }

    .footer-bottom p {
        font-size: 0.8rem;
    }

    .hero-control {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .news-ticker-label {
        display: none;
        /* Too cramped on 320px */
    }
}


/* Active Navbar States */
.nav-item {
    position: relative;
}

.nav-item.active .nav-link {
    color: var(--primary-color) !important;
    position: relative;
    font-weight: 700;
}

.nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    pointer-events: none;
}

/* Mobile active nav: background highlight instead of underline */
@media (max-width: 768px) {
    .nav-item.active .nav-link {
        background-color: rgba(192, 0, 60, 0.08);
        border-radius: 0;
        padding-left: 18px;
        padding-right: 14px;
        border-left: 4px solid var(--accent-color);
    }

    .nav-item.active .nav-link::after {
        display: none;
    }
}

/* Logo Alignment Fix */
.logo {
    /* Removed translate as header is now full width */
}

.logo img {
    height: 85px !important;
    width: auto !important;
    max-width: none !important;
}

/* Hero Slideshow */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

/* Hero Slideshow Controls */
.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-control:hover {
    background: var(--primary-color);
}

.hero:hover .hero-control {
    opacity: 1;
}

.prev-slide {
    left: clamp(8px, 3vw, 40px);
}

.next-slide {
    right: clamp(8px, 3vw, 40px);
}


/* Onload Popup Modal */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    position: relative;
    max-width: 800px;
    width: 90%;
    background: transparent;
    border-radius: 8px;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.popup-overlay.show .popup-content {
    transform: scale(1);
}

.popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #ff4757;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-close:hover {
    background: #ff6b81;
}

/* Scroll to Top Button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    font-size: 20px;
    border: none;
    outline: none;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    box-shadow: 0 4px 15px rgba(192, 0, 60, 0.4);
    transition: all 0.3s ease;
}

#scrollTopBtn:hover {
    background: linear-gradient(135deg, var(--accent-color), #f0b84a);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(245, 166, 35, 0.45);
}

/* Floating Notification Bell */
#notificationBell {
    position: fixed;
    bottom: 95px;
    /* Above scroll-to-top */
    right: 30px;
    z-index: 100;
    font-size: 24px;
    border: none;
    outline: none;
    background-color: #f39c12;
    /* Distinct warm alert color */
    color: white;
    cursor: pointer;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

#notificationBell:hover {
    transform: translateY(-5px) scale(1.05);
    background-color: #d68910;
}

#notificationBadge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px solid white;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#notificationBadge.show {
    opacity: 1;
    visibility: visible;
}

/* Live News Ticker */
.news-ticker-wrap {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    height: 42px;
    width: 100%;
    font-size: 0.88rem;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--accent-color);
    letter-spacing: 0.02em;
}

.news-ticker-label {
    background-color: var(--accent-color);
    color: white;
    font-weight: 600;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.news-ticker-label::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 10px solid var(--accent-color);
}

.news-ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
}

.news-ticker-content {
    display: flex;
    width: max-content;
    height: 100%;
    align-items: center;
    animation: scrollTicker 35s linear infinite;
}

.news-ticker-content:hover {
    animation-play-state: paused;
}

.news-item {
    padding: 0 50px;
    white-space: nowrap;
    position: relative;
}

.news-item::after {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    right: 0;
}

.news-item:last-child::after {
    content: '';
}

@keyframes scrollTicker {
    0% {
        transform: translateX(100vw);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Precision Mobile Bug Resets */
@media (max-width: 991px) {
    .header-inner {
        height: auto !important;
        min-height: 80px;
        padding: 0 !important;
    }

    .logo {
        transform: none !important;
        margin-left: 10px;
    }

    .logo img {
        height: 65px !important;
    }

    .nav-item.active .nav-link::after {
        display: none !important;
        /* handled by bg-highlight in mobile drawer */
    }

    .mobile-menu-toggle {
        margin-right: 15px !important;
    }

    /* nav.active is now fully controlled by the drawer CSS above */
}


/* Mobile Dropdown Click-to-Open Overrides */
@media (max-width: 991px) {
    .nav-list li.has-dropdown .mega-menu {
        position: static !important;
        display: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        animation: none !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
    }

    .nav-list li.has-dropdown .mega-menu.mobile-open {
        display: flex !important;
        flex-direction: column;
        padding: 10px 15px;
        margin-top: 5px;
        background-color: rgba(192, 0, 60, 0.03);
        border-radius: 0;
        border-left: 3px solid var(--primary-color);
    }

    .nav-item.has-dropdown:hover .mega-menu {
        display: none !important;
    }

    .nav-item.has-dropdown:hover .mega-menu.mobile-open {
        display: flex !important;
    }

    .about-menu .mega-menu-col ul li a {
        padding: 9px 12px;
    }

    .about-menu .mega-menu-col ul li.has-sub > a i.sub-arrow {
        transform: rotate(90deg);
    }

    .about-menu .has-sub > .sub-dropdown {
        position: static;
        display: block;
        min-width: 0;
        margin: 0 0 6px 12px;
        padding: 4px 0 4px 10px;
        border-top: none;
        border-left: 2px solid rgba(192, 0, 60, 0.18);
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
        background: transparent;
    }

    .about-menu .sub-dropdown li a {
        padding: 7px 10px !important;
        font-size: 0.84rem !important;
    }
}


/* Universal Mobile Text Overflow and Padding Rescuer */
@media (max-width: 768px) {

    p,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    span,
    div,
    a {
        overflow-wrap: anywhere !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }

    /* Safely scale down hardcoded 40px inline paddings on narrow viewports */
    div[style*="padding: 30px"],
    div[style*="padding: 40px"],
    div[style*="padding: 50px"],
    div[style*="padding: 60px"] {
        padding: 15px !important;
    }
}

/* Level 3 Dropdown */
.sub-dropdown .has-sub {
    position: relative;
}
.sub-dropdown .sub-dropdown-level-3 {
    top: 0;
    left: 100%;
    margin-left: 1px;
}


/* Explicit fix for level 3 dropdown visibility bug */
.sub-dropdown-level-3 {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.has-sub:hover > .sub-dropdown-level-3 {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
