/* Awesome Header Plugin - V16 (FINAL - STABLE) */

:root {
    --ahp-header-height: 70px; --ahp-menu-width: 320px; --ahp-bg: #FFFFFF; --ahp-menu-bg: #F7F7F7;
    --ahp-submenu-bg: #FFFFFF; --ahp-text: #111111; --ahp-text-subtle: #666666; --ahp-accent: #D90429;
    --ahp-border: #E5E5E5; --ahp-shadow: 0 4px 15px rgba(0,0,0,0.08); --ahp-timing: cubic-bezier(0.4, 0, 0.2, 1);
    --ahp-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body { font-family: var(--ahp-font); }
body.ahp-active { padding-top: var(--ahp-header-height); }
body.ahp-active #page > header, body.ahp-active .elementor-location-header { display: none !important; }
body.admin-bar #ahp-header { top: 32px; }
body.admin-bar #ahp-off-canvas-menu, body.admin-bar #ahp-overlay { top: 32px; height: calc(100% - 32px); }
body.ahp-active.admin-bar { padding-top: calc(var(--ahp-header-height) + 32px); }
#ahp-header { position: fixed; top: 0; left: 0; width: 100%; height: var(--ahp-header-height); background: var(--ahp-bg); box-shadow: var(--ahp-shadow); z-index: 9999; padding: 0 25px; border-bottom: 1px solid var(--ahp-border); }
#ahp-header .ahp-container { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; }
.ahp-logo a { text-decoration: none; color: var(--ahp-text); font-size: 1.8rem; font-weight: 700; }
.ahp-logo img { max-height: 40px; }
.ahp-menu-toggle { width: 28px; height: 22px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; background: transparent; border: none; }
.ahp-menu-toggle span { display: block; width: 100%; height: 3px; background-color: var(--ahp-text); border-radius: 3px; }
#ahp-off-canvas-menu { position: fixed; top: 0; left: 0; width: var(--ahp-menu-width); height: 100%; background-color: var(--ahp-menu-bg); box-shadow: 5px 0 25px rgba(0,0,0,0.15); z-index: 10001; transition: transform 0.4s var(--ahp-timing); transform: translateX(-100%); display: flex; flex-direction: column; }
#ahp-off-canvas-menu.is-open { transform: translateX(0); }
#ahp-menu-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; border-bottom: 1px solid var(--ahp-border); flex-shrink: 0; }
.ahp-search-icon, .ahp-close-btn { cursor: pointer; width: 28px; height: 28px; }
.ahp-search-icon svg, .ahp-close-btn svg { fill: var(--ahp-text); transition: transform 0.2s ease; }
.ahp-search-icon:hover svg, .ahp-close-btn:hover svg { transform: scale(1.1); }
#ahp-main-nav { padding: 10px 0; overflow-y: auto; flex-grow: 1; }
#ahp-main-nav ul { list-style: none !important; margin: 0 !important; padding: 0 !important; }
#ahp-main-nav > ul > li { border-bottom: 1px solid var(--ahp-border); }
#ahp-main-nav li a { display: flex; justify-content: space-between; align-items: center; padding: 18px 25px; text-decoration: none; color: var(--ahp-text); font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; transition: background-color 0.2s ease; }
#ahp-main-nav > ul > li > a:hover { background-color: #EFEFEF; }
.ahp-expand-btn { font-size: 2rem; font-weight: 300; line-height: 1; color: var(--ahp-accent); transition: transform 0.3s var(--ahp-timing); padding: 5px; cursor: pointer; }
.ahp-expand-btn.is-open { transform: rotate(45deg); }
#ahp-main-nav .sub-menu { max-height: 0; overflow: hidden; background-color: var(--ahp-submenu-bg); transition: max-height 0.4s var(--ahp-timing), padding 0.4s var(--ahp-timing); padding: 0; }
#ahp-main-nav .sub-menu.is-open { max-height: 500px; padding: 10px 0; }
#ahp-main-nav .sub-menu li a { padding: 12px 25px 12px 45px; text-transform: none; font-size: 0.95rem; font-weight: 500; color: var(--ahp-text-subtle); border-bottom: none; position: relative; transition: color 0.2s ease, padding-left 0.2s ease; }
#ahp-main-nav .sub-menu li a::before { content: ''; position: absolute; left: 25px; top: 50%; transform: translateY(-50%) scaleX(0); transform-origin: left; width: 4px; height: 20px; background-color: var(--ahp-accent); transition: transform 0.3s var(--ahp-timing); }
#ahp-main-nav .sub-menu li a:hover { background-color: transparent; color: var(--ahp-text); padding-left: 50px; }
#ahp-main-nav .sub-menu li a:hover::before { transform: translateY(-50%) scaleX(1); }
#ahp-search-container { padding: 20px 25px; display: flex; flex-direction: column; height: 100%; }
.ahp-search-form-wrapper { position: relative; }
.ahp-search-field { width: 100%; padding: 15px 20px; border: 1px solid var(--ahp-border); border-radius: 5px; font-size: 1.1rem; font-family: var(--ahp-font); background: #fff; }
.ahp-loader { border: 3px solid #f3f3f3; border-top: 3px solid var(--ahp-accent); border-radius: 50%; width: 20px; height: 20px; animation: spin 1s linear infinite; position: absolute; right: 15px; top: 50%; margin-top: -10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.ahp-search-results { margin-top: 20px; flex-grow: 1; overflow-y: auto; }
.ahp-search-results a { display: block; padding: 12px 15px; background: #fff; border-bottom: 1px solid var(--ahp-border); text-decoration: none; color: var(--ahp-text); transition: background-color 0.2s ease; }
.ahp-search-results a:hover { background-color: #f0f0f0; }
.ahp-search-results .no-results { padding: 15px; color: var(--ahp-text-subtle); }
.ahp-back-to-menu { display: inline-block; margin-top: auto; padding-top: 20px; color: var(--ahp-text-subtle); text-decoration: none; font-size: 0.9rem; flex-shrink: 0; }
#ahp-off-canvas-menu.search-active #ahp-main-nav { display: none; }
#ahp-off-canvas-menu.search-active #ahp-search-container { display: flex; }
#ahp-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); z-index: 10000; opacity: 0; visibility: hidden; transition: opacity 0.4s ease; }
#ahp-overlay.is-visible { opacity: 1; visibility: visible; }
@media screen and (max-width: 782px) { body.admin-bar #ahp-header { top: 46px; } body.admin-bar #ahp-off-canvas-menu, body.admin-bar #ahp-overlay { top: 46px; height: calc(100% - 46px); } body.ahp-active.admin-bar { padding-top: calc(var(--ahp-header-height) + 46px); } }
@media (max-width: 600px) { :root { --ahp-menu-width: 85%; } }

/* --- START: Fixes for Alignment and Active Menu Highlighting --- */

/* Fix for Vertically Centering the Header Logo */
.ahp-logo a {
    display: inline-flex;
    align-items: center;
    height: 100%;
}

/* --- Style for the Active/Current Menu Item --- */

/* Highlights the main menu item that is currently active */
#ahp-main-nav > ul > li.current-menu-item > a {
    background-color: #EFEFEF;
    color: var(--ahp-accent);
}

/* Highlights the sub-menu item that is currently active */
#ahp-main-nav .sub-menu li.current-menu-item > a {
    color: var(--ahp-text); /* Makes text darker than other sub-items */
    padding-left: 50px; /* Aligns it like a hovered item */
}

/* Shows the accent-colored bar on the left of the active sub-menu item */
#ahp-main-nav .sub-menu li.current-menu-item > a::before {
    transform: translateY(-50%) scaleX(1);
}

/* --- END: Fixes for Alignment and Active Menu Highlighting --- */