/* Header refinements: sticky bar, mobile menu, CTA visibility, language switch.
   Note: the template sets html { font-size: 10px }, so sizes here are in px. */

/* Anchor jumps (scrollIntoView) land below the sticky header */
html {
    scroll-padding-top: 100px;
}

header {
    position: sticky;
    top: 0;
    z-index: 999;
}

.rs-header-one {
    position: relative;
    background: #FFFFFF;
    transition: box-shadow .4s cubic-bezier(.16, 1, .3, 1);
}

/* main.js toggles .active after 200px of scroll */
.rs-header-one.active {
    box-shadow: 0 10px 30px -18px rgba(0, 35, 107, .45);
}

/* Keep the contact CTA on common laptop widths (template hid it below 1367px) */
@media (min-width: 1200px) {
    .rs-header-one .rs-header-btn {
        display: block;
    }
}

@media (min-width: 1200px) and (max-width: 1440px) {
    .rs-header-one .rs-header-btn .rs-btn {
        padding: 14px 26px;
        min-width: 0;
    }

    .rs-header-one .rs-header-right {
        gap: 16px;
    }
}

/* Language switch: clear active state and visible keyboard focus */
.rs-lang-switch .lang-btn {
    min-width: 40px;
    min-height: 40px;
    transition: background-color .2s, color .2s;
}

.rs-lang-switch .lang-btn:hover:not(.active) {
    background: #E6EBF5;
}

.rs-lang-switch .lang-btn:focus-visible {
    outline: 2px solid var(--rs-theme-orange);
    outline-offset: 2px;
}

/* Mobile menu toggle */
.rs-menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(0, 35, 107, .15);
    border-radius: 4px;
    background: #FFFFFF;
    color: var(--rs-theme-orange);
    cursor: pointer;
    position: relative;
}

.rs-menu-toggle span {
    position: absolute;
    left: 11px;
    right: 11px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: top .3s cubic-bezier(.16, 1, .3, 1), transform .3s cubic-bezier(.16, 1, .3, 1), opacity .2s;
}

.rs-menu-toggle span:nth-child(1) { top: 14px; }
.rs-menu-toggle span:nth-child(2) { top: 21px; }
.rs-menu-toggle span:nth-child(3) { top: 28px; }

.is-menu-open .rs-menu-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.is-menu-open .rs-menu-toggle span:nth-child(2) { opacity: 0; }
.is-menu-open .rs-menu-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

.rs-menu-toggle:focus-visible {
    outline: 2px solid var(--rs-theme-orange);
    outline-offset: 2px;
}

.onepage-menu .menu-cta {
    display: none;
}

@media (max-width: 1199px) {
    .rs-menu-toggle {
        display: block;
    }

    .rs-header-one .rs-header-right {
        gap: 12px;
        padding-inline-end: 16px;
    }

    /* The menu column becomes a drop-down panel under the bar */
    .rs-header-one .rs-header-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin: 0;
        padding: 8px 24px 24px;
        background: #FFFFFF;
        border-top: 1px solid rgba(31, 31, 31, .07);
        box-shadow: 0 24px 40px -24px rgba(0, 35, 107, .4);
    }

    .is-menu-open .rs-header-menu {
        display: flex;
    }

    .rs-header-one .rs-header-nav {
        order: -1;
    }

    .rs-header-one #mobile-menu-two {
        display: block;
        border: 0;
        margin: 0;
        padding: 0;
    }

    .rs-header-one .onepage-menu {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .rs-header-one .onepage-menu li a {
        display: block;
        padding: 14px 0;
        border-bottom: 1px solid rgba(31, 31, 31, .07);
        font-size: 18px;
    }

    .onepage-menu .menu-cta {
        display: block;
        padding-top: 16px;
    }

    .onepage-menu .menu-cta a {
        border: 0;
        border-radius: 4px;
        background: var(--rs-theme-orange);
        color: #FFFFFF;
        text-align: center;
        font-weight: 600;
    }

    .onepage-menu .menu-cta a:hover {
        background: var(--rs-theme-orange-dark);
        color: #FFFFFF;
    }

    /* LinkedIn lives inside the panel; the template hid it below 576px */
    .rs-header-one .is-menu-open .rs-theme-social,
    .is-menu-open .rs-header-linkedin {
        display: flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rs-menu-toggle span,
    .rs-header-one {
        transition: none;
    }
}

/* Desktop/mobile layout: header aligned to the page container, no grey logo box */
.rs-header-one .rs-header-inner {
    padding-inline: 0;
}

.rs-header-one .rs-header-logo-wrapper {
    width: auto;
    height: 88px;
    background: transparent;
    justify-content: flex-start;
}

.rs-header-one .rs-header-logo img {
    height: 50px;
    width: auto;
}

@media (min-width: 1200px) {
    /* Nav sits right after the logo; LinkedIn joins the right-hand utilities */
    .rs-header-one .rs-header-menu {
        justify-content: space-between;
        padding-inline: 56px 24px;
    }

    .rs-header-one .main-menu {
        border: 0;
        margin: 0;
        padding: 0;
    }

    .rs-header-one .rs-header-linkedin {
        order: 2;
    }

    .rs-header-one .rs-header-right {
        gap: 16px;
    }
}

@media (max-width: 1199px) {
    .rs-header-one .rs-header-logo-wrapper {
        height: 76px;
    }

    .rs-header-one .rs-header-logo img {
        height: 40px;
    }

    .rs-header-one .rs-header-right {
        padding-inline-end: 0;
        margin-inline-start: auto;
    }
}

/* Menu labels never wrap (e.g. "Quiénes Somos" at 1200-1300px) */
@media (min-width: 1200px) {
    .rs-header-one .onepage-menu li a {
        white-space: nowrap;
    }
}
