/* ==========================================================================
   MMK & SDM Mahila Mahavidyalaya - Premium Design System
   ========================================================================== */
/* Enforce strict viewport width and prevent horizontal scrolling */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Ensure all images remain responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for Bootstrap rows pushing margins outside the container */
.row {
    max-width: 100%;
}
/* --------------------------------------------------------------------------
   1. CSS Variables & Theming
   -------------------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --primary: #800000;           /* SDM Maroon */
    --primary-dark: #5c0000;      /* Deep Red */
    --primary-light: #a31a1a;
    --accent: #d4af37;            /* Gold Accent */
    --accent-hover: #b8962e;
    
    /* Neutrals & UI Colors */
    --text-main: #2d3748;
    --text-muted: #718096;
    --bg-light: #f8f9fa;
    --bg-body: #ffffff;
    --dark-blue: #0f172a;
    
    /* Shadows & Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-hover: 0 25px 50px -12px rgba(128, 0, 0, 0.15);
    
    /* Animation Timings */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-slow: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-body: #0a0f1c;
    --bg-light: #111827;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --shadow-hover: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* --------------------------------------------------------------------------
   2. Base Styles & Typography
   -------------------------------------------------------------------------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    color: inherit;
    letter-spacing: -0.02em;
}

a {
    transition: var(--transition);
}

/* --------------------------------------------------------------------------
   3. Glassmorphism & UI Utilities
   -------------------------------------------------------------------------- */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

body.dark-mode .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.05);
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.z-index-1 { z-index: 1; }
.tracking-wider { letter-spacing: 0.1em; }
.transition-all { transition: var(--transition); }
.border-bottom-dashed { border-bottom: 1px dashed rgba(113, 128, 150, 0.3); }

/* Backgrounds & Text Colors */
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary-subtle { background-color: rgba(128, 0, 0, 0.08) !important; }
body.dark-mode .bg-primary-subtle { background-color: rgba(128, 0, 0, 0.2) !important; }

.text-warning { color: var(--accent) !important; }
.bg-warning { background-color: var(--accent) !important; }
.bg-warning-subtle { background-color: rgba(212, 175, 55, 0.1) !important; }

/* --------------------------------------------------------------------------
   4. Buttons & Interactive Elements
   -------------------------------------------------------------------------- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(128, 0, 0, 0.3);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-warning {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.btn-warning:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-2px);
}

/* Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
}

.floating-whatsapp:hover {
    transform: scale(1.1) rotate(-10deg);
    color: white;
}

/* --------------------------------------------------------------------------
   5. Navigation & Mega Menu
   -------------------------------------------------------------------------- */
#mainNav {
    transition: var(--transition);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode #mainNav {
    background-color: var(--bg-light) !important;
    border-bottom-color: rgba(255,255,255,0.05);
}

body.dark-mode .navbar-brand .text-primary,
body.dark-mode .nav-link {
    color: var(--text-main) !important;
}

.nav-link {
    font-weight: 500;
    padding: 1rem 1.2rem !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 8px;
    left: 50%;
    background-color: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 70%;
}
/* Shrink nav links slightly on screens where space is at a premium */
@media (min-width: 1200px) and (max-width: 1400px) {
    .navbar-nav .nav-link {
        font-size: 0.9rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}
/* Mega Menu Logic */
@media all and (min-width: 992px) {
    .has-megamenu:hover .megamenu {
        display: block;
        opacity: 1;
        visibility: visible;
        margin-top: 0;
        transform: translateX(-50%) translateY(0);
    }
    .megamenu {
        position: absolute;
        width: 650px;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        opacity: 0;
        visibility: hidden;
        display: block;
        transition: var(--transition);
        border-top: 4px solid var(--primary) !important;
    }
}

body.dark-mode .megamenu, body.dark-mode .dropdown-menu {
    background-color: var(--bg-light);
    border: 1px solid rgba(255,255,255,0.05);
}

body.dark-mode .dropdown-item {
    color: var(--text-main);
}

body.dark-mode .dropdown-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--primary);
}

/* --------------------------------------------------------------------------
   6. Hero Slider (Swiper Overrides)
   -------------------------------------------------------------------------- */
.swiper-pagination-bullet {
    background: #ffffff;
    opacity: 0.6;
    width: 10px;
    height: 10px;
    transition: var(--transition);
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--accent);
    width: 25px;
    border-radius: 5px;
}

.swiper-button-next::after, .swiper-button-prev::after {
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* --------------------------------------------------------------------------
   7. Specialized Components (Timeline, Accordion, Gallery)
   -------------------------------------------------------------------------- */
/* Timeline (Admissions / History) */
.timeline {
    position: relative;
}
.timeline::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 5px;
    bottom: 0;
    width: 2px;
    background-color: rgba(128, 0, 0, 0.1);
}

/* Accordion Customization */
.accordion-button:not(.collapsed) {
    color: var(--primary);
    background-color: var(--bg-light);
    box-shadow: inset 0 -1px 0 rgba(0,0,0,0.05);
}
.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,0.1);
}
body.dark-mode .accordion-item,
body.dark-mode .accordion-button {
    background-color: transparent;
    color: var(--text-main);
}
body.dark-mode .accordion-button:not(.collapsed) {
    background-color: rgba(255,255,255,0.05);
}

/* Image Zoom (Gallery/Cards) */
.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.overflow-hidden:hover img {
    transform: scale(1.08);
}

/* Breadcrumbs */
.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* --------------------------------------------------------------------------
   8. Footer
   -------------------------------------------------------------------------- */
footer {
    background-color: var(--dark-blue);
    border-top: 4px solid var(--primary);
}
footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}
footer a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Corporate Styling */
.navbar { transition: all 0.3s ease; }
.nav-link { color: #333; position: relative; }
.nav-link:hover, .nav-link.active { color: var(--bs-primary); }

/* Dropdown Animation */
.dropdown-menu { border-radius: 10px; margin-top: 10px; }
.dropdown-item { padding: 10px 20px; transition: 0.2s; }
.dropdown-item:hover { background-color: var(--bs-primary-bg-subtle); color: var(--bs-primary); }

/* Logo Text spacing */
.navbar-brand h6 { font-size: 1.1rem; line-height: 1; }
.hero-slider { height: 750px; }
.carousel-overlay { z-index: 1; }
.swiper-button-next, .swiper-button-prev { color: white !important; text-shadow: 0 0 10px rgba(0,0,0,0.5); }
/* Force the slider container and images to behave */
.mainSlider {
    width: 100%;
    height: 750px;
}

.swiper-slide img {
    width: 100%;
    height: 750px;
    object-fit: cover; /* Ensures images fill the space without stretching */
}

/* Styling for the Right-Side Enquiry Form */
.enquiry-container {
    z-index: 20; /* Ensures it stays above the slider */
    pointer-events: none; /* Allows clicking through the container if empty */
}

.enquiry-container > * {
    pointer-events: auto; /* Allows interacting with the form itself */
}

/* Glassmorphism for the form */
.form-glass {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
/* Ensure the image covers the 16:9 ratio container */
.swiper-slide img {
    width: 100%;
    height: 750px; 
    object-fit: cover;
    transform: scale(1);
    transition: transform 6s ease-in-out; /* Smooth transition fallback */
}

/* Cinematic Zoom Effect (Ken Burns) triggered when the slide is active */
.swiper-slide-active img {
    animation: cinematicZoom 6s linear forwards;
}

@keyframes cinematicZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.15); /* Zooms in 15% smoothly */
    }
}
/* Container positioned at Bottom-Right */
.floating-menu-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1050;
    display: flex;
    flex-direction: column; /* Naturally stacks the options on top of the main button */
    align-items: center;
    gap: 15px; /* Space between the main button and the popping menu */
}

/* Main Action Button */
.floating-main-btn {
    width: 65px;
    height: 65px;
    transition: transform 0.3s ease;
    animation: pulse-ring 2s infinite;
}

/* Sub-options Container (Hidden & Tucked down by default) */
.floating-options {
    display: flex;
    flex-direction: column; /* Sub-buttons stack vertically */
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    
    /* Tucks the buttons 50px downwards behind the main button */
    transform: translateY(50px) scale(0.5); 
    transform-origin: bottom center; /* Animation grows from the bottom */
    
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy pop-up effect */
    pointer-events: none; 
}

/* Individual Sub-buttons */
.floating-sub-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.floating-sub-btn:hover {
    transform: scale(1.15);
}

/* --- THE HOVER EXPANSION EFFECT --- */
.floating-menu-container:hover .floating-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1); /* Shoots up into place */
    pointer-events: auto; 
}

/* Stop pulsing and rotate the main button on hover */
.floating-menu-container:hover .floating-main-btn {
    animation: none;
    transform: rotate(90deg);
}

/* Swap icons on hover */
.floating-menu-container:hover .main-icon {
    display: none !important;
}
.floating-menu-container:hover .close-icon {
    display: block !important;
    transform: rotate(-90deg); /* Counter-rotates so the X stays upright */
}

/* Pulse animation for the main button */
@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(255, 183, 3, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 183, 3, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 183, 3, 0); }
}