/* Bloque central de blog y calendario con la estética de las páginas de actividades del original
   (p. ej. /seminarios-y-conferencias): foto de la Tierra sobre azul, título blanco centrado y
   tarjetas cuadradas con foto teñida, título en mayúsculas arriba y «ACCEDE →» abajo. */
.tt {
  --navy: #07215f; --blue: #0a3087; --coral: #ff8562; --line: #dde2ee; --muted: #5b6480; --bg: #f3f5f9;
  --shadow: 0 6px 24px rgba(7, 33, 95, .08);
  position: relative; background: var(--blue); color: #fff; font-family: "Inter Tight", system-ui, sans-serif;
  padding: clamp(110px, 14vw, 170px) 20px clamp(60px, 8vw, 100px); overflow: hidden;
}
.tt::before {
  content: ""; position: absolute; inset: 0;
  background: url(/assets/static.tildacdn.net/tild6337-3434-4462-a461-616566356634/1.png) center top / cover no-repeat;
  opacity: .7; pointer-events: none;
}
.tt > * { position: relative; }
.tt__inner { max-width: 1200px; margin: 0 auto; }
.tt__title { margin: 0; text-align: center; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.1; font-weight: 600; letter-spacing: -.01em; }
.tt__sub { margin: 14px 0 46px; text-align: center; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.tt__h3 { margin: 70px 0 6px; text-align: center; font-size: clamp(24px, 3vw, 32px); font-weight: 600; }

/* ---- Tarjetas cuadradas ---- */
.tt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 24px; }
.tt-card, .tt .ev-card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1;
  min-height: 0; padding: 18px 18px 16px; border: 0; border-radius: 16px; overflow: hidden; cursor: pointer;
  background: var(--navy); color: #f3f5f9; text-align: left; text-decoration: none; font: inherit; box-shadow: none;
  transition: transform .18s ease;
}
.tt-card:hover, .tt .ev-card:hover { transform: translateY(-4px); box-shadow: none; }
.tt-card__img, .tt .ev-card__thumb { position: absolute; inset: 0; aspect-ratio: auto; background: var(--navy); display: block; }
.tt-card__img img, .tt .ev-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 1; transition: transform .35s ease; }
.tt-card:hover img, .tt .ev-card:hover .ev-card__thumb img { transform: scale(1.04); }
.tt-card__img::after, .tt .ev-card__thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 48, 135, .55) 0%, rgba(10, 48, 135, .35) 45%, rgba(7, 33, 95, .9) 100%);
}
.tt-card__top, .tt-card__cta, .tt .ev-card__body { position: relative; z-index: 1; }
.tt-card__title, .tt .ev-card__title {
  margin: 0; color: #f3f5f9; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.15; font-weight: 600; text-transform: uppercase;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.tt-card__date, .tt .ev-card__date { margin: 0 0 8px; color: #f3f5f9; opacity: .8; font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.tt-card__cta, .tt .ev-card__more { color: #f3f5f9; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }

/* Tarjeta de evento (misma estructura que genera upcoming.js) */
.tt .ev-card__body { display: flex; flex-direction: column; height: 100%; padding: 0; gap: 0; text-align: left; align-items: stretch; }
.tt .ev-card__loc { display: none; }
.tt .ev-card__more { margin-top: auto; padding-top: 0; }
.tt .ev-card__icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; opacity: .35; }
.tt .ev-card__play { top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; width: 54px; height: 54px; font-size: 20px; }
.tt .ev-badge { display: none; }
.tt .empty { background: rgba(255, 255, 255, .1); color: #f3f5f9; border-radius: 16px; }

/* Destacado (inscripción) */
.tt-destacado {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 40px;
  padding: 26px 30px; border-radius: 16px; background: rgba(243, 245, 249, .12); border: 1px solid rgba(243, 245, 249, .25);
  color: #f3f5f9; text-decoration: none; backdrop-filter: blur(4px);
}
.tt-destacado strong { display: block; font-size: clamp(20px, 2.4vw, 26px); font-weight: 600; }
.tt-destacado span { opacity: .85; }
.tt-destacado em { font-style: normal; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }

/* Calendario dentro del bloque azul */
.tt .cal { background: #fff; color: #0b1430; border-radius: 16px; }

@media (max-width: 520px) {
  .tt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .tt-card, .tt .ev-card { padding: 12px; }
  .tt-card__title, .tt .ev-card__title { font-size: 14px; }
}

/* Panel blanco para formularios y textos (inscripción, junta, legales) */
.tt-panel { background: #fff; color: #0b1430; border-radius: 16px; padding: clamp(20px, 4vw, 40px); }
.tt-panel h2, .tt-panel h3 { color: var(--navy); }
.tt-panel a { color: var(--blue); }
.tt-panel .form-card { box-shadow: none; border: 1px solid var(--line); position: static; }
.tt-panel .destacado { margin: 0; }
.tt-panel .form-status.ok { color: #14532d; }

/* Rejilla de logos de partners (como el bloque de partners del original) */
.tt-logos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 22px; }
.tt-logo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 3 / 2;
  background: #fff; border-radius: 16px; padding: 24px; text-decoration: none; transition: transform .18s ease; }
.tt-logo:hover { transform: translateY(-4px); }
.tt-logo img { max-width: 80%; max-height: 70px; object-fit: contain; }
.tt-logo span { color: var(--navy); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; text-align: center; }

/* Destacados dentro del panel blanco: sin caja azul anidada, texto legible */
.tt-panel .destacado { background: none; color: #0b1430; box-shadow: none; padding: 0; margin: 0; border-radius: 0; }
.tt-panel .destacado h2 { color: var(--navy); margin-top: 0; }
.tt-panel .destacado p { opacity: 1; color: #2c3553; }
.tt-panel .destacado a { color: var(--blue); font-weight: 600; }
@media (max-width: 600px) {
  .tt { padding-left: 14px; padding-right: 14px; }
  .tt-panel { padding: 18px 16px; border-radius: 14px; }
  .tt__sub { margin-bottom: 28px; }
}

/* Páginas de actividades: foto + texto en el panel blanco */
.tt-actividad { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 4vw, 44px); align-items: start; }
.tt-actividad:not(:has(.tt-foto)) { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }
.tt-foto { margin: 0; position: sticky; top: 100px; }
.tt-foto img { width: 100%; border-radius: 14px; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.tt-foto figcaption { font-size: 13px; color: #5b6480; margin-top: 8px; }
.tt-actividad__texto h2 { font-size: clamp(20px, 2.2vw, 24px); font-weight: 600; margin: 0 0 10px; }
.tt-actividad__texto h2:not(:first-child) { margin-top: 28px; }
.tt-actividad__texto p { line-height: 1.65; color: #2c3553; margin: 0 0 12px; }
.tt-actividad__oficial { margin-top: 24px !important; font-weight: 600; }
@media (max-width: 800px) {
  .tt-actividad { grid-template-columns: minmax(0, 1fr); }
  .tt-foto { position: static; }
}

/* Bloque destacado: texto siempre blanco (Tilda pintaba los enlaces en naranja) */
.tt a.tt-destacado, .tt a.tt-destacado:hover, .tt a.tt-destacado strong, .tt a.tt-destacado span, .tt a.tt-destacado em { color: #fff !important; }

/* Partners: tarjetas centradas aunque no llenen la fila */
.tt-logos { display: flex; flex-wrap: wrap; justify-content: center; }
.tt-logos .tt-logo { flex: 0 1 260px; }
@media (max-width: 600px) { .tt-logos .tt-logo { flex-basis: 100%; } }

/* Partners: instituciones visitadas */
.tt-chips { list-style: none; padding: 0; margin: 0 auto; max-width: 980px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tt-chips li { background: #fff; color: var(--navy); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.junta-lista { columns: 2 260px; padding-left: 18px; line-height: 1.9; }

/* Partners con tipo y filtro (estilo elsaspain.org/partners) */
.tt-filtros { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 32px; }
.tt-filtros button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; padding: 8px 18px; font: inherit; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.tt-filtros button[aria-pressed="true"] { background: #fff; color: var(--navy); border-color: #fff; }
.tt-panel .destacado h3 { color: var(--navy); margin: 18px 0 8px; font-size: 20px; }
.tt-panel a, .tt-panel a:hover { color: var(--blue) !important; }

/* Calendario: suscripción */
.tt-suscribir { margin: 26px auto 0; max-width: 760px; text-align: center; color: #f3f5f9; font-size: 15px; }
.tt-suscribir a { color: #fff; font-weight: 600; margin: 0 6px; white-space: nowrap; }
.tt-card[hidden] { display: none; }

/* La ventana del evento cuelga de <body>, fuera de los bloques de Tilda: hereda su tipografía */
.event-modal, .event-modal * { font-family: "Inter Tight", system-ui, sans-serif; }

/* Partners: tipo encima del logo; centradas aunque la última fila no esté completa */
.tt-logo[hidden] { display: none; }
.tt-logo__tipo { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--blue); text-transform: uppercase; text-align: center; }
.tt-logo__nombre { font-size: 26px; color: var(--navy); }

/* Blog: carga progresiva */
.tt-mas { text-align: center; margin: 32px 0 0; }
.tt-mas__btn { background: #fff; color: var(--navy); border: 0; border-radius: 999px; padding: 12px 26px; font: 600 15px "Inter Tight", system-ui, sans-serif; cursor: pointer; }
.tt-mas__btn[hidden] { display: none; }
