/* Hogar Crea Manizales · estilos de la página. Colores en tokens.css. Móvil primero. */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--color-ink);
    background: var(--color-bg);
    padding-bottom: 76px; /* espacio para la barra "Hablar ahora" del celular */
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--color-red); text-underline-offset: 3px; }
a:hover { color: var(--color-red-dark); }

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 800; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 8px; top: -60px; z-index: 100;
    background: var(--color-ink); color: var(--color-on-dark); padding: 10px 16px; border-radius: var(--radius-small);
}
.skip-link:focus { top: 8px; }

.icon { flex: none; }

/* Botones */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
    font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.btn--primary { background: var(--color-red); color: var(--color-on-dark); }
.btn--primary:hover { background: var(--color-red-dark); color: var(--color-on-dark); }
.btn--whatsapp { background: var(--color-green); color: var(--color-on-dark); }
.btn--whatsapp:hover { background: var(--color-green-dark); color: var(--color-on-dark); }
.btn--ghost { border-color: var(--color-ink); color: var(--color-ink); background: transparent; }
.btn--ghost:hover { background: var(--color-ink); color: var(--color-on-dark); }
.btn--outline { border-color: var(--color-red); color: var(--color-red); background: transparent; }
.btn--outline:hover { background: var(--color-red); color: var(--color-on-dark); }
.btn--light { background: var(--color-surface); color: var(--color-ink); border-color: var(--color-line); }
.btn--light:hover { background: var(--color-yellow-soft); color: var(--color-ink); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0 0.75rem; }

/* Borrador y notas */
.draft-banner {
    background: repeating-linear-gradient(-45deg, var(--color-yellow), var(--color-yellow) 14px, #ffe066 14px, #ffe066 28px);
    color: var(--color-ink); padding: 10px var(--gutter); font-size: 0.95rem; text-align: center;
}
.pending {
    background: var(--color-pending-bg); border: 2px dashed var(--color-pending-line); border-radius: var(--radius-small);
    padding: 10px 14px; margin: 0 0 1.25rem; font-size: 0.95rem; color: var(--color-ink);
}
.section--empty { padding: 2rem 0; background: var(--color-tint); border-top: 1px dashed var(--color-pending-line); }
.empty-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-muted); margin-bottom: 0.5rem; }
.tag {
    display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
    background: var(--color-pending-bg); border: 1px solid var(--color-pending-line); font-size: 0.8rem; font-weight: 600;
}
.photo-slot {
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
    aspect-ratio: 4 / 3; border-radius: var(--radius); border: 2px dashed var(--color-pending-line);
    background: repeating-linear-gradient(45deg, var(--color-tint), var(--color-tint) 12px, var(--color-bg) 12px, var(--color-bg) 24px);
    color: var(--color-muted); font-weight: 600;
}

/* Aviso de crisis */
.crisis { background: var(--color-ink); color: var(--color-on-dark); font-size: 0.9rem; }
.crisis__inner { display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 8px; padding-bottom: 8px; }
.crisis a { color: var(--color-on-dark); font-weight: 700; }
.crisis a:hover { color: var(--color-yellow); }

/* Encabezado */
.site-header {
    position: sticky; top: 0; z-index: 50; background: rgba(255, 253, 248, 0.97);
    border-bottom: 1px solid var(--color-line);
}
.site-header__inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--color-ink); text-decoration: none; margin-right: auto; }
.brand__logo { width: 48px; height: 48px; border-radius: 50%; }
.brand__name { font-weight: 800; font-size: 1.05rem; line-height: 1.1; max-width: 9em; }

.nav-desktop, .site-header__help { display: none; }
.nav-desktop ul, .nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-desktop ul { display: flex; gap: 2px; }
.nav-desktop a, .nav-mobile a {
    display: block; padding: 8px 10px; border-radius: var(--radius-small);
    color: var(--color-ink); text-decoration: none; font-weight: 600;
}
.nav-desktop a:hover, .nav-mobile a:hover { background: var(--color-tint); color: var(--color-ink); }
.nav-desktop a[aria-current="page"], .nav-mobile a[aria-current="page"] { color: var(--color-red); box-shadow: inset 0 -3px 0 var(--color-yellow); }

.nav-mobile summary {
    display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; cursor: pointer;
    list-style: none; border: 1px solid var(--color-line); border-radius: 999px; font-weight: 700; background: var(--color-surface);
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--color-surface); border-bottom: 1px solid var(--color-line); box-shadow: var(--shadow);
    padding: 8px var(--gutter) 16px;
}

/* Barra fija "Hablar ahora" (celular) */
.help-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: flex; gap: 10px; padding: 10px var(--gutter);
    background: rgba(255, 253, 248, 0.98); border-top: 1px solid var(--color-line);
}
.help-bar .btn { flex: 1; }

/* Portada */
.hero {
    background:
        radial-gradient(circle at 92% 8%, var(--color-yellow-soft) 0, var(--color-yellow-soft) 22%, transparent 22.2%),
        linear-gradient(180deg, var(--color-tint), var(--color-bg));
    padding: 2.5rem 0 3rem;
}
.hero__inner { display: grid; gap: 2rem; align-items: center; }
.hero__title { color: var(--color-ink); }
.hero__title::after {
    content: ""; display: block; width: 72px; height: 6px; margin-top: 16px; border-radius: 3px;
    background: linear-gradient(90deg, var(--color-red) 0 50%, var(--color-yellow) 50% 100%);
}
.hero__note { color: var(--color-muted); font-size: 0.95rem; }
.hero__image { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 860px) {
    .hero { padding: 4rem 0 4.5rem; }
    .hero__inner { grid-template-columns: 1.15fr 1fr; }
    .hero__inner--solo { grid-template-columns: minmax(0, 760px); }
}

.kicker { color: var(--color-red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.85rem; margin-bottom: 0.75rem; }
.lead { font-size: 1.15rem; color: var(--color-muted); max-width: 46rem; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 1rem 0 0; }
.chips li {
    padding: 6px 12px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--color-line);
    font-size: 0.9rem; font-weight: 600;
}
.chips li::before { content: "✓ "; color: var(--color-green); }

/* Encabezado de página */
.page-head { padding: 2.5rem 0 1.5rem; background: linear-gradient(180deg, var(--color-tint), var(--color-bg)); }
.page-head h1::after {
    content: ""; display: block; width: 56px; height: 5px; margin-top: 14px; border-radius: 3px;
    background: linear-gradient(90deg, var(--color-red) 0 50%, var(--color-yellow) 50% 100%);
}
.not-found-links { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-left: 1.2em; }

/* Secciones */
section[id] { scroll-margin-top: 84px; }
.section { padding: 2.75rem 0; }
.section--tint { background: var(--color-tint); }
.section-title { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
.section-intro { color: var(--color-muted); max-width: 46rem; }

.split { display: grid; gap: 1.75rem; align-items: start; }
.split__text { max-width: 46rem; }
.block-image { width: 100%; border-radius: var(--radius); }
@media (min-width: 860px) {
    .split { grid-template-columns: 1.1fr 1fr; gap: 3rem; }
    .split--solo { grid-template-columns: minmax(0, 46rem); }
}

.points { padding-left: 1.2em; margin: 0 0 1em; }
.points li { margin-bottom: 0.35em; }
.points--check { list-style: none; padding-left: 0; }
.points--check li { position: relative; padding-left: 1.6em; }
.points--check li::before { content: "✓"; position: absolute; left: 0; color: var(--color-green); font-weight: 800; }

/* Caminos */
.paths { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 14px; }
@media (min-width: 640px) { .paths { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .paths { grid-template-columns: repeat(4, 1fr); } }
.path__link {
    display: flex; flex-direction: column; height: 100%; padding: 22px; border-radius: var(--radius);
    background: var(--color-surface); box-shadow: var(--shadow); color: var(--color-ink); text-decoration: none;
    border-top: 6px solid var(--color-red);
}
.path:nth-child(4n + 2) .path__link { border-top-color: var(--color-yellow); }
.path:nth-child(4n + 3) .path__link { border-top-color: var(--color-green); }
.path:nth-child(4n + 4) .path__link { border-top-color: var(--color-ink); }
.path__link:hover { color: var(--color-ink); transform: translateY(-2px); }
.path__title { font-size: 1.2rem; font-weight: 800; margin-bottom: 0.5rem; }
.path__text { color: var(--color-muted); }
.path__more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--color-red); font-weight: 700; }

/* Tarjetas */
.cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card {
    display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius);
    background: var(--color-surface); box-shadow: var(--shadow);
}
.card__image { width: calc(100% + 44px); max-width: none; margin: -22px -22px 18px; border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 4 / 3; object-fit: cover; }
.card__image.photo-slot { border-width: 0 0 2px; }
.card__title { font-size: 1.15rem; font-weight: 800; }
.card__text { color: var(--color-muted); }
.card__action { margin-top: auto; align-self: flex-start; }

/* Pasos */
.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 4px; max-width: 52rem; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 16px; position: relative; padding-bottom: 18px; }
.step:not(:last-child)::before {
    content: ""; position: absolute; left: 27px; top: 56px; bottom: 0; width: 2px; background: var(--color-line);
}
.step__mark {
    width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: var(--color-red); color: var(--color-on-dark); font-weight: 800; font-size: 1.2rem;
}
.step__mark--label { background: var(--color-yellow); color: var(--color-ink); font-size: 0.95rem; }
.step__title { font-size: 1.15rem; font-weight: 800; margin: 0.6rem 0 0.35rem; }
.step__text { color: var(--color-muted); }

/* Cifras */
.stats { display: grid; gap: 16px; margin: 1.25rem 0 0; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 860px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column-reverse; padding: 18px; border-radius: var(--radius); background: var(--color-surface); }
.stat__value { margin: 0; font-size: clamp(2rem, 6vw, 2.75rem); font-weight: 800; color: var(--color-red); line-height: 1.1; }
.stat__label { color: var(--color-muted); font-weight: 600; }

/* Preguntas */
.faq { display: grid; gap: 10px; margin-top: 1.25rem; }
.faq__item { background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-small); }
.faq__item summary {
    cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
    content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
    font-size: 1.5rem; font-weight: 400; color: var(--color-red);
}
.faq__item[open] summary::after { content: "−"; }
.faq__answer { padding: 0 18px 6px; color: var(--color-muted); }

/* Llamado a escribir */
.cta { background: var(--color-red); color: var(--color-on-dark); padding: 2.5rem 0; }
.cta__inner { display: grid; gap: 1.25rem; align-items: center; }
.cta__title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; }
.cta__text { opacity: 0.95; margin: 0; }
.cta .pending { color: var(--color-ink); }
@media (min-width: 860px) {
    .cta__inner { grid-template-columns: 1fr auto; }
    .cta__inner .pending { grid-column: 1 / -1; }
}

/* Contacto */
.contact-grid { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.contact-item { display: flex; gap: 14px; padding: 20px; background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-item .icon { color: var(--color-red); margin-top: 3px; }
.contact-item p { margin: 0 0 0.25em; overflow-wrap: anywhere; }
.contact-item__label { font-weight: 800; }
.link-arrow { font-weight: 700; }

/* Testimonios */
.quotes { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.quote { margin: 0; padding: 24px; background: var(--color-surface); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 6px solid var(--color-yellow); }
.quote blockquote { margin: 0 0 1rem; font-size: 1.1rem; }
.quote figcaption { display: flex; flex-direction: column; }
.quote__name { font-weight: 800; }
.quote__role { color: var(--color-muted); font-size: 0.95rem; }

/* Documentos */
.documents { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 10px; }
.document { display: flex; gap: 12px; padding: 16px 18px; background: var(--color-surface); border: 1px solid var(--color-line); border-radius: var(--radius-small); }
.document .icon { color: var(--color-red); margin-top: 3px; }
.document__title { font-weight: 700; margin: 0; }
.document__text { color: var(--color-muted); margin: 0.25rem 0 0; }

/* Noticias */
.news-card__date { color: var(--color-muted); font-size: 0.9rem; font-weight: 600; margin: 0 0 0.35rem; }
.news-card .card__title a { color: var(--color-ink); text-decoration: none; }
.news-card .card__title a:hover { color: var(--color-red); text-decoration: underline; }
.news-more { margin-top: 1.25rem; }
.article__image { width: 100%; border-radius: var(--radius); margin-bottom: 1.5rem; }
.breadcrumb { font-size: 0.95rem; margin-bottom: 0.5rem; }

/* Pie */
.site-footer { background: var(--color-ink); color: rgba(255, 255, 255, 0.85); padding: 2.75rem 0 2rem; font-size: 0.95rem; }
.site-footer a { color: var(--color-on-dark); }
.site-footer a:hover { color: var(--color-yellow); }
.site-footer__grid { display: grid; gap: 2rem; }
@media (min-width: 860px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer__name { color: var(--color-on-dark); font-weight: 800; font-size: 1.15rem; margin-bottom: 0.25rem; }
.site-footer__title { color: var(--color-on-dark); font-weight: 800; margin-bottom: 0.5rem; }
.site-footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; overflow-wrap: anywhere; }
.site-footer__legal { color: rgba(255, 255, 255, 0.75); }
.site-footer__supersalud { margin-top: 1rem; background: var(--color-surface); border-radius: var(--radius-small); padding: 6px; width: 175px; height: auto; }

/* Pantallas medianas y anchas: menú completo y botón en el encabezado; sin
   barra inferior. Hasta 1400 px el menú va en una segunda fila (logo y botón
   arriba); desde 1400 px, todo en una sola fila. Va al final para ganarle a
   las reglas de celular de arriba. */
@media (min-width: 1000px) {
    body { padding-bottom: 0; }
    .nav-desktop, .site-header__help { display: block; }
    .nav-mobile, .help-bar { display: none; }
    .site-header__inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 4px; }
    .nav-desktop { order: 3; flex-basis: 100%; }
    .nav-desktop ul { flex-wrap: wrap; justify-content: center; }
    .nav-desktop a { padding: 8px 9px; white-space: nowrap; }
    .site-header__help .btn { white-space: nowrap; }
    section[id] { scroll-margin-top: 130px; }
}
@media (min-width: 1400px) {
    .site-header .container { max-width: 1320px; }
    .site-header__inner { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
    .nav-desktop { order: 0; flex-basis: auto; }
    .nav-desktop ul { flex-wrap: nowrap; }
    section[id] { scroll-margin-top: 84px; }
}

/* Historias y voces reales */
.story-card__who { color: var(--color-red); font-weight: 700; font-size: 0.95rem; margin: -0.25rem 0 0.5rem; }
.story-card .card__title a { color: var(--color-ink); text-decoration: none; }
.story-card .card__title a:hover { color: var(--color-red); text-decoration: underline; }
.story-body p:first-child::first-letter { font-size: 2.6em; font-weight: 800; float: left; line-height: 0.9; margin: 0.08em 0.1em 0 0; color: var(--color-red); }
.story-cta { margin: 2rem 0; padding: 22px; border-radius: var(--radius); background: var(--color-yellow-soft); border-left: 6px solid var(--color-yellow); }
.story-cta__title { font-weight: 800; font-size: 1.2rem; margin-bottom: 0.25rem; }
.video { width: calc(100% + 44px); max-width: none; margin: -22px -22px 16px; border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 9 / 16; background: var(--color-ink); object-fit: cover; }
.transcript summary { cursor: pointer; font-weight: 700; color: var(--color-red); }
.transcript p { color: var(--color-muted); }
.quote--photo { display: grid; grid-template-columns: 64px 1fr; gap: 4px 16px; }
.quote--photo blockquote, .quote--photo figcaption { grid-column: 2; }
.quote__photo { grid-row: span 2; width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.site-footer__admin { margin-top: 6px; font-size: 0.9rem; }
.site-footer__admin a { color: rgba(255, 255, 255, 0.75); }

/* Carrusel de fotos: la clase del espacio (hero__image, card__image…) va en la caja. */
.slideshow { position: relative; overflow: hidden; aspect-ratio: 4 / 3; }
.slideshow__slide { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: 0; transition: opacity 0.7s ease; }
.slideshow__slide.is-active { opacity: 1; }
.slideshow__controls { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 2px; padding: 2px 6px; border-radius: 999px; background: var(--color-overlay); }
.slideshow__pause, .slideshow__dot { min-width: 28px; min-height: 28px; border: 0; background: none; color: var(--color-on-dark); cursor: pointer; padding: 0; font-size: 0.75rem; }
.slideshow__dot::before { content: ""; display: block; width: 10px; height: 10px; margin: auto; border-radius: 50%; border: 2px solid var(--color-on-dark); }
.slideshow__dot[aria-current="true"]::before { background: var(--color-on-dark); }
.slideshow__pause:focus-visible, .slideshow__dot:focus-visible { outline: 2px solid var(--color-yellow); outline-offset: 1px; }
@media (prefers-reduced-motion: reduce) {
    .slideshow__slide { transition: none; }
}

/* Aviso de cookies (solo con Google Analytics configurado) */
.cookie-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: var(--color-surface); border-top: 1px solid var(--color-line); box-shadow: var(--shadow);
    padding: 14px 0;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.cookie-banner__text { flex: 1 1 320px; margin: 0; font-size: 0.95rem; }
.cookie-banner__actions { display: flex; gap: 10px; flex: 1 1 100%; }
.cookie-banner__actions .btn { flex: 1; }
@media (min-width: 860px) {
    .cookie-banner__actions { flex: 0 0 auto; }
    .cookie-banner__actions .btn { flex: 0 0 auto; min-width: 9rem; }
}
.link-button {
    background: none; border: 0; padding: 0; font: inherit; color: inherit;
    text-decoration: underline; cursor: pointer;
}
.link-button[hidden] { display: none; }

/* Prueba de diseño: círculos amarillos suaves, como el de la portada, en el
   resto de la página. Solo fondos (sin elementos extra); el texto no se mueve. */
.page-head {
    background:
        radial-gradient(circle at 94% -10%, var(--color-yellow-soft) 0, var(--color-yellow-soft) 160px, transparent 161px),
        linear-gradient(180deg, var(--color-tint), var(--color-bg));
}
.section--tint {
    background:
        radial-gradient(circle at -4% 105%, var(--color-yellow-soft) 0, var(--color-yellow-soft) 190px, transparent 191px),
        var(--color-tint);
}
.section--tint:nth-of-type(even) {
    background:
        radial-gradient(circle at 104% -5%, var(--color-yellow-soft) 0, var(--color-yellow-soft) 170px, transparent 171px),
        var(--color-tint);
}
.cta {
    background:
        radial-gradient(circle at 96% 120%, var(--color-red-dark) 0, var(--color-red-dark) 180px, transparent 181px),
        radial-gradient(circle at 3% -30%, var(--color-red-dark) 0, var(--color-red-dark) 110px, transparent 111px),
        var(--color-red);
}
@media (min-width: 860px) {
    .page-head {
        background:
            radial-gradient(circle at 90% -20%, var(--color-yellow-soft) 0, var(--color-yellow-soft) 260px, transparent 261px),
            linear-gradient(180deg, var(--color-tint), var(--color-bg));
    }
}
