/* ==========================================================
   resources.css  |  Sección "Recursos gratuitos" (Empezá por acá)
   Una tarjeta destacada (oscura, más grande) y tres tarjetas
   normales. En celular y tablet las tres normales pasan a ser un
   carrusel (carousel.css / carousel.js); la destacada queda arriba.

   Imágenes: mientras el src empiece por "REEMPLAZAR" la imagen se
   oculta y se ve un fondo de color en su lugar.
   Proporción recomendada de las imágenes: 16:10 (1200 x 750 px).
   ========================================================== */
.sa-res {
    --sa-res-bg: var(--sa-stone);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--sa-res-bg);
    border-radius: var(--sa-radius-lg);
    box-shadow: var(--sa-card-shadow,
                0 2px 6px rgb(var(--sa-deep-rgb) / .05),
                0 14px 28px -12px rgb(var(--sa-deep-rgb) / .16));
}

/* ---------- Imagen ---------- */
.sa-res__frame {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, var(--sa-ink-soft), var(--sa-ink));
}
.sa-res__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .8s var(--sa-ease);
}
.sa-res__media[src^="REEMPLAZAR"] { display: none; }
.sa-res:hover .sa-res__media { transform: scale(1.04); }

/* Borde ondulado entre la imagen y el texto (misma forma de los cortes de sección) */
.sa-res__frame::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    z-index: 1;
    height: 28px;
    background: var(--sa-res-bg);
    -webkit-mask: var(--sa-wave-shape) 0 0 / 100% 100% no-repeat;
    mask: var(--sa-wave-shape) 0 0 / 100% 100% no-repeat;
}

.sa-res__tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 6px 14px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--sa-on-dark-strong);
    background: rgb(var(--sa-ink-rgb) / .82);
    border: 1px solid rgb(var(--sa-bronze-rgb) / .6);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

/* ---------- Texto ---------- */
.sa-res__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 10px 28px 30px;
}
.sa-res__title {
    margin-bottom: 12px;
    font-family: var(--sa-font-serif);
    font-weight: 400;
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--sa-ink);
}
.sa-res__kicker {
    margin-bottom: 10px;
    font-family: var(--sa-font-serif);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.4;
    color: var(--sa-bronze-deep);
}
.sa-res__list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    font-size: .96rem;
    list-style: none;
}
.sa-res__list li {
    position: relative;
    margin: 0;
    padding: 0 0 0 18px;
}
.sa-res__list li::before {
    content: "";
    position: absolute;
    top: .7em;
    left: 0;
    width: 7px;
    height: 2px;
    background: var(--sa-bronze);
}
.sa-res__list strong { font-weight: 600; color: var(--sa-text); }

.sa-res__action {
    margin-top: auto;   /* el botón queda siempre abajo, aunque el texto sea corto */
    padding-top: 26px;
}

/* ---------- Tarjeta destacada ---------- */
.sa-res--featured {
    --sa-res-bg: var(--sa-ink);
    flex-direction: row;
    margin-bottom: clamp(28px, 4vw, 48px);
    color: var(--sa-on-dark-soft);
    box-shadow: 0 24px 48px -20px rgb(var(--sa-deep-rgb) / .45);
}
.sa-res--featured .sa-res__frame {
    flex: 0 0 46%;
    aspect-ratio: auto;
    min-height: 380px;
}
.sa-res--featured .sa-res__frame::after { display: none; } /* en escritorio el corte es recto */
.sa-res--featured .sa-res__body {
    justify-content: center;
    padding: clamp(36px, 5vw, 64px);
}
.sa-res--featured .sa-res__title {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    color: var(--sa-on-dark-strong);
}
.sa-res--featured .sa-res__body > p {
    max-width: 46ch;
    font-size: 1.08rem;
}
.sa-res--featured .sa-res__action { margin-top: 0; padding-top: 32px; }

/* ---------- Tablet y celular ---------- */
@media (max-width: 900px) {
    .sa-res--featured { flex-direction: column; }
    .sa-res--featured .sa-res__frame {
        flex: none;
        aspect-ratio: 16 / 10;
        min-height: 0;
    }
    .sa-res--featured .sa-res__frame::after { display: block; }
    .sa-res--featured .sa-res__body { padding: 10px 28px 34px; justify-content: flex-start; }
}

@media (max-width: 600px) {
    .sa-res__body { padding: 8px 24px 28px; }
    .sa-res--featured .sa-res__body { padding: 8px 24px 30px; }
}

@media (prefers-reduced-motion: reduce) {
    .sa-res__media { transition: none; }
    .sa-res:hover .sa-res__media { transform: none; }
}