/* Fix for Partners Section Visibility */
.featured-partner-item {
    background: transparent;
    border-radius: 0;
    padding: 15px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    transition: transform 0.3s ease;
    border: none;
}

.featured-partner-item img {
    max-width: 115%;
    max-height: 115px;
    object-fit: contain;
    filter: none;
}

/* Fix for Applause/Awards Images being cut off */
.award-img img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
}

/* Fix "Partners" Slider visibility if they are in a slider */
.logo-slider .slide {
    background: transparent;
    border-radius: 0;
    margin: 0 10px;
    padding: 10px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 130px;
}

.logo-slider .slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* CRITICAL MOBILE HERO IMAGE FIX */
@media (max-width: 768px) {

    /* Fix for all hero sections on mobile */
    #hero,
    #g-body,
    #what_we_do,
    #resources,
    #getinvolved-hero,
    #donate-hero,
    #award-hero,
    #publication-hero {
        height: auto !important;
        min-height: 50vh !important;
        padding-top: 80px !important;
        background: #f4f7f6 !important;
    }

    /* Force hero containers to show background images on mobile */
    .hero-container,
    #hero .hero-container,
    #g-body .hero-container,
    #what_we_do .hero-container,
    #resources .hero-container,
    #getinvolved-hero .hero-container,
    #donate-hero .hero-container,
    #award-hero .hero-container,
    #publication-hero .hero-container {
        height: 50vh !important;
        min-height: 400px !important;
        width: 100% !important;
        max-width: 96% !important;
        margin: 10px auto !important;
        border-radius: 15px !important;
        overflow: hidden !important;
        background-size: cover !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-attachment: scroll !important;
        display: block !important;
        position: relative !important;
    }

    /* Index page carousel items */
    .carousel-item {
        height: 50vh !important;
        min-height: 400px !important;
        background-size: cover !important;
        background-position: center center !important;
        background-attachment: scroll !important;
        background-repeat: no-repeat !important;
    }

    /* Ensure text is visible */
    .carousel-caption {
        bottom: 20px !important;
    }

    /* Fix container positioning */
    #g-body .container,
    #what_we_do .container,
    #resources .container,
    #getinvolved-hero .container,
    #donate-hero .container,
    #award-hero .container,
    #publication-hero .container {
        position: absolute !important;
        bottom: 30px !important;
        left: 20px !important;
        right: 20px !important;
    }
}

/* MOBILE MENU ICON FIX - COMPLETE SOLUTION */
@media (max-width: 991px) {

    /* Ensure mobile menu toggle is visible and properly sized */
    .mobile-nav-toggle {
        display: block !important;
        cursor: pointer;
        position: relative;
        z-index: 9999;
        width: 30px !important;
        height: 24px !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        font-size: 0 !important;
        /* Hide any text/icon font */
    }

    /* Create the three hamburger lines using pseudo-elements */
    .mobile-nav-toggle.bi-list::before,
    .mobile-nav-toggle::before {
        content: '' !important;
        position: absolute;
        width: 100%;
        height: 3px;
        background: #024b26;
        top: 0;
        left: 0;
        transition: all 0.3s ease;
        display: block;
    }

    .mobile-nav-toggle.bi-list::after,
    .mobile-nav-toggle::after {
        content: '' !important;
        position: absolute;
        width: 100%;
        height: 3px;
        background: #024b26;
        bottom: 0;
        left: 0;
        transition: all 0.3s ease;
        display: block;
    }

    /* Middle line - always show for hamburger */
    .mobile-nav-toggle.bi-list {
        background: linear-gradient(#024b26 0%, #024b26 100%) !important;
        background-size: 100% 3px !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }

    /* When menu is open (bi-x class), transform to X */
    .mobile-nav-toggle.bi-x::before {
        transform: rotate(45deg);
        top: 50%;
        margin-top: -1.5px;
    }

    .mobile-nav-toggle.bi-x::after {
        transform: rotate(-45deg);
        bottom: 50%;
        margin-bottom: -1.5px;
    }

    .mobile-nav-toggle.bi-x {
        background: none !important;
    }

    /* Ensure navbar is hidden on mobile by default */
    #navbar ul {
        display: none;
    }

    #navbar.navbar-mobile ul {
        display: block !important;
    }
}