/* =============================================
   ASOCIACIÓN CULTURAL TERA — versión 2026
   Formal y colorida: noche de pizarra + verde roble, oro de centeno,
   rojo teja y azul cielo (los colores del logo).
   Tipos: Bricolage Grotesque (titulares), Figtree (texto),
   JetBrains Mono (datos y detalles técnicos).
   Se carga después de style.css y lo sobrescribe.
   ============================================= */

:root {
  --t-ink:     #0F1B2D;
  --t-ink-2:   #1A2A43;
  --t-bg:      #F4F6FA;
  --t-surface: #FFFFFF;
  --t-text:    #18243A;
  --t-muted:   #586379;
  --t-line:    #E2E6EE;
  --t-verde:   #138A5E;
  --t-oro:     #F2B13B;
  --t-teja:    #E2552D;
  --t-cielo:   #2F6FED;
  --t-radius:  24px;
  --t-head: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --t-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
  --t-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-io:  cubic-bezier(0.77, 0, 0.175, 1);

  /* Variables heredadas de style.css, para que todo use la paleta nueva */
  --color-verde:       var(--t-verde);
  --color-verde-claro: #1FA672;
  --color-ocre:        #C7861B;
  --color-ocre-claro:  var(--t-oro);
  --color-terracota:   var(--t-teja);
  --color-azul:        var(--t-cielo);
  --color-crema:       var(--t-bg);
  --color-piedra:      #E9ECF2;
  --color-tierra:      var(--t-text);
  --color-tierra-soft: var(--t-muted);
  --color-blanco:      var(--t-surface);
  --font-display: var(--t-head);
  --font-body:    var(--t-body);
  --font-ui:      var(--t-body);
  --radius:    14px;
  --radius-lg: var(--t-radius);
  --shadow-sm: 0 1px 2px rgba(15,27,45,.06);
  --shadow-md: 0 18px 40px -22px rgba(15,27,45,.35);
  --shadow-lg: 0 30px 60px -30px rgba(15,27,45,.45);
}

@view-transition { navigation: auto; }

html { -webkit-font-smoothing: antialiased; }
body { background: var(--t-bg); color: var(--t-text); font-family: var(--t-body); font-size: 1.0625rem; line-height: 1.6; }
body::before { display: none; }

h1, h2, h3, h4 { font-family: var(--t-head); color: var(--t-ink); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 750; line-height: 1.1; }
h3 { font-size: 1.25rem; font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
a { color: var(--t-cielo); }
a:hover { color: var(--t-ink); }
::selection { background: var(--t-oro); color: var(--t-ink); }
:focus-visible { outline: 3px solid var(--t-cielo); outline-offset: 3px; border-radius: 8px; }

.container, .wx { width: min(1240px, 100% - 3rem); max-width: none; margin-inline: auto; padding: 0; }
.mono { font-family: var(--t-mono); font-size: .8rem; font-weight: 500; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* ── Cabecera flotante ── */
.site-header {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  width: min(1240px, 100% - 1.5rem);
  background: rgba(255,255,255,.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
  box-shadow: 0 12px 32px -18px rgba(15,27,45,.35);
  transition: top .3s var(--ease-out), background-color .3s;
}
.site-header.scrolled { top: 8px; background: rgba(255,255,255,.9); }
.header-inner { max-width: none; padding: .45rem .5rem .45rem .55rem; gap: 1rem; }
.logo-img { width: 42px; height: 42px; border-radius: 50%; background: #fff; padding: 1px; }
.logo-title { font-family: var(--t-head); font-weight: 700; font-size: 1.02rem; color: var(--t-ink); letter-spacing: -0.01em; }
.logo-sub { font-family: var(--t-body); text-transform: none; letter-spacing: 0; font-size: .8rem; color: var(--t-muted); }
.site-nav { gap: .15rem; }
.nav-link { font-family: var(--t-body); text-transform: none; letter-spacing: 0; font-size: .97rem; font-weight: 600; color: var(--t-ink); padding: .6rem 1rem; border-radius: 999px; transition: background-color .2s, color .2s; }
.nav-link::after { display: none; }
.nav-link:hover { background: rgba(15,27,45,.06); color: var(--t-ink); }
.nav-link.active { background: var(--t-ink); color: #fff; }
.nav-toggle span { background: var(--t-ink); }

.page-index .site-header { background: rgba(15,27,45,.34); border-color: rgba(255,255,255,.18); box-shadow: none; }
.page-index .site-header .logo-title, .page-index .site-header .nav-link { color: #fff; }
.page-index .site-header .logo-sub { color: rgba(255,255,255,.75); }
.page-index .site-header .nav-link:hover { background: rgba(255,255,255,.14); }
.page-index .site-header .nav-link.active { background: var(--t-oro); color: var(--t-ink); }
.page-index .site-header .nav-toggle span { background: #fff; }
.page-index .site-header.scrolled { background: rgba(15,27,45,.82); }

/* ── Botones ── */
.btn, .btn-t {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px;
  font-family: var(--t-body); font-size: 1rem; font-weight: 650; letter-spacing: 0; text-transform: none;
  padding: .8rem 1.45rem; border-radius: 999px; border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:active, .btn-t:active { transform: scale(.97); }
.btn svg, .btn-t svg { width: 18px; height: 18px; }
.btn-t-oro, .btn-primary { background: var(--t-oro); color: var(--t-ink); border-color: var(--t-oro); }
.btn-t-oro:hover, .btn-primary:hover { background: #FFC457; border-color: #FFC457; color: var(--t-ink); box-shadow: 0 10px 24px -12px rgba(242,177,59,.8); }
.btn-verde, .btn-t-ink { background: var(--t-ink); border-color: var(--t-ink); color: #fff; }
.btn-verde:hover, .btn-t-ink:hover { background: var(--t-ink-2); border-color: var(--t-ink-2); color: #fff; }
.btn-outline { background: transparent; border-color: var(--t-line); color: var(--t-ink); }
.btn-t-glass { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.38); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.btn-t-glass:hover { background: rgba(255,255,255,.24); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover, .btn-t:hover { transform: translateY(-2px); }
}

/* ── Portada ── */
.th { position: relative; min-height: min(100svh, 920px); padding: 12px; display: flex; }
.th-media { position: absolute; inset: 12px; border-radius: calc(var(--t-radius) + 6px); overflow: hidden; background: var(--t-ink); }
.th-media img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; transform: scale(1.06); animation: th-zoom 2.6s var(--ease-out) forwards; }
.th-media::after { content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 70% at 0% 100%, rgba(15,27,45,.9) 0%, rgba(15,27,45,0) 70%),
    linear-gradient(180deg, rgba(15,27,45,.5) 0%, rgba(15,27,45,0) 24%, rgba(15,27,45,0) 50%, rgba(15,27,45,.55) 100%); }
@keyframes th-zoom { to { transform: scale(1); } }

.th-inner { position: relative; z-index: 2; width: min(1240px, 100% - 3rem); margin: auto auto 0; padding: 9rem 0 clamp(7.5rem, 12vw, 9.5rem);
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2rem; align-items: end; }
.th-content { color: #fff; max-width: 760px; }
.th-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.4rem; }
.chip { display: inline-flex; align-items: center; gap: .45rem; padding: .38rem .8rem; border-radius: 999px; color: #fff;
  background: rgba(15,27,45,.42); border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); white-space: nowrap; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,.7); animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.6); } 80%, 100% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } }
.th-title { color: #fff; font-family: var(--t-head); font-weight: 800; font-size: clamp(3.2rem, 8.4vw, 7.6rem); line-height: .95; letter-spacing: -0.035em; margin: 0 0 1.2rem; }
.th-desc { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; color: rgba(255,255,255,.9); max-width: 44ch; margin: 0 0 2rem; }
.th-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.th-content, .th-card { animation: th-rise .9s var(--ease-out) both; }
.th-card { animation-delay: .25s; }
@keyframes th-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.th-card { display: grid; gap: .3rem; padding: 1.3rem 1.4rem 1.4rem; border-radius: 20px; color: #fff; text-decoration: none;
  background: rgba(15,27,45,.45); border: 1px solid rgba(255,255,255,.2); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  transition: transform .2s var(--ease-out), background-color .2s; }
.th-card:hover { color: #fff; background: rgba(15,27,45,.6); }
.th-card-top { display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.75); }
.th-card-date { font-family: var(--t-head); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -0.03em; color: var(--t-oro); margin-top: .4rem; }
.th-card-title { font-weight: 650; font-size: 1.1rem; line-height: 1.3; }
.th-card-meta { color: rgba(255,255,255,.75); font-size: .92rem; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .7rem; }
.countdown div { background: rgba(255,255,255,.1); border-radius: 12px; padding: .45rem 0; text-align: center; }
.countdown b { display: block; font-family: var(--t-mono); font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.countdown span { font-size: .72rem; color: rgba(255,255,255,.7); }

/* ── Cifras bajo la portada ── */
.stats-t { position: relative; z-index: 3; width: min(1100px, 100% - 3rem); margin: -4.5rem auto 0; background: var(--t-ink); color: #fff;
  border-radius: var(--t-radius); padding: 1.6rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; box-shadow: var(--shadow-lg); overflow: hidden; }
.stats-t::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 60%; height: 180%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(47,111,237,.35), transparent 70%); }
.stat-t { position: relative; display: flex; gap: .9rem; align-items: center; padding: .4rem .6rem; }
.stat-t + .stat-t { border-left: 1px solid rgba(255,255,255,.1); padding-left: 1.2rem; }
.stat-ico { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; }
.stat-ico svg { width: 22px; height: 22px; }
.ico-verde { background: rgba(19,138,94,.22); color: #44D39E; }
.ico-oro   { background: rgba(242,177,59,.2);  color: var(--t-oro); }
.ico-teja  { background: rgba(226,85,45,.22);  color: #FF8A66; }
.ico-cielo { background: rgba(47,111,237,.25); color: #8DB2FF; }
.stat-t b { display: block; font-family: var(--t-head); font-weight: 800; font-size: 1.9rem; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-t span { font-size: .9rem; color: rgba(255,255,255,.72); }

/* ── Secciones ── */
.sx { padding-block: clamp(4.5rem, 8vw, 7rem); }
.sx-head { display: flex; justify-content: space-between; align-items: end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.2rem; }
.sx-head p { margin: .5rem 0 0; color: var(--t-muted); max-width: 52ch; font-size: 1.1rem; }
.kicker { display: inline-flex; align-items: center; gap: .5rem; color: var(--t-verde); margin-bottom: .6rem; }
.kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }

/* ── Bento ── */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.tile { position: relative; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); padding: clamp(1.5rem, 2.6vw, 2.2rem); min-width: 0; overflow: hidden; isolation: isolate; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(47,111,237,.10), transparent 60%); }
@media (hover: hover) and (pointer: fine) { .tile:hover::after { opacity: 1; } }
.tile-agenda { grid-column: span 7; grid-row: span 2; background: var(--t-ink); color: #fff; border-color: transparent; display: flex; flex-direction: column; }
.tile-agenda::before { content: ""; position: absolute; z-index: -1; right: -20%; top: -30%; width: 80%; height: 90%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(19,138,94,.55), transparent), radial-gradient(closest-side at 70% 60%, rgba(47,111,237,.45), transparent); filter: blur(10px); }
.tile-agenda::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.08), transparent 60%); }
.tile-tablon { grid-column: span 5; }
.tile-cuentas { grid-column: span 5; }
.tile-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.tile-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 0; }
.tile-agenda h2, .tile-agenda h3 { color: #fff; }
.more-t { display: inline-flex; align-items: center; gap: .35rem; font-weight: 650; font-size: .95rem; color: var(--t-cielo); text-decoration: none; }
.more-t svg { width: 16px; height: 16px; transition: transform .2s var(--ease-out); }
.more-t:hover svg { transform: translateX(3px); }
.tile-agenda .more-t { color: var(--t-oro); }

.agenda-t { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.agenda-t li { display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: center; padding: .9rem; border-radius: 16px; background: rgba(255,255,255,.06); }
.date-t { text-align: center; border-radius: 12px; background: var(--t-oro); color: var(--t-ink); padding: .35rem 0 .45rem; }
.date-t b { display: block; font-family: var(--t-head); font-weight: 800; font-size: 1.8rem; line-height: 1; }
.date-t span { font-size: .78rem; font-weight: 650; }
.agenda-t h3 { font-size: 1.15rem; margin: 0 0 .15rem; }
.agenda-t p { margin: 0; color: rgba(255,255,255,.72); font-size: .95rem; }
.agenda-empty { padding: 1.2rem 1.3rem; border-radius: 16px; background: rgba(255,255,255,.06); }
.agenda-empty h3 { font-size: 1.4rem; margin: 0 0 .4rem; }
.agenda-empty p { margin: 0; color: rgba(255,255,255,.78); }
.agenda-empty strong { color: #fff; }
.agenda-poster { display: block; margin-top: 1.2rem; border-radius: 16px; overflow: hidden; flex: 1; min-height: 220px; }
.agenda-poster img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; object-position: center 25%; transition: transform .5s var(--ease-out); }
.agenda-poster:hover img { transform: scale(1.03); }

.news-t { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.news-t li + li { padding-top: 1.1rem; border-top: 1px solid var(--t-line); }
.news-t h3 { margin: .5rem 0 .3rem; font-size: 1.15rem; }
.news-t p { margin: 0 0 .4rem; color: var(--t-muted); font-size: .98rem; }
.news-t small { color: var(--t-muted); font-size: .88rem; }
.tag-t { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 650; padding: .2rem .65rem; border-radius: 999px; background: #E8F5EF; color: var(--t-verde); }
.tag-t[data-type="noticia"]  { background: #E7EEFE; color: var(--t-cielo); }
.tag-t[data-type="denuncia"] { background: #FDECE6; color: #B83C17; }

.cuentas-body { display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; align-items: center; }
.donut { position: relative; width: 150px; aspect-ratio: 1; border-radius: 50%;
  background: conic-gradient(var(--t-teja) 0 var(--g, 0%), var(--t-verde) var(--g, 0%) 100%); }
.donut::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--t-surface); }
.donut-c { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; text-align: center; }
.donut-c b { font-family: var(--t-head); font-weight: 800; font-size: 1.5rem; line-height: 1; color: var(--t-ink); }
.donut-c span { font-size: .78rem; color: var(--t-muted); }
.legend-t { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.legend-t li { display: grid; grid-template-columns: 12px 1fr auto; gap: .6rem; align-items: center; font-size: .98rem; }
.legend-t i { width: 12px; height: 12px; border-radius: 4px; }
.legend-t b { font-variant-numeric: tabular-nums; font-weight: 650; }
.legend-t .saldo-row { padding-top: .7rem; border-top: 1px solid var(--t-line); }
.legend-t .saldo-row b { color: var(--t-verde); font-size: 1.15rem; }

/* ── Fotos ── */
.sx-fotos { background: var(--t-ink); color: #fff; margin-inline: 12px; border-radius: calc(var(--t-radius) + 6px); position: relative; overflow: hidden; }
.sx-fotos::before { content: ""; position: absolute; left: -10%; top: -40%; width: 60%; height: 100%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(242,177,59,.22), transparent 70%); }
.sx-fotos h2 { color: #fff; }
.sx-fotos .sx-head p { color: rgba(255,255,255,.72); }
.sx-fotos .kicker { color: var(--t-oro); }
.rail-ctrl { display: flex; gap: .6rem; align-items: center; }
.rail-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; transition: background-color .2s, transform .16s var(--ease-out); }
.rail-btn svg { width: 20px; height: 20px; }
.rail-btn:hover { background: rgba(255,255,255,.12); }
.rail-btn:active { transform: scale(.95); }
.rail { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(250px, 28vw, 380px); gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none;
  padding-inline: max(1.5rem, calc((100% - 1240px) / 2)); scroll-padding-inline: max(1.5rem, calc((100% - 1240px) / 2)); }
.rail::-webkit-scrollbar { display: none; }
.rail-item { margin: 0; aspect-ratio: 4 / 5; border-radius: 18px; scroll-snap-align: start; background: var(--t-ink-2); cursor: zoom-in; }
.rail-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.rail-item:hover img { transform: scale(1.03); }
.rail-item figcaption { position: absolute; left: 12px; bottom: 12px; padding: .3rem .7rem; border-radius: 999px; color: #fff; font-size: .85rem; font-weight: 600;
  background: rgba(15,27,45,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.rail-item .gallery-item-overlay { display: none; }
.rail-progress { width: min(1240px, 100% - 3rem); margin: 1.6rem auto 0; height: 4px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; }
.rail-progress i { display: block; height: 100%; width: 20%; border-radius: inherit; background: linear-gradient(90deg, var(--t-oro), var(--t-teja)); transform-origin: left; }

/* ── Llamada a participar ── */
.cta-t { position: relative; overflow: hidden; border-radius: calc(var(--t-radius) + 6px); padding: clamp(2.2rem, 5vw, 3.6rem);
  background: linear-gradient(120deg, var(--t-verde) 0%, #0F6E84 55%, var(--t-cielo) 100%); color: #fff;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.cta-t::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000); mask-image: linear-gradient(90deg, transparent, #000); }
.cta-t h2 { color: #fff; margin: 0 0 .6rem; }
.cta-t p { margin: 0; color: rgba(255,255,255,.88); font-size: 1.1rem; max-width: 46ch; }
.cta-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .7rem; justify-content: flex-end; }

/* ── Páginas interiores ── */
.page-hero { margin: 12px; border-radius: calc(var(--t-radius) + 6px); padding: clamp(8.5rem, 13vw, 10.5rem) clamp(24px, 5vw, 64px) clamp(3rem, 5vw, 4rem);
  background: var(--t-ink) url("../img/paisaje-2026.jpg") center 45% / cover no-repeat; }
.page-hero::before { inset: 0; top: 0; right: 0; width: auto; height: auto; border-radius: 0;
  background: radial-gradient(70% 90% at 0% 100%, rgba(15,27,45,.92), rgba(15,27,45,.2) 75%), linear-gradient(180deg, rgba(15,27,45,.4), rgba(15,27,45,0) 40%); }
.page-hero-inner { position: relative; z-index: 1; max-width: none; }
.page-hero h1 { color: #fff; font-weight: 800; font-size: clamp(2.6rem, 6vw, 4.8rem); letter-spacing: -0.03em; line-height: 1; margin: .5rem 0 .8rem; }
.page-hero p { color: rgba(255,255,255,.88); font-size: 1.15rem; max-width: 48ch; margin: 0; }
.page-hero .section-label { display: inline-flex; color: var(--t-ink) !important; background: var(--t-oro); border-radius: 999px; padding: .2rem .75rem; font-weight: 650; }
.page-hero-wave, .hero-wave, .footer-wave { display: none; }

.section { padding-block: clamp(3.5rem, 6vw, 5rem); }
.section-alt { background: transparent; }
.section-header { text-align: left; }
.section-header p { margin-left: 0; }
.section-label { font-family: var(--t-body); text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 650; color: var(--t-verde); }

.card, .announcement-card, .event-card-horizontal, .finance-stat, .form-section, .finance-table {
  background: var(--t-surface); border: 1px solid var(--t-line); box-shadow: var(--shadow-sm); border-radius: var(--t-radius);
}
.card { border-left: 1px solid var(--t-line); }
.card:hover, .event-card-horizontal:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.announcement-card { border-left: 4px solid var(--t-verde); }
.announcement-card[data-type="noticia"]  { border-left-color: var(--t-cielo); }
.announcement-card[data-type="denuncia"] { border-left-color: var(--t-teja); }
.announcement-card.pinned { border-left-color: var(--t-oro); background: #FFFBF2; }
.announcement-card:hover { box-shadow: var(--shadow-md); }
.card-img, .card-img-placeholder { height: 230px; }
.card-img-placeholder { font-size: 0; background: var(--t-ink) url("../img/paisaje-2026.jpg") center / cover; }
.event-card-horizontal { border-left: 4px solid var(--t-oro); }
.event-date-block { background: var(--t-oro); color: var(--t-ink); border-radius: 14px; min-width: 62px; }
.event-date-block .day { font-family: var(--t-head); font-weight: 800; font-size: 1.7rem; }
.event-date-block .month { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 650; }
details.past-events-section > summary { background: var(--t-surface) !important; border: 1px solid var(--t-line); border-radius: 16px !important; font-family: var(--t-head) !important; color: var(--t-ink) !important; }

.badge { font-family: var(--t-body); text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 650; padding: .2rem .7rem; }
.badge-verde     { background: #E8F5EF; color: var(--t-verde); }
.badge-ocre      { background: #FEF3DC; color: #9A6510; }
.badge-terracota { background: #FDECE6; color: #B83C17; }
.badge-azul      { background: #E7EEFE; color: var(--t-cielo); }
.badge-gris      { background: #EEF0F4; color: var(--t-muted); }

.filter-btn, .year-tab { font-family: var(--t-body); font-size: .95rem; font-weight: 600; letter-spacing: 0; border: 1px solid var(--t-line); background: var(--t-surface); color: var(--t-ink); min-height: 44px; display: inline-flex; align-items: center; }
.filter-btn:hover, .filter-btn.active, .year-tab:hover, .year-tab.active { background: var(--t-ink); border-color: var(--t-ink); color: #fff; }

.empty-state { padding: 3rem 1rem; }
.empty-state .empty-icon { display: none; }
.empty-state h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); color: var(--t-ink); }

.album-title { font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--t-ink); }
.album-title::before { width: 6px; background: linear-gradient(var(--t-oro), var(--t-teja)); }
.gallery-grid { gap: 12px; }
.gallery-item { border-radius: 16px; background: #E4E8EF; }
.gallery-item:hover img { transform: scale(1.03); }
.gallery-item-overlay { background: linear-gradient(to top, rgba(15,27,45,.7), transparent 55%); }

.finance-stat { text-align: left; padding: 1.6rem; position: relative; overflow: hidden; }
.finance-stat::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--t-verde); }
.stat-gastos::before { background: var(--t-teja); }
.stat-balance::before { background: var(--t-cielo); }
.finance-stat .stat-label { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 600; }
.finance-stat .amount { font-family: var(--t-head); font-weight: 800; font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-ingresos .amount { color: var(--t-verde); }
.stat-gastos .amount   { color: var(--t-teja); }
.stat-balance .amount  { color: var(--t-cielo); }
.finance-table th { background: var(--t-ink); text-transform: none; letter-spacing: 0; font-size: .9rem; font-weight: 600; }
.finance-table td { border-bottom-color: var(--t-line); font-variant-numeric: tabular-nums; }
.finance-table tr:hover td { background: #F7F9FC; }
.amount-ingreso { color: var(--t-verde); }
.amount-gasto { color: var(--t-teja); }
.bar-track { height: 8px; background: #E9ECF2; }
.bar-fill.ingreso { background: linear-gradient(90deg, var(--t-verde), #1FA672); }
.bar-fill.gasto { background: linear-gradient(90deg, var(--t-teja), var(--t-oro)); }

.form-section { border-top: 4px solid var(--t-cielo); }
label { text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 600; color: var(--t-ink); }
input[type="text"], input[type="email"], input[type="date"], input[type="time"], input[type="number"], select, textarea {
  font-family: var(--t-body); font-size: 1rem; background: #F7F9FC; border: 1px solid var(--t-line); border-radius: 12px; min-height: 46px; }
input:focus, select:focus, textarea:focus { border-color: var(--t-cielo); box-shadow: 0 0 0 4px rgba(47,111,237,.15); }
.form-hint { font-style: normal; }
.pin-icon::before { content: "Destacado"; font-size: .8rem; font-weight: 650; color: #9A6510; background: #FEF3DC; border-radius: 999px; padding: .15rem .6rem; }

.lightbox { background: rgba(15,27,45,.94); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox-img { border-radius: 16px; }

/* ── Pie ── */
.site-footer { background: var(--t-ink); color: rgba(255,255,255,.8); margin: 12px; border-radius: calc(var(--t-radius) + 6px); overflow: hidden; position: relative; }
.site-footer::before { content: ""; position: absolute; right: -10%; top: -50%; width: 55%; height: 120%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(19,138,94,.35), transparent 70%); }
.footer-word { position: relative; font-family: var(--t-head); font-weight: 800; color: #fff; font-size: clamp(2.8rem, 9.5vw, 9rem); line-height: .95; letter-spacing: -0.04em;
  padding: clamp(2.6rem, 5vw, 4rem) clamp(24px, 4vw, 56px) 0; margin: 0; white-space: nowrap; overflow: hidden;
  background: linear-gradient(90deg, #fff 0%, #fff 45%, var(--t-oro) 75%, var(--t-teja) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer-meta { position: relative; padding: .8rem clamp(24px, 4vw, 56px) 0; color: rgba(255,255,255,.55); }
.footer-inner { position: relative; max-width: none; padding: 2.2rem clamp(24px, 4vw, 56px) 2rem; }
.footer-brand, .footer-brand strong { color: #fff; }
.footer-brand strong { font-family: var(--t-head); font-weight: 700; }
.footer-links a { color: rgba(255,255,255,.75); font-size: .98rem; }
.footer-links a:hover { color: var(--t-oro); }
.social-link { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; width: 44px; height: 44px; }
.social-link:hover { background: var(--t-oro); color: var(--t-ink); }
.footer-bottom { position: relative; max-width: none; padding: 1.2rem clamp(24px, 4vw, 56px); border-top-color: rgba(255,255,255,.1); color: rgba(255,255,255,.55); }
.footer-admin-link { color: rgba(255,255,255,.55); }

/* ── Responsive ── */
@media (max-width: 1020px) {
  .th-inner { grid-template-columns: 1fr; }
  .th-card { max-width: 380px; }
  .stats-t { grid-template-columns: repeat(2, 1fr); }
  .stat-t:nth-child(3) { border-left: 0; padding-left: .6rem; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-agenda { grid-column: 1 / -1; grid-row: auto; }
  .tile-tablon, .tile-cuentas { grid-column: span 1; }
  .cta-t { grid-template-columns: 1fr; }
  .cta-actions { justify-content: flex-start; }
}
@media (max-width: 768px) {
  .site-header { border-radius: 26px; }
  .site-nav { top: calc(100% + 8px); left: 0; right: 0; border-radius: 22px; background: rgba(255,255,255,.98); border: 1px solid var(--t-line); box-shadow: var(--shadow-md); }
  .page-index .site-nav .nav-link { color: var(--t-ink); }
  .container, .wx, .th-inner { width: calc(100% - 2rem); }
  .th-inner { padding-top: 7.5rem; padding-bottom: 6.5rem; }
  .th-card { display: none; }
  .stats-t { width: calc(100% - 2rem); grid-template-columns: 1fr 1fr; padding: 1rem; margin-top: -3.5rem; }
  .stat-t { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .5rem; }
  .stat-t + .stat-t { border-left: 0; padding-left: .5rem; }
  .stat-t b { font-size: 1.5rem; }
  .bento { grid-template-columns: 1fr; }
  .tile-tablon, .tile-cuentas { grid-column: 1 / -1; }
  .cuentas-body { grid-template-columns: 1fr; justify-items: start; }
  .rail { grid-auto-columns: 78%; }
  .rail-btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .th-media img { transform: none; }
}

/* Ajustes de cifras: los importes no se parten en dos líneas */
.stat-t b, .legend-t b, .countdown b { white-space: nowrap; }
.stat-t b { font-size: clamp(1.35rem, 2.1vw, 1.9rem); }
.cuentas-body { grid-template-columns: 124px minmax(0, 1fr); }
.donut { width: 124px; }
.donut::after { inset: 15px; }
@media (max-width: 1020px) { .stat-t:nth-child(3) { border-left: 0; } }
@media (max-width: 768px) {
  .th-media::after { background: linear-gradient(180deg, rgba(15,27,45,.55) 0%, rgba(15,27,45,.15) 28%, rgba(15,27,45,.55) 55%, rgba(15,27,45,.92) 100%); }
}
