/* tips.applenws.com: encabezado, pie y portada revista. Celular primero. */
:root {
  --tn-texto: #1d1d1f; --tn-suave: #6e6e73; --tn-linea: #e5e5ea; --tn-fondo: #fff; --tn-gris: #f5f5f7;
  --tn-acento: #0066cc; --tn-ancho: 1200px;
  --tn-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.tn-header, .tn-footer, .tn-home { font-family: var(--tn-sans); color: var(--tn-texto); }
.tn-header a, .tn-footer a, .tn-home a { text-decoration: none; color: inherit; }
/* Twenty Twenty-Two pone padding lateral en .wp-site-blocks: encabezado y pie van de borde a borde */
.wp-site-blocks > .tn-header, .wp-site-blocks > .tn-footer { width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
html { overflow-x: clip; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- encabezado ---------- */
.tn-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--tn-linea); }
.tn-header__bar { max-width: var(--tn-ancho); margin: 0 auto; height: 52px; padding: 0 16px;
  display: flex; align-items: center; gap: 8px; position: relative; }
.tn-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.tn-brand img { width: 30px; height: 30px; flex: none; }
.tn-brand__nombre { font-weight: 600; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.tn-brand__largo { display: none; }
.tn-nav, .tn-search { display: none; }
.tn-icono { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; color: var(--tn-texto); }
.tn-icono:hover { background: var(--tn-gris); }
.tn-menu { position: static; }
.tn-menu > summary { list-style: none; }
.tn-menu > summary::-webkit-details-marker { display: none; }
.tn-menu .tn-ico-cerrar, .tn-menu[open] .tn-ico-abrir { display: none; }
.tn-menu[open] .tn-ico-cerrar { display: block; }
.tn-menu__lista { position: absolute; left: 0; right: 0; top: 52px; background: var(--tn-fondo);
  border-bottom: 1px solid var(--tn-linea); display: flex; flex-direction: column; padding: 4px 0 8px; }
.tn-menu__lista a { padding: 14px 20px; font-size: 17px; border-top: 1px solid var(--tn-linea); }
.tn-menu__lista a:first-child { border-top: 0; }
.tn-nav a[aria-current], .tn-menu__lista a[aria-current] { color: var(--tn-acento); }

@media (min-width: 560px) { .tn-brand__largo { display: inline; } }
@media (min-width: 960px) {
  .tn-header__bar { height: 60px; padding: 0 24px; gap: 28px; }
  .tn-brand { margin-right: 0; }
  .tn-nav { display: flex; gap: 24px; margin-right: auto; font-size: 15px; color: var(--tn-suave); }
  .tn-nav a:hover { color: var(--tn-texto); }
  .tn-search { display: flex; align-items: center; gap: 8px; width: 220px; height: 36px; padding: 0 12px;
    border-radius: 999px; background: var(--tn-gris); color: var(--tn-suave); }
  .tn-search:focus-within { box-shadow: 0 0 0 2px var(--tn-acento); }
  .tn-search input { border: 0; background: transparent; font: 15px var(--tn-sans); color: var(--tn-texto); width: 100%; outline: none; }
  .tn-icono--buscar, .tn-menu { display: none; }
}

/* ---------- pie ---------- */
.tn-footer { border-top: 1px solid var(--tn-linea); margin-top: 48px; }
.tn-footer__in { max-width: var(--tn-ancho); margin: 0 auto; padding: 20px 16px 28px; display: flex; flex-wrap: wrap;
  gap: 12px 24px; justify-content: space-between; font-size: 13px; color: var(--tn-suave); }
.tn-footer nav { display: flex; gap: 20px; }
.tn-footer a:hover { color: var(--tn-texto); }
@media (min-width: 960px) { .tn-footer__in { padding: 24px; } }

/* ---------- portada ---------- */
/* el margen lateral lo pone .wp-site-blocks de Twenty Twenty-Two; aquí solo el vertical */
.tn-home { max-width: var(--tn-ancho); margin: 0 auto; padding: 20px 0 0; }
@media (min-width: 960px) { .tn-home { padding-top: 36px; } }
.tn-kicker { display: block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tn-acento); margin-bottom: 6px; }
.tn-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.tn-card__foto { display: block; overflow: hidden; border-radius: 14px; background: var(--tn-gris); aspect-ratio: 16 / 10; }
.tn-card__foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.tn-card:hover .tn-card__foto img { transform: scale(1.03); }
.tn-card__titulo { font-family: var(--tn-sans); font-weight: 650; letter-spacing: -.015em; line-height: 1.25; margin: 0 0 6px; font-size: 18px; }
.tn-card__titulo a:hover { color: var(--tn-acento); }
.tn-card time { font-size: 13px; color: var(--tn-suave); }
.tn-card__resumen { color: var(--tn-suave); font-size: 16px; line-height: 1.5; margin: 0 0 10px; }
.tn-card--hero .tn-card__titulo { font-size: clamp(26px, 6vw, 44px); line-height: 1.1; letter-spacing: -.025em; }
.tn-card--sinfoto { padding: 18px; border: 1px solid var(--tn-linea); border-radius: 14px; }

.tn-portada { display: grid; gap: 28px; padding-bottom: 36px; border-bottom: 1px solid var(--tn-linea); }
.tn-destacados { display: grid; gap: 20px; }
.tn-card--lateral { flex-direction: row; align-items: flex-start; }
.tn-card--lateral .tn-card__foto { flex: 0 0 38%; aspect-ratio: 4 / 3; border-radius: 10px; }
.tn-card--lateral .tn-card__titulo { font-size: 16px; }
@media (min-width: 960px) {
  .tn-portada { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; }
  .tn-destacados { gap: 24px; align-content: start; }
}

.tn-seccion { padding: 32px 0; border-bottom: 1px solid var(--tn-linea); }
.tn-seccion__cab { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.tn-seccion__cab h2 { font-family: var(--tn-sans); font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.tn-seccion__cab a { color: var(--tn-acento); font-size: 15px; }
.tn-seccion__cab a::after { content: " \203A"; }
.tn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
.tn-grid .tn-card__titulo { font-size: 15px; }
@media (min-width: 960px) { .tn-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; } .tn-grid .tn-card__titulo { font-size: 17px; } }

.tn-temas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tn-tema { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 104px;
  padding: 18px; border-radius: 16px; background: var(--tn-gris); transition: background .2s; }
.tn-tema:hover { background: #ebebef; }
.tn-tema__nombre { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.tn-tema__total { font-size: 14px; color: var(--tn-suave); }
.tn-tema__total::after { content: " \203A"; }
.tn-tema:last-child:nth-child(odd) { grid-column: span 2; min-height: 84px; }   /* el 5.º no queda solo en celular */
@media (min-width: 720px) { .tn-temas { grid-template-columns: repeat(5, minmax(0, 1fr)); } .tn-tema:last-child:nth-child(odd) { grid-column: auto; min-height: 104px; } }
.tn-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tn-chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--tn-linea); font-size: 14px; }
.tn-chip:hover { border-color: var(--tn-texto); }

.tn-intro { padding: 28px 0 40px; border-bottom: 1px solid var(--tn-linea); max-width: 760px; }
.tn-intro h1 { font-family: var(--tn-sans); font-size: clamp(32px, 8vw, 56px); line-height: 1.05; letter-spacing: -.03em; font-weight: 750; margin: 0 0 16px; }
.tn-intro p { font-size: clamp(17px, 2.4vw, 20px); color: var(--tn-suave); line-height: 1.45; margin: 0 0 24px; }
.tn-archivo { padding: 36px 0 8px; }
.tn-archivo h2 { font-family: var(--tn-sans); font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; }
.tn-archivo p { color: var(--tn-suave); margin: 0 0 18px; }
.tn-buscador { display: flex; align-items: center; gap: 10px; max-width: 620px; height: 52px; padding: 0 6px 0 16px;
  border-radius: 999px; background: var(--tn-gris); color: var(--tn-suave); }
.tn-buscador:focus-within { box-shadow: 0 0 0 2px var(--tn-acento); }
.tn-buscador input { flex: 1; min-width: 0; border: 0; background: transparent; font: 17px var(--tn-sans); color: var(--tn-texto); outline: none; }
.tn-buscador button { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--tn-texto); color: #fff;
  font: 600 15px var(--tn-sans); cursor: pointer; }

/* ---------- contenido de los posts en celular ---------- */
.wp-block-post-content img, .wp-block-post-content video { max-width: 100%; height: auto; }
.wp-block-post-content iframe { max-width: 100%; }
.wp-block-post-content iframe[src*="youtube"] { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.wp-block-post-content pre, .wp-block-post-content table { overflow-x: auto; max-width: 100%; }
.wp-block-post-content { overflow-wrap: break-word; }
@media (max-width: 600px) {
  .wp-block-post-title { font-size: clamp(28px, 8vw, 40px) !important; margin-bottom: 1.5rem !important; }
}
