/* Cuba Despierta · Página de una efeméride (views/efemeride.php): artículos de efemérides y fichas breves.
   «La hoja del día»: la hoja del almanaque cae colgada de un clavo y se balancea; detrás, el año en contorno.
   Comparte el papel crema y la banda roja del calendario de /efemerides (css/efemerides.css). */
.ek { --paper: #fbf6ec; --paper-2: #efe5d1; --ink-ak: #141210; }

/* ---------- 1. Cabecera ---------- */
.ekh { position: relative; padding: calc(var(--hdr-h) + 3rem) 0 5rem; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse 50% 70% at 82% 40%, rgba(220,52,35,.3), transparent 70%), var(--ink-ak); }
.ekh-year { position: absolute; z-index: -1; left: -1vw; bottom: -3vw; font-size: clamp(9rem, 4rem + 22vw, 26rem); font-weight: 900; line-height: .8; letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.09); pointer-events: none; }
html.js .ekh-year { animation: ek-rise 2.2s cubic-bezier(.2,.8,.2,1) .2s both; }
@keyframes ek-rise { from { opacity: 0; transform: translateY(18%); } }
.ekh-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (min-width: 960px) { .ekh-in { grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; } }
.ekh-kicker { margin-top: 1.8rem; display: flex; align-items: center; gap: .9rem; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: #f0e6da; }
.ekh-title { margin-top: 1.1rem; max-width: 22ch; font-size: clamp(2rem, 1rem + 3.4vw, 3.9rem); font-weight: 900; line-height: 1.02; letter-spacing: -.03em; }
.ekh-lead { margin-top: 1.3rem; max-width: 40rem; font-size: clamp(1.02rem, .95rem + .35vw, 1.22rem); line-height: 1.65; color: #ddd6cc; }
.ekh-meta { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem 2.4rem; }
.ekh-meta li { display: flex; flex-direction: column; gap: .15rem; padding-left: 1rem; border-left: 2px solid var(--brand); }
.ekh-meta b { font-family: var(--serif); font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.6rem); font-weight: 600; line-height: 1; color: #fff; }
.ekh-meta b.is-txt { font-family: inherit; font-size: 1.05rem; font-weight: 800; line-height: 1.4; }
.ekh-meta span { font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #a89f93; }
/* La hoja colgada de un clavo: cae y se balancea hasta quedarse quieta */
.ekh-hoja { position: relative; justify-self: center; width: min(66vw, 280px); padding-top: 14px; }
.ekh-clavo { position: absolute; z-index: 2; top: 0; left: 50%; width: 16px; height: 16px; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f2efe9, #8b8780 60%, #4d4a46); box-shadow: 0 3px 4px rgba(0,0,0,.5); }
.ekh-sheet { position: relative; display: flex; flex-direction: column; align-items: center; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px 6px 10px 10px; background: var(--paper); color: var(--ink-ak); text-align: center; transform-origin: 50% 0;
  box-shadow: 0 30px 40px -18px rgba(0,0,0,.65), 0 2px 0 var(--paper-2), 0 6px 0 #d9ccb1; }
html.js .ekh-sheet { animation: ek-drop 1s cubic-bezier(.3,1.4,.5,1) .3s both, ek-swing 2.6s ease-in-out 1.2s both; }
@keyframes ek-drop { from { opacity: 0; transform: translateY(-60px) rotate(-14deg); } }
@keyframes ek-swing { 0% { transform: rotate(-6deg); } 25% { transform: rotate(4.5deg); } 50% { transform: rotate(-2.5deg); } 75% { transform: rotate(1.2deg); } 100% { transform: rotate(0); } }
.ekh-m { display: block; width: 100%; padding: 1.5rem 1rem .8rem; background: var(--brand); color: #fff; font-size: clamp(1rem, .85rem + .6vw, 1.35rem); font-weight: 900; letter-spacing: .28em; text-transform: uppercase; }
.ekh-d { display: block; margin-top: auto; font-family: var(--serif); font-size: clamp(7rem, 5rem + 7vw, 9.5rem); font-weight: 600; line-height: 1; letter-spacing: -.04em; color: var(--brand-dark); }
.ekh-w { margin: auto 0 1.3rem; font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: #8a7d68; }

/* ---------- 2. Cuerpo ---------- */
.ekb { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; padding-block: clamp(2.5rem, 2rem + 2vw, 4rem); }
@media (min-width: 1024px) { .ekb { grid-template-columns: minmax(0, 1fr) 320px; gap: 4rem; align-items: start; } }
.ekb-main { min-width: 0; max-width: 46rem; }
.ekb-fig { margin: 0 0 2.2rem; }
.ekb-fig img { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 24px 40px -28px rgba(0,0,0,.6); }
.ekb-fig figcaption { margin-top: .7rem; padding-left: .8rem; border-left: 2px solid var(--brand); font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ekb-puntos { margin-bottom: 2.2rem; padding: 1.5rem 1.6rem; background: var(--paper); border-top: 4px solid var(--brand); border-radius: 0 0 8px 8px; }
.ekb-puntos h2 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.ekb-puntos h2 svg { color: var(--brand-dark); }
.ekb-puntos ul { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.ekb-puntos li { position: relative; padding-left: 1.4rem; font-size: 15.5px; line-height: 1.6; }
.ekb-puntos li::before { content: ''; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; background: var(--brand); rotate: 45deg; }
/* Letra capitular en el primer párrafo del artículo */
.ekb-prose > p:first-child::first-letter { float: left; margin: .1em .12em 0 0; font-family: var(--serif); font-size: 4.2em; line-height: .8; color: var(--brand-dark); }
.ekb-prose h2 { scroll-margin-top: calc(var(--hdr-h) + 1rem); }
.ekb-lead { font-size: 1.15rem; }
.ekb-pronto { margin-top: 2rem; display: flex; gap: .8rem; padding: 1.1rem 1.3rem; background: var(--paper); border-left: 4px solid var(--brand); font-size: 15px; line-height: 1.55; color: var(--ink); }
.ekb-pronto svg { flex: none; margin-top: .15rem; color: var(--brand-dark); }
/* Preguntas frecuentes */
.ekb-faq { margin-top: 2.8rem; }
.ekb-faq h2 { margin-bottom: 1rem; font-size: 1.5rem; font-weight: 900; letter-spacing: -.01em; }
.ekb-faq details { border-top: 1px solid var(--line); }
.ekb-faq details:last-child { border-bottom: 1px solid var(--line); }
.ekb-faq summary { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-size: 16.5px; font-weight: 800; line-height: 1.4; cursor: pointer; list-style: none; }
.ekb-faq summary::-webkit-details-marker { display: none; }
.ekb-faq summary span { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--brand-dark); font-size: 1.2rem; transition: transform .35s var(--ease-out), background-color .3s, color .3s; }
.ekb-faq details[open] summary span { transform: rotate(45deg); background: var(--brand); color: #fff; }
.ekb-faq summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ekb-faq details p { padding: 0 2.5rem 1.2rem 0; font-size: 15.5px; line-height: 1.7; color: var(--muted); }
/* Columna: ficha, índice y cronología (fija al bajar en escritorio) */
.ekb-side { display: flex; flex-direction: column; gap: 1.6rem; }
@media (min-width: 1024px) { .ekb-side { position: sticky; top: calc(var(--hdr-h) + 1.5rem); } }
.ekb-k { margin-bottom: .8rem; font-size: 11px; font-weight: 900; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-dark); }
.ekb-ficha { padding: 1.3rem 1.4rem; background: var(--ink-ak); color: #fff; border-radius: 8px; }
.ekb-ficha .ekb-k { color: var(--brand-light); }
.ekb-ficha dl { margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.ekb-ficha dl div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px solid rgba(255,255,255,.12); font-size: 14px; }
.ekb-ficha dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.ekb-ficha dt { color: #a89f93; }
.ekb-ficha dd { margin: 0; font-weight: 800; text-align: right; }
.ekb-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.ekb-toc a { display: block; padding: .4rem 0 .4rem 1rem; margin-left: -2px; border-left: 2px solid transparent; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--muted); text-decoration: none; transition: color .25s, border-color .25s; }
.ekb-toc a:hover { color: var(--ink); border-left-color: var(--brand); }
.ekb-crono ol { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 1rem; }
.ekb-crono li { position: relative; display: flex; flex-direction: column; gap: .1rem; font-size: 13.5px; line-height: 1.45; color: var(--muted); transition: opacity .6s ease, transform .6s var(--ease-out); transition-delay: calc(var(--j) * 70ms); }
.ekb-crono li::before { content: ''; position: absolute; left: calc(-1.1rem - 6px); top: .35rem; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--line-strong); }
.ekb-crono li.is-cuba::before { border-color: var(--brand); }
.ekb-crono li b { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); }
.ekb-crono-h { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.ekb-crono li.is-este { padding: .7rem .8rem; margin-left: -.5rem; background: var(--brand); color: #fff; border-radius: 6px; }
.ekb-crono li.is-este::before { left: calc(-1.1rem + .5rem - 6px); background: var(--brand); border-color: #fff; box-shadow: 0 0 0 3px var(--brand); }
.ekb-crono li.is-este b, .ekb-crono li.is-este .ekb-crono-h { color: #fff; }
html.js .ekb-crono[data-reveal]:not(.is-in) li { opacity: 0; transform: translateX(-10px); }

/* ---------- 3. Día anterior y siguiente ---------- */
.ekn { padding-block: clamp(3rem, 2rem + 3vw, 5rem); background: var(--paper); }
.ekn-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 720px) { .ekn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ekn-card { display: flex; align-items: center; gap: 1.2rem; padding: 1.1rem 1.3rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; transition: transform .45s var(--ease-out), box-shadow .45s, border-color .3s; }
.ekn-card.is-next { flex-direction: row-reverse; text-align: right; }
.ekn-card:hover { transform: translateY(-4px); border-color: var(--ink); box-shadow: 0 18px 30px -20px rgba(0,0,0,.5); }
.ekn-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.ekn-hoja { flex: none; display: flex; flex-direction: column; align-items: center; width: 74px; overflow: hidden; border-radius: 6px; background: var(--paper); box-shadow: 0 6px 12px -6px rgba(0,0,0,.35); transition: transform .45s var(--ease-out); }
.ekn-hoja span { width: 100%; padding: .25rem 0; background: var(--brand); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .2em; text-align: center; text-transform: uppercase; }
.ekn-hoja b { padding: .2rem 0 .35rem; font-family: var(--serif); font-size: 2.3rem; font-weight: 600; line-height: 1; color: var(--brand-dark); }
.ekn-card.is-prev:hover .ekn-hoja { transform: rotate(-6deg); }
.ekn-card.is-next:hover .ekn-hoja { transform: rotate(6deg); }
.ekn-txt { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.ekn-k { font-size: 11px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-dark); }
.ekn-t { font-size: 16px; font-weight: 800; line-height: 1.35; }
.ekn-y { font-size: 13px; color: var(--muted); }
.ekn-all { margin-top: 2rem; text-align: center; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js .ekh-year, html.js .ekh-sheet { animation: none; }
  .ekb-crono li, .ekn-card, .ekn-hoja, .ekb-faq summary span { transition: none; }
  html.js .ekb-crono[data-reveal]:not(.is-in) li { opacity: 1; transform: none; }
}
