/* Tema de entradas y páginas de Temenir.
   Las @font-face las inyecta functions.php: apuntan a los woff2 del plugin de la portada cuando
   está instalado, y a la copia del tema cuando no. Aquí solo se usan las familias.

   Todo cuelga de `.tmn` (clase que el tema añade al <body>): si una página lleva el atajo de la
   landing, esa hoja actúa dentro de `.imb-landing` y no se cruzan. */

/* La barra es pegajosa: sin este margen, un enlace a un anclaje deja el titular DEBAJO de ella. */
html:has(body.tmn) {
  scroll-padding-top: 74px;
}

.tmn {
  /* El color de la casa es el relleno de la tira de anuncios de la portada. Los demás son
     variantes suyas, no colores nuevos. */
  --acc-050: #a9cdd0;
  --acc-200: #7ab0b4;
  --acc-400: #4e7e82;
  --acc-600: #3a6266;
  --ink: #050f0e;
  --ink-deep: #0d2220;

  --text: #ffffff;
  --text-70: rgba(255, 255, 255, 0.78);
  --text-50: rgba(255, 255, 255, 0.55);
  --edge: rgba(255, 255, 255, 0.14);
  --edge-soft: rgba(255, 255, 255, 0.08);

  --ink: #000000;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-line: rgba(255, 255, 255, 0.09);
  --radius: 18px;

  --shell: 1240px;
  --read: 760px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: "Engramite Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

.tmn a {
  color: var(--acc-200);
  text-decoration: none;
}

.tmn a:hover {
  color: var(--acc-050);
}

.tmn img,
.tmn video,
.tmn iframe {
  max-width: 100%;
  height: auto;
}

.tmn :focus-visible {
  outline: 2px solid var(--acc-400);
  outline-offset: 2px;
}

.tmn-shell {
  width: min(100% - 48px, var(--shell));
  margin-inline: auto;
}

.tmn-narrow {
  width: min(100% - 48px, var(--read));
}

.tmn-sr,
.tmn .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tmn .tmn-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink-deep);
  color: var(--text);
}

.tmn .tmn-skip:focus {
  left: 12px;
  top: 12px;
}

/* ---------- tira de anuncios ---------- */
/* Misma franja que la portada. Llega con `hidden` y la enseña el JS, para que a quien ya la cerró
   no le parpadee al cargar. */
.tmn-ticker {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 39px;
  padding-inline: clamp(20px, 3.5vw, 48px);
  background: #7ab0b4;
  color: #141414;
  font-size: 12px;
  font-weight: 500;
}

.tmn-ticker[hidden] {
  display: none;
}

.tmn-ticker p {
  flex: 1;
  margin: 0;
}

.tmn .tmn-ticker a {
  color: #141414;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.tmn .tmn-ticker a:hover {
  opacity: 0.8;
}

.tmn .tmn-ticker-close {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(20, 20, 20, 0.66);
  cursor: pointer;
}

.tmn .tmn-ticker-close:hover {
  background: transparent;
  color: #141414;
}

.tmn .tmn-ticker-close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

/* ---------- barra ---------- */
.tmn-nav-dock {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge-soft);
}

/* Marca a la izquierda y todo lo demás a la derecha, como en la portada. La pastilla de contacto
   necesita el alto entero, de ahí el `stretch`. */
.tmn-nav {
  width: 100%;
  padding-inline: clamp(20px, 3.5vw, 48px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: stretch;
  gap: 24px;
  height: 58px;
}

.tmn-nav-actions {
  display: flex;
  align-items: stretch;
  gap: 32px;
}

.tmn-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
}

/* Con `.tmn-brand-logo` a secas gana `.tmn img { height: auto }`, que es más específica por llevar
   tipo: el logotipo salía a tamaño natural y tapaba media página. */
.tmn .tmn-brand-logo,
.tmn .tmn-brand .custom-logo {
  height: 20px;
  width: auto;
  display: block;
}

.tmn-menu {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.tmn-menu li {
  position: relative;
}

.tmn-menu a {
  color: var(--text-70);
  transition: color 150ms var(--ease);
}

.tmn-menu a:hover,
.tmn-menu .current-menu-item > a,
.tmn-menu .current_page_item > a {
  color: var(--text);
}

/* Submenú: aparece bajo su padre, sin animación ni caja con esquinas. */
.tmn-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: var(--ink-deep);
  border: 1px solid var(--edge-soft);
}

.tmn-menu li:hover > .sub-menu,
.tmn-menu li:focus-within > .sub-menu {
  display: block;
}

.tmn-menu .sub-menu a {
  display: block;
  padding: 6px 16px;
}

/* La pastilla blanca de la portada: alto completo de la barra, sin esquinas ni sombra. Lleva `.tmn`
   delante porque `.tmn a` gana por especificidad y el rótulo se quedaba sin color propio. */
.tmn .tmn-cta {
  display: inline-flex;
  align-items: center;
  align-self: stretch;
  padding-inline: 34px;
  margin-right: calc(clamp(20px, 3.5vw, 48px) * -1);
  font-size: 14px;
  font-weight: 500;
  color: #141414;
  background: #ffffff;
  transition: opacity 150ms var(--ease);
}

.tmn .tmn-cta:hover {
  color: #141414;
  opacity: 0.88;
}

/* ---------- estructura ---------- */
.tmn-main {
  padding-block: 56px 96px;
}

.tmn-page-head {
  padding-bottom: 8px;
  margin-bottom: 40px;
}

/* Cabecera del blog: rótulo, título grande y entradilla. */
.tmn-blog-head {
  padding-block: 8px 48px;
  max-width: 720px;
}

.tmn-kicker {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--acc-200);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.tmn-page-title {
  margin: 0;
  font-family: "Engramite Display", "Engramite Sans", serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.tmn-page-sub {
  margin-top: 14px;
  color: var(--text-50);
  font-size: 15px;
}

/* ---------- listado ---------- */
.tmn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

/* Tarjeta: superficie levantada, esquinas redondeadas y NADA de sombra. El enlace cubre la
   tarjeta entera para que se pueda pinchar en cualquier parte sin anidar enlaces. */
.tmn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--surface-line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}

.tmn-card:hover {
  border-color: rgba(122, 176, 180, 0.55);
  background: rgba(255, 255, 255, 0.06);
}

.tmn-card-link {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.tmn-card-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.tmn-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 24px 26px;
}

.tmn-chip {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(122, 176, 180, 0.16);
  color: var(--acc-200);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tmn-card-title {
  margin: 0;
  font-family: "Engramite Display", "Engramite Sans", serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}

.tmn-card-excerpt {
  margin: 0;
  color: var(--text-70);
  font-size: 15px;
  line-height: 1.6;
}

/* Pegada abajo: así las fechas quedan a la misma altura en toda la fila. */
.tmn-card-date {
  margin-top: auto;
  padding-top: 4px;
  color: var(--text-50);
  font-size: 13px;
}

/* La primera entrada manda: ancho entero, imagen a un lado y texto al otro. */
.tmn-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
}

.tmn-card-featured .tmn-card-media {
  flex: 0 0 52%;
}

.tmn-card-featured .tmn-card-media img {
  height: 100%;
  aspect-ratio: auto;
  min-height: 400px;
}

.tmn-card-featured .tmn-card-body {
  justify-content: center;
  gap: 16px;
  padding: 40px;
}

.tmn-card-featured .tmn-card-title {
  font-size: 32px;
}

.tmn-card-featured .tmn-card-excerpt {
  font-size: 17px;
}

.tmn-list {
  display: flex;
  flex-direction: column;
}

.tmn-item {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding-block: 32px;
}

.tmn-item:first-child {
  padding-top: 0;
}

.tmn-item:not(:has(.tmn-item-media)) {
  grid-template-columns: minmax(0, 1fr);
}

.tmn-item-media img {
  border-radius: var(--radius);
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.9);
}

.tmn-item-title {
  margin: 0;
  font-family: "Engramite Display", "Engramite Sans", serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.tmn-item-title a {
  color: var(--text);
}

.tmn-item-title a:hover {
  color: var(--acc-200);
}

.tmn-item-excerpt {
  margin-top: 10px;
  color: var(--text-70);
  font-size: 16px;
}

.tmn-item-excerpt p {
  margin: 0;
}

.tmn-item.sticky .tmn-item-title a::before {
  content: "· ";
  color: var(--acc-400);
}

.tmn-empty {
  padding-block: 40px;
  color: var(--text-70);
}

/* ---------- entrada y página ---------- */
.tmn-entry-head {
  padding-bottom: 4px;
  margin-bottom: 36px;
}

.tmn-entry-title {
  margin: 0;
  font-family: "Engramite Display", "Engramite Sans", serif;
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.tmn-meta {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--text-50);
  font-size: 13px;
}

.tmn-meta a {
  color: var(--text-50);
}

.tmn-meta a:hover {
  color: var(--acc-200);
}

.tmn-meta-sep {
  opacity: 0.5;
}

.tmn-featured {
  margin: 0 0 40px;
}

.tmn-featured img {
  display: block;
  width: 100%;
  border-radius: var(--radius);
}

/* ---------- texto corrido ---------- */
.tmn-prose {
  color: var(--text-70);
  font-size: 18px;
  line-height: 1.75;
}

.tmn-prose > * + * {
  margin-top: 1.25em;
}

.tmn-prose h1,
.tmn-prose h2,
.tmn-prose h3,
.tmn-prose h4,
.tmn-prose h5,
.tmn-prose h6 {
  margin: 2em 0 0.6em;
  color: var(--text);
  font-family: "Engramite Display", "Engramite Sans", serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.tmn-prose h2 { font-size: 30px; }
.tmn-prose h3 { font-size: 24px; }
.tmn-prose h4 { font-size: 20px; }
.tmn-prose h5,
.tmn-prose h6 { font-size: 17px; }

.tmn-prose a {
  color: var(--acc-200);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.tmn-prose strong {
  color: var(--text);
  font-weight: 600;
}

.tmn-prose ul,
.tmn-prose ol {
  padding-left: 1.3em;
}

.tmn-prose li + li {
  margin-top: 0.4em;
}

.tmn-prose blockquote {
  margin-inline: 0;
  padding-left: 22px;
  border-left: 2px solid var(--acc-400);
  color: var(--text);
  font-size: 20px;
}

.tmn-prose blockquote cite {
  display: block;
  margin-top: 10px;
  color: var(--text-50);
  font-size: 14px;
  font-style: normal;
}

.tmn-prose code,
.tmn-prose kbd {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  color: var(--acc-050);
}

.tmn-prose pre {
  padding: 18px 20px;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--edge-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  line-height: 1.6;
}

.tmn-prose pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.tmn-prose hr,
.tmn-prose .wp-block-separator {
  height: 0;
  border: 0;
  border-top: 1px solid var(--edge-soft);
}

.tmn-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.tmn-prose th,
.tmn-prose td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--edge-soft);
  text-align: left;
}

.tmn-prose th {
  color: var(--text);
  font-weight: 600;
}

.tmn-prose figure {
  margin-inline: 0;
}

.tmn-prose figcaption,
.tmn-prose .wp-caption-text {
  margin-top: 8px;
  color: var(--text-50);
  font-size: 13px;
}

/* Clases de alineación de WordPress: el contenido las emite y sin esto se ignoran. */
.tmn-prose .alignleft {
  float: left;
  margin: 0.4em 1.6em 1.2em 0;
}

.tmn-prose .alignright {
  float: right;
  margin: 0.4em 0 1.2em 1.6em;
}

.tmn-prose .aligncenter {
  display: block;
  margin-inline: auto;
}

.tmn-prose .alignwide {
  width: min(100vw - 48px, var(--shell));
  max-width: none;
  margin-inline: calc(50% - min(50vw - 24px, var(--shell) / 2));
}

.tmn-prose .alignfull {
  width: 100vw;
  max-width: none;
  margin-inline: calc(50% - 50vw);
}

.tmn-single-full .tmn-prose .alignwide,
.tmn-single-full .tmn-prose .alignfull {
  margin-inline: 0;
  width: auto;
}

.tmn-prose .wp-block-image img {
  display: block;
}

.tmn-prose .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding-inline: 22px;
  background: var(--acc-200);
  color: var(--ink);
  text-decoration: none;
  border-radius: 0;
}

.tmn-prose .wp-block-pullquote,
.tmn-prose .wp-block-quote {
  border-left: 2px solid var(--acc-400);
}

.tmn-tags {
  margin-top: 40px;
  font-size: 13px;
  color: var(--text-50);
}

.tmn-tags a {
  color: var(--text-70);
  margin-right: 10px;
}

.tmn-linkpages {
  margin-top: 28px;
  font-size: 14px;
  color: var(--text-50);
}

.tmn-post-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 44px;
  font-size: 14px;
}

.tmn-post-nav-next {
  text-align: right;
}

/* ---------- paginación ---------- */
.tmn .navigation.pagination {
  margin-top: 48px;
  font-size: 14px;
}

.tmn .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tmn .page-numbers {
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding-inline: 10px;
  border: 1px solid var(--edge-soft);
  color: var(--text-70);
}

.tmn .page-numbers:hover {
  border-color: var(--edge);
  color: var(--text);
}

.tmn .page-numbers.current {
  border-color: var(--acc-400);
  color: var(--text);
}

/* ---------- formularios ---------- */
.tmn-search {
  display: flex;
  gap: 10px;
  max-width: 460px;
}

.tmn input[type="text"],
.tmn input[type="email"],
.tmn input[type="url"],
.tmn input[type="search"],
.tmn textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--surface-line);
  border-radius: 12px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.tmn input::placeholder,
.tmn textarea::placeholder {
  color: var(--text-50);
}

.tmn button,
.tmn input[type="submit"],
.tmn .tmn-search-submit {
  padding: 12px 22px;
  border: 0;
  border-radius: 12px;
  background: var(--acc-200);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
}

.tmn button:hover,
.tmn input[type="submit"]:hover {
  background: var(--acc-050);
}

/* ---------- pie ---------- */
.tmn-foot {
  background: #000;
  padding: 56px 0 40px;
}

.tmn-foot-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.tmn-foot-menu a {
  color: var(--text-70);
}

.tmn-foot-menu a:hover {
  color: var(--acc-200);
}

.tmn-foot-end {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  color: var(--text-50);
  font-size: 13px;
}

/* ---------- pantallas estrechas ---------- */
@media (max-width: 900px) {
  .tmn-shell,
  .tmn-narrow,
  .tmn-nav {
    width: calc(100% - 32px);
  }

  .tmn-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .tmn-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tmn-card-featured {
    flex-direction: column;
  }

  .tmn-card-featured .tmn-card-media img {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .tmn-card-featured .tmn-card-body {
    padding: 24px;
  }

  .tmn-card-featured .tmn-card-title {
    font-size: 24px;
  }

  .tmn-item-media img {
    aspect-ratio: 16 / 9;
  }

  /* El menú pasa a una segunda fila que se arrastra en horizontal. Esconderlo sin poner un
     sustituto dejaba el sitio sin navegación en el móvil. */
  .tmn-nav {
    grid-template-columns: 1fr auto;
    height: auto;
    padding-bottom: 8px;
  }

  .tmn-nav-actions {
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
  }

  .tmn .tmn-cta {
    align-self: center;
    height: 34px;
    padding-inline: 20px;
    margin-right: 0;
  }

  .tmn-menu {
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    font-size: 13px;
  }

  .tmn-menu::-webkit-scrollbar {
    display: none;
  }

  .tmn-menu li {
    flex: none;
  }

  .tmn-main {
    padding-block: 36px 64px;
  }

  .tmn-prose {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tmn * {
    transition: none !important;
    animation: none !important;
  }
}

@media (max-width: 1100px) and (min-width: 901px) {
  .tmn-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
