/* =================================================================
   HEADER COMPONENT - Pixel-perfect implementation
   Based on Kredlo design PNG
   ================================================================= */

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    transition: top 0.3s;
}

/* =================================================================
   HEADER MAIN COMPONENT
   ================================================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1000;
    /* Exact height from design analysis */
    height: 118px;
}

@media(max-width: 768px){
    .header {
        border-bottom: none;
    }
}

.header__container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* =================================================================
   LOGO/BRAND SECTION
   ================================================================= */
.header__brand {
    flex-shrink: 0;
}

.header__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.header__logo:hover {
    opacity: 0.8;
}

.header__logo-svg {
    height: 30px;
    width: auto;
    flex-shrink: 0;
}

/* =================================================================
   MAIN NAVIGATION
   ================================================================= */
.header__nav {
    /* Remove flex: 1 so it doesn't take up space */
    display: flex;
}

.nav__list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 20px 0;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav__link:hover {
    color: var(--primär-navy);
}

.nav__arrow {
    transition: transform 0.2s ease;
    opacity: 0.7;
}

.nav__link[aria-expanded="true"] .nav__arrow {
    transform: rotate(180deg);
}

/* =================================================================
   HEADER RIGHT SIDE (Navigation + Actions)
   ================================================================= */
.header__right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* =================================================================
   HEADER ACTIONS (Language + CTA)
   ================================================================= */
.header__actions {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-shrink: 0;
}

/* Language Selector */
.header__language {
    position: relative;
}

.language-dropdown{
    padding: 0;
}

.language__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 !important;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="27.695" height="27.695" viewBox="0 0 27.695 27.695"><g id="world-line" transform="translate(-10.66 -10.66)"><path id="Path_693" data-name="Path 693" d="M50.918,40.58a16.773,16.773,0,0,0-.372-3.462h3.116a10.645,10.645,0,0,0-.58-1.385h-2.9a17.067,17.067,0,0,0-2.5-5.08A10.645,10.645,0,0,0,45.474,30a15.432,15.432,0,0,1,3.367,5.7H44.176V29.848h-1.3v5.859H38.212A15.431,15.431,0,0,1,41.588,30a10.628,10.628,0,0,0-2.2.649,17.067,17.067,0,0,0-2.519,5.063H33.954a10.646,10.646,0,0,0-.589,1.411h3.142a16.773,16.773,0,0,0-.372,3.462,17.024,17.024,0,0,0,.433,3.782H33.5a10.679,10.679,0,0,0,.64,1.411h2.8a16.721,16.721,0,0,0,2.328,4.639,10.628,10.628,0,0,0,2.259.684,15.5,15.5,0,0,1-3.194-5.323h4.552V51.26h1.3V45.773h4.535a15.492,15.492,0,0,1-3.2,5.323,10.628,10.628,0,0,0,2.268-.7,16.721,16.721,0,0,0,2.328-4.622h2.77a10.68,10.68,0,0,0,.64-1.385H50.45A17.024,17.024,0,0,0,50.918,40.58Zm-8.04,3.782H37.91a15.31,15.31,0,0,1-.078-7.27h5.046Zm6.266,0H44.176V37.118h5.046a16.539,16.539,0,0,1-.078,7.244Z" transform="translate(-19.019 -16.072)"/><path id="Path_694" data-name="Path 694" d="M24.508,10.66A13.848,13.848,0,1,0,38.355,24.508,13.848,13.848,0,0,0,24.508,10.66Zm0,25.964A12.117,12.117,0,1,1,36.624,24.508,12.117,12.117,0,0,1,24.508,36.624Z"/></g></svg>');
    height: 28px;
    background-repeat: no-repeat;
    padding-left: 34px !important;
    font-size: 18px;
}

.language-dropdown .language__name{
    font-size: 18px;
    font-weight: 700;
}

.language-dropdown__link:hover,
.language-dropdown__link:focus{
    background-color: #fff !important;
}

.wpml-language-switcher .language-dropdown{
    min-width: 278px !important;
}

.language-dropdown{
    border: 1px solid #707070 !important;
    border-radius: 0 !important;
    left: auto !important;
    right: 0;
    position: relative;
}

.language-dropdown__item{
    border-bottom: 1px solid #A5A8A980 !important;
}

.language-dropdown__item:last-child{
    border-bottom: none !important;
}

.language-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #707070;
}

.language-dropdown::after {
    content: '';
    position: absolute;
    top: -9px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
}

.language__globe {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

.language__arrow {
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.language__toggle[aria-expanded="true"] .language__arrow {
    transform: rotate(180deg);
}

/* CTA Button - Exact purple from design */
.header__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #8B5CF6; /* Exact purple from design analysis */
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 20px;
    border-radius: 6px; /* Subtle rounding, not too rounded */
    transition: all 0.2s ease;
    border: none;
    white-space: nowrap;
}

.header__cta:hover {
    background: #7C3AED;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.header__cta:active {
    transform: translateY(0);
    background: #6D28D9;
}

/* Mobile Menu Toggle (hidden by default, for future mobile implementation) */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001; /* Higher than mobile menu overlay (999) */
    padding: 0 !important;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background: #333333;
    border-radius: 1px;
    transition: all 0.3s ease;
    display: block;
    margin-bottom: 5px;
}

/* Mobile Menu Toggle Active State */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* =================================================================
   MOBILE MENU OVERLAY
   ================================================================= */
.mobile-menu-overlay {
    position: fixed;
    top: 56px; /* Height of mobile header */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
}
.mobile-nav {
    background: #faf3fc;
    height: 100%;
    padding: 80px 20px 32px 20px; /* Extra top padding to account for language switcher */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    background-image: url('../assets/bg.jpg');
    background-repeat: repeat-x;
    background-position: 0 68px;
}

.mobile-menu-overlay[aria-hidden="false"] .mobile-nav {
    transform: translateX(0);
}


.mobile-menu-overlay li.nav__item .nav__link.btn{
    background: transparent;
    border: 0;
    padding: 16px 0 !important;
}

.mobile-menu-overlay li.nav__item a.nav__link.btn:hover,
.mobile-menu-overlay li.nav__item a.nav__link:hover{
    border-bottom: 1.5px solid transparent !important;
    background: transparent !important;
    padding: 16px 0 !important;
    color: #333333 !important;
}

/* Mobile Navigation List */
.mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav__list .nav__item {
    border-bottom: 1px solid rgba(165, 168, 169, 0.5);
}

.mobile-nav__list .nav__item:last-child {
    border-bottom: none;
}



.mobile-nav__list .nav__link {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: #333333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.mobile-nav__list .nav__link:hover {
    color: var(--primär-navy, #1E40AF);
}

/* Remove desktop current link styling in mobile menu */
.mobile-nav__list .nav__item a.current {
    border-bottom: none !important;
    padding: 16px 0 !important;
}



/* Mobile Language Selector - Positioned at top left */
.mobile-nav__language {
    position: absolute;
    top: 20px;
    left: 20px;
    margin: 0;
    padding: 0;
    border: none;
    z-index: 10; /* Ensure it's above other content */
}

.mobile-nav__language .wpml-language-switcher {
    display: block;
}

.mobile-nav__language .language__toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 0 !important;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="27.695" height="27.695" viewBox="0 0 27.695 27.695"><g id="world-line" transform="translate(-10.66 -10.66)"><path id="Path_693" data-name="Path 693" d="M50.918,40.58a16.773,16.773,0,0,0-.372-3.462h3.116a10.645,10.645,0,0,0-.58-1.385h-2.9a17.067,17.067,0,0,0-2.5-5.08A10.645,10.645,0,0,0,45.474,30a15.432,15.432,0,0,1,3.367,5.7H44.176V29.848h-1.3v5.859H38.212A15.431,15.431,0,0,1,41.588,30a10.628,10.628,0,0,0-2.2.649,17.067,17.067,0,0,0-2.519,5.063H33.954a10.646,10.646,0,0,0-.589,1.411h3.142a16.773,16.773,0,0,0-.372,3.462,17.024,17.024,0,0,0,.433,3.782H33.5a10.679,10.679,0,0,0,.64,1.411h2.8a16.721,16.721,0,0,0,2.328,4.639,10.628,10.628,0,0,0,2.259.684,15.5,15.5,0,0,1-3.194-5.323h4.552V51.26h1.3V45.773h4.535a15.492,15.492,0,0,1-3.2,5.323,10.628,10.628,0,0,0,2.268-.7,16.721,16.721,0,0,0,2.328-4.622h2.77a10.68,10.68,0,0,0,.64-1.385H50.45A17.024,17.024,0,0,0,50.918,40.58Zm-8.04,3.782H37.91a15.31,15.31,0,0,1-.078-7.27h5.046Zm6.266,0H44.176V37.118h5.046a16.539,16.539,0,0,1-.078,7.244Z" transform="translate(-19.019 -16.072)"/><path id="Path_694" data-name="Path 694" d="M24.508,10.66A13.848,13.848,0,1,0,38.355,24.508,13.848,13.848,0,0,0,24.508,10.66Zm0,25.964A12.117,12.117,0,1,1,36.624,24.508,12.117,12.117,0,0,1,24.508,36.624Z"/></g></svg>');
    height: 28px;
    background-repeat: no-repeat;
    padding-left: 34px !important;
    font-size: 18px;
    color: #333333;
    width: auto;
    justify-content: flex-start;
}

.mobile-nav__language .language__toggle:hover {
    opacity: 0.8;
}

.mobile-nav__language .language-dropdown {
    margin-top: 8px;
    margin-left: 0;
    padding: 0;
    border: 1px solid #707070 !important;
    border-radius: 0 !important;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    left: 0 !important;
    right: auto !important;
    position: absolute;
    z-index: 15; /* Above the horizontal line */
}

@media(max-width: 768px) {
    .mobile-nav__language .language-dropdown{
        width: calc(100vw - 40px) !important;
        min-width: 100% !important;
    }
}

.mobile-nav__language .language-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #707070;
}

.mobile-nav__language .language-dropdown::after {
    content: '';
    position: absolute;
    top: -9px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff;
}

.mobile-nav__language .language-dropdown__item {
    border-bottom: 1px solid #A5A8A980 !important;
}

.mobile-nav__language .language-dropdown__item:last-child {
    border-bottom: none !important;
}

.mobile-nav__language .language-dropdown__link {
    display: block;
    padding: 12px 16px;
    color: #333333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

.mobile-nav__language .language-dropdown__link:hover {
    background-color: #f5f5f5;
    color: #333333;
}

/* =================================================================
   MOBILE SOCIAL MEDIA SECTION
   ================================================================= */
.mobile-nav__social {
    padding-top: 16px;
    border-top: 1px solid rgba(165, 168, 169, 0.5);
    margin-left: 16px;
    margin-right: 16px;
}

.mobile-nav__social-title {
    font-family: var(--unnamed-font-family-lato, 'Lato', sans-serif);
    font-size: 18px;
    font-weight: bold;
    line-height: 22px;
    color: #333333;
    margin: 0 0 16px 0;
    letter-spacing: 0;
}

.mobile-nav__social-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mobile-nav__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: var(--lila, #4114C8);
    border-radius: 50%;
    background-color: transparent;
    text-decoration: none;
}

@media(max-width: 768px) {
    .mobile-nav__social-link svg{
        width: 100%;
        height: 100%;
    }
}

.mobile-nav__social-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Body scroll lock when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

/* Tablet adjustments */
@media (max-width: 1024px) {
    .header__container {
        padding: 0 32px;
    }

    .nav__link {
        padding: 20px 16px;
        font-size: 14px;
    }

    .header__actions {
        gap: 12px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .header {
        height: 56px;
    }

    .header__container {
        padding: 0 20px;
    }

    .header__nav {
        display: none; /* Hidden on mobile, would need hamburger menu */
    }

    .header__language {
        display: none; /* Hidden on mobile for cleaner look */
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header__logo-text {
        font-size: 20px;
    }

    .header__cta {
        font-size: 12px;
        padding: 8px 16px;
    }
}

/* Mobile small */
@media (max-width: 480px) {
    .header__container {
        padding: 0 16px;
    }

    .header__cta {
        font-size: 11px;
        padding: 7px 14px;
    }
}
