/* ══════════════════════════════════════════════════
   AGUA — Revista de higiene y bienestar de Horus Perú
   Hereda el sistema visual del sitio principal.
   ══════════════════════════════════════════════════ */

:root {
    --bone: #F7F2EA;
    --bone-2: #EFE7DA;
    --ink: #21302C;
    --muted: #5C6B66;
    --agua: #2F6F73;
    --agua-deep: #1D4C50;
    --mist: #E6F0EE;
    --bamboo: #C08A3E;
    --bamboo-deep: #96682B;
    --terra: #D95B2B;
    --wa: #25D366;
    --line: #E2D8C8;
    --white: #FFFFFF;
    --shadow-soft: 0 24px 60px -24px rgba(33, 48, 44, 0.28);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Instrument Sans', sans-serif;
    background: var(--bone);
    color: var(--ink);
    line-height: 1.7;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none; z-index: 9999;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.028'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', serif;
    font-optical-sizing: auto;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.015em;
}
em { font-style: italic; font-weight: 500; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 22px; }

.overline {
    font-size: 0.72rem; font-weight: 700;
    letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--agua);
    display: flex; align-items: center; gap: 12px;
}
.overline::before { content: ""; width: 34px; height: 1px; background: var(--bamboo); }

/* ── Cabecera de la revista ── */
.masthead {
    background: rgba(247, 242, 234, 0.94);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 100;
}
.masthead-inner {
    max-width: 1120px; margin: 0 auto; padding: 0 22px;
    height: 62px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.mh-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.mh-brand img { height: 32px; width: auto; }
.mh-title {
    font-family: 'Fraunces', serif; font-weight: 600;
    font-size: 1.24rem; letter-spacing: 0.02em;
}
.mh-title span { color: var(--agua); }
.mh-by {
    font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--muted);
    display: block; margin-top: -3px;
}
.mh-nav { display: none; gap: 24px; }
.mh-nav a { text-decoration: none; font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.mh-nav a:hover { color: var(--ink); }
.mh-cta {
    background: var(--ink); color: var(--bone); text-decoration: none;
    padding: 9px 18px; border-radius: 100px;
    font-size: 0.8rem; font-weight: 700; white-space: nowrap;
    transition: background 0.25s;
}
.mh-cta:hover { background: var(--agua-deep); }
@media (min-width: 860px) { .mh-nav { display: flex; } }

/* ── Portada ── */
.cover { padding: 60px 0 40px; }
.cover h1 {
    font-size: clamp(2.4rem, 5.6vw, 4rem);
    margin: 18px 0 18px; max-width: 15ch;
}
.cover h1 em { color: var(--agua); }
.cover-lead {
    font-size: 1.1rem; color: var(--muted); max-width: 560px;
}

/* ── Artículo destacado ── */
.featured {
    display: grid; gap: 30px; align-items: center;
    background: var(--white); border: 1px solid var(--line);
    border-radius: 28px; overflow: hidden;
    box-shadow: var(--shadow-soft);
    margin: 44px 0 60px;
    text-decoration: none;
    transition: transform 0.3s;
}
.featured:hover { transform: translateY(-3px); }
@media (min-width: 860px) { .featured { grid-template-columns: 1fr 1fr; gap: 0; } }
.featured-img { background: var(--mist); aspect-ratio: 16/11; overflow: hidden; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 34px 32px; }
.featured-body .kicker {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--terra);
}
.featured-body h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 12px 0 12px; }
.featured-body p { font-size: 0.96rem; color: var(--muted); }
.featured-body .meta { font-size: 0.78rem; color: var(--muted); margin-top: 18px; }

/* ── Clusters ── */
.clusters { padding: 20px 0 40px; }
.cluster-grid { display: grid; gap: 16px; margin-top: 32px; }
@media (min-width: 700px) { .cluster-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cluster-grid { grid-template-columns: repeat(4, 1fr); } }
.cluster {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 20px; padding: 26px 24px;
    text-decoration: none; display: block;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.cluster:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); border-color: var(--bamboo); }
.cluster .ic {
    width: 40px; height: 40px; border-radius: 12px;
    background: var(--mist);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}
.cluster .ic svg { width: 20px; height: 20px; color: var(--agua-deep); }
.cluster h3 { font-size: 1.08rem; margin-bottom: 6px; }
.cluster p { font-size: 0.85rem; color: var(--muted); line-height: 1.55; }
.cluster .count {
    font-size: 0.72rem; font-weight: 700; color: var(--bamboo);
    margin-top: 12px; display: block;
}

/* ── Lista de artículos ── */
.section-title {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    padding-bottom: 16px; border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
}
.section-title h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-title span { font-size: 0.82rem; color: var(--muted); }

.post-list { display: grid; }
.post-row {
    display: grid; gap: 6px 26px; align-items: baseline;
    padding: 26px 4px; border-bottom: 1px solid var(--line);
    text-decoration: none;
    transition: padding 0.3s;
}
@media (min-width: 760px) { .post-row { grid-template-columns: 130px 1fr auto; } }
.post-row:hover { padding-left: 14px; }
.post-row .p-cat {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--bamboo);
}
.post-row h3 { font-size: 1.22rem; margin-bottom: 5px; }
.post-row p { font-size: 0.9rem; color: var(--muted); }
.post-row .p-date { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

/* ── Artículo ── */
article { padding: 46px 0 20px; }
.art-head { margin-bottom: 36px; }
.art-cat {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--bamboo);
}
.art-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin: 14px 0 18px; }
.art-standfirst {
    font-family: 'Fraunces', serif; font-size: 1.18rem; font-weight: 400;
    line-height: 1.55; color: var(--muted);
    padding-left: 18px; border-left: 2px solid var(--bamboo);
}
.art-meta {
    display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
    font-size: 0.8rem; color: var(--muted);
    margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line);
}
.art-meta .author { font-weight: 600; color: var(--ink); }

.art-hero {
    border-radius: 24px; overflow: hidden; border: 1px solid var(--line);
    margin: 0 0 40px; background: var(--mist);
}
.art-hero img { width: 100%; height: auto; }

.art-body > * { margin-bottom: 22px; }
.art-body h2 {
    font-size: clamp(1.45rem, 3vw, 1.95rem);
    margin: 44px 0 14px; padding-top: 4px;
}
.art-body h3 { font-size: 1.2rem; margin: 30px 0 10px; }
.art-body p { font-size: 1.04rem; }
.art-body a { color: var(--agua); font-weight: 600; }
.art-body ul, .art-body ol { padding-left: 22px; }
.art-body li { margin-bottom: 9px; font-size: 1.02rem; }
.art-body strong { font-weight: 600; color: var(--ink); }

/* Respuesta directa — bloque extraíble para buscadores de IA */
.answer-box {
    background: var(--mist); border: 1px solid #D2E2DF;
    border-left: 3px solid var(--agua);
    border-radius: 14px; padding: 22px 24px;
    margin: 26px 0;
}
.answer-box .ab-label {
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--agua-deep); margin-bottom: 8px;
}
.answer-box p { font-size: 1.02rem; color: var(--ink); margin: 0; }

.data-box {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 16px; padding: 24px 26px; margin: 30px 0;
}
.data-box .db-label {
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--bamboo); margin-bottom: 12px;
}
.data-box table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
.data-box th, .data-box td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.data-box th { font-weight: 700; font-size: 0.82rem; color: var(--muted); }
.data-box tr:last-child td { border-bottom: 0; }
.data-box .win { color: var(--agua-deep); font-weight: 600; }
.data-box .lose { color: var(--terra); }
.data-source { font-size: 0.76rem; color: var(--muted); margin-top: 12px; }

blockquote {
    font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 500;
    line-height: 1.45; color: var(--ink);
    padding: 6px 0 6px 24px; border-left: 3px solid var(--bamboo);
    margin: 32px 0;
}

/* Tabla de contenidos */
.toc {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 16px; padding: 22px 24px; margin: 0 0 36px;
}
.toc h4 {
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
    font-family: 'Instrument Sans', sans-serif;
}
.toc ol { padding-left: 18px; }
.toc li { margin-bottom: 6px; font-size: 0.92rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--agua); text-decoration: underline; }

/* CTA de producto dentro del artículo */
.art-cta {
    background: var(--ink); color: var(--bone);
    border-radius: 24px; padding: 36px 34px;
    margin: 48px 0 20px;
    position: relative; overflow: hidden;
}
.art-cta::before {
    content: ""; position: absolute; inset: -45%;
    background: radial-gradient(circle at 72% 18%, rgba(47,111,115,0.55), transparent 55%),
                radial-gradient(circle at 18% 88%, rgba(192,138,62,0.32), transparent 50%);
    pointer-events: none;
}
.art-cta > * { position: relative; z-index: 1; }
.art-cta .tag {
    display: inline-block; background: var(--terra); color: #fff;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; padding: 6px 14px; border-radius: 100px;
    margin-bottom: 14px;
}
.art-cta h3 { font-size: 1.6rem; margin-bottom: 10px; }
.art-cta h3 em { color: #A7CDC8; }
.art-cta p { font-size: 0.95rem; color: #B9C6C1; margin-bottom: 22px; max-width: 460px; }
.art-cta .btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    text-decoration: none; border: 0; border-radius: 100px;
    font-size: 0.95rem; font-weight: 700; padding: 15px 28px;
    transition: transform 0.25s, background 0.25s;
    min-height: 50px; cursor: pointer;
    font-family: 'Instrument Sans', sans-serif;
}
.btn-light { background: var(--bone); color: var(--ink); }
.btn-light:hover { background: #fff; transform: translateY(-2px); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #17a74e; transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: var(--bone); }
.btn-dark:hover { background: var(--agua-deep); transform: translateY(-2px); }

/* Relacionados */
.related { padding: 40px 0 0; border-top: 1px solid var(--line); margin-top: 40px; }
.related h3 { font-size: 1.3rem; margin-bottom: 22px; }
.rel-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .rel-grid { grid-template-columns: repeat(3, 1fr); } }
.rel-card {
    background: var(--white); border: 1px solid var(--line);
    border-radius: 16px; padding: 22px 20px; text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}
.rel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.rel-card .r-cat { font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bamboo); }
.rel-card h4 { font-size: 1rem; margin: 8px 0 6px; }
.rel-card p { font-size: 0.82rem; color: var(--muted); }

/* Footer */
footer {
    border-top: 1px solid var(--line);
    padding: 44px 0 40px; margin-top: 66px;
}
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 800px) { .foot-grid { grid-template-columns: 1.5fr 1fr 1fr; } }
.foot-brand p { font-size: 0.86rem; color: var(--muted); max-width: 320px; margin-top: 12px; }
.foot-col h4 {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--muted); margin-bottom: 12px;
    font-family: 'Instrument Sans', sans-serif;
}
.foot-col a { display: block; text-decoration: none; font-size: 0.88rem; color: var(--ink); padding: 5px 0; }
.foot-col a:hover { color: var(--agua); }
.foot-bottom {
    margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--line);
    font-size: 0.76rem; color: var(--muted);
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

:focus-visible { outline: 2px solid var(--agua); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
