/* =========================================
   HEADER
========================================= */

.header {
    position: absolute;

    top: 45px;
    left: 50%;

    transform: translateX(-50%);

    width: 60%;
    left: 50%;

    padding: 15px 35px;

    background: rgba(255, 255, 255, 0.96);

    border-radius: 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    z-index: 1000;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.12);
}


/* =========================================
   NAVEGACIÓN
========================================= */

.header nav {
    display: flex;
    align-items: center;

    gap: 28px;

    width: 100%;
}


/* =========================================
   ENLACES
========================================= */

.header nav a {
    position: relative;

    text-decoration: none;

    color: #6c4173;

    font-family: "Nunito", sans-serif;

    font-size: 1.05rem;

    font-weight: 650;
    padding: 15px 5px;
    white-space: nowrap;

    transition:
        color .3s ease,
        transform .3s ease;
}

.header nav a:first-of-type {
    margin-left: 25px;
}

.header nav a:not(:last-of-type)::before {
    content: "|";

    position: absolute;

    right: -18px;
    top: 50%;

    transform: translateY(-50%);

    color: rgba(140, 108, 255, 0.45);

    font-weight: 400;
}


/* Línea decorativa */

.header nav a::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -8px;

    width: 0;
    height: 3px;

    border-radius: 10px;

    background: linear-gradient(90deg,
            #a8df6b,
            #b58cff);

    transform: translateX(-50%);

    transition: width .3s ease;
}


/* HOVER */

.header nav a:hover {
    color: #8c6cff;

    transform: translateY(-2px);
}


.header nav a:hover::after {
    width: 70%;
}

/* =========================================
   PÁGINA ACTUAL
========================================= */

.header nav a.activo {
    color: #8c6cff;

    transform: translateY(-2px);
}


.header nav a.activo::after {
    width: 70%;
}

/* =========================================
   FRASE DEL HEADER
========================================= */

.header__frase {
    margin-left: auto;

    display: flex;
    align-items: center;

    gap: 8px;

    padding: 10px 18px;

    border-radius: 25px;

    background: linear-gradient(90deg,
            rgba(168, 223, 107, 0.12),
            rgba(181, 140, 255, 0.12));

    color: #5d557d;

    font-family: Arial, sans-serif;

    font-size: 1.05rem;

    font-style: italic;

    white-space: nowrap;
}


.header__frase i {
    color: #70ad5b;

    font-size: 0.9rem;
}


.header__frase span {
    color: #b58cff;

    font-size: 1.1rem;
}

.logo-planeta {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.logo-letras {
    width: 200px;
    height: auto;
    object-fit: contain;
}

.logo-planeta:hover {
    transform: rotate(12deg) scale(1.08);
}

.header a:hover {
    color: #8c6cff;
}

.logo {
    font-family: "Nunito", sans-serif;
    font-size: 35px;
    font-weight: 900;
}

.logo span {
    color: #9bd36a;
}

.logo strong {
    color: #8c6cff;
}


/* =========================================
   MENÚ HAMBURGUESA - SOLO MÓVILES
   Independiente del header original
========================================= */

/* Oculto por defecto en ordenador */
.header-movil {
    display: none;
}


/* =========================================
   TABLETS Y MÓVILES
========================================= */

@media (max-width: 900px) {

    /* Ocultamos el menú original en pantallas pequeñas */
    .header {
        display: none;
    }

    /* Nuevo encabezado móvil */
    .header-movil {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 15px;

        position: absolute;
        top: 15px;
        left: 4%;
        width: 92%;
        box-sizing: border-box;

        padding: 10px 10px;

        background: rgba(255, 255, 255, 0.97);
        border: 1px solid rgba(181, 140, 255, 0.18);
        border-radius: 22px;

        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);

        z-index: 1001;
    }
    @media (max-width: 768px) {
    .header-movil {
        padding-top: 6px;
        padding-bottom: 6px;
        min-height: 0;
    }

    .header-movil img {
        max-height: 38px;
        width: auto;
    }
}
    /* Planeta */
    .logo-movil {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    .logo-movil img {
        display: block;
        width: 52px;
        height: 52px;
        object-fit: contain;
    }

    /* Botón hamburguesa */
    .hamburguesa-movil {
        width: 38px;
        height: 38px;
        padding: 5px;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3px;

        background: linear-gradient(135deg,
                #a8df6b,
                #b58cff);

        border: none;
        border-radius: 10px;
        cursor: pointer;
        flex-shrink: 0;

        box-shadow: 0 4px 12px rgba(140, 108, 255, 0.18);

        transition: transform 0.3s ease;
    }

    .hamburguesa-movil:hover {
        transform: scale(1.05);
    }

    .hamburguesa-movil span {
        display: block;
        width: 15px;
        height: 2px;

        background: #ffffff;
        border-radius: 5px;

        transition:
            transform 0.3s ease,
            opacity 0.3s ease;
    }

    /* Menú desplegable */
    .enlaces-movil {
        display: none;

        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;

        padding: 14px;

        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(181, 140, 255, 0.18);
        border-radius: 22px;

        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    }

    /* Esta clase se activa con JavaScript */
    .header-movil.menu-abierto .enlaces-movil {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    /* Enlaces */
    .enlaces-movil a {
        display: block;
        padding: 13px 14px;

        color: #6c4173;
        font-family: "Nunito", sans-serif;
        font-size: 1rem;
        font-weight: 700;

        text-decoration: none;
        border-radius: 12px;

        transition:
            background 0.25s ease,
            color 0.25s ease,
            transform 0.25s ease;
    }

    .enlaces-movil a:hover,
    .enlaces-movil a.activo {
        color: #7855c7;

        background: linear-gradient(90deg,
                rgba(168, 223, 107, 0.18),
                rgba(181, 140, 255, 0.18));

        transform: translateX(3px);
    }

    /* Frase decorativa */
    .frase-movil {
        display: block;
        margin-top: 8px;
        padding: 14px 10px 5px;

        border-top: 1px solid rgba(181, 140, 255, 0.2);

        color: #5d557d;
        font-size: 0.9rem;
        font-style: italic;
        text-align: center;
    }

}
/* TABLET Y MÓVIL: menú compacto */
@media (max-width: 1024px) {

    /* Ocultamos la cabecera de ordenador */
    .header {
        display: none;
    }

    /* Mostramos la cabecera con hamburguesa */
    .header-movil {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

/* TABLET: un poco más de espacio */
@media (min-width: 769px) and (max-width: 1024px) {

    .header-movil {
        padding: 16px 5%;
    }

    .logo-movil img {
        width: 58px;
        height: auto;
    }

    .hamburguesa-movil {
        width: 44px;
        height: 44px;
    }

    .enlaces-movil {
        min-width: 240px;
    }
}