/* =========================================================
   DYNAMOS HEADER
========================================================= */

.site-header {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 92px;

    z-index: 9999;

    background: transparent;

    transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        height 0.35s ease;
}


/* =========================================================
   SCROLLED HEADER
========================================================= */

.site-header.scrolled {
    position: fixed;
    top: 0;
    left: 0;

    height: 82px;

    background: rgba(255, 255, 255, 0.97);

    box-shadow:
        0 5px 25px rgba(0, 0, 0, 0.08);

    backdrop-filter: blur(12px);
}


/* =========================================================
   HEADER CONTAINER
========================================================= */

.header-container {
    width: min(94%, 1450px);

    height: 100%;
    min-height: 92px;

    margin: 0 auto;

    display: flex;
    align-items: center;

    gap: 35px;
}

.site-header.scrolled .header-container {
    min-height: 82px;
}


/* =========================================================
   LOGO
========================================================= */

.site-logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    line-height: 0;

    text-decoration: none;
}

.header-logo {
    display: block;

    width: 175px;
    height: auto;

    max-height: 70px;

    object-fit: contain;

    transition:
        width 0.35s ease,
        max-height 0.35s ease;
}

.site-header.scrolled .header-logo {
    width: 155px;
    max-height: 62px;
}


/* =========================================================
   DESKTOP NAVIGATION
========================================================= */

.main-navigation {
    flex: 1;

    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;
}

.main-menu {
    display: flex;
    align-items: center;

    gap: 32px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.main-menu > li {
    position: relative;

    margin: 0;
    padding: 0;
}

.main-menu > li > a {
    position: relative;

    height: 92px;

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 0;

    color: #ffffff;

    text-decoration: none;

    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;

    letter-spacing: 0.02em;

    white-space: nowrap;

    transition:
        color 0.3s ease;
}

.site-header.scrolled .main-menu > li > a {
    height: 82px;

    color: var(--dark);
}


/* =========================================================
   ACTIVE / HOVER LINE
========================================================= */

.main-menu > li > a::after {
    content: "";

    position: absolute;

    left: 0;
    bottom: 25px;

    width: 0;
    height: 2px;

    background: var(--primary);

    transition:
        width 0.3s ease;
}

.main-menu > li > a:hover::after,
.main-menu > li > a.active::after {
    width: 100%;
}


/* =========================================================
   DROPDOWN ARROW
========================================================= */

.nav-arrow {
    display: inline-block;

    font-size: 10px;
    line-height: 1;

    transition:
        transform 0.3s ease;
}

.has-dropdown:hover .nav-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   DESKTOP DROPDOWN
========================================================= */

.dropdown-menu {
    position: absolute;

    top: 100%;
    left: 50%;

    width: 230px;

    margin: 0;
    padding: 8px 0;

    list-style: none;

    background: #ffffff;

    opacity: 0;
    visibility: hidden;

    transform: translate(-50%, 10px);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.12);

    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease;
}

.has-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;

    transform: translate(-50%, 0);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
}

.dropdown-menu a {
    display: block;

    width: 100%;

    padding: 12px 20px;

    color: #202326;

    text-decoration: none;

    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        padding-left 0.2s ease;
}

.dropdown-menu a:hover {
    color: var(--primary);

    background: #f6f6f6;

    padding-left: 25px;
}


/* =========================================================
   HEADER ACTIONS
========================================================= */

.header-actions {
    display: flex;
    align-items: center;

    gap: 14px;

    flex-shrink: 0;
}


/* =========================================================
   SEARCH BUTTON
========================================================= */

.header-search {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.45);

    outline: none;

    background: transparent;

    color: #ffffff;

    cursor: pointer;

    transition:
        color 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease;
}

.header-search:hover {
    background: var(--primary);

    border-color: var(--primary);

    color: #ffffff;
}

.site-header.scrolled .header-search {
    border-color: rgba(0, 0, 0, 0.15);

    color: var(--dark);
}

.site-header.scrolled .header-search:hover {
    background: var(--primary);

    border-color: var(--primary);

    color: #ffffff;
}


/* =========================================================
   GET IN TOUCH
========================================================= */

.header-cta {
    height: 45px;

    min-width: 150px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 14px;

    padding: 0 18px;

    background: var(--primary);

    color: #ffffff;

    text-decoration: none;

    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    transition:
        background 0.3s ease,
        transform 0.3s ease;
}

.header-cta:hover {
    background: var(--primary-dark);

    color: #ffffff;

    transform: translateY(-2px);
}

.cta-arrow {
    font-size: 16px;
}


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.mobile-menu-toggle {
    display: none;

    width: 44px;
    height: 44px;

    margin: 0;
    padding: 0;

    border: 0;

    background: transparent;

    cursor: pointer;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;
}

.mobile-menu-toggle span {
    display: block;

    width: 25px;
    height: 2px;

    background: #ffffff;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        background 0.3s ease;
}

.site-header.scrolled .mobile-menu-toggle span {
    background: var(--dark);
}


/* =========================================================
   MOBILE MENU ICON ACTIVE
========================================================= */

.mobile-menu-toggle.active span:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* =========================================================
   MOBILE NAVIGATION
========================================================= */

.mobile-navigation {
    position: fixed;

    top: 0;
    right: 0;

    width: min(400px, 90vw);
    height: 100vh;

    z-index: 10000;

    background: #ffffff;

    visibility: hidden;

    transform: translateX(100%);

    box-shadow:
        -10px 0 40px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.4s ease,
        visibility 0.4s ease;

    overflow-y: auto;
}

.mobile-navigation.active {
    visibility: visible;

    transform: translateX(0);
}

.mobile-navigation-inner {
    min-height: 100%;

    display: flex;
    flex-direction: column;

    padding: 30px;
}


/* =========================================================
   MOBILE MENU TOP
========================================================= */

.mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding-bottom: 25px;

    border-bottom: 1px solid #e5e5e5;
}

.mobile-menu-top > span {
    color: var(--dark);

    font-family: var(--font-heading);

    font-size: 30px;
    font-weight: 700;

    text-transform: uppercase;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--dark);

    font-size: 32px;

    cursor: pointer;
}


/* =========================================================
   MOBILE NAV
========================================================= */

.mobile-main-navigation {
    margin-top: 20px;
}

.mobile-main-navigation ul {
    margin: 0;
    padding: 0;

    list-style: none;
}

.mobile-main-navigation > ul > li {
    border-bottom: 1px solid #e7e7e7;
}

.mobile-main-navigation a,
.mobile-dropdown-toggle {
    width: 100%;
    min-height: 56px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--dark);

    text-decoration: none;

    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;

    text-align: left;

    cursor: pointer;
}

.mobile-dropdown-icon {
    font-size: 20px;

    transition:
        transform 0.3s ease;
}

.mobile-dropdown.open .mobile-dropdown-icon {
    transform: rotate(45deg);
}


/* =========================================================
   MOBILE SUBMENU
========================================================= */

.mobile-dropdown > ul {
    display: none;

    padding: 0 0 10px 15px;
}

.mobile-dropdown.open > ul {
    display: block;
}

.mobile-dropdown > ul a {
    min-height: 44px;

    color: #666666;

    font-size: 13px;
    font-weight: 500;
}


/* =========================================================
   MOBILE CTA
========================================================= */

.mobile-cta {
    margin-top: auto;

    min-height: 54px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    background: var(--primary);

    color: #ffffff;

    text-decoration: none;

    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;
}


/* =========================================================
   BODY LOCK
========================================================= */

body.menu-open {
    overflow: hidden;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .header-container {
        width: 94%;
    }

    .main-menu {
        gap: 20px;
    }

    .header-cta {
        min-width: 130px;

        padding: 0 14px;
    }

}


/* =========================================================
   DYNAMOS MOBILE MENU - CLEAN FIX
========================================================= */

@media (max-width: 900px) {
    .site-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 78px;
        z-index: 10002;
    }

    .site-header.scrolled {
        position: fixed;
        height: 72px;
        z-index: 10002;
    }

    .header-container {
        width: 94%;
        height: 100%;
        min-height: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .main-navigation,
    .header-search,
    .header-cta {
        display: none !important;
    }

    .header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-left: auto;
        gap: 0;
    }

    .mobile-menu-toggle {
        display: flex !important;
        position: relative;
        z-index: 10004;
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin: 0;
        padding: 8px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        border: 0;
        border-radius: 0;
        background: transparent;
        cursor: pointer;
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        flex: 0 0 2px;
        background: #ffffff;
        transition: transform 0.25s ease, opacity 0.25s ease,
                    background 0.25s ease;
    }

    .site-header.scrolled .mobile-menu-toggle span {
        background: var(--dark, #202326);
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-navigation {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(400px, 90vw);
        height: 100vh;
        height: 100dvh;
        z-index: 10001;
        display: block;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        background: #ffffff;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        visibility: hidden;
        pointer-events: none;
        transform: translate3d(100%, 0, 0);
        transition: transform 0.3s ease, visibility 0.3s ease;
    }

    .mobile-navigation.active {
        visibility: visible;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    .mobile-navigation-inner {
        min-height: 100%;
        display: flex;
        flex-direction: column;
        padding: 30px;
    }

    .mobile-menu-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .mobile-menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        border: 0;
        background: transparent;
        color: var(--dark, #202326);
        font-size: 32px;
        cursor: pointer;
        touch-action: manipulation;
    }

    .mobile-main-navigation {
        display: block;
        margin-top: 20px;
    }

    .mobile-main-navigation ul {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .mobile-main-navigation > ul > li {
        border-bottom: 1px solid #e7e7e7;
    }

    .mobile-main-navigation a,
    .mobile-main-navigation .mobile-dropdown-toggle {
        width: 100%;
        min-height: 56px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--dark, #202326);
        font-family: var(--font-body, Arial, sans-serif);
        font-size: 14px;
        font-weight: 600;
        text-align: left;
        text-decoration: none;
        cursor: pointer;
        touch-action: manipulation;
    }

    .mobile-dropdown-icon {
        display: inline-block;
        transition: transform 0.25s ease;
    }

    .mobile-dropdown.open > .mobile-dropdown-toggle .mobile-dropdown-icon {
        transform: rotate(45deg);
    }

    .mobile-dropdown > ul {
        display: none;
        padding: 0 0 10px 15px;
    }

    .mobile-dropdown.open > ul {
        display: block;
    }

    .mobile-dropdown > ul a {
        min-height: 44px;
        color: #666666;
        font-size: 13px;
        font-weight: 500;
    }

    .mobile-cta {
        margin-top: auto;
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        background: var(--primary, #e7120a);
        color: #ffffff;
        text-decoration: none;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    body.menu-open {
        overflow: hidden;
        touch-action: none;
    }
}

@media (max-width: 500px) {
    .header-container {
        width: 92%;
    }

    .mobile-navigation {
        width: 100%;
    }

    .mobile-navigation-inner {
        padding: 25px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mobile-navigation,
    .mobile-menu-toggle span,
    .mobile-dropdown-icon {
        transition: none;
    }
}
