/* ============================================================
   HEADER - Dr. Peri Skincare
   Design: #495E77, #769cc1, Montserrat, Glassmorphism
============================================================ */

/* Hide custom header inside Divi Visual Builder */
.et_fb #wa-header,
.et-fb #wa-header,
.et_fb .wa-mobile-dropdown,
.et-fb .wa-mobile-dropdown {
    display: none !important;
}

/* ============================================================
   1. HEADER BAR
============================================================ */

#wa-header {
    position: relative;
    width: 100%;
    z-index: 999999;
    background-color: #ffffff;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.wa-header-container {
    max-width: 1400px;
    width: 90%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 12px 0;
    gap: 30px;
}

/* ============================================================
   2. LOGO
============================================================ */

.wa-header-logo {
    flex-shrink: 0;
}

.wa-header-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.wa-header-logo img {
    height: 55px !important;
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

.wa-logo-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #495E77;
    text-decoration: none;
}

/* ============================================================
   3. DESKTOP NAV
============================================================ */

.wa-header-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.wa-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    align-items: center;
}

.wa-nav-list li {
    margin: 0;
    padding: 0;
}

.wa-nav-list li a {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #495E77;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 0;
    position: relative;
    transition: color 0.25s ease;
}

.wa-nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #769cc1;
    transition: width 0.3s ease;
}

.wa-nav-list li a:hover {
    color: #769cc1;
}

.wa-nav-list li a:hover::after {
    width: 100%;
}

.wa-nav-list li.current-menu-item > a,
.wa-nav-list li.current_page_item > a {
    color: #769cc1;
}

.wa-nav-list li.current-menu-item > a::after,
.wa-nav-list li.current_page_item > a::after {
    width: 100%;
}

/* WPML flag styling */
.wa-nav-list li.wpml-ls-menu-item a {
    display: inline-flex;
    align-items: center;
    padding: 4px 0;
}

.wa-nav-list li.wpml-ls-menu-item img.wpml-ls-flag {
    width: 22px;
    height: auto;
    border-radius: 3px;
    transition: transform 0.25s ease;
}

.wa-nav-list li.wpml-ls-menu-item a:hover img.wpml-ls-flag {
    transform: scale(1.1);
}

.wa-nav-list li.wpml-ls-menu-item a::after {
    display: none;
}

/* ============================================================
   4. CTA BUTTON
============================================================ */

.wa-header-actions {
    flex-shrink: 0;
}

.wa-header-cta {
    display: inline-block;
    padding: 0.65em 1.8em;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background-color: #495E77;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 6px rgba(73, 94, 119, 0.05),
        0 10px 25px rgba(73, 94, 119, 0.12);
    white-space: nowrap;
}

.wa-header-cta:hover {
    background-color: #3a4d61;
    transform: translateY(-2px);
    box-shadow:
        0 6px 10px rgba(73, 94, 119, 0.08),
        0 15px 35px rgba(73, 94, 119, 0.18);
    color: #ffffff;
}

/* ============================================================
   5. HAMBURGER (hidden on desktop)
============================================================ */

.wa-header-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 26px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    z-index: 1000001;
    flex-shrink: 0;
}

.wa-hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #495E77;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.wa-header-hamburger.active .wa-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.wa-header-hamburger.active .wa-hamburger-line:nth-child(2) {
    opacity: 0;
}

.wa-header-hamburger.active .wa-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.wa-header-hamburger:active {
    transform: scale(0.92);
}

/* ============================================================
   6. STICKY HEADER
============================================================ */

#wa-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 30px rgba(73, 94, 119, 0.1);
    animation: waHeaderSlideDown 0.4s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

@keyframes waHeaderSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================
   7. MOBILE DROPDOWN
============================================================ */

.wa-mobile-dropdown {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999998;
    pointer-events: none;
}

.wa-mobile-dropdown.active {
    display: block;
    pointer-events: auto;
}

.wa-mobile-dropdown-nav {
    margin: 0 5%;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(73, 94, 119, 0.12);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    animation: waDropdownSlideIn 0.3s cubic-bezier(0.215, 0.610, 0.355, 1.000) both;
}

@keyframes waDropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wa-mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wa-mobile-nav-list li {
    margin: 0;
    padding: 0;
}

.wa-mobile-nav-list li a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #495E77;
    text-decoration: none;
    display: block;
    padding: 14px 18px;
    border-radius: 12px;
    transition: background-color 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.wa-mobile-nav-list li a:hover {
    background-color: rgba(73, 94, 119, 0.06);
    padding-left: 24px;
}

.wa-mobile-nav-list li.current-menu-item > a,
.wa-mobile-nav-list li.current_page_item > a {
    color: #769cc1;
    background-color: rgba(118, 156, 193, 0.1);
    font-weight: 700;
}

/* WPML flag in mobile */
.wa-mobile-nav-list li.wpml-ls-menu-item a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wa-mobile-nav-list li.wpml-ls-menu-item img.wpml-ls-flag {
    width: 22px;
    height: auto;
    border-radius: 3px;
}

/* Mobile CTA */
.wa-mobile-cta {
    display: block;
    margin: 0.8rem 0.5rem 0.5rem;
    padding: 0.8rem 2rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    background-color: #495E77;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    border-radius: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(73, 94, 119, 0.15);
}

.wa-mobile-cta:hover {
    background-color: #3a4d61;
    color: #ffffff;
}

/* ============================================================
   8. RESPONSIVE: <= 1150px (small logo)
============================================================ */

@media (max-width: 1150px) {
    .wa-header-logo img {
        height: 42px !important;
    }

    .wa-nav-list {
        gap: 20px;
    }

    .wa-nav-list li a {
        font-size: 14px;
    }
}

/* ============================================================
   9. RESPONSIVE: <= 980px (mobile layout)
============================================================ */

@media (max-width: 980px) {
    .wa-header-container {
        width: 100%;
        padding: 10px 2rem;
        gap: 15px;
    }

    .wa-header-nav {
        display: none;
    }

    .wa-header-hamburger {
        display: flex;
    }

    .wa-header-logo {
        flex: 1;
    }

    .wa-header-logo img {
        height: 38px !important;
    }

    .wa-header-actions {
        order: 2;
    }

    .wa-header-hamburger {
        order: 3;
    }

    #wa-header.sticky .wa-header-container {
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/* ============================================================
   10. RESPONSIVE: <= 767px
============================================================ */

@media (max-width: 767px) {
    .wa-header-container {
        padding: 8px 1.5rem;
    }

    .wa-header-logo img {
        height: 32px !important;
    }

    .wa-header-cta {
        font-size: 12px;
        padding: 0.55em 1.4em;
    }

    .wa-mobile-dropdown-nav {
        border-radius: 15px;
        padding: 0.8rem 1rem;
    }

    .wa-mobile-nav-list li a {
        font-size: 13px;
        padding: 12px 15px;
    }

    .wa-mobile-cta {
        font-size: 13px;
    }
}

/* ============================================================
   11. ADMIN BAR FIXES
   WP admin bar heights:
     > 782px  -> 32px (fixed)
     <= 782px -> 46px (fixed)
     <= 600px -> 46px (scrolls away, not fixed)
============================================================ */

body.admin-bar #wa-header.sticky {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar #wa-header.sticky {
        top: 46px;
    }
}

@media (max-width: 600px) {
    body.admin-bar #wa-header.sticky {
        top: 0;
    }
}
