:root {
    --primary: #800000; /* Deep Maroon */
    --primary-light: #A52A2A; /* Lighter Maroon/Brown */
    --secondary: #7c3aed;
    --accent: #9333ea;
    --success: #0d9488;
    --bg-light: #f9fafb;
    --text-dark: #111827;
    --text-muted: #6b7280;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);
    --footer-bg: #4D000B; /* Dark Maroon */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

section, .py-5 {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
}

@media (max-width: 768px) {
    section, .py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    padding-top: 85px; /* Added for fixed-top navbar */
}

h1, h2, h3, h4, .navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.navbar {
    background-color: #fdfdfd !important; /* Premium Off-White */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 0 !important;
    border-bottom: 2px solid var(--primary); /* Added a subtle red bottom border for branding */
    transition: all 0.3s ease-in-out;
    width: 100%;
    z-index: 1030;
}

.navbar-brand {
    color: var(--primary) !important; /* Changed from white to primary red */
    font-size: 1.25rem;
    letter-spacing: 0.5px;
    white-space: normal;
    max-width: 320px;
    line-height: 1.2;
}

@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1rem;
        max-width: 220px;
    }
}

.navbar-logo {
    height: 85px; /* Increased to fill the menu bar */
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
}

.footer-logo {
    height: 90px; /* Increased from 60px */
    width: auto;
    object-fit: contain;
}

.institute-name-long {
    max-width: 280px;
    white-space: normal;
    line-height: 1.2;
    font-size: 0.85rem !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px; /* Added significant tracking for breathing room */
    display: inline-block;
}

.navbar-nav {
    display: flex;
    align-items: center; /* Center links and buttons vertically */
}

.nav-item {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 600;
    margin: 0 0.5rem;
    padding: 1.5rem 0.5rem !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%; /* Fill the 85px space */
}

.nav-link:hover {
    color: var(--primary) !important;
    transform: translateY(-1px);
}

/* Show dropdown on hover for desktop */
@media (min-width: 992px) {
    .nav-item.dropdown {
        position: relative;
    }
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        top: 100%; /* Align to bottom of navbar */
        left: 0;
        margin-top: 0;
        animation: dropdownSlideDown 0.3s ease-out forwards;
    }
}

@keyframes dropdownSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}



.navbar .btn-primary {
    background-color: var(--primary); /* Reverted to red button for high-contrast on off-white */
    color: white;
    border: none;
    padding: 0.6rem 1.8rem;
    font-weight: 700;
    border-radius: 8px;
}

.navbar .btn-primary:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Premium Dropdown Item Styling */
.dropdown-menu {
    border-radius: 12px;
    padding: 0.5rem;
    min-width: 220px;
}

.dropdown-item {
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-item:hover {
    background-color: rgba(128, 0, 0, 0.05); /* Very light maroon */
    color: var(--primary) !important;
    padding-left: 1.25rem; /* Subtle indent on hover */
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    color: white;
}

/* Vibrant Gradients */
.bg-grad-indigo { background: linear-gradient(135deg, #1e1b4b 0%, #4338ca 100%); }
.bg-grad-teal { background: linear-gradient(135deg, #064e3b 0%, #0d9488 100%); }
.bg-grad-amber { background: linear-gradient(135deg, #78350f 0%, #d97706 100%); }
.bg-grad-purple { background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%); }
.bg-grad-maroon { background: linear-gradient(135deg, #4D000B 0%, #800000 100%); }
.bg-grad-red { background: linear-gradient(135deg, #D31D24 0%, #800000 100%); }
.bg-grad-blue { background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%); }
.bg-grad-vibrant-blue { background: linear-gradient(135deg, #006CFF 0%, #0045A3 100%); }

.carousel-item .lead, .carousel-item .display-3 {
    color: white !important;
}

.carousel-item .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

#heroCarousel .container {
    padding: 30px 0;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 20px 0;
    }
    
    .display-3 {
        font-size: 2.2rem !important;
        margin-bottom: 1rem !important;
    }
    
    #heroCarousel .container {
        padding: 10px 0;
    }

    .carousel-item img {
        margin-top: 10px;
        width: 100%;
        max-height: 400px;
        object-fit: contain;
    }
    
    .carousel-item .lead {
        font-size: 1rem;
        margin-bottom: 20px !important;
    }
}

.carousel-item {
    transition: transform 1.2s ease-in-out, opacity 1.2s ease-in-out;
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

.carousel-item {
    transition: transform 1s ease-in-out;
}

#heroCarousel .container {
    padding: 60px 0;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary);
    margin: 0 6px;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    width: 40px;
    height: 40px;
    background-size: 50%;
}

.course-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    border: none;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* Vibrant Course Card Variations */
.card-optometry { border: 2px solid var(--primary) !important; }
.card-technical { border: 2px solid var(--primary-light) !important; }
.card-management { border: 2px solid #065f46 !important; }

.icon-optometry { color: var(--primary) !important; }
.icon-technical { color: var(--primary-light) !important; }
.icon-management { color: #065f46 !important; }

.section-title {
    margin-bottom: 3rem;
    text-align: center;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

footer {
    background: linear-gradient(180deg, #800000 0%, #4D000B 100%); /* Vibrant maroon gradient */
    color: var(--white);
    padding: 4rem 0 2rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

footer a:hover {
    color: var(--white);
}

.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: all 0.3s ease;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
}