/* ===================================
   IPN Website - Media Queries
   Responsive styles for all breakpoints
   =================================== */



/* ===================================
   Mobile Page Banner
   =================================== */

.mobile-page-banner {
    background: linear-gradient(90deg, #333E1F 0%, #87A452 100%);
    padding: 30px 0;
    display: none; /* Hidden by default, shown on mobile via media query */
}

.mobile-page-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    text-align: center;
    letter-spacing: 0.5px;
}

/* ===================================
   Tablet Hero Image Container
   =================================== */

.tablet-hero-image {
    display: none; /* Hidden by default, shown only on tablet via media query */
    width: 100%;
    overflow: hidden;
}

.tablet-hero-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}


/* ===================================
   Mobile (max-width: 499px)
   =================================== */

@media (max-width: 499px) {
    /* Hide hero sections on mobile */
    .hero,
    section.hero,
    section[class*="hero"],
    #heroCarousel {
        display: none !important;
    }

    /* Hide top bar on mobile */
    .top-bar {
        display: none;
    }

    /* Hide quote section on mobile */
    .quote-section {
        display: none !important;
    }

    /* Mobile spacing adjustments – more padding for breathing room */
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Smaller display headings on mobile */
    .display-5 {
        font-size: 2rem;
    }

    /* Section titles stay reduced on mobile */
    .section-title {
        font-size: 1.35rem;
    }

    /* Full width buttons on mobile */
    .btn-lg {
        width: 100%;
        max-width: 300px;
    }

    /* ===================================
       Center ALL Titles and Buttons on Mobile
       =================================== */
    
    /* Center all headings */
    h1, h2, h3, h4, h5, h6,
    .section-title,
    .section-subtitle,
    .hero-title,
    .hero-subtitle,
    .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
        text-align: center !important;
    }

    /* Center all buttons */
    .btn,
    button,
    a.btn {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    /* Keep inline buttons from breaking */
    .btn-group .btn,
    .d-inline .btn,
    .d-inline-block .btn {
        display: inline-block !important;
    }

    /* EXCEPTION: Keep navbar toggler (hamburger) on the right */
    .navbar-toggler {
        display: inline-block !important;
        margin-left: auto !important;
        margin-right: 0 !important;
    }

    /* Ensure navbar container uses flexbox properly on mobile */
    .navbar .container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
    }

    /* Back to top button - keep icon centered and positioned correctly */
    .btn.position-fixed.bottom-0.end-0,
    button.position-fixed.bottom-0.end-0 {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        text-align: center !important;
    }

    /* Center icon inside back to top button */
    .btn.position-fixed i,
    button.position-fixed i {
        display: inline-block !important;
        margin: 0 auto !important;
    }

    /* Keep bullets and list items LEFT-aligned (DO NOT center) */
    ul, ol,
    ul li, ol li,
    .list-unstyled,
    .list-unstyled li {
        text-align: left !important;
    }

    /* Keep list content aligned properly */
    li p,
    li span,
    li div {
        text-align: left !important;
    }

    /* ===================================
       Mobile YouTube Video Section
       =================================== */
    
    /* Always show YouTube overlay on mobile */
    .youtube-overlay {
        transform: translateY(0) !important;
        animation: mobileYoutubePulse 3s ease-in-out infinite;
    }

    /* Add tap instruction text on mobile */
    .youtube-overlay::after {
        content: "Tap to watch";
        font-size: 12px;
        font-weight: 500;
        margin-left: 8px;
        opacity: 0.95;
    }

    /* Larger play button on mobile */
    .about-play-button {
        width: 90px !important;
        height: 90px !important;
        animation: playButtonPulse 2.5s ease-in-out infinite;
    }

    .about-play-button i {
        font-size: 40px !important;
    }

    /* Add subtle border animation to video container */
    .about-image {
        position: relative;
    }

    .about-image::before {
        content: '';
        position: absolute;
        top: -3px;
        left: -3px;
        right: -3px;
        bottom: -3px;
        background: linear-gradient(45deg, #FF0000, var(--ipn-primary), #FF0000);
        border-radius: inherit;
        z-index: -1;
        opacity: 0.6;
        animation: borderGlow 3s ease-in-out infinite;
    }

    @keyframes mobileYoutubePulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.85;
        }
    }

    @keyframes playButtonPulse {
        0%, 100% {
            transform: translate(-50%, -50%) scale(1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }
        50% {
            transform: translate(-50%, -50%) scale(1.05);
            box-shadow: 0 6px 25px rgba(204, 168, 58, 0.6);
        }
    }

    @keyframes borderGlow {
        0%, 100% {
            opacity: 0.3;
        }
        50% {
            opacity: 0.6;
        }
    }

    /* ===================================
       Mobile Card Centering
       =================================== */
    
    /* Center all headings inside cards */
    .card h1,
    .card h2,
    .card h3,
    .card h4,
    .card h5,
    .card h6,
    .card .card-title {
        text-align: center !important;
    }

    /* Center all icons inside cards */
    .card .feature-icon,
    .card .innovation-icon,
    .card i[class*="bi-"],
    .card .bi {
        display: flex !important;
        justify-content: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* Center feature icon containers */
    .feature-icon {
        text-align: center !important;
        justify-content: center !important;
    }

    /* Center innovation card icons */
    .innovation-card .feature-icon,
    .feature-card .feature-icon {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Center timeline card content */
    .timeline-card h5,
    .timeline-card .card-title {
        text-align: center !important;
    }

    /* Center About Us timeline titles and content on mobile */
    .timeline-scroll-title,
    .timeline-card-content h3 {
        text-align: center !important;
    }

    .timeline-scroll-date {
        display: block !important;
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .timeline-scroll-description {
        text-align: center !important;
    }

    /* Center any buttons in timeline cards */
    .timeline-card-content .btn,
    .timeline-scroll-card .btn {
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        text-align: center !important;
    }

    /* Disable timeline pop-in animations on mobile - show all cards immediately */
    .timeline-scroll-card,
    .timeline-logo-card {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
        transition: none !important;
    }

    .timeline-scroll-card.in-view,
    .timeline-logo-card.in-view {
        opacity: 1 !important;
        transform: translateY(0) scale(1) !important;
    }

    /* ===================================
       Mobile Page Banner
       =================================== */
    
    /* Show mobile page banner only on mobile */
    .mobile-page-banner {
        display: block !important;
    }

    /* Adjust font size for smaller screens */
    .mobile-page-title {
        font-size: 24px !important;
    }

    /* ===================================
       Mobile Contact Page Introduction
       =================================== */
    
    /* Center contact intro on mobile */
    .container .text-center.text-lg-start,
    .container .text-lg-start {
        text-align: center !important;
    }

    .container .text-lg-start .section-title,
    .container .text-lg-start .section-subtitle,
    .container .text-lg-start p {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* ===================================
       Mobile Contact Details Alignment
       =================================== */
    
    /* Contact details - center the card but keep icon alignment */
    .col-md-6 .d-flex.gap-3.align-items-start {
        align-items: center !important;
        flex-direction: column !important;
        text-align: center !important;
    }

    /* Keep icon at proper size */
    .col-md-6 .d-flex.gap-3 .bi {
        flex-shrink: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    /* Center all contact detail content */
    .col-md-6 .d-flex.gap-3 div {
        text-align: center !important;
    }

    /* ===================================
       Mobile Side Panel Menu
       =================================== */
    
    /* Prevent body scroll when menu is open */
    body.overflow-hidden {
        overflow: hidden;
    }

    /* Side panel sliding menu - Sticky and Full Height */
    .navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: -100% !important;
        width: 80% !important;
        max-width: 320px !important;
        height: 100% !important;
        min-height: 100vh !important;
        background: #ffffff !important;
        z-index: 200 !important;
        transition: left 0.3s ease-in-out !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
        padding: 20px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .navbar-collapse.show {
        left: 0 !important;
        background: #ffffff !important;
    }

    /* Ensure collapsing state also has white background */
    .navbar-collapse.collapsing {
        background: #ffffff !important;
        left: -100% !important;
    }

    /* Dark overlay behind the panel - Full coverage */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        min-height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 100;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out;
    }

    body.menu-open::after {
        opacity: 1;
        pointer-events: auto;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Reset navbar styles for side panel */
    .navbar-nav {
        flex-direction: column !important;
        width: 100% !important;
        margin: 0 !important;
        padding-top: 60px !important;
        background: #ffffff !important;
    }

    .nav-item {
        width: 100% !important;
        border-bottom: 1px solid #d0d0d0 !important;
        background: #ffffff !important;
    }

    .nav-link {
        padding: 15px 10px !important;
        color: var(--ipn-secondary) !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        background: transparent !important;
    }

    .nav-link:hover,
    .nav-link:active {
        color: var(--ipn-primary) !important;
        background-color: #f9f9f9 !important;
    }

    /* ===================================
       Mobile Dropdown Menus
       =================================== */

    /* Dropdown menus push content down (no overlay) */
    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #fafafa !important;
        padding: 0 !important;
        display: none;
    }

    .dropdown-menu.show {
        display: block !important;
        background: #fafafa !important;
    }

    .dropdown-item {
        padding: 12px 10px 12px 25px !important;
        color: #666666 !important;
        font-size: 14px !important;
        background: transparent !important;
    }

    .dropdown-item:hover,
    .dropdown-item:active,
    .dropdown-item:focus {
        color: var(--ipn-primary) !important;
        background: #ffffff !important;
    }

    /* Submenu indentation */
    .dropdown-submenu-menu {
        position: static !important;
        padding-left: 0 !important;
        background: #f5f5f5 !important;
        display: none;
    }

    .dropdown-submenu-menu.show {
        display: block !important;
        background: #f5f5f5 !important;
    }

    .dropdown-submenu-menu .dropdown-item {
        padding-left: 45px !important;
        font-size: 13px !important;
        color: #777777 !important;
        background: transparent !important;
    }

    .dropdown-submenu-menu .dropdown-item:hover,
    .dropdown-submenu-menu .dropdown-item:focus {
        color: var(--ipn-primary) !important;
        background: #ffffff !important;
    }

    /* Dropdown toggle icons */
    .dropdown-toggle::after {
        float: right !important;
        margin-top: 8px !important;
    }

    /* Action buttons in mobile menu */
    .navbar-collapse .btn-gradient,
    .navbar-collapse .auth-link {
        width: 100% !important;
        margin: 10px 0 !important;
        text-align: center !important;
        display: block !important;
    }

    .navbar-collapse .d-flex {
        flex-direction: column !important;
        width: 100% !important;
        padding: 20px 0 !important;
        background: #ffffff !important;
    }

    /* ===================================
       Stakeholders/Partners - Full Color on Mobile
       =================================== */

    /* Remove grayscale filter - show full color */
    .grayscale-hover {
        filter: none !important;
        opacity: 1 !important;
    }

    /* ===================================
       FAQ Accordion - Mobile Caret Alignment
       =================================== */
    
    /* Fix accordion button layout for mobile */
    .faq-accordion .accordion-button {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px !important;
        font-size: 16px !important;
        text-align: left !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }

    /* Ensure caret stays aligned to the right on mobile */
    .faq-accordion .accordion-button::after {
        flex-shrink: 0 !important;
        margin-left: 15px !important;
        align-self: flex-start !important;
        margin-top: 2px !important;
    }

    /* Reduce FAQ section container padding on mobile */
    .faq-section-container {
        padding: 20px 15px !important;
        border-radius: 20px !important;
    }

    /* Adjust FAQ body padding on mobile */
    .faq-accordion .accordion-body {
        padding: 1rem 20px 20px 20px !important;
        font-size: 15px !important;
        line-height: 24px !important;
    }
}

/* ===================================
   Tablet (500px - 1023px)
   =================================== */

@media (min-width: 500px) and (max-width: 1023px) {
    /* More padding on tablet */
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    .container {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    /* Top bar: keep contact left, social icons right (no stacking) */
    .top-bar .row {
        flex-wrap: nowrap;
    }

    .top-bar .row > div.col-lg-6 {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
    }

    .top-bar .row > div.col-lg-6:first-child {
        flex: 1 1 auto;
    }

    .top-bar .row > div.col-lg-6:last-child {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .top-bar__social {
        justify-content: flex-end !important;
    }

    /* ===================================
       Tablet Hero - Image Only Display
       =================================== */
    
    /* Hide text-based hero sections on tablet */
    .hero {
        display: none !important;
    }

    .about-hero {
        display: none !important;
    }

    /* Show tablet hero image container */
    .tablet-hero-image {
        display: block !important;
        width: 100%;
        overflow: hidden;
    }

    .tablet-hero-image img {
        width: 100%;
        height: auto;
        display: block;
        object-fit: contain;
    }

    /* Hide carousel on tablet */
    #heroCarousel {
        display: none !important;
    }

    /* Quote section adjustments */
    .quote-icon {
        font-size: 60px;
    }

    /* Timeline adjustments (About Us page) */
    .timeline-scroll-card {
        width: 320px;
    }

    .timeline-card-content {
        height: 220px;
        padding: 25px;
    }

    .timeline-connector {
        height: 50px;
    }

    .timeline-horizontal-line {
        bottom: 50px;
        height: 3px;
    }

    .timeline-logo-card {
        width: 320px;
    }

    .timeline-logo-inner {
        width: 220px;
        height: 220px;
        padding: 25px;
    }

    /* Stakeholders/Partners - Full Color on Tablet */
    .grayscale-hover {
        filter: none !important;
        opacity: 1 !important;
    }

    /* ===================================
       Tablet YouTube Video Section
       =================================== */
    
    /* Always show YouTube overlay on tablet */
    .youtube-overlay {
        transform: translateY(0) !important;
        animation: tabletYoutubePulse 3.5s ease-in-out infinite;
    }

    /* Add tap instruction text on tablet */
    .youtube-overlay::after {
        content: "Tap to watch on YouTube";
        font-size: 13px;
        font-weight: 500;
        margin-left: 10px;
        opacity: 0.95;
    }

    /* Larger play button on tablet */
    .about-play-button {
        width: 85px !important;
        height: 85px !important;
        animation: tabletPlayButtonPulse 3s ease-in-out infinite;
    }

    .about-play-button i {
        font-size: 38px !important;
    }

    /* Subtle glow effect on video container */
    .about-image {
        position: relative;
    }

    .about-image::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(45deg, #FF0000, var(--ipn-primary), #FF0000);
        border-radius: inherit;
        z-index: -1;
        opacity: 0.4;
        animation: tabletBorderGlow 3.5s ease-in-out infinite;
    }

    @keyframes tabletYoutubePulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.9;
        }
    }

    @keyframes tabletPlayButtonPulse {
        0%, 100% {
            transform: translate(-50%, -50%) scale(1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        }
        50% {
            transform: translate(-50%, -50%) scale(1.03);
            box-shadow: 0 6px 20px rgba(204, 168, 58, 0.5);
        }
    }

    @keyframes tabletBorderGlow {
        0%, 100% {
            opacity: 0.2;
        }
        50% {
            opacity: 0.5;
        }
    }
}

/* ===================================
   Tablet (min-width: 500px)
   =================================== */

@media (min-width: 500px) {
    /* FAQ section padding */
    .faq-section-container {
        padding: 40px 30px;
    }
}

/* ===================================
   Tablet and Below (max-width: 991px)
   =================================== */

@media (max-width: 991px) {
    /* Adjust hero title on tablets */
    .hero-title {
        font-size: 48px;
    }

    /* Prevent body scroll when menu is open */
    body.overflow-hidden {
        overflow: hidden;
    }

    /* Side panel menu for tablets - Sticky and Full Height */
    .navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: -100% !important;
        width: 70% !important;
        max-width: 400px !important;
        height: 100% !important;
        min-height: 100vh !important;
        background: #ffffff !important;
        z-index: 200 !important;
        transition: left 0.3s ease-in-out !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1) !important;
        padding: 20px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .navbar-collapse.show {
        left: 0 !important;
        background: #ffffff !important;
    }

    .navbar-collapse.collapsing {
        background: #ffffff !important;
        left: -100% !important;
    }

    /* Dark overlay behind the panel (tablet) - Full coverage */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        min-height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 100;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease-in-out;
    }

    body.menu-open::after {
        opacity: 1;
        pointer-events: auto;
    }

    /* Prevent body scroll when menu is open (tablet) */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Stack navigation items */
    .navbar-nav {
        padding-top: 60px;
        flex-direction: column;
        width: 100%;
    }

    .navbar-nav {
        background: #ffffff !important;
        flex-direction: column !important;
    }

    .nav-item {
        width: 100% !important;
        border-bottom: 1px solid #d0d0d0 !important;
        background: #ffffff !important;
    }

    .nav-link {
        padding: 15px 10px !important;
        color: var(--ipn-secondary) !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        background: transparent !important;
    }

    .nav-link:hover,
    .nav-link:active {
        color: var(--ipn-primary) !important;
        background: #f9f9f9 !important;
    }

    /* Dropdown adjustments for tablets */
    .dropdown-menu {
        position: static !important;
        box-shadow: none !important;
        min-width: 100% !important;
        width: 100% !important;
        border: none !important;
        background: #fafafa !important;
        display: none;
    }

    .dropdown-menu.show {
        display: block !important;
        background: #fafafa !important;
    }

    .dropdown-item {
        padding: 12px 10px 12px 25px !important;
        color: #666666 !important;
        background: transparent !important;
    }

    .dropdown-item:hover,
    .dropdown-item:active,
    .dropdown-item:focus {
        color: var(--ipn-primary) !important;
        background: #ffffff !important;
    }

    .dropdown-submenu-menu {
        position: static !important;
        box-shadow: none !important;
        padding-left: 0 !important;
        background: #f5f5f5 !important;
        display: none;
    }

    .dropdown-submenu-menu.show {
        display: block !important;
        background: #f5f5f5 !important;
    }

    .dropdown-submenu-menu .dropdown-item {
        padding-left: 45px !important;
        color: #777777 !important;
        background: transparent !important;
    }

    .dropdown-submenu-menu .dropdown-item:hover,
    .dropdown-submenu-menu .dropdown-item:focus {
        color: var(--ipn-primary) !important;
        background: #ffffff !important;
    }

    .dropdown-submenu .dropdown-toggle::after {
        content: "\F282";
        float: right;
        margin-top: 8px;
    }

    /* Action buttons */
    .navbar-collapse .d-flex {
        flex-direction: column;
        width: 100%;
        padding: 20px 0;
    }

    .navbar-collapse .btn-gradient,
    .navbar-collapse .auth-link {
        width: 100%;
        margin: 10px 0;
        display: block;
        text-align: center;
    }
}

/* ===================================
   Laptop (992px - 1399px) – more padding on regular laptop screens
   =================================== */

@media (min-width: 992px) and (max-width: 1399px) {
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    /* Hero carousel must sit flush under navbar – no top gap */
    section.hero,
    .hero {
        padding-top: 0 !important;
    }

    .container {
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
    }

    /* Increase gap between timeline cards and innovation section */
    section.timeline {
        padding-bottom: 6rem !important;
    }

    section.innovation {
        padding-top: 6rem !important;
    }

    section.innovation .container {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
}

/* ===================================
   Desktop (min-width: 1024px)
   =================================== */

@media (min-width: 1024px) {
    /* Show desktop hero sections */
    .hero {
        display: block !important;
    }

    .about-hero {
        display: block !important;
    }

    #heroCarousel {
        display: block !important;
    }

    /* Hide tablet hero image on desktop */
    .tablet-hero-image {
        display: none !important;
    }

    /* Adjust gap between video/about section and timeline */
    section.about {
        padding-bottom: 3rem !important;
    }

    section.about .container {
        padding-bottom: 1.5rem !important;
    }

    section.timeline {
        padding-top: 1.5rem !important;
    }
}

/* ===================================
   Desktop (min-width: 992px)
   =================================== */

@media (min-width: 992px) {
    /* Increase gap between timeline cards and innovation section */
    section.timeline {
        padding-bottom: 6rem !important;
    }

    section.innovation {
        padding-top: 6rem !important;
    }

    section.innovation .container {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Dropdown positioning for desktop */
    .navbar .dropdown {
        position: relative;
    }

    /* Dropdown menu positioning - NO overflow hidden for parent menus with submenus */
    .navbar .dropdown-menu {
        position: absolute;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }

    /* Only apply overflow hidden to dropdown menus that DON'T have submenus */
    .navbar .dropdown-menu:not(:has(.dropdown-submenu)) {
        overflow: hidden;
    }

    /* Desktop submenu positioning */
    .navbar .dropdown-submenu-menu {
        position: absolute;
        top: 0;
        left: 100%;
        margin-left: 0;
        margin-top: 0;
        display: none;
        z-index: 1051;
        border: none;
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.25);
        border-radius: 0;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
        padding: 0;
        min-width: 300px;
        background-color: white;
        overflow: hidden;
    }

    /* Bottom corners border radius for last items */
    .navbar .dropdown-menu > li:last-child > .dropdown-item:not(.dropdown-toggle),
    .navbar .dropdown-submenu-menu > li:last-child .dropdown-item {
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }

    /* First item styling - no top radius */
    .navbar .dropdown-menu > li:first-child .dropdown-item,
    .navbar .dropdown-submenu-menu > li:first-child .dropdown-item {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }

    /* Ensure dropdown items don't overflow the rounded container */
    .navbar .dropdown-menu .dropdown-item:last-child:not(.dropdown-toggle),
    .navbar .dropdown-submenu-menu .dropdown-item:last-child {
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }
}

/* ===================================
   Loader Background Images - Screen Fill
   =================================== */

/* Mobile Loader - Screen Fill (up to 499px) */
@media (max-width: 499px) {
    .loader-overlay {
        background-image: url('/Loader/Loader%20Images/Mobile%20Loader.webp');
        background-size: cover !important;
        background-position: center center !important;
        width: 100vw !important;
        height: 100vh !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
    }
    
    /* Lock body scroll on mobile while loading */
    body.loading {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        touch-action: none !important;
    }
}

/* Tablet Loader - Screen Fill (500px to 1023px) */
@media (min-width: 500px) and (max-width: 1023px) {
    .loader-overlay {
        background-image: url('/Loader/Loader%20Images/Tablet%20Loader.webp');
        background-size: cover !important;
        background-position: center center !important;
        width: 100vw !important;
        height: 100vh !important;
        min-height: 100vh !important;
        min-height: -webkit-fill-available !important;
    }
    
    /* Lock body scroll on tablet while loading */
    body.loading {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        touch-action: none !important;
    }
}

/* Desktop/Laptop Loader - Screen Fill (1024px and above) */
@media (min-width: 1024px) {
    .loader-overlay {
        background-image: url('/Loader/Loader%20Images/Desktop_Laptop%20loader.webp');
        background-size: cover;
        background-position: center center;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .top-bar,
    .navbar,
    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators,
    .footer a[href^="#"] {
        display: none;
    }

    .hero {
        min-height: auto;
    }
}
