/*
Theme Name: MSG91 BuddyX Child
Theme URI: https://msg91.trykaziweb.com/
Description: BuddyX child theme for the MSG91 OBA community platform.
Author: MSG91 / KaziWeb
Template: buddyx
Version: 1.0.0
Text Domain: msg91-buddyx-child
*/
/* =========================================================
   MSG91 Mobile Header
   Keep crest and branding readable on small screens
   ========================================================= */

@media screen and (max-width: 767px) {

    /* Do not allow the crest/logo itself to be squeezed */
    .site-header .custom-logo-link {
        flex: 0 0 auto;
        margin-right: 8px;
    }

    .site-header .custom-logo {
        display: block;
        width: auto;
        height: auto;
        max-width: 48px;
        max-height: 56px;
        object-fit: contain;
    }

    /* Allow the text portion of the branding to use its space efficiently */
    .site-header .site-branding-inner {
        min-width: 0;
    }

    .site-header .site-title {
        margin: 0 0 2px;
        font-size: 20px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .site-header .site-description {
        margin: 0;
        max-width: 170px;
        font-size: 11px;
        line-height: 1.25;
    }
}

/* =========================================================
   MSG91 Mobile Header - flex correction
   ========================================================= */
@media screen and (max-width: 767px) {

    /* Branding may use remaining header space but must not collapse */
    .site-header .site-branding {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* This is the actual flex child containing the crest */
    .site-header .site-logo-wrapper {
        flex: 0 0 48px;
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        margin-right: 8px;
    }

    .site-header .site-logo-wrapper > a {
        display: block;
        width: 48px;
        margin-right: 0;
    }

    .site-header .site-logo-wrapper .custom-logo {
        display: block;
        width: 48px;
        height: 48px;
        max-width: 48px;
        max-height: 48px;
        object-fit: contain;
    }

    /* Text gets whatever branding space remains */
    .site-header .site-branding-inner {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* =========================================================
   MSG91 Desktop Header - keep primary navigation on one row
   ========================================================= */
@media screen and (min-width: 768px) {
    .main-navigation ul#primary-menu > li > a {
        padding: 1.5em .35em;
    }
}
