/* ================================================================
   SAMFyR Revista – Frontend Styles
   Paleta: #005da4 (azul oscuro) · #009edb (azul claro) · #313030
   ================================================================ */

/* ── Reset mínimo para el componente ────────────────────────── */
.sar-wrapper *,
.sar-wrapper *::before,
.sar-wrapper *::after {
    box-sizing: border-box;
}

.sar-wrapper {
    font-family: "Source Sans 3", "Archivo Narrow", "Helvetica Neue", Arial, sans-serif;
    color: #222;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ── Badge "Última edición" ──────────────────────────────────── */
.sar-badge {
    display: inline-block;
    background: linear-gradient(90deg, #005da4 0%, #009edb 100%);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: .3rem .75rem;
    border-radius: 2rem;
    margin-bottom: .9rem;
}

/* ── Botones ─────────────────────────────────────────────────── */
.sar-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem 1.3rem;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .18s, color .18s, box-shadow .18s;
    cursor: pointer;
}

.sar-btn--primary {
    background: linear-gradient(118deg, #005da4 0%, #009edb 100%);
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(0, 93, 164, .28);
}
.sar-btn--primary:hover {
    background: linear-gradient(118deg, #004d8a 0%, #007bb8 100%);
    color: #fff !important;
    box-shadow: 0 5px 18px rgba(0, 93, 164, .38);
}

.sar-btn--outline {
    border: 2px solid #005da4;
    color: #005da4 !important;
    background: transparent;
}
.sar-btn--outline:hover {
    background: #005da4;
    color: #fff !important;
}

.sar-btn--ghost {
    border: 2px solid #aaa;
    color: #444 !important;
    background: transparent;
    font-weight: 400;
}
.sar-btn--ghost:hover {
    border-color: #005da4;
    color: #005da4 !important;
}

/* ── Placeholder de portada ──────────────────────────────────── */
.sar-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, #005da4 0%, #009edb 55%, #313030 100%);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    color: rgba(255,255,255,.85);
}

.sar-placeholder--sm {
    aspect-ratio: 3/4;
    border-radius: 4px;
}

.sar-placeholder__rar {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1;
}
.sar-placeholder--sm .sar-placeholder__rar {
    font-size: 1.4rem;
}

.sar-placeholder__vol {
    font-size: .9rem;
    opacity: .75;
}
.sar-placeholder--sm .sar-placeholder__vol {
    font-size: .75rem;
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN: ÚLTIMO NÚMERO DESTACADO
   ═══════════════════════════════════════════════════════════════ */
.sar-featured {
    background: #f5f8fc;
    border: 1px solid #d4e4f4;
    border-radius: 12px;
    padding: 2.2rem 2rem;
    margin-bottom: 3rem;
}

.sar-featured__inner {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2.4rem;
    align-items: center;
}

.sar-featured__cover {
    width: 100%;
}

.sar-featured__cover img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .14);
    display: block;
}

.sar-featured__title {
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 700;
    color: #005da4;
    margin: 0 0 .4rem;
    line-height: 1.2;
}

.sar-featured__label {
    font-size: 1rem;
    color: #444;
    margin: 0 0 .25rem;
    font-weight: 600;
}

.sar-featured__issn {
    font-size: .85rem;
    color: #888;
    margin: 0 0 1.4rem;
}

.sar-featured__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN: EDICIONES ANTERIORES
   ═══════════════════════════════════════════════════════════════ */
.sar-archive__heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: #313030;
    margin-bottom: 1.4rem;
    padding-bottom: .6rem;
    border-bottom: 2px solid #009edb;
    display: inline-block;
}

.sar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* ── Card individual ──────────────────────────────────────────── */
.sar-card {
    background: #fff;
    border: 1px solid #e0eaf3;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .18s, box-shadow .18s;
}

.sar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 93, 164, .12);
}

.sar-card__cover {
    width: 100%;
    background: #eef4fb;
}

.sar-card__cover img {
    width: 100%;
    display: block;
    aspect-ratio: 3/4;
    object-fit: cover;
}

.sar-card__body {
    padding: .85rem .9rem;
}

.sar-card__vol {
    font-size: .82rem;
    font-weight: 700;
    color: #005da4;
    margin: 0 0 .2rem;
    line-height: 1.3;
}

.sar-card__date {
    font-size: .78rem;
    color: #888;
    margin: 0 0 .6rem;
}

.sar-card__link {
    display: inline-block;
    font-size: .8rem;
    font-weight: 600;
    color: #009edb !important;
    text-decoration: none;
    transition: color .15s;
}
.sar-card__link:hover {
    color: #005da4 !important;
}

.sar-card__no-pdf {
    font-size: .78rem;
    color: #bbb;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════════
   SECCIÓN: INFORMACIÓN EDITORIAL
   ═══════════════════════════════════════════════════════════════ */
.sar-editorial {
    background: #1a2a3f;
    color: rgba(255,255,255,.88);
    border-radius: 10px;
    padding: 2rem 2.2rem;
    margin-bottom: 2rem;
}

.sar-editorial__inner {
    max-width: 800px;
}

.sar-editorial h3 {
    color: #fff;
    font-size: 1.1rem;
    margin: 0 0 .7rem;
}

.sar-editorial p {
    font-size: .9rem;
    line-height: 1.65;
    margin: 0 0 1rem;
    color: rgba(255,255,255,.78);
}

.sar-editorial__comite {
    font-size: .85rem;
    color: rgba(255,255,255,.65);
    line-height: 1.7;
    margin-bottom: 1.3rem;
}

.sar-editorial__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.sar-editorial .sar-btn--outline {
    border-color: rgba(255,255,255,.5);
    color: rgba(255,255,255,.9) !important;
}
.sar-editorial .sar-btn--outline:hover {
    background: rgba(255,255,255,.12);
    border-color: #fff;
    color: #fff !important;
}

.sar-editorial .sar-btn--ghost {
    border-color: rgba(255,255,255,.25);
    color: rgba(255,255,255,.65) !important;
}
.sar-editorial .sar-btn--ghost:hover {
    border-color: rgba(255,255,255,.6);
    color: #fff !important;
}

/* ── Estado vacío ────────────────────────────────────────────── */
.sar-empty {
    color: #888;
    font-style: italic;
    text-align: center;
    padding: 3rem 0;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 680px) {
    .sar-featured__inner {
        grid-template-columns: 1fr;
    }
    .sar-featured__cover {
        max-width: 200px;
        margin: 0 auto;
    }
    .sar-featured__content {
        text-align: center;
    }
    .sar-featured__actions {
        justify-content: center;
    }
    .sar-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }
    .sar-editorial {
        padding: 1.4rem 1.2rem;
    }
}
