/* =========================================================
   SITE HEADER
   ========================================================= */

.rp-skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    padding: 12px 18px;
    background: var(--rp-color-text, #1f2933);
    color: var(--rp-color-white, #ffffff);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    border-radius: 8px;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.rp-skip-link:focus {
    transform: translateY(0);
}

.rp-site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: var(--rp-color-white, #ffffff);
    border-bottom: 1px solid rgba(31, 41, 51, 0.09);
    box-shadow: 0 0 0 rgba(31, 41, 51, 0);
    transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.rp-site-header.is-sticky {
    border-bottom-color: transparent;
    box-shadow: 0 5px 20px rgba(31, 41, 51, 0.11);
}

.rp-site-header__container {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 32px;
    transition: min-height 0.22s ease;
}

.rp-site-header.is-sticky .rp-site-header__container {
    min-height: 64px;
}


/* =========================================================
   LOGO
   ========================================================= */

.rp-site-header__logo {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rp-color-text, #1f2933);
    text-decoration: none;
}

.rp-site-header__logo:hover,
.rp-site-header__logo:focus {
    color: var(--rp-color-text, #1f2933);
    text-decoration: none;
}

.rp-site-header__logo-image {
    display: block;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    object-fit: contain;
    transition: width 0.22s ease, height 0.22s ease, flex-basis 0.22s ease;
}

.rp-site-header.is-sticky .rp-site-header__logo-image {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
}

.rp-site-header__logo-text {
    font-family: var(--rp-font-family, Ubuntu, sans-serif);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    white-space: nowrap;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.rp-site-header__navigation {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
}

.rp-site-header__nav {
    min-width: 0;
}

.rp-site-header__menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 36px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-site-header__menu > li {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-site-header__menu > li > a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--rp-color-text, #1f2933);
    font-family: var(--rp-font-family, Ubuntu, sans-serif);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.rp-site-header__menu > li > a:hover,
.rp-site-header__menu > li > a:focus {
    color: var(--rp-color-primary, #2e7d32);
    text-decoration: none;
}

.rp-site-header__menu > li.current-menu-item > a,
.rp-site-header__menu > li.current-menu-ancestor > a,
.rp-site-header__menu > li.current_page_item > a {
    color: var(--rp-color-primary, #2e7d32);
}


/* =========================================================
   SUBMENU
   ========================================================= */

.rp-site-header__menu .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: -18px;
    z-index: 20;
    min-width: 230px;
    margin: 0;
    padding: 10px;
    list-style: none;
    background: var(--rp-color-white, #ffffff);
    border: 1px solid rgba(31, 41, 51, 0.1);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(31, 41, 51, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
}

.rp-site-header__menu li:hover > .sub-menu,
.rp-site-header__menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rp-site-header__menu .sub-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-site-header__menu .sub-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--rp-color-text, #1f2933);
    font-family: var(--rp-font-family, Ubuntu, sans-serif);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.rp-site-header__menu .sub-menu a:hover,
.rp-site-header__menu .sub-menu a:focus {
    color: var(--rp-color-primary, #2e7d32);
    background: rgba(46, 125, 50, 0.07);
    text-decoration: none;
}


/* =========================================================
   HEADER ACTIONS
   ========================================================= */

.rp-site-header__actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 28px;
}


/* =========================================================
   LANGUAGE SWITCHER
   ========================================================= */

.rp-site-header__languages {
    display: flex;
    align-items: center;
    font-family: var(--rp-font-family, Ubuntu, sans-serif);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.rp-site-header__languages ul {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-site-header__languages li {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-site-header__languages li + li::before {
    content: "/";
    margin: 0 7px;
    color: var(--rp-color-text-muted, #7a858f);
    font-weight: 400;
}

.rp-site-header__languages a,
.rp-site-header__languages span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--rp-color-text-muted, #66727d);
    text-decoration: none;
}

.rp-site-header__languages a {
    transition: color 0.2s ease;
}

.rp-site-header__languages a:hover,
.rp-site-header__languages a:focus-visible {
    color: var(--rp-color-primary, #2e7d32);
    text-decoration: none;
}

.rp-site-header__languages .is-current span {
    color: var(--rp-color-text, #1f2933);
}


/* =========================================================
   CTA
   ========================================================= */

.rp-site-header__cta {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 10px 18px;
    font-size: 15px;
    line-height: 1.3;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease,
        min-height 0.22s ease,
        padding 0.22s ease;
}

.rp-site-header.is-sticky .rp-site-header__cta {
    min-height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
}


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.rp-site-header__menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 1px solid rgba(31, 41, 51, 0.14);
    border-radius: 9px;
    cursor: pointer;
}

.rp-site-header__menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--rp-color-text, #1f2933);
    border-radius: 2px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    .rp-site-header,
    .rp-site-header__container,
    .rp-site-header__logo-image,
    .rp-site-header__cta {
        transition: none;
    }
}


/* =========================================================
   DESKTOP ADJUSTMENTS
   ========================================================= */

@media (max-width: 1240px) {
    .rp-site-header__container {
        gap: 22px;
    }

    .rp-site-header__logo-image {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .rp-site-header__logo-text {
        font-size: 19px;
    }

    .rp-site-header__navigation {
        gap: 20px;
    }

    .rp-site-header__menu {
        gap: 18px;
    }

    .rp-site-header__menu > li > a {
        font-size: 14px;
    }

    .rp-site-header__actions {
        gap: 14px;
    }

    .rp-site-header__cta {
        padding-right: 16px;
        padding-left: 16px;
    }
}


/* =========================================================
   MOBILE HEADER
   ========================================================= */

@media (max-width: 900px) {

    .rp-site-header {
        width: 100%;
    }

    .rp-site-header__container {
        position: relative;
        width: 100%;
        min-width: 0;
        min-height: 72px;
        gap: 12px;
    }

    .rp-site-header.is-sticky .rp-site-header__container {
        min-height: 64px;
    }

    .rp-site-header__logo {
        min-width: 0;
        flex: 1 1 auto;
    }

    .rp-site-header__logo-image,
    .rp-site-header.is-sticky .rp-site-header__logo-image {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .rp-site-header__logo-text {
        min-width: 0;
        font-size: 16px;
        white-space: nowrap;
    }

    .rp-site-header__menu-toggle {
        display: flex;
        margin-left: auto;
    }

    .rp-site-header__navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 50;

        display: none;
        width: 100%;
        max-height: calc(100vh - 72px);
        overflow-y: auto;

        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 16px;

        padding: 16px 20px 20px;
        box-sizing: border-box;

        background: var(--rp-color-white, #ffffff);
        border-top: 1px solid rgba(31, 41, 51, 0.09);
        box-shadow: 0 12px 24px rgba(31, 41, 51, 0.10);
    }

    .rp-site-header__menu-toggle[aria-expanded="true"]
    + .rp-site-header__navigation {
        display: flex;
    }

    .rp-site-header__nav {
        width: 100%;
        min-width: 0;
    }

    .rp-site-header__menu {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
    }

    .rp-site-header__menu > li {
        width: 100%;
    }

    .rp-site-header__menu > li > a {
        width: 100%;
        min-height: 44px;
        white-space: normal;
    }

    .rp-site-header__menu .sub-menu {
        position: static;
        width: 100%;
        min-width: 0;
        margin: 0;
        padding: 0 0 6px 14px;

        opacity: 1;
        visibility: visible;
        transform: none;

        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .rp-site-header__menu .sub-menu a {
        padding: 8px 10px;
    }

    .rp-site-header__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .rp-site-header__languages {
        width: 100%;
    }

    .rp-site-header__cta,
    .rp-site-header.is-sticky .rp-site-header__cta {
        width: 100%;
        min-height: 44px;
        padding: 10px 18px;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .rp-site-header__container {
        min-height: 66px;
        gap: 8px;
    }

    .rp-site-header__logo-image,
    .rp-site-header.is-sticky .rp-site-header__logo-image {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .rp-site-header__logo-text {
        font-size: 15px;
    }

    .rp-site-header__menu-toggle {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .rp-site-header__navigation {
        max-height: calc(100vh - 66px);
        padding: 14px 16px 18px;
    }
}