/* ==========================================================================
   Site Header Compact
   Reduces the Elementor theme header from ~132px to ~55px on desktop
   so exercise widgets can fit within viewport at 100% zoom.

   Targets: .elementor-location-header (Elementor theme header)
   Does NOT affect widget headers (.exercise-header-container)

   NOTE: Elementor's post-28665.css uses high-specificity selectors like
   .elementor-28665 .elementor-element.elementor-element-e382e54 .elementor-nav-menu .elementor-item
   We must match/beat that specificity without using !important.
   ========================================================================== */

/* --- Logo image --- */
.elementor-location-header .elementor-widget-image img,
.elementor-location-header .elementor-widget-theme-site-logo img {
    max-height: 40px;
    width: auto;
    object-fit: contain;
}

/* --- Logo container: Elementor sets this to 248px but image is only 100px --- */
.elementor-location-header .elementor-widget-image,
.elementor-location-header .elementor-widget-theme-site-logo {
    max-height: 44px;
    width: auto;
}

/* --- Logo parent container: shrink to fit the logo, not 248px --- */
.elementor-location-header .e-con.e-child:has(.elementor-widget-image),
.elementor-location-header .e-con.e-child:has(.elementor-widget-theme-site-logo) {
    flex: 0 0 auto;
    width: auto;
    max-width: 120px;
}

/* --- Main header container padding --- */
.elementor-location-header .e-con-inner {
    padding-top: 6px;
    padding-bottom: 6px;
    align-items: center;
}

/* --- Nav menu items ---
   Elementor post-28665.css specificity: 0,4,0
   .elementor-28665 .elementor-element.elementor-element-e382e54 .elementor-nav-menu .elementor-item
   Our counter: header element (0,0,1) + multiple classes = 0,5,1 to safely win.
*/
header.elementor-location-header .elementor-element .elementor-widget-nav-menu .elementor-nav-menu .elementor-item,
header.elementor-location-header .elementor-element .elementor-nav-menu--main .elementor-nav-menu > li > a {
    font-size: 14px;
    padding: 5px 10px;
    line-height: 1.3;
}

/* --- Prevent nav UL from wrapping to multiple rows --- */
header.elementor-location-header .elementor-nav-menu--main > ul.elementor-nav-menu {
    flex-wrap: nowrap;
}

/* --- Nav dropdown indicator arrow --- */
header.elementor-location-header .elementor-nav-menu .sub-arrow,
header.elementor-location-header .elementor-nav-menu .elementor-item .sub-arrow {
    font-size: 10px;
}

/* --- Submenu (dropdown) items stay readable --- */
header.elementor-location-header .elementor-nav-menu .sub-menu .elementor-item {
    font-size: 13px;
    padding: 6px 14px;
}

/* --- Tighten the flex gap between nav container children --- */
.elementor-location-header .e-con {
    --gap: 4px;
    gap: 4px;
}

/* --- Nav container: let it take remaining space --- */
.elementor-location-header .e-con.e-child:has(.elementor-widget-nav-menu) {
    flex: 1 1 auto;
}

/* --- Mobile: even more compact --- */
@media (max-width: 768px) {
    .elementor-location-header .elementor-widget-image img,
    .elementor-location-header .elementor-widget-theme-site-logo img {
        max-height: 32px;
    }

    .elementor-location-header .e-con-inner {
        padding-top: 4px;
        padding-bottom: 4px;
    }

    /* Reset logo container constraint for mobile */
    .elementor-location-header .e-con.e-child:has(.elementor-widget-image),
    .elementor-location-header .e-con.e-child:has(.elementor-widget-theme-site-logo) {
        max-width: none;
    }
}
