/* ==========================================================
   RENKÁVIA — Header + Bootstrap Offcanvas
   ========================================================== */

:root {
    --header-paper: #f7f4ef;
    --header-paper-light: #fbf9f6;
    --header-navy: #4c5564;
    --header-ink: #3a4049;
    --header-gold: #b59668;
    --header-sage: #aec3ba;
    --header-line: rgba(76, 85, 100, 0.14);
    --header-display: var(--rk-font-primary);
    --header-body: var(--rk-font-primary);
}

body {
    padding-top: 78px;
}

/* ==========================================================
   Header fijo
   ========================================================== */

.rk-site-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;

    width: 100%;

    background: rgba(247, 244, 239, 0.82);
    border-bottom: 1px solid transparent;

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;
}

.rk-site-header.is-scrolled {
    background: rgba(247, 244, 239, 0.97);
    border-bottom-color: var(--header-line);
    box-shadow: 0 8px 30px rgba(58, 64, 73, 0.06);
}

.rk-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(100%, 1440px);
    min-height: 90px;
    margin: 0 auto;
    padding: 10px clamp(20px, 3vw, 40px);
}

/* ==========================================================
   Marca
   ========================================================== */

.rk-header-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;

    min-width: 0;

    color: var(--header-navy);
    text-decoration: none;
}

.rk-header-brand:hover,
.rk-header-brand:focus {
    color: var(--header-navy);
    text-decoration: none;
}

.rk-header-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 150px;
    height: 77px;
    flex: 0 0 auto;
}

.rk-header-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rk-header-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.rk-header-brand-text strong {
    color: var(--header-navy);
    font-family: var(--header-display);
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 0.11em;
    line-height: 1;
}

.rk-header-brand-text small {
    margin-top: 5px;

    color: rgba(58, 64, 73, 0.76);
    font-family: var(--header-body);
    font-size: var(--rk-text-sm);
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1.4;
    text-transform: uppercase;
}

/* ==========================================================
   Navegación de escritorio
   ========================================================== */

.rk-header-nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.25vw, 20px);
}

.rk-header-link {
    position: relative;

    padding: 8px 0;

    color: rgba(76, 85, 100, 0.82);
    font-family: var(--header-body);
    font-size: 1.08rem;
    font-weight: 500;
    letter-spacing: 0.035em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;

    transition: color 0.25s ease;
}

.rk-header-link::after {
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;

    height: 1px;

    content: "";
    background: var(--header-gold);

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 0.25s ease;
}

.rk-header-link:hover,
.rk-header-link:focus,
.rk-header-link.is-active {
    color: var(--header-gold);
}

.rk-header-link:hover::after,
.rk-header-link:focus::after,
.rk-header-link.is-active::after {
    transform: scaleX(1);
}

.rk-header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;
    padding: 0.8rem 1.55rem;

    color: #fff;
    background: var(--header-navy);
    border: 1px solid var(--header-navy);
    border-radius: 999px;

    font-family: var(--header-body);
    font-size: 1.04rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.rk-header-cta:hover,
.rk-header-cta:focus,
.rk-header-cta.is-active {
    color: #fff;
    background: #3a414d;
    border-color: #3a414d;

    transform: translateY(-1px);

    box-shadow: 0 12px 24px rgba(58, 65, 77, 0.16);
}

/* ==========================================================
   Botón móvil
   ========================================================== */

.rk-menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    gap: 6px;
    padding: 0;

    background: transparent;
    border: 1px solid var(--header-line);
    border-radius: 50%;

    box-shadow: none;
}

.rk-menu-toggle span {
    display: block;

    width: 21px;
    height: 1.5px;

    background: var(--header-navy);
}

.rk-menu-toggle:hover,
.rk-menu-toggle:focus {
    border-color: rgba(76, 85, 100, 0.28);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(76, 85, 100, 0.08);
}

/* ==========================================================
   Bootstrap Offcanvas móvil
   ========================================================== */

.rk-mobile-offcanvas {
    --bs-offcanvas-width: 100vw;

    z-index: 2000 !important;

    width: 100vw !important;
    max-width: none;

    color: var(--header-ink);

    background-color: var(--header-paper);
    background-image:
        radial-gradient(
            circle at 90% 10%,
            rgba(224, 231, 249, 0.65),
            transparent 35%
        );

    background-repeat: no-repeat;
    background-size: auto;

    border-left: 0;
    opacity: 1;
}

.rk-mobile-offcanvas.offcanvas-end {
    width: 100vw !important;
    border-left: 0;
}

.rk-mobile-offcanvas.show,
.rk-mobile-offcanvas.showing,
.rk-mobile-offcanvas.hiding {
    background-color: var(--header-paper);
    opacity: 1;
}

.rk-mobile-offcanvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 78px;
    padding: 10px clamp(20px, 5vw, 74px);

    background-color: var(--header-paper);
    border-bottom: 1px solid var(--header-line);
}

.rk-mobile-offcanvas-body {
    position: relative;
    z-index: 1;

    padding: 28px 30px 40px;

    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;

    background-color: var(--header-paper);
}

.rk-mobile-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.rk-mobile-nav .rk-header-link {
    display: block;

    padding: 17px 4px;

    border-bottom: 1px solid var(--header-line);

    font-family: var(--header-body);
    font-size: 1.28rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    text-transform: none;
}

.rk-mobile-nav .rk-header-link::after {
    display: none;
}

.rk-mobile-nav .rk-header-link:hover,
.rk-mobile-nav .rk-header-link:focus,
.rk-mobile-nav .rk-header-link.is-active {
    color: var(--header-gold);
}

.rk-mobile-nav .rk-header-cta {
    width: 100%;
    min-height: 52px;
    margin-top: 28px;
    padding: 1rem 1.3rem;

    font-size: 1.05rem;
    letter-spacing: 0.035em;
    line-height: 1.2;
}

.rk-offcanvas-close {
    flex: 0 0 auto;

    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;

    background-size: 16px;
    border: 1px solid var(--header-line);
    border-radius: 50%;

    opacity: 1;
    box-shadow: none;
}

.rk-offcanvas-close:hover,
.rk-offcanvas-close:focus {
    opacity: 1;
    box-shadow: 0 0 0 0.2rem rgba(76, 85, 100, 0.1);
}

/* Bootstrap genera automáticamente este backdrop */

.offcanvas-backdrop {
    z-index: 1990 !important;
    background-color: #2a2f36;
}

.offcanvas-backdrop.show {
    opacity: 0.45;
}

/* Evita que alguna regla global vuelva transparente el panel */

.rk-mobile-offcanvas,
.rk-mobile-offcanvas .offcanvas-header,
.rk-mobile-offcanvas .offcanvas-body {
    opacity: 1;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 1199.98px) {
    body {
        padding-top: 72px;
    }

    .rk-header-container {
        min-height: 72px;
    }

    .rk-header-nav {
        display: none;
    }

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

    .rk-mobile-offcanvas-header {
        min-height: 72px;
    }
}

@media (min-width: 1200px) {
    .rk-mobile-offcanvas {
        display: none !important;
    }
}

@media (max-width: 575.98px) {
    .rk-header-container,
    .rk-mobile-offcanvas-header {
        padding-right: 16px;
        padding-left: 16px;
    }

    .rk-header-logo {
        width: 100px;
        height: 51px;
    }

    .rk-header-brand-text strong {
        font-size: 1.25rem;
    }

    .rk-header-brand-text small {
        max-width: 180px;
        font-size: var(--rk-text-xs);
        letter-spacing: 0.035em;
    }

    .rk-mobile-offcanvas-body {
        padding-right: 24px;
        padding-left: 24px;
    }
}

@media (max-width: 340px) {
    .rk-header-brand-text small {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rk-site-header *,
    .rk-site-header *::before,
    .rk-site-header *::after,
    .rk-mobile-offcanvas,
    .rk-mobile-offcanvas *,
    .offcanvas-backdrop {
        transition-duration: 0.01ms !important;
    }
}
