/*
 * Epic 18 (sitio publico): el home, mas parecido al de siempre (Nelson, 2026-10-06). Fotos e ilustraciones de la
 * comunidad, los colores de la marca (sin naranja) y el contenido visible desde el inicio: nada se esconde hasta
 * hacer scroll. Usa las variables de tml.css (--tml-*).
 */
.th { color: var(--tml-deep); background: var(--tml-surface); font-family: var(--tml-font); }
.th-wrap { max-width: 1200px; margin: 0 auto; padding: 56px 20px; }
.th-split { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.th-split > * { flex: 1 1 380px; min-width: 0; }
.th-split-rev { flex-wrap: wrap-reverse; }
.th-bg-soft { background: #F0F7F4; }
.th-bg-page { background: var(--tml-bg); }
.th-hero { background: linear-gradient(180deg, #F0F7F4 0%, var(--tml-surface) 100%); overflow: hidden; }

.th-eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 2px; color: var(--tml-accent); background: var(--tml-accent-soft); border-radius: 999px; padding: 6px 14px; margin-bottom: 18px; }
.th .th-h1 { margin: 0 0 18px; font-size: clamp(34px, 6vw, 52px); line-height: 1.12; font-weight: 400; color: var(--tml-deep); }
.th-h1 .th-green { color: var(--tml-accent); font-weight: 600; }
.th-h1 .th-blue { color: var(--tml-primary); font-weight: 600; }
/* "Elige": el degradado azul a verde del logo de Cecy (la mano y la flecha); sin degradado, el azul */
.th-h1 .th-grad { color: var(--tml-primary); font-weight: 600; background: linear-gradient(90deg, var(--tml-primary), var(--tml-accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.th .th-h2 { margin: 0 0 12px; font-size: clamp(26px, 4vw, 34px); line-height: 1.25; font-weight: 500; color: var(--tml-deep); }
.th .th-center { text-align: center; max-width: 760px; margin: 0 auto 36px; }
.th .th-lead { margin: 0 0 28px; font-size: 18px; line-height: 1.6; color: var(--tml-muted); max-width: 560px; }
.th .th-sub { margin: 0 0 26px; font-size: 19px; line-height: 1.5; color: var(--tml-primary); }
.th .th-center .th-lead, .th .th-center .th-sub { margin-left: auto; margin-right: auto; }
.th-note { font-size: 14px; color: var(--tml-muted); }

.th-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
/* .th delante: .tml-page a / h1 / p (tml.css) pintan los enlaces de azul y quitan los margenes; sin el .th le ganaban a estas reglas */
.th-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 999px; padding: 0 28px; font-weight: 600; font-size: 16px; text-decoration: none; transition: background .2s ease, color .2s ease; }
.th .th-btn-primary { background: var(--tml-accent); color: #FFFFFF; }
.th .th-btn-primary:hover, .th .th-btn-primary:focus { background: #035C43; color: #FFFFFF; text-decoration: none; }
.th .th-btn-ghost { border: 2px solid var(--tml-accent); color: var(--tml-accent); }
.th .th-btn-ghost:hover, .th .th-btn-ghost:focus { background: var(--tml-accent-soft); color: var(--tml-accent); text-decoration: none; }
.th .th-btn-light { border: 2px solid #FFFFFF; color: #FFFFFF; }
.th .th-btn-light:hover, .th .th-btn-light:focus { background: rgba(255, 255, 255, .12); color: #FFFFFF; text-decoration: none; }
.th .th-btn-growth { background: var(--tml-growth); color: var(--tml-deepest); }
.th .th-btn-growth:hover, .th .th-btn-growth:focus { background: #34D399; color: var(--tml-deepest); text-decoration: none; }
.th-btn:focus-visible { outline: 3px solid var(--tml-primary); outline-offset: 3px; }

/* Portada: la foto con dos tarjetas flotantes */
.th-hero-art { position: relative; padding: 18px 0 30px; }
.th-hero-art img { width: 100%; height: clamp(240px, 32vw, 380px); object-fit: cover; border-radius: 28px; display: block; box-shadow: 0 24px 48px rgba(23, 37, 84, .16); }
.th-chip { position: absolute; background: #FFFFFF; border-radius: 16px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 12px 28px rgba(23, 37, 84, .14); font-size: 14px; line-height: 1.3; }
.th-chip strong { display: block; }
.th-chip span.th-muted { color: var(--tml-muted); }
.th-chip-a { left: 8px; bottom: 6px; }
.th-chip-b { right: 8px; top: 0; }
.th-dots { display: flex; }
.th-dots i { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #FFFFFF; display: block; }
.th-dots i + i { margin-left: -10px; }
.th-check { width: 34px; height: 34px; border-radius: 50%; background: var(--tml-accent-soft); display: flex; align-items: center; justify-content: center; }

/* Ilustraciones */
.th-illus { width: 100%; height: auto; display: block; }

/* Tres areas */
.th-list { display: flex; flex-direction: column; gap: 14px; }
.th-item { display: flex; gap: 14px; align-items: flex-start; background: var(--tml-bg); border-radius: 16px; padding: 16px; }
.th-item h3 { margin: 0; font-size: 17px; font-weight: 600; }
.th-item p { margin: 0; color: var(--tml-muted); line-height: 1.5; }
.th-ico { flex: 0 0 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--tml-accent-soft); }
.th-ico-blue { background: var(--tml-primary-soft); }

/* Pasos */
.th-steps { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.th-steps li { display: flex; gap: 14px; align-items: flex-start; line-height: 1.5; }
.th-steps li > span:last-child { padding-top: 6px; }
.th-num { flex: 0 0 36px; height: 36px; border-radius: 50%; color: #FFFFFF; font-weight: 700; display: flex; align-items: center; justify-content: center; background: var(--tml-primary); }
.th-num-green { background: var(--tml-accent); }

/* Comunidad: fotos con leyenda y tarjetas */
.th-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
/* #398: 3 tarjetas, nunca 2 arriba y 1 abajo (con auto-fit pasaba en la tablet y el celular girado): una columna en el
   celular y las 3 en fila desde 720 px */
.th-grid-3 { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .th-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.th-photo { margin: 0; position: relative; border-radius: 22px; overflow: hidden; height: 280px; }
.th-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.th-photo figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 20px 16px; background: linear-gradient(180deg, rgba(23, 37, 84, 0) 0%, rgba(23, 37, 84, .78) 100%); color: #FFFFFF; font-weight: 600; font-size: 18px; }
.th-photos { margin-bottom: 40px; }
.th-card { background: var(--tml-bg); border-radius: 18px; padding: 24px; }
.th-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.th-card p { margin: 0; color: var(--tml-muted); line-height: 1.5; }

/* Opiniones */
.th-opinion { margin: 0; background: #FFFFFF; border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 8px 24px rgba(23, 37, 84, .06); }
.th-opinion blockquote { margin: 0; font-size: 17px; line-height: 1.6; color: var(--tml-deep); }
.th-opinion figcaption { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.th-opinion figcaption strong { display: block; }
.th-opinion figcaption span span { color: var(--tml-muted); font-size: 14px; }
.th-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: 0 0 48px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.th-tone-1 { background: #DBE4FF; color: #1E3A8A; }
.th-tone-2 { background: #CDEFE1; color: #065F46; }
.th-tone-3 { background: #E2E8F0; color: var(--tml-deep); }
.th-opinions-nav { display: flex; justify-content: center; gap: 12px; margin-top: 24px; }
.th-round { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #CBD5E1; background: #FFFFFF; color: var(--tml-deep); font-size: 20px; cursor: pointer; }
.th-round:hover, .th-round:focus-visible { border-color: var(--tml-accent); color: var(--tml-accent); }
.th-round:disabled { opacity: .4; cursor: default; }

/* Unete: la foto en un circulo */
.th-circle { position: relative; width: 100%; max-width: 400px; aspect-ratio: 1 / 1; margin: 0 auto; }
.th-circle::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--tml-primary-soft); transform: translate(18px, 18px); }
.th-circle img { position: relative; width: 100%; height: 100%; display: block; border-radius: 50%; }
.th-badge { position: absolute; left: -6px; bottom: 26px; background: #FFFFFF; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 14px; box-shadow: 0 12px 28px rgba(23, 37, 84, .14); display: flex; align-items: center; gap: 8px; }
.th-badge i { width: 10px; height: 10px; border-radius: 50%; background: var(--tml-growth); display: block; }
.th-points { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 12px; line-height: 1.5; }
.th-points li { display: flex; gap: 10px; }
.th-points svg { flex: 0 0 22px; margin-top: 1px; }

/* Blog y Foro */
.th .th-post { display: block; text-decoration: none; color: var(--tml-deep); border-radius: 20px; overflow: hidden; background: #FFFFFF; transition: box-shadow .2s ease, transform .2s ease; }
.th .th-post:hover, .th .th-post:focus { box-shadow: 0 12px 32px rgba(23, 37, 84, .12); transform: translateY(-2px); color: var(--tml-deep); text-decoration: none; }
.th-post img, .th-post .th-post-cover { width: 100%; height: 190px; object-fit: cover; display: block; }
.th .th-post-cover { background: var(--tml-accent-soft); display: flex; align-items: center; justify-content: center; }
.th-post-body { padding: 20px; }
.th-post-date { font-size: 13px; color: var(--tml-muted); margin-bottom: 6px; }
.th-post h3 { margin: 0; font-weight: 600; font-size: 18px; line-height: 1.35; }
.th-forum { margin-top: 28px; background: var(--tml-deep); border-radius: 22px; padding: 26px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: #FFFFFF; }
.th-forum h3 { margin: 0; font-weight: 600; font-size: 20px; color: #FFFFFF; }
.th-forum p { margin: 0; color: #CBD5E1; }

/* Epic 18 (Story 18.4): las demas paginas publicas (tml/_publica.html.twig) usan las mismas piezas */
.th .th-h1-page { font-size: clamp(30px, 5vw, 44px); font-weight: 500; }
.th-wrap-tight { padding-top: 8px; padding-bottom: 8px; }
.th .th-band-title { margin: 0 0 6px; font-weight: 600; font-size: 20px; line-height: 1.35; color: #FFFFFF; }
.th-forum > div:first-child { flex: 1 1 320px; }
.th .th-actions-band { margin: 0; }
.th-card-white { background: #FFFFFF; }
.th-steps-solo { max-width: 720px; margin: 0 auto; }
.th-steps-blocks strong { display: block; }
.th-cta { text-align: center; }
.th-cta .th-center { margin-bottom: 0; }
.th-cta-ico { display: inline-flex; width: 72px; height: 72px; border-radius: 50%; background: var(--tml-accent-soft); align-items: center; justify-content: center; margin-bottom: 16px; }
.th-gain .th-ico { width: 44px; margin-bottom: 14px; }
.th .th-gains-note { margin: 24px auto 0; max-width: 640px; text-align: center; font-size: 15px; line-height: 1.6; color: var(--tml-muted); }
.th .th-fine { margin: 28px auto 0; max-width: 640px; font-size: 13px; line-height: 1.6; color: var(--tml-muted); }
/* Story 18.2: La comunidad hoy */
.th-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin: 0; }
.th-stats > div { background: var(--tml-bg); border-radius: 18px; padding: 24px 16px; text-align: center; display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 4px; }
.th-bg-page .th-stats > div { background: #FFFFFF; }
.th-stats dd { margin: 0; font-size: clamp(30px, 4vw, 40px); font-weight: 600; line-height: 1.1; color: var(--tml-accent); }
.th-stats dt { font-size: 15px; color: var(--tml-muted); }
.th .th-stats-last { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--tml-muted); }

@media (min-width: 768px) {
    .th-wrap { padding: 72px 24px; }
    .th-hero .th-wrap { padding-top: 64px; }
    .th-chip-a { left: -12px; }
    .th-chip-b { right: -8px; }
}
@media (prefers-reduced-motion: reduce) {
    .th-btn, .th-post { transition: none; }
    .th-post:hover { transform: none; }
}
