/**
 * Header
 * Remodelando Pixel
 */


/* =========================================================
   HEADER
   ========================================================= */

.rmd-header {
    position: relative;
    z-index: 100;

    width: 100%;

    background: var(--rmd-white);

    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}


.rmd-header__inner {
    display: flex;

    min-height: 92px;

    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =========================================================
   LOGO
   ========================================================= */

.rmd-branding {
    flex: 0 0 auto;

    display: flex;

    align-items: center;
}


.rmd-branding .custom-logo-link {
    display: flex;

    align-items: center;

    line-height: 0;
}


.rmd-branding .custom-logo {
    display: block;

    width: auto;
    height: auto;

    max-width: 280px;
  

    object-fit: contain;
}


.rmd-site-logo__fallback {
    display: flex;

    flex-direction: column;

    gap: 2px;

    color: var(--rmd-brown-dark);

    font-size: 24px;
    font-weight: 700;

    line-height: 1;

    text-decoration: none;
}


/* =========================================================
   NAVEGACIÓN + ACCIONES
   ========================================================= */

.rmd-header__navigation {
    display: flex;

    flex: 1;

    align-items: center;
    justify-content: flex-end;

    gap: 28px;
}


.rmd-nav {
    display: flex;

    align-items: center;
}


.rmd-nav__menu {
    display: flex;

    margin: 0;
    padding: 0;

    align-items: center;

    gap: 28px;

    list-style: none;
}


.rmd-nav__menu li {
    position: relative;

    margin: 0;
    padding: 0;
}


.rmd-nav__menu a {
    position: relative;

    display: inline-flex;

    padding: 10px 0;

    align-items: center;

    color: var(--rmd-text);

    font-size: 15px;
    font-weight: 600;

    line-height: 1.2;

    text-decoration: none;

    transition:
        color 0.2s ease;
}


.rmd-nav__menu a::after {
    position: absolute;

    right: 0;
    bottom: 4px;
    left: 0;

    height: 2px;

    background: var(--rmd-orange);

    content: "";

    transform: scaleX(0);
    transform-origin: right center;

    transition:
        transform 0.25s ease;
}


.rmd-nav__menu a:hover,
.rmd-nav__menu .current-menu-item > a,
.rmd-nav__menu .current_page_item > a {
    color: var(--rmd-orange);
}


.rmd-nav__menu a:hover::after,
.rmd-nav__menu .current-menu-item > a::after,
.rmd-nav__menu .current_page_item > a::after {
    transform: scaleX(1);
    transform-origin: left center;
}


/* =========================================================
   ACCIONES HEADER
   ========================================================= */

.rmd-header__actions {
    display: flex;

    flex: 0 0 auto;

    align-items: center;

    gap: 12px;
}


/* =========================================================
   WHATSAPP
   ========================================================= */

.rmd-header__whatsapp {
    display: inline-flex;

    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    border: 1px solid rgba(0, 0, 0, 0.08);

    border-radius: 50%;

    align-items: center;
    justify-content: center;

    background: var(--rmd-white);

    color: var(--rmd-green);

    text-decoration: none;

    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}


.rmd-header__whatsapp svg {
    width: 22px;
    height: 22px;
}


.rmd-header__whatsapp:hover {
    border-color: var(--rmd-green);

    background: rgba(63, 121, 88, 0.07);

    color: var(--rmd-green);

    transform: translateY(-2px);
}


/* =========================================================
   CTA
   ========================================================= */

.rmd-header__cta {
    display: inline-flex;

    min-height: 46px;

    padding: 0 20px;

    border-radius: 7px;

    align-items: center;
    justify-content: center;

    white-space: nowrap;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;
}


/* =========================================================
   BOTÓN MÓVIL
   ========================================================= */

.rmd-menu-toggle {
    display: none;

    width: 46px;
    height: 46px;

    padding: 0;

    border: 0;

    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 5px;

    background: transparent;

    cursor: pointer;
}


.rmd-menu-toggle span {
    display: block;

    width: 25px;
    height: 2px;

    border-radius: 999px;

    background: var(--rmd-brown-dark);

    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}


/* Estado abierto */

.rmd-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}


.rmd-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}


.rmd-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   TABLET / MENÚ MÓVIL
   ========================================================= */

@media (max-width: 980px) {

    .rmd-header {
        position: relative;
    }


    .rmd-header__inner {
        position: relative;

        min-height: 82px;

        gap: 18px;
    }


    .rmd-branding .custom-logo {
        max-width: 195px;
        max-height: 64px;
    }


    .rmd-header__navigation {
        gap: 12px;
    }


    .rmd-nav {
        position: absolute;

        top: 100%;
        right: 0;
        left: 0;

        display: block;

        width: 100%;

        padding: 14px 24px 24px;

        border-top: 1px solid rgba(0, 0, 0, 0.05);

        background: var(--rmd-white);

        box-shadow:
            0 18px 35px rgba(0, 0, 0, 0.10);

        opacity: 0;

        visibility: hidden;

        transform: translateY(-8px);

        transition:
            opacity 0.2s ease,
            visibility 0.2s ease,
            transform 0.2s ease;
    }


    .rmd-nav.is-open {
        opacity: 1;

        visibility: visible;

        transform: translateY(0);
    }


    .rmd-nav__menu {
        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 0;
    }


    .rmd-nav__menu li {
        width: 100%;
    }


    .rmd-nav__menu a {
        display: flex;

        width: 100%;

        padding: 15px 0;

        border-bottom: 1px solid rgba(0, 0, 0, 0.06);

        font-size: 16px;
    }


    .rmd-nav__menu a::after {
        display: none;
    }


    .rmd-menu-toggle {
        display: flex;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 640px) {

    .rmd-header__inner {
        min-height: 76px;

        gap: 10px;
    }


    .rmd-branding .custom-logo {
        max-width: 170px;
        max-height: 56px;
    }


    .rmd-header__actions {
        gap: 7px;
    }


    .rmd-header__whatsapp {
        width: 42px;
        height: 42px;

        flex-basis: 42px;
    }


    .rmd-header__whatsapp svg {
        width: 21px;
        height: 21px;
    }


    /*
     * En móvil ocultamos el CTA grande.
     * Ya tenemos WhatsApp + hamburguesa.
     */

    .rmd-header__cta {
        display: none;
    }


    .rmd-menu-toggle {
        width: 42px;
        height: 42px;
    }


    .rmd-nav {
        padding-right: 20px;
        padding-left: 20px;
    }

}


/* =========================================================
   MÓVIL PEQUEÑO
   ========================================================= */

@media (max-width: 390px) {

    .rmd-branding .custom-logo {
        max-width: 158px;
        max-height: 52px;
    }


    .rmd-header__inner {
        gap: 6px;
    }


    .rmd-header__whatsapp {
        width: 40px;
        height: 40px;

        flex-basis: 40px;
    }


    .rmd-menu-toggle {
        width: 40px;
        height: 40px;
    }

}