/* ==========================================================================
   Recroot Header Stylesheet
   Font    : Archivo (Google Fonts)
   Colors  : Active/Dark  #1A0052  |  Primary  #7060F7  |  Hover  #7060F7
   ========================================================================== */

/* ── CUSTOM PROPERTIES ──────────────────────────────────────────────────── */
:root {
    --rh-font          : 'Archivo', 'Archivo Placeholder', sans-serif;
    --rh-color-dark    : #1A0052;
    --rh-color-primary : #7060F7;
    --rh-color-white   : #ffffff;
    --rh-color-bg      : #ffffff;
    --rh-color-border  : #ede9ff;          /* soft purple bottom border */
    --rh-nav-text      : #1A0052;          /* menu items default */
    --rh-nav-hover     : #7060F7;          /* menu items hover */
    --rh-btn-bg        : #7060F7;
    --rh-btn-text      : #ffffff;
    --rh-btn-hover-bg  : #1A0052;
    --rh-btn-hover-text: #ffffff;
    --rh-height        : 76px;
    --rh-max-width     : 1280px;
    --rh-transition    : 0.22s ease;
    --rh-radius-btn    : 100px;
    --rh-shadow        : 0 2px 20px rgba(112, 96, 247, 0.08);
}

/* ── RESET / BASE ────────────────────────────────────────────────────────── */
.recroot-header *,
.recroot-header *::before,
.recroot-header *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── HEADER WRAPPER ─────────────────────────────────────────────────────── */
.recroot-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--rh-color-bg);
    border-bottom: 1.5px solid var(--rh-color-border);
    box-shadow: var(--rh-shadow);
    font-family: var(--rh-font);
    transition: box-shadow var(--rh-transition);
}

/* Scrolled state (JS adds this class) */
.recroot-header.is-scrolled {
    box-shadow: 0 4px 32px rgba(112, 96, 247, 0.13);
}

/* ── INNER CONTAINER ────────────────────────────────────────────────────── */
.recroot-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--rh-max-width);
    margin: 0 auto;
    padding: 0 40px;
    height: var(--rh-height);
    gap: 32px;
}

/* ── LOGO ───────────────────────────────────────────────────────────────── */
.recroot-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    outline-offset: 4px;
}

.recroot-logo .custom-logo {
    width: auto;
    height: 38px;
    display: block;
}

.recroot-logo__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.recroot-logo__icon svg {
    display: block;
}

.recroot-logo__name {
    font-family: var(--rh-font);
    font-size: 22px;
    font-weight: 700;
    color: var(--rh-color-dark);
    letter-spacing: -0.01em;
    line-height: 1;
}

.recroot-logo:hover .recroot-logo__name {
    color: var(--rh-color-primary);
}

/* ── PRIMARY NAV ────────────────────────────────────────────────────────── */
.recroot-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.recroot-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
}

/* ── NAV ITEM ───────────────────────────────────────────────────────────── */
.recroot-nav__item {
    position: relative;
}

/* ── NAV LINK ───────────────────────────────────────────────────────────── */
.recroot-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--rh-font);
    font-size: 15px !important;
    font-weight: 500 !important;
    color: var(--rh-nav-text);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
    transition: color var(--rh-transition), background var(--rh-transition);
    outline-offset: 2px;
    line-height: 1.4;
}

.recroot-nav__link:hover,
.recroot-nav__link:focus-visible {
    color: var(--rh-nav-hover);
    background: rgba(112, 96, 247, 0.06);
}

/* Active / current page */
.recroot-nav__item--active > .recroot-nav__link,
.recroot-nav__link[aria-current="page"] {
    color: var(--rh-color-dark);
    font-weight: 600;
}

/* ── DROPDOWN CARET ─────────────────────────────────────────────────────── */
.recroot-nav__caret {
    display: inline-flex;
    align-items: center;
    transition: transform var(--rh-transition);
}

.recroot-nav__item--has-dropdown:hover > .recroot-nav__link .recroot-nav__caret,
.recroot-nav__item--has-dropdown.is-open > .recroot-nav__link .recroot-nav__caret {
    transform: rotate(180deg);
}

/* ── DROPDOWN MENU ──────────────────────────────────────────────────────── */
.recroot-nav__dropdown {
    list-style: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    min-width: 200px;
    background: var(--rh-color-bg);
    border: 1.5px solid var(--rh-color-border);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 40px rgba(26, 0, 82, 0.12);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity var(--rh-transition),
        visibility var(--rh-transition),
        transform var(--rh-transition);
    z-index: 100;
}

/* Show on hover (desktop) */
.recroot-nav__item--has-dropdown:hover > .recroot-nav__dropdown,
.recroot-nav__item--has-dropdown.is-open > .recroot-nav__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Dropdown connector (invisible hover bridge) */
.recroot-nav__item--has-dropdown::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

/* Dropdown items */
.recroot-nav__dropdown .recroot-nav__item {
    width: 100%;
}

.recroot-nav__sublink {
    display: block;
    font-family: var(--rh-font);
    font-size: 14px;
    font-weight: 500;
    color: var(--rh-nav-text);
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 8px;
    white-space: nowrap;
    transition: color var(--rh-transition), background var(--rh-transition);
}

.recroot-nav__sublink:hover,
.recroot-nav__sublink:focus-visible {
    color: var(--rh-nav-hover);
    background: rgba(112, 96, 247, 0.07);
}

/* ── CTA BUTTON ─────────────────────────────────────────────────────────── */
.recroot-header__cta {
    flex-shrink: 0;
}

.recroot-btn-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--rh-font);
    font-size: 15px !important;
    font-weight: 600 !important;
    color: var(--rh-btn-text);
    background: var(--rh-btn-bg);
    text-decoration: none;
    padding: 11px 26px !important;
    border-radius: var(--rh-radius-btn);
    border: 2px solid var(--rh-btn-bg);
    white-space: nowrap;
    transition:
        background var(--rh-transition),
        color var(--rh-transition),
        border-color var(--rh-transition),
        transform 0.15s ease,
        box-shadow var(--rh-transition);
    outline-offset: 3px;
    letter-spacing: 0.01em;
}

.recroot-btn-contact:hover,
.recroot-btn-contact:focus-visible {
    background: var(--rh-btn-hover-bg);
    color: var(--rh-btn-hover-text);
    border-color: var(--rh-btn-hover-bg);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(26, 0, 82, 0.22);
}

.recroot-btn-contact:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── HAMBURGER (mobile) ─────────────────────────────────────────────────── */
.recroot-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1.5px solid var(--rh-color-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
    transition: border-color var(--rh-transition);
}

.recroot-hamburger:hover {
    border-color: var(--rh-color-primary);
}

.recroot-hamburger__bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--rh-color-dark);
    border-radius: 2px;
    transition: transform var(--rh-transition), opacity var(--rh-transition);
}

/* Hamburger → X animation */
.recroot-hamburger[aria-expanded="true"] .recroot-hamburger__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.recroot-hamburger[aria-expanded="true"] .recroot-hamburger__bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.recroot-hamburger[aria-expanded="true"] .recroot-hamburger__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE OVERLAY ─────────────────────────────────────────────────────── */
.recroot-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26, 0, 82, 0.35);
    z-index: 998;
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity var(--rh-transition);
}

.recroot-mobile-overlay.is-active {
    display: block;
    opacity: 1;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .recroot-header__inner {
        padding: 0 24px;
        gap: 20px;
    }
    .recroot-nav__link {
        font-size: 14px;
        padding: 8px 12px;
    }
    .recroot-btn-contact {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    /* Show hamburger */
    .recroot-hamburger {
        display: flex;
    }

    /* Hide desktop nav & CTA */
    .recroot-nav,
    .recroot-header__cta {
        display: none;
    }

    .recroot-header__inner {
        padding: 0 20px;
        height: 64px;
    }

    /* ── MOBILE NAV (drawer) ── */
    .recroot-nav {
        position: fixed;
        top: 64px;                     /* below header */
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background: var(--rh-color-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 24px 20px 32px;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        border-top: 1.5px solid var(--rh-color-border);
    }

    /* Open state */
    .recroot-nav.is-mobile-open {
        display: flex;
        transform: translateX(0);
    }

    .recroot-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        width: 100%;
    }

    .recroot-nav__link {
        font-size: 16px;
        padding: 13px 16px;
        border-radius: 10px;
        width: 100%;
        justify-content: space-between;
    }

    /* Mobile dropdown */
    .recroot-nav__dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0 0 0 16px;
        border-left: 2px solid var(--rh-color-border);
        margin-left: 16px;
        display: none;
    }

    .recroot-nav__item--has-dropdown.is-open > .recroot-nav__dropdown {
        display: block;
    }

    /* Mobile CTA at bottom of drawer */
    .recroot-header__cta {
        display: flex;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1.5px solid var(--rh-color-border);
    }

    .recroot-nav.is-mobile-open ~ .recroot-header__cta {
        display: flex;
    }

    .recroot-btn-contact {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .recroot-logo__name {
        font-size: 19px;
    }
}