/* --- Root Variables Matching Reference Image --- */
:root {
    --color-primary: #0a3161;
    --color-orange: #ff6b00;
    --color-teal: #00b894;
    --color-whatsapp: #25D366;

    --text-dark: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    /* --bg-white: #fff; */
    --font-primary: 'Poppins', sans-serif;
}

/* --- Global Scaling --- */
body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    font-size: 1.05rem;
    /* Scaled up base text */
    padding-bottom: 80px;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* --- Topbar --- */
.topbar {
    background-color: var(--color-primary);
    color: white;
}

.topbar a {
    color: white;
    transition: opacity 0.3s ease;
}

.topbar a:hover {
    opacity: 0.8;
}

/* --- Action Buttons --- */
.btn-student {
    background-color: var(--color-primary);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-student:hover {
    background-color: #08264d;
    color: white;
    transform: translateY(-2px);
}

.btn-exam {
    background-color: var(--color-orange);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-exam:hover {
    background-color: #e66000;
    color: white;
    transform: translateY(-2px);
}

.btn-online {
    background-color: var(--color-teal);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-online:hover {
    background-color: #00a383;
    color: white;
    transform: translateY(-2px);
}

/* --- Desktop Navigation & Dropdowns --- */
.main-nav .nav-link {
    color: var(--text-dark);
    font-size: 1.05rem;
    /* Larger nav text */
    font-weight: 500;
    padding: 1.2rem 1.2rem !important;
    /* Increased padding */
    position: relative;
    transition: color 0.3s ease;
}

.main-nav .nav-link:hover,
.main-nav .nav-link:focus {
    color: var(--color-primary);
}

/* Yellow Active Underline */
.main-nav .nav-link.active {
    color: var(--color-primary);
}

.main-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 1.2rem;
    right: 1.2rem;
    height: 3px;
    /* Slightly thicker */
    background-color: #f59e0b;
    border-radius: 2px;
}

/* Dropdown Hover Settings */
.main-nav .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.dropdown-menu {
    border-radius: 12px;
    font-size: 1rem;
    min-width: 240px;
    /* Wider dropdowns matching image */
}

.dropdown-item {
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
    color: var(--color-primary);
    padding-left: 1.5rem;
    /* Slight nudge on hover */
}

/* Flip chevron on desktop hover */
.dropdown:hover .nav-chevron {
    transform: rotate(180deg);
}

.nav-chevron {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* --- Sticky Wrapper --- */
.sticky-wrapper {
    background-color: white;
    transition: box-shadow 0.3s ease;
}

/* --- Mobile Menu & Submenus --- */
.btn-close-custom {
    background-color: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #000;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-close-custom:hover {
    background-color: #e5e7eb;
    transform: scale(1.05);
}

.mobile-nav-links a {
    transition: all 0.2s ease;
    border-color: #f1f5f9 !important;
}

.mobile-nav-links>a:hover {
    background-color: #f8fafc;
    padding-left: 8px !important;
}

.mobile-nav-links a:hover span,
.mobile-nav-links a:hover i {
    color: var(--color-primary) !important;
}

/* Submenu rotation */
.mobile-nav-links a[aria-expanded="true"] .mobile-chevron {
    transform: rotate(180deg);
    color: var(--color-primary) !important;
}

.mobile-chevron {
    transition: transform 0.3s ease;
}

/* Inner submenu styling */
.mobile-nav-links .collapse a {
    font-size: 0.95rem;
}

.mobile-nav-links .collapse a:hover {
    color: var(--color-primary) !important;
    padding-left: 5px;
}

/* --- App-like Mobile Bottom Nav --- */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    border-top: 1px solid #e2e8f0;
}

.mobile-bottom-nav .nav-item {
    flex: 1;
    color: var(--text-muted);
    transition: color 0.2s ease;
}

.mobile-bottom-nav .nav-item.active,
.mobile-bottom-nav .nav-item:hover {
    color: var(--color-primary);
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    width: 65px;
    /* Scaled up */
    height: 65px;
    bottom: 95px;
    right: 25px;
    background-color: var(--color-whatsapp);
    color: white;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    /* Bigger icon */
    z-index: 1050;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
}

@media (min-width: 992px) {
    .whatsapp-float {
        bottom: 40px;
        right: 40px;
    }
}

/* --- Premium Mega Footer Styling --- */
.premium-footer {
    background-color: #0b1120;
    /* Deep, rich slate */
    color: #94a3b8;
    overflow: hidden;
}

/* Ambient Background Glows */
.footer-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 1;
    pointer-events: none;
}

.glow-top-left {
    width: 400px;
    height: 400px;
    background: rgba(10, 49, 97, 0.4);
    top: -150px;
    left: -150px;
}

.glow-bottom-right {
    width: 300px;
    height: 300px;
    background: rgba(0, 184, 148, 0.15);
    /* Teal tint */
    bottom: -100px;
    right: -50px;
}

/* Glassmorphism Contact Banner */
.glass-contact-banner {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.footer-logo-wrap {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), #1e3a8a);
}

.contact-item {
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
}

/* Footer Headings */
.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 30px;
    height: 2px;
    background-color: var(--color-orange);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.col-12:hover .footer-heading::after {
    width: 50px;
}

/* Footer Navigation Links */
.footer-nav li {
    margin-bottom: 0.8rem;
}

.footer-nav a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    padding-left: 0;
    transition: all 0.3s ease;
}

.footer-nav a::before {
    content: '\F285';
    /* Bootstrap Chevron Icon */
    font-family: 'bootstrap-icons';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--color-teal);
    opacity: 0;
    transition: all 0.3s ease;
}

.footer-nav a:hover {
    color: #ffffff;
    padding-left: 18px;
    /* Smoothly pushes text right */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    /* Subtle text glow */
}

.footer-nav a:hover::before {
    opacity: 1;
}

/* Glass Social Icons */
.social-glass-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.social-glass-icons a:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(10, 49, 97, 0.5);
}

/* Bottom Bar */

.footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

.footer-legal a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #ffffff;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .premium-footer {
        padding-bottom: 70px;
        /* Space for the mobile app nav */
    }

    .glass-contact-banner {
        text-align: center;
        align-items: center;
    }

    .glass-contact-banner .d-flex {
        justify-content: center;
    }
}

/* --- Fixes for Footer Text Visibility & Icon Centering --- */

/* 1. Boost Text Visibility */
/* Overrides Bootstrap's default text-muted on dark backgrounds */
.premium-footer p.text-muted,
.premium-footer .footer-bottom .text-muted,
.premium-footer span.text-muted {
    color: #cbd5e1 !important;
    /* Brighter slate color for excellent contrast */
    opacity: 0.9;
}

/* Slightly brighten the nav links for better accessibility */
.footer-nav a {
    color: #cbd5e1 !important;
}

/* 2. Perfectly Center Social Icons */
.social-glass-icons a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    /* Use inline-flex for perfect button sizing */
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 0;
    /* Strip any accidental padding */
}

/* Strip the inherent font line-height that pushes the icon off-center */
.social-glass-icons a i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    /* Optional: If a specific icon still looks 1px off visually, you can nudge it */
    /* transform: translateY(1px); */
}

.social-glass-icons a:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(10, 49, 97, 0.5);
}

/* Page title */
/* --- Page Title & Breadcrumb Section --- */
.page-title-section {
    padding: 140px 0 100px 0;
    /* Provides space for sticky header */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    position: relative;
}

.page-title-overlay {
    /* Gradient using the primary color to blend seamlessly */
    background: linear-gradient(90deg, rgba(10, 49, 97, 0.95) 0%, rgba(10, 49, 97, 0.5) 100%);
}

/* Glassmorphism Breadcrumb Styling */
.glass-breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
}

.glass-breadcrumb .breadcrumb-item a {
    color: #cbd5e1;
    /* Light slate text */
    text-decoration: none;
    transition: color 0.3s ease;
}

.glass-breadcrumb .breadcrumb-item a:hover {
    color: var(--color-orange);
}

/* Customizing the Breadcrumb Divider Icon */
.glass-breadcrumb .breadcrumb-item+.breadcrumb-item {
    display: flex;
    align-items: center;
}

.glass-breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    content: "\F285";
    /* Bootstrap Icons: chevron-right */
    font-family: 'bootstrap-icons';
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    padding: 0 12px;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .page-title-section {
        padding: 100px 0 80px 0;
        background-attachment: scroll;
        /* Disable parallax on mobile for smooth scrolling */
    }

    .page-title-section h1 {
        font-size: 2.5rem;
    }
}