/* Shared RTL geometry for the header on home, content pages and WooCommerce. */
body .mg-site-header .header-row { direction: rtl; }
body .mg-site-header .mg-header-brand { grid-area: brand; min-width: 0; justify-self: start; }
body .mg-site-header .mg-header-brand .brand { min-width: 0; }
body .mg-site-header .mg-header-brand .custom-logo { display: block; max-width: min(160px, 100%); max-height: 62px; width: auto; height: auto; object-fit: contain; }
body .mg-site-header .header-row > .mana-search { grid-area: search; width: 100%; min-width: 0; max-width: none; margin: 0; }
body .mg-site-header .header-row > .head-actions { grid-area: actions; justify-self: end; }
body .mg-site-header #navigation { grid-area: menu; min-width: 0; }
@media (min-width: 701px) {
    body .mg-site-header .header-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(170px, 360px) minmax(0, 1fr);
        grid-template-areas: "brand search actions" "menu menu menu";
        align-items: center;
        gap: 6px 16px;
        min-height: 121px;
        padding-block: 8px;
    }
    body .mg-site-header #navigation {
        display: flex;
        position: relative;
        inset: auto;
        justify-content: center;
        flex-wrap: wrap;
        width: 100%;
        padding: 0;
        background: transparent;
        box-shadow: none;
        gap: 8px 18px;
    }
    body .mg-site-header #navigation .mg-primary-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
    body .mg-site-header #navigation .mg-primary-menu li { position: relative; }
    body .mg-site-header #navigation .sub-menu { display: none; position: absolute; z-index: 100; inset: 100% 0 auto auto; min-width: 160px; list-style: none; margin: 0; padding: 8px; background: #fff; border-radius: 12px; }
    body .mg-site-header #navigation .sub-menu a { display: block; color: #24533f; padding: 6px 8px; }
    body .mg-site-header #navigation li:hover > .sub-menu, .mg-site-header #navigation li:focus-within > .sub-menu { display: block; }
    body .mg-site-header #menuButton { display: none; }
}
@media (max-width: 700px) {
    body .mg-site-header .header-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "search search" "menu menu"; gap: 6px 10px; }
    body .mg-site-header .mg-header-brand .custom-logo { max-width: min(120px, 100%); max-height: 43px; }
    body .mg-site-header .mg-header-brand .brand strong { font-size: clamp(17px, 5vw, 22px); }
    body .mg-site-header .mg-header-brand .brand small { font-size: 9px; }
    body .mg-site-header .head-actions { gap: 3px; }
    body .mg-site-header .head-actions .icon-button { min-width: 34px; width: 34px; }
}

@media (max-width: 700px) {
    body .mg-site-header .header-row { min-height: 110px; }
    body .mg-site-header .header-row > .head-actions { min-width: 0; }
    body .mg-site-header .header-row > .mana-search { align-self: start; }
}
@media (max-width: 700px) {
    #footer .mobile-license-placeholder { flex: 0 0 104px; display: grid; gap: 5px; align-content: center; min-height: 74px; padding: 8px; text-align: center; background: #fffdf4; color: #173f32; border-radius: 12px; scroll-snap-align: start; }
    #footer .mobile-footer-license > p { color: #eef4ed; font-size: 12px; margin-block: 6px 10px; }
}
