/* ==================================================
   IMAPATH – Custom Styles (Mega Menu Working)
   ================================================== */

:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary: #7209b7;
    --secondary-light: #b5179e;
    --secondary-dark: #560bad;
    --success: #06d6a0;
    --danger: #ef476f;
    --warning: #ffd166;
    --info: #118ab2;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --gray-light: #e9ecef;
    --white: #ffffff;

    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-secondary: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    --box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    --box-shadow-hover: 0 15px 35px rgba(67, 97, 238, 0.15);
    --border-radius: 10px;
    --border-radius-lg: 20px;
    --border-radius-sm: 5px;
}

/* -------------------- STARS BACKGROUND -------------------- */
@keyframes twinkle {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.5; }
}
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: var(--white);
}
.star {
    position: absolute;
    background-color: var(--primary-light);
    border-radius: 50%;
    animation: twinkle 4s infinite;
    opacity: 0.2;
}
body.admin-area .stars-container { display: none; }

/* -------------------- NAVBAR -------------------- */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow);
    padding: 12px 0;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
}
.navbar .container { max-width: 95%; }
@media (min-width: 1400px) { .navbar .container { max-width: 1400px; } }

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    transition: opacity 0.3s;
    text-decoration: none;
    color: inherit;
}
.navbar-brand:hover { opacity: 0.85; }
.navbar-brand img { max-height: 50px; width: auto; }

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark);
    padding: 8px 16px !important;
    transition: all 0.2s;
    position: relative;
    font-size: 15px;
}
@media (min-width: 992px) { .navbar-nav .nav-link { padding-left: 28px !important; padding-right: 28px !important; } }
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus { color: var(--primary) !important; }
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    font-weight: 600;
}
.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
}
@media (min-width: 992px) { .navbar-nav .nav-link.active::after { left: 28px; right: 28px; } }

/* ========== MEGA MENU FIXES ========== */
.nav-item.dropdown.mega-menu {
    position: static !important;  /* Allows full-width dropdown */
}

.mega-menu .dropdown-menu.mega-dropdown {
    width: 100% !important;        /* Full width */
    left: 0 !important;
    right: auto !important;
    padding: 25px !important;
    box-shadow: var(--box-shadow);
    border: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    background: var(--white);
    z-index: 9999 !important;
    position: absolute !important; /* Override Bootstrap's relative positioning */
    transform: none !important;     /* Remove any transform */
    margin-top: 0 !important;
    top: 100% !important;
}

/* Ensure dropdown is visible when open */
.mega-menu .dropdown-menu.mega-dropdown.show {
    display: block !important;
}

/* Content columns */
.mega-menu-column h6 {
    color: var(--dark);
    margin-bottom: 18px;
    font-weight: 700;
    font-size: 16px;
    border-bottom: 2px solid var(--gray-light);
    padding-bottom: 10px;
}
.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.mega-menu-column ul li { margin-bottom: 10px; }
.mega-menu-column ul li a {
    color: var(--gray);
    text-decoration: none;
    transition: all 0.2s;
    display: block;
    padding: 6px 0;
    font-size: 14px;
}
.mega-menu-column ul li a:hover {
    color: var(--primary);
    transform: translateX(6px);
}
.course-category {
    background: linear-gradient(145deg, var(--light), var(--white));
    padding: 22px;
    border-radius: var(--border-radius);
    height: 100%;
    border: 1px solid rgba(67, 97, 238, 0.1);
    box-shadow: var(--box-shadow);
}
.course-icon { font-size: 2.2rem; color: var(--primary); margin-bottom: 12px; }
.featured-banner {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 18px 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.2);
}

/* -------------------- CONTACT DROPDOWN -------------------- */
.contact-dropdown {
    min-width: 320px;
    padding: 22px;
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}
.contact-info { list-style: none; padding: 0; margin: 0; }
.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
}
.contact-info li i {
    color: var(--primary);
    margin-right: 14px;
    margin-top: 5px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}
.contact-info li span {
    font-weight: 700;
    color: var(--dark);
    display: block;
    font-size: 14px;
}
.contact-info li p { margin: 0; color: var(--gray); font-size: 14px; }

/* -------------------- RIGHT MENU BUTTONS -------------------- */
.login-btn {
    color: var(--primary) !important;
    font-weight: 600;
    transition: color 0.2s;
}
.login-btn:hover { color: var(--primary-dark) !important; }
.nav-cta-btn {
    background: var(--gradient-primary);
    color: var(--white) !important;
    border-radius: 50px;
    padding: 8px 22px !important;
    font-weight: 600;
    margin-left: 12px;
    transition: all 0.3s;
    border: none;
}
.nav-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
}
.logout-form {
    display: flex;
    align-items: center;
}
.logout-form button {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--primary);
    transition: color 0.2s;
}
.logout-form button:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* -------------------- WHATSAPP FLOATING BUTTON -------------------- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease-in-out;
    animation: pulse 2s infinite;
    text-decoration: none;
    border: 3px solid white;
}
.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.whatsapp-options {
    position: fixed;
    bottom: 110px;
    right: 40px;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 15px;
    box-shadow: var(--box-shadow);
    z-index: 999;
    display: none;
    min-width: 250px;
    border: 1px solid var(--gray-light);
}
.whatsapp-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    color: var(--dark);
    margin-bottom: 10px;
    transition: all 0.3s;
}
.whatsapp-option:last-child { margin-bottom: 0; }
.whatsapp-option:hover { background: var(--light); }
.whatsapp-option i {
    width: 40px;
    height: 40px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

/* ===== PROFESSIONAL BREADCRUMB STYLING ===== */
.breadcrumb {
    background: transparent !important;
    padding: 0.75rem 0 !important;
    margin-bottom: 1.5rem !important;
    border-bottom: 2px solid var(--gray-light) !important;
    font-size: 0.95rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    list-style: none !important;
}

.breadcrumb-item {
    display: inline-flex !important;
    align-items: center !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›" !important;
    color: var(--gray) !important;
    font-size: 1.2rem !important;
    line-height: 1 !important;
    padding: 0 0.5rem !important;
    font-weight: 300 !important;
}

.breadcrumb-item a {
    color: var(--primary) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    font-weight: 500 !important;
}

.breadcrumb-item a:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}

.breadcrumb-item.active {
    color: var(--dark) !important;
    font-weight: 600 !important;
}

/* Optional wrapper for better visibility */
.breadcrumb-wrapper {
    background-color: var(--light) !important;
    border-radius: var(--border-radius-sm) !important;
    padding: 0.5rem 1rem !important;
    margin-bottom: 1.5rem !important;
}

/* -------------------- MOBILE RESPONSIVENESS -------------------- */
@media (max-width: 991px) {
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
        background: var(--white);
        padding: 20px;
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);
        margin-top: 15px;
    }
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        padding: 1rem;
        border: none;
        background: var(--light);
    }
    .navbar-nav .nav-link.active::after { display: none; }
    .nav-cta-btn {
        margin-left: 0;
        margin-top: 10px;
        text-align: center;
    }
    .navbar-brand { font-size: 1.5rem; }
    .navbar-brand img { max-height: 40px; }
    .mega-menu .mega-dropdown {
        position: static !important;
        transform: none !important;
        box-shadow: none;
        padding: 15px;
        background: transparent;
    }
    .logout-form button { padding: 8px 0; }
    .whatsapp-float { width: 50px; height: 50px; bottom: 20px; right: 20px; font-size: 24px; }
    .whatsapp-options { bottom: 80px; right: 20px; min-width: 200px; }
}
.carousel-caption {
    background: rgba(0,0,0,0.5);
    border-radius: 10px;
    padding: 15px;
}
.carousel-caption .btn {
    margin-top: 10px;
}