/* NUVA — Artículos del blog (diseño según mockup Do's y Dont's) */

body.article-page {
    background: var(--paper);
}

/* El header de la landing es fixed: reservamos su altura */
/* Altura unificada para TODAS las imágenes destacadas de artículos */
.article-cover {
    width: 100%;
    height: clamp(380px, 48vw, 580px);
    object-fit: cover;
    display: block;
}

.article-wrap {
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.4rem 4.5rem;
}

/* Etiqueta de categoría (GUÍAS) */
.article-kicker {
    display: inline-block;
    margin: 0 0 1.2rem;
    padding: 0.28rem 0.85rem;
    background: var(--accent, #5143dc);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 999px;
}

.article-title {
    margin: 0 0 1.6rem;
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.06;
    text-transform: uppercase;
    color: var(--ink, #262b27);
}

.article-body {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink, #262b27);
    letter-spacing: -0.01em;
}

.article-body p {
    margin: 0 0 1.1rem;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1.1rem;
    padding-left: 1.4rem;
}

.article-body li {
    margin-bottom: 0.35rem;
    line-height: 1.6;
    white-space: normal !important; /* override Google Docs paste white-space:pre */
}

/* Google Docs paste wraps <li> content in <p> with inline margin/style */
.article-body li > p {
    margin: 0 !important;
    display: inline !important;
    white-space: normal !important;
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
}

/* Bandas de sección: LO QUE SÍ FUNCIONA / LO QUE DEBES EVITAR */
.article-body h2 {
    margin: 2.2rem 0 1.2rem;
    padding: 0.4rem 1rem;
    background: #e6e9e7;
    font-size: clamp(0.78rem, 1.4vw, 0.92rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

/* Encabezados planos grandes: LA CLAVE */
.article-body h3 {
    margin: 2.6rem 0 1rem;
    font-size: clamp(1.6rem, 3.4vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    text-transform: uppercase;
    line-height: 1.1;
}

.article-body img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0.4rem 0 1.2rem;
    border-radius: 6px;
}

.article-body a {
    color: #5143dc;
}

.article-back {
    display: inline-block;
    margin-top: 2rem;
    font-weight: 600;
    color: #5143dc;
    text-decoration: none;
}
.article-back:hover { color: #4033c4; }

/* ─── Archive del blog ─────────────────────────────────────────────── */

/* Degradado morado tras el header fijo, fundido a blanco */
.archive-hero {
    background: #ffffff;
    padding: 10rem 1.4rem 6rem;
    position: relative;
    overflow: hidden;
}

.archive-hero__gradient {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    filter: saturate(1.08);
    pointer-events: none;
    z-index: 0;
    /* desvanece hacia los bordes laterales y especialmente el inferior
       para que el efecto se funda orgánicamente con el blanco de abajo */
    -webkit-mask-image:
        radial-gradient(ellipse 110% 88% at 50% 30%, black 0%, black 42%, transparent 76%);
    mask-image:
        radial-gradient(ellipse 110% 88% at 50% 30%, black 0%, black 42%, transparent 76%);
}

.archive-hero .archive-carousel {
    position: relative;
    z-index: 1;
}
.archive-hero .archive-hero__empty {
    position: relative;
    z-index: 1;
}

.archive-carousel {
    position: relative;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.archive-slides { position: relative; }

.archive-slide {
    display: none;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.2rem;
    align-items: center;
}
.archive-slide.is-active {
    display: grid;
    animation: slideReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideReveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .archive-slide.is-active { animation: none; }
}

.archive-slide__media img {
    width: 100%;
    height: clamp(280px, 34vw, 450px);
    object-fit: cover;
    display: block;
}

.archive-slide__body h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    text-transform: uppercase;
}
.archive-slide__body h2 a { color: var(--ink, #262b27); text-decoration: none; }
.archive-slide__body p { margin: 0 0 1rem; line-height: 1.6; }

.archive-more {
    font-weight: 600;
    color: var(--ink, #262b27);
    text-decoration: none;
}
.archive-more:hover { color: #5143dc; }

.archive-nav {
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--ink, #262b27);
    cursor: pointer;
}
.archive-nav:hover { background: rgba(255, 255, 255, 0.35); }
.archive-nav svg { width: 1.6rem; fill: none; stroke: currentColor; stroke-width: 2.4; }

/* Blogs recientes */
.archive-recent {
    max-width: 1080px;
    margin: 0 auto;
    padding: 3.5rem 1.4rem 5rem;
}

.archive-recent h1 {
    margin: 0 0 2.4rem;
    text-align: center;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    text-transform: uppercase;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.4rem;
}

.archive-card__media {
    overflow: hidden;
}

.archive-card__media img {
    width: 100%;
    height: 215px;
    object-fit: cover;
    display: block;
    transition: transform 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
    .archive-card:hover .archive-card__media img {
        transform: scale(1.04);
    }
}

.archive-card h2 {
    margin: 1rem 0 0.2rem;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}
.archive-card h2 a { color: var(--ink, #262b27); text-decoration: none; }
.archive-card h2 a:hover { color: #5143dc; }

.archive-card__meta {
    margin: 0 0 0.8rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink, #262b27);
}

.archive-card__excerpt {
    margin: 0 0 0.9rem;
    font-size: 0.95rem;
    line-height: 1.55;
}

.archive-load-more { text-align: center; margin-top: 3rem; }

.archive-load-btn {
    display: inline-block;
    background: #5143dc;
    color: #fff;
    text-decoration: none;
    font-size: 1.15rem;
    padding: 0.55rem 2.4rem;
    border-radius: 999px;
}
.archive-load-btn:hover { background: #4033c4; }

.archive-hero__empty, .archive-empty { text-align: center; padding: 2rem 0; }

@media (max-width: 860px) {
    .archive-slide { grid-template-columns: 1fr; gap: 1.2rem; }
    .archive-grid { grid-template-columns: 1fr; gap: 2rem; }
    .archive-hero { padding-top: 5.5rem; }
}

/* Footer mínimo, mismo tono legal de la landing */
.article-footer {
    border-top: 1px solid #e7e5f2;
    padding: 1.6rem 1.4rem 2rem;
    text-align: center;
    color: #5c615d;
    font-size: 0.85rem;
}
.article-footer a { color: #5143dc; text-decoration: none; }

@media (max-width: 820px) {
    .article-wrap { padding-top: 2.2rem; }
}

/* Evita FOUC: el body arranca en opacity:0 (inline en <head>) y se hace
   visible cuando este CSS —el último— termina de cargar. */
body {
    opacity: 1;
    transition: opacity 0.2s ease;
}
@media (prefers-reduced-motion: reduce) {
    body { transition: none; }
}
