/* ==========================================================================
   💎 BHSS SOGAM - MODERN DESIGN SYSTEM (FINAL COMPLETE FIX)
   ========================================================================== */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --dark: #1e293b;
    --light: #f8fafc;
    --glass: rgba(255, 255, 255, 0.95);
}

/* 1. VIEWPORT & CONTENT ALIGNMENT */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important; /* Prevents horizontal scroll */
    width: 100% !important;
}

/* Fixes the "unfit" gap - Content starts exactly below headers */
main {
    margin-top: 85px !important; /* Mobile total height */
    width: 100% !important;
}

@media (min-width: 992px) {
    main { margin-top: 100px !important; } /* Desktop total height */
}

/* 2. PINNED HEADER WRAPPER (Pins to very top) */
.sticky-top:has(header) {
    position: fixed !important; 
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 2000 !important;
    background: white !important;
    overflow: visible !important; /* Critical for dropdown */
}

/* --- Oval Branding Badge (Slim & Latitudinal) --- */
.logo-pill-badge {
    display: flex !important;
    align-items: center !important;
    background-color: #f1f5f9 !important;
    border-radius: 50px !important;
    border: 1px solid #dee2e6 !important;
    padding: 2px 10px 2px 2px !important;
    gap: 8px !important;
    flex: 0 1 auto !important;
    min-width: 0 !important;
    margin-left: 10px !important;
}

.logo-img {
    border-radius: 50% !important;
    object-fit: cover !important;
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
}

.school-name {
    font-weight: 700 !important;
    margin: 0 !important;
    font-size: 0.85rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: var(--dark) !important;
}
/* header image    */
.post-header-img {
    max-height: 450px;
    width: 100%;
    object-fit: cover;
    object-position: top;
}

/* --- Student Portal Button & Dropdown Fix --- */
.btn-portal {
    border-radius: 50px !important;
    transition: all 0.3s ease;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

.btn-portal:hover {
    background-color: var(--primary-dark) !important;
    color: #ffffff !important;
}

/* Force dropdown visibility */
.dropdown-menu.show {
    display: block !important;
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    z-index: 9999 !important;
    background-color: white !important;
    min-width: 210px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

/* --- Mobile View (Default) --- */
@media (max-width: 991px) {
    header.sticky-top {
        height: 44px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        overflow: visible !important;
    }
    
    .header-responsive {
        display: flex !important;
        justify-content: space-between !important; 
        align-items: center !important;
        padding: 0 10px !important;
        width: 100% !important;
    }

    .btn-portal {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
        width: auto !important;
    }

    .search-socials-container, .school-tagline { display: none !important; }
}

/* --- Desktop View (Slim Sticky Design) --- */
@media (min-width: 992px) {
    header.sticky-top {
        height: 50px !important;
        display: flex !important;
        align-items: center !important;
    }

    .logo-img { width: 40px !important; height: 40px !important; }
    .school-name { font-size: 1.1rem !important; }
    
    /* Social Icons on Desktop */
    .search-socials-container {
        display: flex !important;
        align-items: center !important;
        gap: 15px !important;
        margin-left: auto !important;
        margin-right: 20px !important;
    }
    .search-socials-container form { display: none !important; }

    /* Blue Nav Bar - Stacked under branding */
    nav.navbar.sticky-top {
        display: flex !important;
        background-color: var(--primary) !important;
        height: 44px !important;
        position: relative !important;
        padding: 0 !important;
    }
    
    nav.navbar .nav-link {
        padding: 5px 12px !important;
        font-size: 0.9rem !important;
        color: white !important;
    }
}

/* --- Aesthetic Utility --- */
.pulse-dot {
    width: 8px; height: 8px;
    background: #dc3545;
    border-radius: 50%;
    margin-right: 10px;
    animation: pulse-soft 2s infinite;
}

@keyframes pulse-soft {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

/* --- Restore Social Icons Visibility (FB, YouTube, etc.) --- */

/* 1. Show the container that holds the icons */
.search-socials-container {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    gap: 12px !important;
}

/* 2. Hide only the search bar to keep the header slim and clean */
.search-socials-container form {
    display: none !important;
}

/* 3. Ensure the icons look good on both Mobile and Desktop */
@media (max-width: 991px) {
    .search-socials-container {
        /* On small screens, keep them slim so they don't overlap branding */
        gap: 8px !important;
    }
    
    .search-socials-container a {
        font-size: 1.1rem !important; /* Adjust icon size for mobile */
    }
}

/* Force Logo Rendering on Physical Mobile Devices */
.logo-img {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 32px !important;  /* Ensures it never shrinks to 0 */
    min-height: 32px !important;
    content-visibility: visible !important; /* Prevents mobile browser from "skipping" the render */
}

/* Fix for ALL dropdown menus in the sticky headers */
.dropdown-menu.show {
    display: block !important;
    position: absolute !important;
    z-index: 9999 !important;
    background-color: white !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important;
}

/* Ensure the blue navbar doesn't cut off the Admissions dropdown */
nav.navbar {
    overflow: visible !important;
}
