/* === Anigdha Ausbildung — Header Styles === */

/* === Desktop nav menu items (scoped to .site-nav to avoid leaking into mobile) === */
.site-nav .menu-item {
    list-style: none;
    position: relative;
}

.site-nav .menu-item a {
    font-family: 'Poppins', sans-serif;
    font-size: 15.5px;
    font-weight: 500;
    color: #1A1A1A;
    text-decoration: none;
    transition: color .2s;
}

.site-nav .menu-item a:hover {
    color: #DD0000;
}

.site-nav .current-menu-item > a {
    color: #DD0000;
}

/* === Desktop nav dropdown === */

.site-nav .menu-item .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px;
    min-width: 240px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 36px rgba(0,0,0,.12);
    padding: 12px 0;
    margin-top: 16px;
    z-index: 100;
    flex-direction: column;
    gap: 0;
}

.site-nav .menu-item .sub-menu::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}

.site-nav .menu-item:hover > .sub-menu {
    display: flex;
}

.site-nav .sub-menu .menu-item {
    list-style: none;
}

.site-nav .sub-menu .menu-item a {
    display: block;
    padding: 10px 24px;
    font-size: 14.5px;
    font-weight: 500;
    color: #1A1A1A;
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.site-nav .sub-menu .menu-item a:hover {
    background: #F8F9FA;
    color: #DD0000;
}

/* Dropdown arrow on parent */
.site-nav .menu-item-has-children > a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    margin-left: 6px;
    transition: transform .2s;
}

.site-nav .menu-item-has-children:hover > a::after {
    transform: rotate(180deg);
}

/* === Header CTA === */
.header-cta:hover {
    background: #FFCE03;
    color: #1A1A1A;
}

/* === Mobile overlay menu === */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: #FFFFFF;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-overlay.is-open {
    display: flex;
}
.mobile-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #F3F4F6;
    flex-shrink: 0;
}
.mobile-overlay-header button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.mobile-overlay-nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.mobile-nav-list li {
    border-bottom: 1px solid #F3F4F6;
}
.mobile-nav-list li a {
    display: block;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 500;
    color: #1A1A1A;
    text-decoration: none;
    transition: background .15s;
}
.mobile-nav-list li a:hover {
    background: #F9FAFB;
}

/* Parent items with sub-menus — link + separate toggle button side by side */
.mobile-nav-list li.menu-item-has-children {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}
.mobile-nav-list li.menu-item-has-children > a {
    flex: 1;
    min-width: 0;
}
/* Arrow toggle button — boxed, only this area opens the dropdown */
.mobile-submenu-toggle {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 16px;
    padding: 0;
    transition: background .2s, border-color .2s;
}
.mobile-submenu-toggle i {
    font-size: 13px;
    color: #6B7280;
    transition: transform .3s ease, color .2s;
}
.mobile-submenu-toggle:hover {
    background: #E8E8E8;
}
/* Open state — rotate arrow, highlight button */
.mobile-nav-list li.menu-item-has-children.accordion-open > .mobile-submenu-toggle {
    background: #DD0000;
    border-color: #DD0000;
}
.mobile-nav-list li.menu-item-has-children.accordion-open > .mobile-submenu-toggle i {
    transform: rotate(180deg);
    color: #fff;
}
.mobile-nav-list li.menu-item-has-children.accordion-open > a {
    color: #DD0000;
    font-weight: 600;
}
/* Sub-menu spans full width below the link+toggle row */
.mobile-nav-list li.menu-item-has-children > .sub-menu {
    flex-basis: 100%;
}

/* Sub-menu */
.mobile-nav-list .sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
    background: #F9FAFB;
}
.mobile-nav-list li.accordion-open > .sub-menu {
    max-height: 500px;
}
.mobile-nav-list .sub-menu li {
    border-bottom: none;
    border-top: 1px solid #F0F0F0;
}
.mobile-nav-list .sub-menu li a {
    padding: 14px 28px 14px 44px;
    font-size: 15px;
    font-weight: 400;
    color: #4A4F55;
}
.mobile-nav-list .sub-menu li a::before {
    content: '–';
    margin-right: 10px;
    color: #DD0000;
    font-weight: 600;
}
.mobile-nav-list .sub-menu li a:hover {
    color: #DD0000;
    background: #FEF2F2;
}

/* CTA button in overlay */
.mobile-overlay-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    width: 100%;
    background: #DD0000;
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: background .2s;
}
.mobile-overlay-cta:hover {
    background: #B80000;
}
