/* ==========================================================================
   Contenedor Principal y Cabecera
   ========================================================================== */
.resources-section {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;

    @media (min-width: 768px) {
        padding: 6rem 2rem;
    }
}

.resources-header {
    text-align: center;
    margin-bottom: 4rem;

    h1 {
        font-size: 2.5rem;
        color: var(--colorSecundario, #334155);
        margin-bottom: 1rem;
        line-height: 1.2;
    }

    p {
        font-size: 1.125rem;
        color: var(--colorPrimario, #64748b);
        max-width: 600px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Grilla y Tarjetas de Recursos
   ========================================================================== */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;

    @media (min-width: 768px) {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

.resource-card {
    background-color: var(--bg-surface, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;

    &:hover, &:focus-within {
        transform: translateY(-4px);
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        border-color: var(--colorPrimario, #64748b);
    }
}

/* ==========================================================================
   Elementos Internos de la Tarjeta
   ========================================================================== */
.resource-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    background-color: var(--bg-muted, #f8fafc);
    color: var(--colorPrimario, #64748b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;

    svg {
        width: 1.75rem;
        height: 1.75rem;
    }
}

.resource-content {
    flex-grow: 1;
    margin-bottom: 2rem;

    h2 {
        font-size: 1.25rem;
        font-weight: 600;
        color: var(--colorSecundario, #334155);
        margin-bottom: 0.75rem;
        line-height: 1.4;
    }

    p {
        font-size: 0.95rem;
        color: var(--colorPrimario, #64748b);
        line-height: 1.6;
        margin: 0;
    }
}

/* ==========================================================================
   Botones / Enlaces de Acción
   ========================================================================== */
.resource-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--colorSecundario, #334155);
    text-decoration: none;
    transition: color 0.2s ease;

    svg {
        transition: transform 0.2s ease;
    }

    &:hover {
        color: var(--colorPrimario, #64748b);
        
        svg {
            transform: translateX(4px);
        }
    }

    /* Expande el área de click a toda la tarjeta semánticamente */
    &::after {
        content: "";
        position: absolute;
        inset: 0;
    }
}

/* Estado Vacío */
.empty-resources {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-muted, #f8fafc);
    border-radius: 1rem;
    border: 1px dashed var(--colorPrimario, #64748b);
    color: var(--colorSecundario, #334155);
}