/* Header */
#main-header {
    background-color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

#main-header .mh-container {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    justify-content: space-between; /* Space between logo and search bar */
}

#main-header .mh-container .mh-logo img {
    max-width: 10rem;
}

/* Header Search Bar */
#main-header .header-search {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

#main-header .header-search .search-box-con {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 500px; /* Limit width for larger screens */
    width: 100%;
}

#main-header .header-search .search-box-con input.search-box {
    padding: 0.85rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    min-width: 0; /* Allow input to shrink */
    flex-grow: 1; /* Take available space */
    display: inline-block;
    border: 1px solid #424242;
    border-top-left-radius: 1.25rem;
    border-bottom-left-radius: 1.25rem;
}

#main-header .header-search .search-box-con button.search-box-btn {
    padding: 0.85rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    border: 1px solid #424242;
    border-top-right-radius: 1.25rem;
    border-bottom-right-radius: 1.25rem;
    flex-shrink: 0; /* Prevent button from shrinking */
}

#main-header .header-search .search-box-con button.search-box-btn i {
    display: inline-block !important;
    visibility: visible !important;
}

@media (max-width: 768px) {
    #main-header .mh-container {
        padding: 0.5rem;
    }

    #main-header .mh-container .mh-logo img {
        max-width: 8rem; /* Reduce logo size on mobile */
    }

    #main-header .header-search .search-box-con {
        max-width: 100%;
    }

    #main-header .header-search .search-box-con input.search-box {
        font-size: 0.9rem;
        padding: 0.5rem; /* Reduce padding on mobile */
    }

    #main-header .header-search .search-box-con button.search-box-btn {
        font-size: 0.9rem;
        padding: 0.5rem; /* Reduce padding on mobile */
    }
}

@media (max-width: 480px) {
    #main-header .mh-container .mh-logo img {
        max-width: 6rem; /* Further reduce logo size on smaller screens */
    }

    #main-header .header-search .search-box-con input.search-box {
        font-size: 0.8rem;
        padding: 0.4rem;
    }

    #main-header .header-search .search-box-con button.search-box-btn {
        font-size: 0.8rem;
        padding: 0.4rem;
    }
}

#main-header-spacer {
    height: 3rem;
}

/* WhatsApp Channel Banner */
.whatsapp-channel {
    text-align: center;
    margin: 0.5rem 0;
}

.whatsapp-channel img {
    max-width: 100%;
    height: auto;
}

.whatsapp-channel .channel-desktop {
    display: block;
}

.whatsapp-channel .channel-mobile {
    display: none;
}

@media (max-width: 768px) {
    .whatsapp-channel .channel-desktop {
        display: none;
    }

    .whatsapp-channel .channel-mobile {
        display: block;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    #main-header {
        background-color: #121212;
    }

    /* Ensure Dark Mode Logo Displays */
    #main-header .mh-container .mh-logo #light-logo {
        display: none !important;
    }

    #main-header .mh-container .mh-logo #dm-logo {
        display: block !important;
    }

    #main-header .header-search .search-box-con input.search-box {
        background: #333;
        color: #eee;
        border: 1px solid #555;
    }

    #main-header .header-search .search-box-con button.search-box-btn {
        background: #555;
        color: #eee;
        border: 1px solid #555;
    }
}