/* ============================================================
   WERBEAUF CUSTOM HEADER STYLES
   Fully Responsive - Optimized for all screen sizes
   ============================================================ */

#wp-admin-bar-top-secondary {
    display: none !important;
}

/* ============================================================
   MAIN HEADER
   ============================================================ */

.werbeauf-header {
    position: relative;
    width: 100%;
    z-index: 99999;
    background: #ffffff;
    padding: 18px 0;
}

.werbeauf-header.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.werbeauf-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 50px;
    max-width: 1400px;
    width: 92%;
    margin: 0 auto;
}

/* ============================================================
   LOGO
   ============================================================ */

.werbeauf-header__logo {
    justify-self: start;
}

.werbeauf-header__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333333;
    font-weight: 700;
    font-size: 1.125rem;
}

.werbeauf-header__logo img {
    max-height: 48px;
    width: auto;
    height: auto;
    display: block;
}

.werbeauf-header__logo img[src$=".svg"] {
    width: auto;
    height: 48px;
}

/* ============================================================
   DESKTOP NAVIGATION
   ============================================================ */

.werbeauf-header__nav {
    justify-self: start;
}

.werbeauf-header__menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.werbeauf-header__menu li {
    position: relative;
    margin: 0;
    padding: 0;
}

.werbeauf-header__menu > li > a {
    display: block;
    padding: 8px 0;
    color: #333333;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.werbeauf-header__menu > li > a:hover {
    color: #000000;
}

/* Dropdown submenu */
.werbeauf-header__menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
}

.werbeauf-header__menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}

.werbeauf-header__menu .sub-menu li a {
    display: block;
    padding: 10px 18px;
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.werbeauf-header__menu .sub-menu li a:hover {
    background: #f5f5f5;
    color: #000000;
}

/* ============================================================
   HAMBURGER MENU BUTTON
   ============================================================ */

.werbeauf-header__hamburger {
    display: none;
    justify-self: center;
    width: 26px;
    height: 18px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 9999999;
}

.werbeauf-header__hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #333333;
    border-radius: 2px;
    position: absolute;
    left: 0;
}

.werbeauf-header__hamburger-line:nth-child(1) {
    top: 0;
}

.werbeauf-header__hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.werbeauf-header__hamburger-line:nth-child(3) {
    bottom: 0;
}

/* Hamburger to X state */
.menu-open .werbeauf-header__hamburger-line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-open .werbeauf-header__hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-open .werbeauf-header__hamburger-line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* ============================================================
   HEADER BUTTONS
   ============================================================ */

.werbeauf-header__buttons {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
}

.werbeauf-header__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 22px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.werbeauf-header__btn--one {
    background: #333333;
    color: #ffffff;
}

.werbeauf-header__btn--one:hover {
    background: #1a1a1a;
}

.werbeauf-header__btn--second {
    background: transparent;
    color: #333333;
    border: 2px solid #333333;
}

.werbeauf-header__btn--second:hover {
    background: #333333;
    color: #ffffff;
}

.werbeauf-header__btn-icon {
    display: none;
}

.werbeauf-header__btn-icon svg {
    width: 20px;
    height: 20px;
}

/* ============================================================
   MOBILE MENU OVERLAY
   ============================================================ */

.werbeauf-mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background: #f5f4f0;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.menu-open .werbeauf-mobile-menu {
    display: flex;
}

/* Mobile Menu Header */
.werbeauf-mobile-menu__header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.werbeauf-mobile-menu__logo {
    flex-shrink: 0;
}

.werbeauf-mobile-menu__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333333;
    font-weight: 700;
}

.werbeauf-mobile-menu__logo img {
    max-height: 38px;
    width: auto;
    height: auto;
    display: block;
}

.werbeauf-mobile-menu__logo img[src$=".svg"] {
    width: auto;
    height: 38px;
}

.werbeauf-mobile-menu__close {
    width: 42px;
    height: 42px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.werbeauf-mobile-menu__close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.werbeauf-mobile-menu__close-icon {
    font-size: 22px;
    line-height: 1;
    color: #333333;
}

/* Mobile Menu Content */
.werbeauf-mobile-menu__content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

.werbeauf-mobile-menu__nav {
    max-width: 300px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.werbeauf-mobile-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.werbeauf-mobile-menu__list li {
    margin: 0;
    padding: 0;
}

.werbeauf-mobile-menu__list > li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    color: #333333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

.werbeauf-mobile-menu__list > li > a:hover {
    color: #000000;
}

/* Arrow for items with children */
.werbeauf-mobile-menu__list > .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -2px;
}

.werbeauf-mobile-menu__list > .menu-item-has-children.open > a::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

/* Mobile Submenus */
.werbeauf-mobile-menu__list .sub-menu {
    display: none;
    list-style: none;
    margin: 6px auto 12px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 10px;
    max-width: 260px;
}

.werbeauf-mobile-menu__list .menu-item-has-children.open > .sub-menu {
    display: block;
}

.werbeauf-mobile-menu__list .sub-menu li a {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #555555;
    text-decoration: none;
    border-radius: 6px;
}

.werbeauf-mobile-menu__list .sub-menu li a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #333333;
}

/* Mobile Menu Footer */
.werbeauf-mobile-menu__footer {
    flex-shrink: 0;
    padding: 18px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.werbeauf-mobile-menu__buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.werbeauf-mobile-menu__btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.werbeauf-mobile-menu__btn--one {
    background: #333333;
    color: #ffffff;
}

.werbeauf-mobile-menu__btn--one:hover {
    background: #1a1a1a;
}

.werbeauf-mobile-menu__btn--second {
    background: transparent;
    color: #333333;
    border: 2px solid #333333;
}

.werbeauf-mobile-menu__btn--second:hover {
    background: #333333;
    color: #ffffff;
}

/* Social Icons */
.werbeauf-mobile-menu__social {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.werbeauf-mobile-menu__social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    color: #333333;
    text-decoration: none;
}

.werbeauf-mobile-menu__social-icon:hover {
    background: #333333;
    color: #ffffff;
}

.werbeauf-mobile-menu__social-icon svg {
    width: 18px;
    height: 18px;
}

body.menu-open {
    overflow: hidden;
}

/* ============================================================
   RESPONSIVE: Large Desktop (max-width: 1400px)
   ============================================================ */

@media (max-width: 1400px) {
    .werbeauf-header__inner {
        gap: 40px;
    }
    
    .werbeauf-header__menu {
        gap: 28px;
    }
}

/* ============================================================
   RESPONSIVE: Desktop (max-width: 1200px)
   ============================================================ */

@media (max-width: 1200px) {
    .werbeauf-header__inner {
        gap: 30px;
        width: 94%;
    }
    
    .werbeauf-header__menu {
        gap: 24px;
    }
    
    .werbeauf-header__menu > li > a {
        font-size: 14px;
    }
    
    .werbeauf-header__btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .werbeauf-header__logo img {
        max-height: 44px;
    }
    
    .werbeauf-header__logo img[src$=".svg"] {
        height: 44px;
    }
}

/* ============================================================
   RESPONSIVE: Tablet (max-width: 1100px) - Switch to mobile menu
   ============================================================ */

@media (max-width: 1100px) {
    .werbeauf-header {
        padding: 16px 0;
    }
    
    .werbeauf-header.header-sticky {
        padding: 10px 0;
    }
    
    .werbeauf-header__nav {
        display: none;
    }
    
    .werbeauf-header__hamburger {
        display: block;
    }
    
    .werbeauf-header__inner {
        grid-template-columns: 1fr auto 1fr;
        width: 100%;
        padding: 0 24px;
        gap: 16px;
    }
    
    .werbeauf-header__logo {
        justify-self: start;
    }
    
    .werbeauf-header__buttons {
        justify-self: end;
    }
    
    .werbeauf-header__logo img {
        max-height: 42px;
    }
    
    .werbeauf-header__logo img[src$=".svg"] {
        height: 42px;
    }
    
    .werbeauf-header__btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}

/* ============================================================
   RESPONSIVE: Large Mobile (max-width: 900px)
   ============================================================ */

@media (max-width: 900px) {
    .werbeauf-header__inner {
        padding: 0 20px;
    }
    
    .werbeauf-header__logo img {
        max-height: 40px;
    }
    
    .werbeauf-header__logo img[src$=".svg"] {
        height: 40px;
    }
    
    .werbeauf-header__btn {
        padding: 9px 16px;
        font-size: 12px;
    }
    
    .werbeauf-header__hamburger {
        width: 24px;
        height: 16px;
    }
    
    .werbeauf-mobile-menu__header {
        padding: 16px 20px;
    }
    
    .werbeauf-mobile-menu__content {
        padding: 20px;
    }
    
    .werbeauf-mobile-menu__footer {
        padding: 16px 20px 22px;
    }
}

/* ============================================================
   RESPONSIVE: Mobile (max-width: 767px) - Icon buttons
   ============================================================ */

@media (max-width: 767px) {
    .werbeauf-header {
        padding: 14px 0;
    }
    
    .werbeauf-header.header-sticky {
        padding: 10px 0;
    }
    
    .werbeauf-header__inner {
        padding: 0 16px;
        gap: 12px;
    }
    
    .werbeauf-header__logo img {
        max-height: 36px;
    }
    
    .werbeauf-header__logo img[src$=".svg"] {
        height: 36px;
    }
    
    /* Switch to icon buttons */
    .werbeauf-header__btn-text {
        display: none;
    }
    
    .werbeauf-header__btn-icon {
        display: flex;
    }
    
    .werbeauf-header__btn {
        padding: 10px;
        border-radius: 50%;
    }
    
    .werbeauf-header__btn--second {
        border-width: 2px;
    }
    
    .werbeauf-header__buttons {
        gap: 8px;
    }
    
    .werbeauf-header__btn-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .werbeauf-header__hamburger {
        width: 22px;
        height: 14px;
    }
    
    /* Mobile menu adjustments */
    .werbeauf-mobile-menu__header {
        padding: 14px 16px;
    }
    
    .werbeauf-mobile-menu__logo img {
        max-height: 34px;
    }
    
    .werbeauf-mobile-menu__logo img[src$=".svg"] {
        height: 34px;
    }
    
    .werbeauf-mobile-menu__close {
        width: 38px;
        height: 38px;
    }
    
    .werbeauf-mobile-menu__close-icon {
        font-size: 20px;
    }
    
    .werbeauf-mobile-menu__content {
        padding: 16px;
    }
    
    .werbeauf-mobile-menu__nav {
        max-width: 280px;
    }
    
    .werbeauf-mobile-menu__list > li > a {
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .werbeauf-mobile-menu__list .sub-menu {
        padding: 8px 12px;
        max-width: 240px;
    }
    
    .werbeauf-mobile-menu__list .sub-menu li a {
        font-size: 12px;
        padding: 7px 10px;
    }
    
    .werbeauf-mobile-menu__footer {
        padding: 14px 16px 20px;
        gap: 14px;
    }
    
    .werbeauf-mobile-menu__btn {
        padding: 10px 20px;
        font-size: 11px;
    }
    
    .werbeauf-mobile-menu__social-icon {
        width: 36px;
        height: 36px;
    }
    
    .werbeauf-mobile-menu__social-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================================
   RESPONSIVE: Small Mobile (max-width: 480px)
   ============================================================ */

@media (max-width: 480px) {
    .werbeauf-header {
        padding: 12px 0;
    }
    
    .werbeauf-header.header-sticky {
        padding: 8px 0;
    }
    
    .werbeauf-header__inner {
        padding: 0 12px;
        gap: 10px;
    }
    
    .werbeauf-header__logo img {
        max-height: 32px;
    }
    
    .werbeauf-header__logo img[src$=".svg"] {
        height: 32px;
    }
    
    .werbeauf-header__btn {
        padding: 8px;
    }
    
    .werbeauf-header__btn-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .werbeauf-header__hamburger {
        width: 20px;
        height: 12px;
    }
    
    .werbeauf-header__buttons {
        gap: 6px;
    }
    
    /* Mobile menu */
    .werbeauf-mobile-menu__header {
        padding: 12px 14px;
    }
    
    .werbeauf-mobile-menu__logo img {
        max-height: 30px;
    }
    
    .werbeauf-mobile-menu__logo img[src$=".svg"] {
        height: 30px;
    }
    
    .werbeauf-mobile-menu__close {
        width: 34px;
        height: 34px;
    }
    
    .werbeauf-mobile-menu__close-icon {
        font-size: 18px;
    }
    
    .werbeauf-mobile-menu__content {
        padding: 14px 12px;
    }
    
    .werbeauf-mobile-menu__nav {
        max-width: 260px;
    }
    
    .werbeauf-mobile-menu__list > li > a {
        font-size: 13px;
        padding: 9px 12px;
    }
    
    .werbeauf-mobile-menu__list .sub-menu {
        padding: 6px 10px;
        max-width: 220px;
        margin: 4px auto 10px;
    }
    
    .werbeauf-mobile-menu__list .sub-menu li a {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .werbeauf-mobile-menu__footer {
        padding: 12px 14px 18px;
        gap: 12px;
    }
    
    .werbeauf-mobile-menu__buttons {
        gap: 8px;
    }
    
    .werbeauf-mobile-menu__btn {
        padding: 9px 16px;
        font-size: 10px;
    }
    
    .werbeauf-mobile-menu__social {
        gap: 8px;
    }
    
    .werbeauf-mobile-menu__social-icon {
        width: 34px;
        height: 34px;
    }
    
    .werbeauf-mobile-menu__social-icon svg {
        width: 14px;
        height: 14px;
    }
}

/* ============================================================
   RESPONSIVE: Extra Small Mobile (max-width: 360px)
   ============================================================ */

@media (max-width: 360px) {
    .werbeauf-header__inner {
        padding: 0 10px;
    }
    
    .werbeauf-header__logo img {
        max-height: 28px;
    }
    
    .werbeauf-header__logo img[src$=".svg"] {
        height: 28px;
    }
    
    .werbeauf-header__btn {
        padding: 7px;
    }
    
    .werbeauf-header__btn-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .werbeauf-header__hamburger {
        width: 18px;
        height: 10px;
    }
    
    .werbeauf-mobile-menu__header {
        padding: 10px 12px;
    }
    
    .werbeauf-mobile-menu__logo img {
        max-height: 26px;
    }
    
    .werbeauf-mobile-menu__logo img[src$=".svg"] {
        height: 26px;
    }
    
    .werbeauf-mobile-menu__close {
        width: 30px;
        height: 30px;
    }
    
    .werbeauf-mobile-menu__close-icon {
        font-size: 16px;
    }
    
    .werbeauf-mobile-menu__list > li > a {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .werbeauf-mobile-menu__list .sub-menu li a {
        font-size: 10px;
    }
    
    .werbeauf-mobile-menu__btn {
        padding: 8px 14px;
        font-size: 9px;
    }
    
    .werbeauf-mobile-menu__social-icon {
        width: 30px;
        height: 30px;
    }
    
    .werbeauf-mobile-menu__social-icon svg {
        width: 12px;
        height: 12px;
    }
}

/* ============================================================
   ADMIN BAR OFFSETS
   ============================================================ */

/* Desktop (above 782px): Admin bar is 32px fixed */
body.admin-bar .werbeauf-header.header-sticky {
    top: 32px !important;
}

body.admin-bar .werbeauf-mobile-menu {
    top: 32px !important;
    height: calc(100vh - 32px) !important;
}

/* Tablet/Mobile (601px - 782px): Admin bar is 46px fixed */
@media (max-width: 782px) and (min-width: 601px) {
    body.admin-bar .werbeauf-header.header-sticky {
        top: 46px !important;
    }
    
    body.admin-bar .werbeauf-mobile-menu {
        top: 46px !important;
        height: calc(100vh - 46px) !important;
    }
}

/* Small Mobile (600px and below): Admin bar scrolls with page (position: absolute) */
/* Both sticky header and mobile menu should be at top: 0 since admin bar scrolls away */
@media (max-width: 600px) {
    body.admin-bar .werbeauf-header.header-sticky {
        top: 0 !important;
    }
    
    body.admin-bar .werbeauf-mobile-menu {
        top: 0 !important;
        height: 100vh !important;
    }
}
