:root {
    /* ── Logo-matched colour palette ─────────────────────── */
    --primary: #2C2E7B;
    /* deep navy-purple  (logo border text) */
    --primary-dark: #1e2057;
    /* darker tint of primary                */
    --primary-light: #3d40a0;
    /* lighter tint for hovers               */
    --secondary: #CC2200;
    /* red  (logo gears & Estd. text)        */
    --secondary-hover: #a81c00;
    /* darker red for hover states           */
    --accent: #A8B8D8;
    /* steel-blue (logo outer ring)          */
    --accent-dark: #7e94ba;
    /* darker accent for borders             */
    --background: #f4f6fb;
    /* off-white tinted to match logo blue   */
    --text-dark: #1a1c4b;
    /* near-black with blue tint             */
    --text-light: #6270a0;
    /* muted blue-purple                     */
    --white: #ffffff;
    --shadow: 0 10px 15px -3px rgba(44, 46, 123, 0.07), 0 4px 6px -2px rgba(44, 46, 123, 0.04);
    --shadow-hover: 0 20px 25px -5px rgba(44, 46, 123, 0.14), 0 10px 10px -5px rgba(44, 46, 123, 0.06);
}

/* ════════════════════════════════════════════════════════════
   BASE
════════════════════════════════════════════════════════════ */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ════════════════════════════════════════════════════════════
   INNER PAGE STYLES (About, Academics, etc.)
════════════════════════════════════════════════════════════ */
.page-header {
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 6rem 5%;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 32, 87, 0.7);
    /* Dark blue overlay */
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3rem;
    margin: 0;
    font-weight: 800;
}

/* Inner Tables */
.table-responsive {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table-responsive th,
.table-responsive td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table-responsive th {
    background-color: #f8fafc;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.table-responsive tbody tr:hover {
    background-color: #f1f5f9;
}

/* Base Card Styling for inner pages */
.card-content {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border-top: 4px solid var(--primary);
}


/* ════════════════════════════════════════════════════════════
   HEADER & LOGO
════════════════════════════════════════════════════════════ */
header {
    background: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1001;
}


.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-logo {
    height: 90px;
    width: auto;
    transition: height 0.3s;
}

.logo-text h1 {
    margin: 0;
    font-size: 2.0rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: -0.5px;
    white-space: nowrap;
    font-size: clamp(1.2rem, 3vw, 2rem);
    line-height: 1.2;
}

.logo-text p {
    margin: 0;
    font-size: 1rem;
    color: black;
}

.logo-text1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    font-size: clamp(1rem, 2vw, 2rem);
}

.logo-text1 h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #0369a1;
    letter-spacing: 0.5px;
}

.logo-text1 h1 {
    margin: 2px 0 0;
    font-size: 26px;
    font-weight: 700;
    color: #1d4ed8;
    letter-spacing: 2px;
}

.code-box {
    background: linear-gradient(135deg, #e0f2fe, #f8fafc);
    border: 1px solid #bae6fd;
    padding: 8px 16px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #2563eb;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
}

/* ════════════════════════════════════════════════════════════
   NAVIGATION
════════════════════════════════════════════════════════════ */
.main-nav {
    background: var(--primary);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(44, 46, 123, 0.25);
    display: flex;
    justify-content: center;
    width: 100%;
}

.mobile-nav-header {
    display: none;
    padding: 1.5rem;
    background: var(--primary-dark);
    color: var(--white);
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-menu-btn {
    font-size: 1.5rem;
    cursor: pointer;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex-wrap: nowrap;
}

nav a {
    text-decoration: none;
    color: var(--white);
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1rem;
    padding: 1rem 0.7rem;
    display: block;
    white-space: nowrap;
}

nav a:hover,
nav a.active {
    background: var(--secondary);
    color: var(--white);
    border-radius: 4px;
}

.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* ── Dropdown ──────────────────────────────────────────── */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #000000;
    /* Dropdown background changed to black */
    min-width: 210px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    border-top: 3px solid var(--secondary);
}

.dropdown-content a {
    color: #ffffff !important;
    /* Text changed to white for visibility on black */
    font-weight: 500;
    padding: 12px 16px;
    border-bottom: 1px solid #333333;
    /* Darker border for black background */
    transition: all 0.2s ease;
}

.dropdown-content a:hover {
    background-color: var(--secondary);
    color: var(--white);
    padding-left: 22px;
    /* Add a subtle sliding effect */
}

/* ── Mega Menu ─────────────────────────────────────────── */
.mega-dropdown .dropdown-content {
    width: 750px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1.5rem;
    background: #eef2fa;
    border-top: 3px solid var(--secondary);
    border-radius: 0 0 8px 8px;
    display: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    cursor: default;
}

.mega-dropdown:hover .dropdown-content {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2.5rem;
}

.mega-col h4 {
    color: var(--primary);
    font-size: 1.05rem;
    margin-top: 0;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.mega-col h4 i {
    color: var(--secondary);
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

.mega-col a {
    color: var(--text-light);
    padding: 0.35rem 0.4rem;
    border-bottom: none !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.mega-col a:after {
    display: none !important;
}

.mega-col a:hover {
    color: var(--primary);
    background: var(--background);
    border-radius: 6px;
}

.mega-col a i {
    color: var(--text-light);
    font-size: 0.9rem;
    transition: color 0.2s;
    width: 20px;
    text-align: center;
}

.mega-col a:hover i {
    color: var(--secondary);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ════════════════════════════════════════════════════════════
   TOP BAR
════════════════════════════════════════════════════════════ */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 0.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.top-bar a {
    color: var(--white);
    text-decoration: none;
}

.top-bar .apply-btn {
    background: var(--secondary);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════════ */
footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 5%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 4rem;
}

.footer-bottom {
    background: #11134a;
    color: #c8d0e8;
    text-align: center;
    padding: 1rem 5%;
    width: 100%;
    font-size: 0.88rem;
}

/* ════════════════════════════════════════════════════════════
   BUTTONS & LAYOUT
════════════════════════════════════════════════════════════ */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary-hover);
}

.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 2rem 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    color: var(--primary);
    font-weight: 700;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto 0;
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVENESS (MEDIUM & SMALL SCREENS)
════════════════════════════════════════════════════════════ */

@media (max-width: 1100px) {
    nav a {
        font-size: 0.85rem;
        padding: 1rem 0.5rem;
    }

    .logo-text h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 992px) {
    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hide off-screen */
        width: 300px;
        height: 100vh;
        background: var(--primary);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        z-index: 2000;
        display: flex !important;
        /* Keep flex but hide with right property */
        flex-direction: column;
        justify-content: flex-start;
    }

    .main-nav.active {
        right: 0;
    }

    .mobile-nav-header {
        display: flex;
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    nav a {
        width: 100%;
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown-content {
        position: static;
        background: var(--primary-dark);
        box-shadow: none;
        display: none;
        width: 100%;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    header {
        padding: 0.8rem 1.5rem;
        justify-content: space-between;
    }

    .logo-container {
        gap: 1rem;
        flex: 1;
    }

    .hide-on-mobile {
        display: none !important;
    }

    .logo-text h1 {
        font-size: 1.1rem;
        white-space: normal;
        line-height: 1.3;
    }

    .logo-text p {
        font-size: 0.8rem;
    }

    .logo-text1 {
        display: none;
        /* Hide counselling code on mobile header to save space */
    }

    .mobile-menu-btn {
        display: block;
        z-index: 2001;
        padding: 0.5rem;
        margin-left: 1rem;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }

    /* Hide top bar on small mobiles */
    .hero-carousel {
        height: 70vh;
        min-height: 500px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .grid-cards {
        grid-template-columns: 1fr;
    }

    .logo-text p.affiliated {
        display: none;
    }

    /* Hide minor text */
}

@media (max-width: 480px) {
    .main-logo {
        height: 60px;
    }

    .logo-text h1 {
        font-size: 1.1rem;
    }

    .hero-carousel {
        height: 60vh;
    }

    .btn {
        width: 100%;
    }

    /* Stack buttons */
}

/* ════════════════════════════════════════════════════════════
   ENQUIRY BUTTON & MODAL
   ════════════════════════════════════════════════════════════ */
.enquiry-btn {
    background: var(--primary);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
}

.enquiry-btn:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 46, 123, 0.15);
}

.enquiry-btn i {
    font-size: 1.1rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-container {
    background: var(--white);
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-header {
    background: var(--primary);
    color: var(--white);
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.close-modal {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.2s;
}

.close-modal:hover {
    transform: scale(1.1);
}

.modal-body {
    padding: 1.5rem;
}

.enquiry-form .form-group {
    margin-bottom: 1.2rem;
}

.enquiry-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

.enquiry-form input,
.enquiry-form select,
.enquiry-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.enquiry-form input:focus,
.enquiry-form select:focus,
.enquiry-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(44, 46, 123, 0.1);
}

.submit-enquiry {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.submit-enquiry:hover {
    background: var(--primary-dark);
}

.submit-enquiry:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-status {
    margin-top: 1rem;
    padding: 0.8rem;
    border-radius: 6px;
    display: none;
    font-size: 0.9rem;
    text-align: center;
}

.form-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 992px) {
    .enquiry-btn {
        display: none;
    }
}

/* ════════════════════════════════════════════════════════════
   ADMIN PORTAL PREMIUM OVERRIDES
════════════════════════════════════════════════════════════ */
.admin-layout {
    display: flex !important;
    min-height: 100vh !important;
    background: #f1f5f9 !important;
    /* Premium light blue-gray background */
}

/* Sidebar styling overrides */
.admin-layout .sidebar {
    width: 280px !important;
    min-width: 280px !important;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    color: white !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1) !important;
    z-index: 10;
}

.admin-layout .main-content {
    flex: 1 !important;
    padding: 2.5rem 3rem !important;
    background: transparent !important;
    overflow-y: auto !important;
    height: 100vh !important;
    box-sizing: border-box !important;
}

/* Admin Container & Form Cards */
.admin-layout .admin-container,
.admin-layout .form-card,
.admin-layout .dashboard-card {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    padding: 2.5rem !important;
    margin-bottom: 2.5rem !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.admin-layout h1,
.admin-layout h3 {
    color: #0f172a !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
}

.admin-layout h1 {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
}

/* Admin Table Styles */
.admin-layout table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid #e2e8f0 !important;
}

.admin-layout th,
.admin-layout td {
    padding: 1.25rem 1.5rem !important;
    text-align: left !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

.admin-layout th {
    background: #f8fafc !important;
    color: #64748b !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.admin-layout tbody tr {
    transition: background-color 0.2s ease !important;
}

.admin-layout tbody tr:hover {
    background-color: #f8fafc !important;
}

.admin-layout tbody tr:last-child td {
    border-bottom: none !important;
}

/* Form Groups inside Admin */
.admin-layout .form-group label {
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.95rem !important;
}

.admin-layout .form-group input,
.admin-layout .form-group select,
.admin-layout .form-group textarea {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 0.85rem 1rem !important;
    color: #0f172a !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.admin-layout .form-group input:focus,
.admin-layout .form-group select:focus,
.admin-layout .form-group textarea:focus {
    border-color: var(--secondary) !important;
    background: #ffffff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Buttons in Admin */
.admin-layout .btn,
.admin-layout button {
    border-radius: 8px !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.admin-layout .msg {
    border-radius: 8px !important;
    font-weight: 500 !important;
    border-left: 4px solid transparent !important;
}

.admin-layout .msg.success {
    border-left-color: #10b981 !important;
}

.admin-layout .msg.error {
    border-left-color: #ef4444 !important;
}
/* Reusable Responsive Sidebar Layout */
.sidebar-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
}

.sidebar-layout-main {
    min-width: 0;
}

@media (max-width: 992px) {
    .sidebar-layout-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .sidebar-layout-sidebar {
        position: static !important;
    }
}
