/* Patagonien — estilos de las páginas generadas por web-src (artículos y listados).
   Se carga después de css/main.css y reutiliza sus variables, .btn, .section-label, .section-title, nav y footer. */

.page-generated { background: var(--color-cream); }

/* ── Cabecera del artículo ── */
.article-hero {
    position: relative;
    overflow: hidden;
    background: var(--color-dark);
    color: var(--color-white);
    padding: 8.5rem 2rem 4.5rem;
}
.article-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(196, 162, 101, 0.22), transparent 55%),
        radial-gradient(ellipse at 100% 100%, rgba(46, 64, 87, 0.6), transparent 60%);
    pointer-events: none;
}
/* Foto de fondo a sangre con el texto encima */
.article-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.article-hero.has-bg {
    display: flex;
    align-items: flex-end;
    min-height: clamp(430px, 58vh, 600px);
    padding: 10rem 2rem 3.75rem;
}
.article-hero.has-bg::before {
    background:
        linear-gradient(to top,
            rgba(18, 18, 33, 0.94) 0%,
            rgba(18, 18, 33, 0.86) 26%,
            rgba(18, 18, 33, 0.58) 58%,
            rgba(18, 18, 33, 0.50) 78%,
            rgba(18, 18, 33, 0.72) 100%),
        radial-gradient(ellipse at 12% 100%, rgba(196, 162, 101, 0.20), transparent 62%);
}
.article-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: center;
}
.article-hero.has-bg .article-hero-inner { grid-template-columns: 1fr; }
.article-hero.has-bg .article-hero-text { max-width: 780px; }
.article-hero.has-bg h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45); }
.article-hero.has-bg .article-lead {
    max-width: 620px;
    opacity: 0.92;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.7;
    margin-bottom: 1.5rem;
}
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent); }
.article-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1.12;
    margin-bottom: 1.25rem;
    color: var(--color-white);
}
.article-hero h1 em { font-style: italic; color: var(--color-accent); }
.article-lead {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.85;
    max-width: 540px;
    font-weight: 300;
}
.article-meta {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent-light);
}
.list-hero .article-hero-inner { grid-template-columns: 1fr; text-align: center; }
.list-hero .breadcrumb { justify-content: center; }
.list-hero .article-lead { margin: 0 auto; }

/* ── Cuerpo ── */
.article-body-wrap { padding: 4.5rem 1.5rem; }
.article-body {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--color-text);
}
.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.85rem;
    line-height: 1.25;
    color: var(--color-dark);
    margin: 2.75rem 0 1rem;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
    font-size: 1.15rem;
    color: var(--color-dark);
    margin: 1.75rem 0 0.5rem;
}
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { margin: 0 0 1.5rem 1.4rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-body a {
    color: var(--color-blue);
    text-decoration: underline;
    text-decoration-color: var(--color-accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}
.article-body a:hover { color: var(--color-accent); }
.article-body img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 1.5rem 0 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}
.article-body blockquote {
    margin: 1.75rem 0;
    padding: 1rem 1.5rem;
    background: var(--color-white);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 14px 14px 0;
    font-style: italic;
    color: var(--color-text-light);
}
.article-body blockquote p:last-child { margin-bottom: 0; }

/* Pasos numerados: <ol class="steps"> */
.article-body ol.steps {
    list-style: none;
    margin-left: 0;
    counter-reset: step;
}
.article-body ol.steps > li {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 1.75rem;
    counter-increment: step;
}
.article-body ol.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--color-dark);
    color: var(--color-accent);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-body ol.steps > li strong:first-child {
    display: block;
    color: var(--color-dark);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

/* Caja de tip: <div class="tip"> */
.article-body .tip {
    background: var(--color-white);
    border: 1px solid var(--color-warm);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}
.article-body .tip p:last-child { margin-bottom: 0; }
.article-body .tip strong { color: var(--color-dark); }

/* ── CTA ── */
.article-cta {
    background: var(--color-white);
    padding: 4.5rem 1.5rem;
    text-align: center;
}
.article-cta-inner { max-width: 640px; margin: 0 auto; }
.article-cta .section-desc { margin: 0 auto; }
.article-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* ── Relacionados / listado ── */
.article-related { padding: 4.5rem 1.5rem; }
.article-related-inner { max-width: 1100px; margin: 0 auto; }
.article-related .section-title { text-align: center; margin-bottom: 2.5rem; }
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.1);
}
.article-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}
.article-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex: 1; }
.article-card-body .section-label { margin-bottom: 0.5rem; }
.article-card h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    line-height: 1.25;
    color: var(--color-dark);
    margin-bottom: 0.6rem;
}
.article-card p { color: var(--color-text-light); font-size: 0.95rem; line-height: 1.6; flex: 1; }
.article-card-meta {
    margin-top: 1.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .article-hero { padding: 6.5rem 1.5rem 3rem; }
    .article-hero-inner { grid-template-columns: 1fr; gap: 2rem; }
    .article-hero.has-bg {
        min-height: clamp(360px, 68vh, 480px);
        padding: 7.5rem 1.5rem 2.5rem;
    }
}
@media (max-width: 600px) {
    .article-body-wrap { padding: 3rem 1.25rem; }
    .article-body { font-size: 1rem; }
    .article-body h2 { font-size: 1.55rem; }
    .article-body ol.steps > li { padding-left: 3rem; }
    .article-body ol.steps > li::before { width: 2.1rem; height: 2.1rem; font-size: 0.95rem; }
}

/* Tablas dentro del artículo (comparativas) */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0 2rem;
    font-size: 0.95rem;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
.article-body th, .article-body td {
    padding: 0.7rem 0.9rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--color-warm);
}
.article-body th {
    background: var(--color-dark);
    color: var(--color-accent);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body td:first-child { font-weight: 600; color: var(--color-dark); }
@media (max-width: 600px) {
    .article-body table { display: block; overflow-x: auto; }
}

/* ══ Bloques visuales dentro de los artículos ══ */

/* Figura con foto o video en loop */
.article-body figure { margin: 2rem 0 2.25rem; }
.article-body figure img,
.article-body figure video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 0;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
    background: var(--color-dark);
}
.article-body figcaption {
    margin-top: 0.7rem;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: var(--color-text-light);
    text-align: center;
}
.article-body figure.loop { position: relative; }
.article-body figure.loop::after {
    content: '';
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 4px rgba(196, 162, 101, 0.3);
    opacity: 0;
    transition: opacity 0.4s;
}
.article-body figure.loop.playing::after { opacity: 1; }

/* Dos clips o fotos lado a lado */
.article-body .loop-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0 2.25rem;
}
.article-body .loop-row figure { margin: 0; }
.article-body .loop-row figure video,
.article-body .loop-row figure img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Galería de fotos */
.article-body .photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0 2.25rem;
}
.article-body .photos.photos-3 { grid-template-columns: repeat(3, 1fr); }
.article-body .photos figure { margin: 0; }
.article-body .photos img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 14px; }
.article-body .photos figcaption { font-size: 0.78rem; margin-top: 0.5rem; }
.article-body .photos.photos-3 figcaption { font-weight: 600; color: var(--color-dark); letter-spacing: 0.02em; }

/* Tarjetas (equivalencias, variedades, comparativas) */
.article-body .cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.9rem;
    margin: 1.75rem 0 2.25rem;
}
.article-body .card {
    background: var(--color-white);
    border: 1px solid var(--color-warm);
    border-radius: 14px;
    padding: 1.1rem 1.15rem 1rem;
    line-height: 1.5;
}
.article-body .card-icon { font-size: 1.6rem; display: block; margin-bottom: 0.4rem; }
.article-body .card h4 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--color-dark);
    margin: 0 0 0.3rem;
}
.article-body .card p { margin: 0; font-size: 0.92rem; color: var(--color-text-light); }
.article-body .card .arrow { color: var(--color-accent); font-weight: 600; }
.article-body .card.card-dark { background: var(--color-dark); border-color: var(--color-dark); }
.article-body .card.card-dark h4 { color: var(--color-accent); }
.article-body .card.card-dark p { color: rgba(255, 255, 255, 0.85); }

/* Cifras */
.article-body .stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin: 1.75rem 0 2.25rem;
    padding: 1.25rem 1rem;
    background: var(--color-dark);
    border-radius: 16px;
    text-align: center;
}
.article-body .stats strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--color-accent);
    line-height: 1.1;
}
.article-body .stats span {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 600px) {
    .article-body .photos.photos-3 { grid-template-columns: repeat(2, 1fr); }
    .article-body .loop-row { grid-template-columns: 1fr; }
    .article-body .stats { grid-template-columns: 1fr 1fr; }
    .article-body .stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.article-body figure.narrow { max-width: 420px; margin-left: auto; margin-right: auto; }
/* 4 tarjetas: 2×2 en vez de 3+1 */
.article-body .cards:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 480px) { .article-body .cards { grid-template-columns: 1fr !important; } }
