/* Mobile Small (S) - max-width: 575.98px */
@media (max-width: 375px) {

}
@media (max-width: 575.98px) {
}


/* Mobile Large (L) - min-width: 768px and max-width: 991.98px */
@media (max-width: 767.98px) {
    .font18 {
        font-size: 14px !important;
    }

    .font20 {
        font-size: 10px !important;
    }
    .font22 {
        font-size: 15px !important;
    }

    p.text-white.font24.mobile-font15{
        font-size: 15px !important;
    }

    .font24 {
        font-size: 20px !important;
    }

    .font30 {
        font-size: 15px !important;
    }

    .font35 {
        font-size: 18px !important;
    }

    .font40 {
        font-size: 30px !important;
    }

    .font50 {
        font-size: 25px !important;
    }

    .font60 {
        font-size: 30px !important;
    }

    .font70 {
        font-size: 35px !important;
    }

    .font100 {
        font-size: 50px !important;
    }
    .sidebar {
        width: 100px; /* Shrink the sidebar width */
    }

    .sidebar a.nav-link {
        font-size: 14px;
        padding: 10px; /* Adjust padding for smaller screens */
    }

    .sidebar a.nav-link i {
        margin-right: 0; /* Remove margin between icon and text */
    }

    .sidebar .nav-link span {
        display: none; /* Hide text labels and show only icons */
    }

    .profile-tabs-container {
        position: relative;
        width: 100%;
    }

    .profile-tabs {
        display: none; /* Hide tabs */
    }

    .profile-tabs-dropdown {
        display: block;
        width: 100%;
        background-color: transparent;
        padding: 10px;
        font-size: 16px;
    }

        .notification-dropdown {
            position: fixed !important;
            top: 50%;
            left: 150% !important;
            right:0 !important;
            width: 90%; /* Adjust as needed */
            max-width: 400px;
            background-color: white; /* Ensure visibility */
            z-index: 1050; /* Ensure it stays on top */
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }
    
        .cart-dropdown{
            position: fixed !important;
            top: 50%;
            left: 150% !important;
            right:0 !important;
            width: 90%; /* Adjust as needed */
            max-width: 400px;
            background-color: white; /* Ensure visibility */
            z-index: 1050; /* Ensure it stays on top */
            border-radius: 8px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        }
    
        /* Reduce card height */
    .suggestion-widget {
        height: 300px!important; /* Adjust as needed */
        padding: 10px;
    }

    /* Reduce image size */
    .suggestion-image {
        width: 75%;
        height: auto;
        text-align: center;
        margin: 0 auto;
    }

    /* Reduce font sizes */
    .suggestion-text {
        font-size: 24px !important; /* Smaller text */
    }

    .hover-text-container .font14 {
        font-size: 12px !important;
    }

    .skeleton-card {
        border-radius: 10px;
    }

    .skeleton-image {
        height: 80px;
        background-color: transparent;
        border-radius: 10px 10px 0 0;
    }

    .skeleton-title {
        height: 24px;
        width: 70%;
        border-radius: 4px;
    }

    .skeleton-text {
        height: 80px;
        border-radius: 4px;
    }

    .blur-background {
        left: 0% !important;
    }

    .activities-gallery-image {
        width: 50% !important;
    }

    .mentor-date {
        width: 20%;
    }
    .mobile-mentor-date-width{
        width: 50% !important;
    }

    .filter-box {
        max-width: 100%;
    }

    .foundation-head {
        letter-spacing: 10px!important;
        font-size: 24px;
    }

    .mobile-pt-45per{
        padding-top: 45% !important;
    }

    .foundation-planets-head {
        margin-top: 50%;
    }

    .mobile-w-50{
        width: 50% !important;
    }

    .videos-section {
        padding-left: 0% !important;
    }
    .videos-title {
        text-align: right;
        padding-right: 0% !important;
    }

    .video-player{
        width: 100% !important;
    }

    .foundation-video-arrow{
        padding-right: 0% !important;
    }

    .foundation-category-btn {
        padding: 10px 35px!important;
        margin-bottom: 5%!important;
        max-width: 100%!important;
        font-size: 14px!important;
    }
}


@media (max-width: 576px) {
    .sidebar {
        width: 100%; /* Sidebar takes full width on very small screens */
        height: auto;
        position: relative; /* Sidebar can be stacked vertically */
    }

    .sidebar .nav-link {
        text-align: center; /* Center the icons */
    }

    .sidebar .navbar-brand img {
        display: none; /* Hide the logo on very small screens */
    }
}

@media (min-width: 768px) {
    .hide-on-large {
        display: hidden !important;
    }
}






/* ═══════════════════════════════════════════════════════════════════
   GLOBAL mobile catch-alls — layered last so they win in specificity.
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
    /* Any standalone table gets a scrollable parent wrapped around it
       at small sizes. Works for tables rendered without a specific
       wrapper class. */
    table { max-width: 100%; }

    /* Common auto-fill grid fallback — a last-resort 1-column collapse
       for any `[class*="-grid"]` that wasn't explicitly handled. */
    [class*="-grid"]:not([class*="kpi"]):not([class*="sector"]) {
        grid-template-columns: 1fr !important;
    }

    /* Huge page-level headings shouldn't exceed viewport width.
       Caps responsive-heading class (used across pages) at sane size. */
    .responsive-heading {
        font-size: clamp(22px, 7vw, 40px) !important;
    }

    /* Prevent horizontal scroll from rogue wide elements. */
    body, .container, section { max-width: 100vw; overflow-x: hidden; }

    /* Back button / action button rows — consistent sizing. */
    .responsive-back-btn { padding: 6px 10px !important; font-size: 12px !important; }

    /* Images / media never exceed viewport. */
    img, video, iframe { max-width: 100%; height: auto; }
}

@media (max-width: 380px) {
    /* Very narrow phones (iPhone SE-era). Tighten default container padding. */
    .container { padding-left: 10px !important; padding-right: 10px !important; }
    .pt-md-5, .pt-lg-2 { padding-top: 14px !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   PAGE HEADING ROW — app-wide layout consistency
   ───────────────────────────────────────────────────────────────────
   Every page wraps its title in the standard pattern:
       <div class="d-flex align-items-center justify-content-center flex-wrap">
         <BackButton />
         <div class="flex-grow-1 text-center"><h4 class="responsive-heading">...
       </div>
   On mobile, the title's wrap behaviour depends on string length: short
   titles share the row with the BackButton cluster; long titles wrap to
   their own row. That produces DIFFERENT layouts across pages.
   Force the title wrapper to a full row on mobile so every page renders
   identically — nav icons centred on top, title centred beneath.  ═══ */
@media (max-width: 768px) {
    .d-flex.flex-wrap > .flex-grow-1.text-center {
        flex: 0 0 100%;
        margin-top: 10px;
    }
    /* BackButton cluster sits centred on its own row (no title sharing). */
    .d-flex.flex-wrap.justify-content-center > .responsive-back-btn,
    .d-flex.flex-wrap.justify-content-center > .back-button,
    .d-flex.flex-wrap.justify-content-center > .d-flex.gap-2 {
        flex: 0 0 auto;
    }
}
