/* =================================================================
   FUNDACIÓN ZAFFARONI - TARJETAS DE NAVEGACIÓN
   Secciones interactivas con efecto de "empuje" horizontal
   ================================================================= */

/* ===== CONTENEDOR DE TARJETAS ===== */
.nav-tarjetas {
    display: flex;
    flex-direction: row;
    width: 100%;
    border-top: var(--grosor-linea) solid var(--color-linea);
}

.nav-tarjetas--columnas-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.nav-tarjetas--columnas-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

/* ===== TARJETA INDIVIDUAL ===== */
.tarjeta-nav {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: var(--espacio-6);
    min-height: 180px;
    border-right: var(--grosor-linea) solid var(--color-linea);
    background-color: var(--color-fondo);
     
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all var(--transicion-empuje);
}

.tarjeta-nav:last-child {
    border-right: none;
}

/* Fondo con efecto de revelación */
.tarjeta-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-secundario);
    transform: translateX(-101%);
    transition: transform var(--transicion-empuje);
    z-index: 0;
}

.tarjeta-nav:hover::before {
    transform: translateX(0);
}

/* ===== CONTENIDO DE LA TARJETA ===== */
.tarjeta-nav__contenido {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tarjeta-nav__cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--espacio-4);
}

.tarjeta-nav__titulo {
    font-family: var(--fuente-display);
    font-size: var(--texto-xl);
    font-weight: var(--peso-regular);
    font-style: italic;
    font-variation-settings: "ital" 1, "wght" 400;
    transition: color var(--transicion-empuje);
    margin: 0;
}

.tarjeta-nav__flecha {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--texto-lg);
    transition: transform var(--transicion-normal), color var(--transicion-empuje);
}

.tarjeta-nav:hover .tarjeta-nav__flecha {
    transform: translateX(6px);
}

.tarjeta-nav__descripcion {
    font-size: var(--texto-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-principal-suave);
    transition: color var(--transicion-empuje);
    flex-grow: 1;
}

/* Estados hover */
.tarjeta-nav:hover .tarjeta-nav__titulo,
.tarjeta-nav:hover .tarjeta-nav__flecha,
.tarjeta-nav:hover .tarjeta-nav__descripcion {
    color: var(--color-fondo);
}

/* ===== VARIANTE: TARJETA DESTACADA ===== */
.tarjeta-nav--destacada {
    background-color: transparent;
    min-height: auto;
    border-right: none;
    padding: var(--espacio-8);
}

.tarjeta-nav--destacada::before {
    background-color: var(--color-acento);
}

.tarjeta-nav--destacada .tarjeta-nav__titulo {
    font-size: var(--texto-3xl);
    font-style: italic;
}

.tarjeta-nav--destacada .tarjeta-nav__flecha {
    font-size: var(--texto-xl);
}

/* ===== VARIANTE: TARJETA COMPACTA ===== */
.tarjeta-nav--compacta {
    min-height: 120px;
    padding: var(--espacio-4);
}

.tarjeta-nav--compacta .tarjeta-nav__titulo {
    font-size: var(--texto-lg);
}

.tarjeta-nav--compacta .tarjeta-nav__descripcion {
    font-size: var(--texto-xs);
}

/* ===== VARIANTE: CON ICONO ===== */
.tarjeta-nav__icono {
    width: 48px;
    height: 48px;
    margin-bottom: var(--espacio-4);
    object-fit: contain;
    transition: filter var(--transicion-empuje);
}

.tarjeta-nav:hover .tarjeta-nav__icono {
    filter: brightness(0) invert(1);
}

/* ===== EFECTO DE EMPUJE ENTRE TARJETAS ===== */
.nav-tarjetas--empuje .tarjeta-nav {
    transition: flex-grow var(--transicion-empuje), padding var(--transicion-empuje);
}

.nav-tarjetas--empuje .tarjeta-nav:hover {
    flex-grow: 1.5;
    padding-left: var(--espacio-8);
    padding-right: var(--espacio-8);
}

.nav-tarjetas--empuje .tarjeta-nav:not(:hover) {
    flex-grow: 0.75;
}

/* ===== ANIMACIÓN DE ENTRADA ESCALONADA ===== */
.tarjeta-nav[data-animacion="entrada"] {
    opacity: 0;
    transform: translateY(20px);
    animation: tarjetaEntrada 0.6s ease forwards;
}

.tarjeta-nav[data-animacion="entrada"]:nth-child(1) { animation-delay: 0.1s; }
.tarjeta-nav[data-animacion="entrada"]:nth-child(2) { animation-delay: 0.2s; }
.tarjeta-nav[data-animacion="entrada"]:nth-child(3) { animation-delay: 0.3s; }
.tarjeta-nav[data-animacion="entrada"]:nth-child(4) { animation-delay: 0.4s; }

@keyframes tarjetaEntrada {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
   TARJETAS - MÓVIL SIMPLIFICADO
   Lista vertical sin efecto de empuje complejo
   ================================================================= */
@media screen and (max-width: 40em) {
    .nav-tarjetas {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .nav-tarjetas--columnas-3,
    .nav-tarjetas--columnas-4 {
        display: flex;
        grid-template-columns: none;
    }

    .tarjeta-nav {
        border-right: none;
        border-bottom: var(--grosor-linea) solid var(--color-linea);
        min-height: 80px;
        padding: var(--espacio-4);
    }

    .tarjeta-nav:last-child {
        border-bottom: none;
    }

    /* Desactivar efecto empuje (pseudoelemento) en móvil */
    .tarjeta-nav::before {
        display: none;
    }

    /* Hover simple con background sutil */
    .tarjeta-nav:hover,
    .tarjeta-nav:active {
        background-color: var(--color-linea-suave, rgba(0,0,0,0.05));
    }

    .tarjeta-nav:hover .tarjeta-nav__titulo,
    .tarjeta-nav:hover .tarjeta-nav__flecha,
    .tarjeta-nav:hover .tarjeta-nav__descripcion,
    .tarjeta-nav:active .tarjeta-nav__titulo,
    .tarjeta-nav:active .tarjeta-nav__flecha,
    .tarjeta-nav:active .tarjeta-nav__descripcion {
        color: var(--color-principal);
    }

    /* Flecha sin animación de movimiento */
    .tarjeta-nav:hover .tarjeta-nav__flecha {
        transform: none;
    }

    /* Tipografía ajustada */
    .tarjeta-nav__titulo {
        font-size: var(--texto-lg);
    }

    .tarjeta-nav__descripcion {
        font-size: var(--texto-sm);
        display: block;
    }

    .tarjeta-nav__cabecera {
        margin-bottom: var(--espacio-2);
    }

    /* Sin efecto de empuje entre tarjetas */
    .nav-tarjetas--empuje .tarjeta-nav,
    .nav-tarjetas--empuje .tarjeta-nav:hover,
    .nav-tarjetas--empuje .tarjeta-nav:not(:hover) {
        flex-grow: 1;
        padding: var(--espacio-4);
    }

    /* Tarjeta destacada - más simple */
    .tarjeta-nav--destacada {
        padding: var(--espacio-5);
        background-color: var(--color-acento);
    }

    .tarjeta-nav--destacada .tarjeta-nav__titulo,
    .tarjeta-nav--destacada .tarjeta-nav__flecha,
    .tarjeta-nav--destacada .tarjeta-nav__descripcion {
        color: var(--color-fondo);
    }

    .tarjeta-nav--destacada:hover,
    .tarjeta-nav--destacada:active {
        background-color: var(--color-secundario);
    }

    .tarjeta-nav--destacada .tarjeta-nav__titulo {
        font-size: var(--texto-xl);
    }

    /* Sin animación de entrada en móvil */
    .tarjeta-nav[data-animacion="entrada"] {
        opacity: 1;
        transform: none;
        animation: none;
    }
}