/* =========================================================================
   navbar_landing.css?v=1.1
   - Estilos exclusivos para navbar_landing.php
   - Header responsivo con menú hamburguesa
   - Animaciones hover solo en dispositivos con cursor
======================================================================== */

/* =========================
   CONTENEDOR GENERAL
========================= */
.landing-navbar {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 0.125rem solid #5b235f;
    position: relative;
    z-index: 1000;
}

.landing-navbar__container {
    width: 100%;
    max-width: 100%; /* Permite expandirse a todo el ancho */
    margin: 0 auto;
    padding: 0.75rem 3%; /* 3% mantiene los logos pegados a los extremos con un margen seguro */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* =========================
   LOGO
========================= */
.landing-navbar__brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
}

.landing-navbar__logo {
    display: block;
    width: 14rem;
    max-width: 100%;
    height: auto;
}

/* =========================
   NAVEGACIÓN
========================= */
.landing-navbar__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1 1 auto;
    gap: 1.5rem;
    min-width: 0;
}

.landing-navbar__menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem; /* Ajustado para dar respiro a las cajas más anchas */
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}

.landing-navbar__item {
    display: flex;
    align-items: center;
}

.landing-navbar__link {
    position: relative;
    
    /* TRUCO PARA MÁXIMO 2 LÍNEAS CON PUNTOS SUSPENSIVOS */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    
    color: #4c2a63;
    text-decoration: none;
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.2;
    
    /* Padding ajustado para que la línea animada no se corte */
    padding: 0.5rem 0.25rem 0.4rem 0.25rem; 
    transition: color 0.3s ease, transform 0.3s ease;
    
    white-space: normal; /* Permite el salto de línea */
    text-align: center;
    
    /* TAMAÑOS MÍNIMOS Y MÁXIMOS */
    min-width: 90px; /* Evita que los textos muy cortos se vean extraños */
    max-width: 200px; /* Caja ancha para que quepa la mayor cantidad de texto en 2 filas */
    margin: 0 auto;
}

/* Línea animada inferior */
.landing-navbar__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0; /* Posicionado al ras del padding bottom para evitar ser ocultado por overflow:hidden */
    width: 0%;
    height: 0.125rem;
    background-color: #d9a25f;
    border-radius: 999rem;
    transition: width 0.3s ease;
}

/* =========================
   BOTÓN LOGIN
========================= */
.landing-navbar__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.landing-navbar__login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.875rem;
    padding: 0.75rem 1.5rem;
    background-color: #d99d57;
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    border-radius: 999rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}

/* =========================
   BOTÓN HAMBURGUESA
========================= */
.landing-navbar__toggle {
    display: none;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.35rem;
}

.landing-navbar__toggle-line {
    display: block;
    width: 1.6rem;
    height: 0.16rem;
    background-color: #4c2a63;
    border-radius: 999rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Animación del icono hamburguesa al abrir */
.landing-navbar__toggle.is-open .landing-navbar__toggle-line:nth-child(1) {
    transform: translateY(0.5rem) rotate(45deg);
}

.landing-navbar__toggle.is-open .landing-navbar__toggle-line:nth-child(2) {
    opacity: 0;
}

.landing-navbar__toggle.is-open .landing-navbar__toggle-line:nth-child(3) {
    transform: translateY(-0.5rem) rotate(-45deg);
}

/* =========================
   HOVER SOLO ESCRITORIO
========================= */
@media (hover: hover) and (pointer: fine) {
    .landing-navbar__link:hover {
        color: #d99d57;
        transform: translateY(-0.08rem);
    }

    .landing-navbar__link:hover::after {
        width: 100%;
    }

    .landing-navbar__login-btn:hover {
        background-color: #c98d47;
        transform: translateY(-0.08rem);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12);
    }
}

/* =========================
   TABLET
========================= */
@media screen and (max-width: 1200px) {
    .landing-navbar__container {
        padding: 0.75rem 2%;
    }

    .landing-navbar__menu {
        gap: 1rem;
    }

    .landing-navbar__link {
        font-size: 1rem;
        max-width: 160px; /* Reduce un poco el ancho máximo en tabletas */
    }

    .landing-navbar__logo {
        width: 12.5rem;
    }
}

/* =========================
   MENÚ RESPONSIVO
========================= */
@media screen and (max-width: 1024px) {
    .landing-navbar__container {
        position: relative;
        flex-wrap: wrap;
    }

    .landing-navbar__toggle {
        display: inline-flex;
    }

    .landing-navbar__nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding-top: 1rem;
    }

    .landing-navbar__nav.is-open {
        display: flex;
    }

    .landing-navbar__menu {
        width: 100%;
        flex-direction: column;
        align-items: center; /* MODIFICADO: De stretch a center para centrar los elementos de la lista */
        gap: 0.25rem;
    }

    .landing-navbar__item {
        width: 100%;
    }

    .landing-navbar__link {
        width: 100%;
        max-width: 100%; /* Reinicia el límite para el menú móvil */
        -webkit-line-clamp: unset; /* Quita el límite de 2 líneas en móvil */
        justify-content: center; /* MODIFICADO: De flex-start a center para centrar horizontalmente */
        text-align: center; /* MODIFICADO: De left a center para centrar el texto */
        padding: 0.9rem 0.25rem;
        white-space: normal;
        border-bottom: 0.0625rem solid rgba(76, 42, 99, 0.08);
    }

    .landing-navbar__link::after {
        display: none;
    }

    .landing-navbar__actions {
        width: 100%;
        justify-content: center; /* MODIFICADO: De flex-start a center para centrar el botón */
        padding-top: 0.5rem;
    }

    .landing-navbar__login-btn {
        width: 100%;
        max-width: 16rem; /* El botón seguirá teniendo un ancho máximo y se centrará */
    }
}

/* =========================
   MÓVIL
========================= */
@media screen and (max-width: 640px) {
    .landing-navbar__container {
        padding: 0.75rem 1rem;
    }

    .landing-navbar__logo {
        width: 10.5rem;
    }

    .landing-navbar__toggle {
        width: 2.75rem;
        height: 2.75rem;
    }

    .landing-navbar__link {
        font-size: 0.98rem;
    }

    .landing-navbar__login-btn {
        min-height: 2.75rem;
        font-size: 0.95rem;
        padding: 0.75rem 1.25rem;
    }
}