/* ==========================================================================
   Rediseño de portada — tokens y componentes nuevos.
   Se carga despues de custom.css/queries.css y solo agrega o sobrescribe lo
   necesario; no se toco el markup de header.php/footer.php mas alla de lo
   imprescindible, asi que las reglas de abajo reestilizan el DOM existente.
   ========================================================================== */

:root {
  --tc-primary: #6a1b9a;
  --tc-primary-dark: #4a0e72;
  --tc-accent: #ff4081;
  --tc-bg: #f8f9fa;
  --tc-white: #ffffff;
  --tc-text-main: #1a1a1a;
  --tc-text-muted: #666666;
  --tc-border: #eeeeee;
  --tc-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --tc-shadow-hover: 0 14px 34px rgba(0, 0, 0, 0.14);
  --tc-radius: 12px;
  --tc-font: 'Inter', Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--tc-font);
  background-color: var(--tc-bg);
  color: var(--tc-text-main);
}

p, h1, h2, h3, h4, h5, a, li, button, input {
  font-family: var(--tc-font);
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.top-bar {
  background: var(--tc-primary);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.top-bar .datehome {
  text-transform: uppercase;
}

.top-bar-trending {
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid #444444;
  text-transform: none;
  letter-spacing: normal;
}

.top-bar-trending-label {
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 4px;
}

.top-bar-trending a {
  color: #ffffff;
  text-decoration: none;
  margin-right: 10px;
  opacity: 0.85;
}

.top-bar-trending a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* ==========================================================================
   Header
   ========================================================================== */

.head-desk {
  background: var(--tc-white);
  border-top: 0;
  border-bottom: 1px solid var(--tc-border);
  padding: 14px 0;
  transition: padding .16s ease, box-shadow .16s ease;
}

.head-desk .container {
  display: flex;
  align-items: center;
}

.head-desk.top-nav-collapse {
  box-shadow: 0 8px 22px rgba(22, 18, 25, .12);
  padding: 6px 0;
  animation: none;
}

/* Wordmark de texto: reemplaza el logo en imagen en el header (se conserva
   la imagen en el footer). */
.site-wordmark {
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tc-text-main);
  font-family: var(--tc-font);
}

.wordmark-accent {
  color: var(--tc-primary);
}

.head-mobil .site-wordmark {
  font-size: 1.3rem;
}

.mobile-header-spacer {
  display: none;
}

.logo-head {
  /* Usa todo el ancho útil de la columna del logo, sin invadir el menú. */
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.head-desk.top-nav-collapse .logo-head {
  width: 150px;
  max-width: 150px;
}

.head-desk.top-nav-collapse .menu-header > li {
  margin-left: 20px !important;
}

.head-desk.top-nav-collapse .menu-header > li > a,
.head-desk.top-nav-collapse .menu-header > li > button {
  font-size: .8rem;
}

/* El header de escritorio se declutteriza para acercarse a la referencia:
   los iconos sociales siguen disponibles en el footer. */
.head-desk .menu-head-block {
  display: none;
}

/* Menu alineado a la derecha del header */
.head-desk .col-md-9 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.menu-header {
  margin-top: 0;
}

.menu-header > li {
  border-right: 0;
  margin: 0 0 0 28px !important;
}

.menu-header > li:first-child {
  margin-left: 0 !important;
}

.menu-header > li > a,
.menu-header > li > button {
  color: var(--tc-text-main);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.menu-header > li > a:hover,
.menu-header > li > button:hover {
  color: var(--tc-primary);
}

/* Header editorial de escritorio: toma la estructura de dos niveles de la
   referencia, con una lectura mas ligera, accesos sociales y una navegacion
   que conserva aire alrededor del logo. */
@media (min-width: 992px) {
  .top-bar {
    height: 6px;
    padding: 0;
  }

  .top-bar .container {
    display: none;
  }

  .head-desk {
    padding: 0;
    border-bottom-color: #e9e6ea;
  }

  .head-desk .container {
    min-height: 92px;
  }

  .head-desk .col-md-3 {
    display: flex;
    align-items: center;
    padding: 18px 28px 18px 15px;
  }

  .logo-head {
    width: 100%;
    max-width: 238px;
  }

  .head-desk .col-md-9 {
    display: flex;
    position: relative;
    min-height: 92px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding-left: 0;
  }

  .head-desk .menu-head-block {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
  }

  .desk-header-date {
    color: #817a85;
    font-size: .77rem;
    font-weight: 600;
    letter-spacing: .01em;
  }

  .head-desk .menu-social {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 0;
    padding: 0;
  }

  .head-desk .menu-social > li {
    display: block;
    margin: 0;
  }

  .head-desk .menu-social > li > a {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    color: #716979;
    font-size: .78rem;
    transition: color .16s ease, transform .16s ease;
  }

  .head-desk .menu-social > li > a:hover {
    color: var(--tc-primary);
    transform: translateY(-1px);
  }

  .head-desk nav[aria-label="Navegación principal"] {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: flex-end;
    /* Linea solo sobre el menu: el nav mide lo que ocupa y queda pegado a
       la derecha, asi el borde arranca en el primer item y no cruza el
       hueco entre logo y menu. */
    width: fit-content;
    margin-left: auto;
    border-top: 1px solid #e6e2e7;
  }

  .head-desk .menu-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
  }

  .head-desk .menu-header > li {
    position: relative;
    margin: 0 0 0 18px !important;
    padding-left: 18px;
  }

  .head-desk .menu-header > li:first-child {
    padding-left: 0;
  }

  .head-desk .menu-header > li:not(:first-child)::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1px;
    height: 17px;
    background: #d8d2da;
    content: '';
    transform: translateY(-50%);
  }

  .head-desk .menu-header > li > a,
  .head-desk .menu-header > li > button {
    color: #322d35;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .015em;
    text-transform: uppercase;
  }

  .head-desk .menu-header > li > a:hover,
  .head-desk .menu-header > li > button:hover {
    color: var(--tc-primary);
  }

  .head-desk.top-nav-collapse {
    padding: 0;
    border-top: 6px solid var(--tc-primary);
  }

  .head-desk.top-nav-collapse .container,
  .head-desk.top-nav-collapse .col-md-9 {
    min-height: 64px;
  }

  .head-desk.top-nav-collapse .col-md-3 {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .head-desk.top-nav-collapse .logo-head {
    width: 162px;
    max-width: 162px;
  }

  .head-desk.top-nav-collapse .menu-head-block {
    display: none;
  }

  .head-desk.top-nav-collapse nav[aria-label="Navegación principal"] {
    min-height: 64px;
  }

  .head-desk .bubble {
    position: absolute;
    z-index: 10001;
    top: calc(100% - 11px);
    right: 15px;
    width: min(510px, calc(100vw - 42px));
    margin: 0;
    padding: 23px;
    border: 1px solid rgba(106, 27, 154, .18);
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, #faf7fc 100%);
    box-shadow: 0 22px 56px rgba(31, 20, 38, .22);
    transform: translateY(-10px) scale(.98);
  }

  .head-desk .bubble.is-open {
    transform: translateY(0) scale(1);
  }

  .search-desktop {
    display: block;
  }

  .desktop-search-kicker {
    margin: 0 42px 6px 0;
    color: var(--tc-text-main);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.025em;
  }

  .desktop-search-row {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .head-desk .search-field-desk {
    height: 54px;
    border-radius: 11px;
    font-size: .93rem;
  }

  .head-desk .btn-search-desk {
    height: 54px;
    padding: 0 20px;
    border-radius: 11px;
    font-size: .84rem;
  }

  .desktop-search-hint {
    margin: 10px 0 0;
    color: #817a85;
    font-size: .76rem;
  }

  .head-desk .search-panel-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
  }
}

.bubble {
  background-color: var(--tc-white);
  border: 1px solid var(--tc-border);
  border-top: 3px solid var(--tc-primary);
  border-radius: 8px;
  box-shadow: var(--tc-shadow);
}

.bubble:after {
  border-color: var(--tc-primary) transparent;
}

.search-field-desk,
.search-field-mobile {
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* Buscador: panel compacto en escritorio y experiencia de foco en movil. */
.bubble {
  display: block;
  width: min(430px, calc(100vw - 32px));
  padding: 12px;
  margin: 12px 0 0;
  border: 1px solid rgba(106, 27, 154, .2);
  border-top: 0;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(31, 20, 38, .2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(.98);
  transition: opacity .18s ease, transform .18s ease;
}

.bubble:after { display: none; }
.bubble.is-open { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.search-desktop { display: flex; align-items: center; gap: 8px; }
.search-input-wrap { position: relative; display: block; flex: 1; }
.search-input-wrap > .fa { position: absolute; z-index: 1; top: 50%; left: 13px; color: #8a8290; transform: translateY(-50%); }
.search-field-desk,
.search-field-mobile { width: 100%; height: 46px; margin: 0; padding: 0 14px 0 38px; font-family: var(--tc-font); border: 1px solid #ddd; border-radius: 8px; box-shadow: none; }
.search-field-desk:focus,
.search-field-mobile:focus { border-color: var(--tc-primary); box-shadow: 0 0 0 3px rgba(106, 27, 154, .12); outline: 0; }
.btn-search-desk { height: 46px; margin: 0; padding: 0 16px; border: 0; font-family: var(--tc-font); font-weight: 700; }
.search-panel-close { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; color: #6b6470; background: transparent; }
.search-panel-close:hover { color: var(--tc-primary); background: #f3edf6; }
.mobile-search-kicker { margin: 0 0 16px; color: #eee6f4; font-size: 1.05rem; font-weight: 700; text-align: left; }
.search-mobile { max-width: 520px; margin: 88px auto 0; padding: 28px; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(0,0,0,.12); text-align: left; }
.search-mobile .search-input-wrap { display: block; }
.btn-search-mobile { width: 100%; margin-top: 14px; padding: 13px 20px; border: 0; border-radius: 8px; font-family: var(--tc-font); font-weight: 700; }

.btn-search-desk,
.btn-search-mobile,
.native-share {
  background-color: var(--tc-primary);
  border-radius: 6px;
}

.btn-search-desk:hover,
.btn-search-mobile:hover,
.native-share:hover {
  background-color: var(--tc-primary-dark);
}

/* Buscador de escritorio: dialogo editorial centrado, para que la accion de
   buscar no compita con la navegacion ni comprima el formulario. */
@media (min-width: 992px) {
  body.desktop-search-open {
    overflow: hidden;
  }

  body.desktop-search-open::before {
    position: fixed;
    z-index: 9998;
    inset: 0;
    background: rgba(28, 21, 31, .38);
    content: '';
    backdrop-filter: blur(5px);
  }

  .head-desk .bubble {
    position: fixed;
    z-index: 10001;
    top: 50%;
    right: auto;
    left: 50%;
    width: min(760px, calc(100vw - 56px));
    margin: 0;
    padding: 36px 38px 32px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f3fb 100%);
    box-shadow: 0 30px 80px rgba(14, 8, 17, .34);
    transform: translate(-50%, calc(-50% - 12px)) scale(.98);
  }

  .head-desk .bubble.is-open {
    transform: translate(-50%, -50%) scale(1);
  }

  .search-desktop {
    display: block;
  }

  .desktop-search-kicker {
    margin: 0 52px 18px 0;
    font-size: 1.55rem;
    line-height: 1.1;
  }

  .desktop-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .head-desk .search-field-desk {
    height: 60px;
    padding-left: 44px;
    border-color: #8d42b5;
    border-radius: 13px;
    color: #ffffff;
    background: var(--tc-primary);
    caret-color: #ffffff;
    font-size: 1rem;
  }

  .head-desk .search-field-desk::placeholder {
    color: rgba(255, 255, 255, .72);
  }

  .head-desk .search-field-desk:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(106, 27, 154, .2);
  }

  .head-desk .search-field-desk:-webkit-autofill,
  .head-desk .search-field-desk:-webkit-autofill:hover,
  .head-desk .search-field-desk:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    box-shadow: 0 0 0 1000px var(--tc-primary) inset;
    caret-color: #ffffff;
  }

  .head-desk .search-input-wrap > .fa {
    left: 16px;
    color: rgba(255, 255, 255, .72);
    font-size: 1rem;
  }

  .head-desk .btn-search-desk {
    height: 60px;
    min-width: 116px;
    border-radius: 13px;
    font-size: .9rem;
  }

  .desktop-search-hint {
    margin-top: 14px;
    font-size: .82rem;
  }

  .head-desk .search-panel-close {
    top: 20px;
    right: 20px;
    width: 38px;
    height: 38px;
  }
}

.head-mobil {
  border-top: 0;
  border-bottom: 1px solid var(--tc-border);
}

.menu-left {
  background-color: var(--tc-primary);
}

/* ==========================================================================
   Tipografia y color de marca en componentes ya existentes
   ========================================================================== */

.skip-link,
a:focus-visible, button:focus-visible, input:focus-visible,
.editPostAdmin,
.current,
.etiqueta,
.comentarios,
.card-category {
  background-color: var(--tc-primary);
}

.skip-link { background: var(--tc-primary); }
a:focus-visible, button:focus-visible, input:focus-visible { outline-color: var(--tc-primary); }

/* ==========================================================================
   Cards (variante 'grid' de template-parts/card.php)
   ========================================================================== */

.card {
  background: var(--tc-white);
  border-radius: var(--tc-radius);
  overflow: hidden;
  box-shadow: var(--tc-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--tc-shadow-hover);
}

.card .editContent {
  width: 100%;
  margin: 0;
  position: relative;
}

.card .editContent img,
.card img.post-image {
  width: 100%;
  max-width: none;
  height: 240px;
  object-fit: cover;
  display: block;
  margin: 0;
}

.card .editPostAdmin {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s;
}

.card:hover .editPostAdmin {
  opacity: 1;
}

.card .post-title {
  padding: 18px 20px 20px;
  margin-top: 0;
  min-height: auto;
}

.card .card-category {
  font-size: 0.7rem;
}

.card .post-title > a {
  color: var(--tc-text-main);
  text-decoration: none;
  transition: color .16s ease;
}

.card .post-title > a > p {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 0 6px;
  text-decoration: none;
}

/* Los titulos de tarjetas se distinguen por jerarquia y hover, no por el
   subrayado heredado de los enlaces. Cubre grilla, compactas y laterales. */
.post-tendencias > a,
.post-tendencias > a > p,
.post-popular > a,
.post-popular > a > p,
.related-card,
.related-card h4,
.trending-item,
.trending-text,
.hero-post-title > a {
  text-decoration: none;
}

.card .card-date {
  margin-top: 0;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #999999;
}

/* Portada: cada noticia se presenta como una tarjeta independiente. El
   articulo conserva las columnas de Bootstrap, mientras el pseudo-elemento
   crea una superficie interior para que el gutter no quede blanco ni unido
   a la tarjeta vecina. */
body.home {
  background: #f5f5f6;
}

body.home #main-content.contenido {
  background: transparent;
  padding-top: 38px;
  padding-bottom: 60px;
}

body.search-results {
  background: #f5f5f6;
}

body.page-template-pag-tendencias,
body.page-template-pag-vistos {
  background: #f5f5f6;
}

body.search-results #main-content.contenido {
  background: transparent;
  padding-top: 38px;
  padding-bottom: 60px;
}

body.category,
body.tax-futbol_categories,
body.tag {
  background: #f5f5f6;
}

.category-archive-page,
.tag-archive-page {
  background: transparent !important;
  padding-top: 38px;
  padding-bottom: 60px;
}

.editorial-ranking-page {
  background: transparent !important;
  padding-top: 38px;
  padding-bottom: 60px;
}

.tag-archive-intro {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: 16px;
  background: var(--tc-white);
  box-shadow: var(--tc-shadow);
}

.tag-archive-image {
  flex: 0 0 180px;
}

.tag-archive-image img {
  display: block;
  width: 100%;
  height: 112px;
  border-radius: 10px;
  object-fit: cover;
}

.tag-archive-copy p {
  margin: 0;
  color: var(--tc-text-muted);
  font-size: .92rem;
  line-height: 1.6;
}

.search-results-heading {
  margin: 0 0 28px;
}

.search-results-heading p {
  margin: 0 0 6px;
  color: var(--tc-primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.search-results-heading h1 {
  margin: 0;
  color: var(--tc-text-main);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.03em;
}

.search-results-heading h1 span {
  color: var(--tc-primary);
}

.search-empty {
  margin: 0;
  padding: 28px;
  border-radius: 14px;
  background: var(--tc-white);
  box-shadow: var(--tc-shadow);
}

.archive-results-heading {
  margin: 0 0 28px;
}

.archive-results-heading > p {
  margin: 0 0 6px;
  color: var(--tc-primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.archive-results-heading h1 {
  margin: 0;
  color: var(--tc-text-main);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.03em;
}

.archive-results-heading h1 + p {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--tc-text-muted);
  font-size: .92rem;
  line-height: 1.6;
}

/* La primera caja de la barra lateral debe arrancar en la misma linea que la
   nota destacada; el padding heredado era un remanente del layout anterior. */
@media (min-width: 992px) {
  body.home .sidebar-top {
    padding-top: 0;
  }
}

.home-news-grid {
  clear: both;
  margin: 36px -15px 0;
}

.home-news-grid::after {
  content: '';
  display: table;
  clear: both;
}

.home-news-grid .card {
  min-height: 0;
  margin-bottom: 30px;
  padding: 0 15px;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.home-news-grid .card::before {
  position: absolute;
  z-index: 0;
  inset: 0 15px;
  content: '';
  border-radius: 22px;
  background: var(--tc-white);
  box-shadow: 0 16px 35px rgba(22, 18, 25, 0.09);
}

.home-news-grid .card:hover {
  transform: none;
  box-shadow: none;
}

.home-news-grid .card:hover::before {
  box-shadow: 0 20px 42px rgba(22, 18, 25, 0.14);
}

/* Las tarjetas usan columnas flotantes: reiniciar la columna izquierda en
   cada par evita que un titular largo cree un efecto de masonry involuntario. */
@media (min-width: 768px) {
  .home-news-grid > article.card:nth-of-type(odd) {
    clear: left;
  }
}

.home-news-grid .card .editContent,
.home-news-grid .card .post-title {
  position: relative;
  z-index: 1;
}

.home-news-grid .card .editContent {
  overflow: hidden;
  border-radius: 22px 22px 0 0;
}

.home-news-grid .card .post-title {
  min-height: 0;
  padding: 20px 28px 28px;
}

.home-news-grid .card .card-meta-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.home-news-grid .card .card-category {
  display: inline-block;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tc-primary);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  text-align: right;
  text-transform: uppercase;
}

.home-news-grid .card .post-title > a > p {
  margin: 0 0 10px;
  font-size: 1.25rem;
  line-height: 1.27;
}

.home-news-grid .card .card-date {
  font-size: 0.82rem;
  line-height: 1;
  white-space: nowrap;
}

.home-infinite-scroll-status {
  display: none;
}

.archive-infinite-scroll-status {
  display: none;
}

@media (min-width: 992px) {
  body.infinite-pagination-ready .home-pagination,
  body.infinite-pagination-ready .pagination-post {
    display: none;
  }

  body.infinite-pagination-ready .home-infinite-scroll-status,
  body.infinite-pagination-ready .archive-infinite-scroll-status {
    display: flex;
    clear: both;
    align-items: center;
    justify-content: center;
    margin: 6px 15px 38px;
  }

  body.infinite-pagination-ready .infinite-status-label {
    display: none;
  }

  .infinite-load-more {
    min-width: 184px;
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid var(--tc-primary);
    border-radius: 999px;
    color: var(--tc-primary);
    background: #ffffff;
    font-family: var(--tc-font);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .01em;
    transition: color .16s ease, background-color .16s ease, box-shadow .16s ease;
  }

  .infinite-load-more:hover,
  .infinite-load-more:focus {
    color: #ffffff;
    background: var(--tc-primary);
    box-shadow: 0 8px 18px rgba(106, 27, 154, .2);
    outline: 0;
  }

  .infinite-load-more:disabled {
    cursor: wait;
    opacity: .6;
  }

  .home-infinite-scroll-status.is-loading .infinite-load-more,
  .archive-infinite-scroll-status.is-loading .infinite-load-more {
    color: transparent;
  }

  .home-infinite-scroll-status.is-loading .infinite-load-more::after,
  .archive-infinite-scroll-status.is-loading .infinite-load-more::after {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(106, 27, 154, .25);
    border-top-color: var(--tc-primary);
    border-radius: 50%;
    content: '';
    animation: tecache-spin .7s linear infinite;
  }
}

/* ==========================================================================
   Nota destacada de portada (hero.php) — equivalente a .card.featured
   ========================================================================== */

.hero-post {
  background: var(--tc-white);
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow);
  border-bottom: 0;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
}

.hero-post-media {
  height: 100%;
}

.hero-post-media img {
  height: 100%;
  min-height: 350px;
}

.hero-post-body {
  flex: 1 1 360px;
  padding: 20px 28px;
}

.hero-post-title {
  font-size: 1.6rem;
  line-height: 1.2;
  margin-bottom: 15px;
}

.hero-post-title > a {
  color: var(--tc-text-main);
}

/* Todas las tarjetas comparten una respuesta de lectura consistente: el
   titular toma el morado de marca, sin subrayados ni saltos de layout. */
.post-tendencias > a,
.post-popular > a,
.trending-item,
.related-card h4 {
  transition: color .16s ease;
}

.card .post-title > a:hover,
.post-tendencias > a:hover,
.post-popular > a:hover,
.trending-item:hover .trending-text,
.related-card:hover h4 {
  color: var(--tc-primary);
  text-decoration: none;
}

.hero-post-title > a:hover {
  color: var(--tc-primary);
}

.hero-post-excerpt {
  color: var(--tc-text-muted);
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.hero-post .card-date {
  font-size: 0.8rem;
  color: #999999;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (max-width: 767px) {
  .hero-post {
    grid-template-columns: 1fr;
  }

  .hero-post-body {
    padding: 22px 20px;
  }

  .hero-post-title {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   Cajas de sidebar (Tendencias, Mas vistos, Newsletter)
   ========================================================================== */

.sidebar-box {
  background: var(--tc-white);
  padding: 24px;
  border-radius: var(--tc-radius);
  box-shadow: var(--tc-shadow);
  margin-bottom: 28px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tc-text-main);
}

.section-title::after {
  content: '';
  order: 2;
  flex: 1;
  height: 2px;
  background: #eeeeee;
}

.section-title-link {
  order: 3;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--tc-primary);
  text-transform: uppercase;
}

/* Tendencias: lista numerada sin imagen */

.trending-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.trending-item:last-child {
  margin-bottom: 0;
}

.trending-number {
  font-size: 2rem;
  font-weight: 800;
  color: #eeeeee;
  line-height: 1;
  flex: 0 0 auto;
}

.trending-item:hover .trending-number {
  color: var(--tc-primary);
}

.trending-text {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--tc-text-main);
}

.trending-item:hover .trending-text {
  color: var(--tc-primary);
}

/* "Mas vistos": lista editorial compacta con miniatura persistente. */

.most-viewed .section-title {
  margin-bottom: 20px;
}

.most-viewed-item {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--tc-border);
}

.most-viewed-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.most-viewed-item .lateral-clean {
  float: none;
}

.most-viewed-item .lateral-clean:first-child {
  width: 88px;
  flex: 0 0 88px;
}

.most-viewed-item .lateral-clean:last-child {
  width: auto;
  flex: 1 1 auto;
}

.most-viewed-item .post-image {
  display: block;
  width: 88px;
  height: 70px;
  max-width: none;
  border-radius: 8px;
  object-fit: cover;
}

.most-viewed-item .post-popular > a > p {
  margin: 0;
  padding: 0 !important;
  color: var(--tc-text-main);
  font-size: 0.9rem !important;
  font-weight: 700;
  line-height: 1.28;
}

.most-viewed-item .post-popular > a:hover p {
  color: var(--tc-primary);
}

/* Newsletter */

.newsletter-box {
  background: var(--tc-primary);
  color: var(--tc-white);
}

.newsletter-box h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.newsletter-box p {
  font-size: 0.85rem;
  color: #e6cdf0;
  margin-bottom: 14px;
}

.newsletter-form input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #e6cdf0;
  background: #ffffff;
  color: #333333;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.newsletter-form input[type="email"]::placeholder {
  color: #9b8fa8;
}

.newsletter-form input[type="email"]:focus {
  border-color: var(--tc-accent);
  outline: 3px solid rgba(255, 255, 255, 0.35);
  outline-offset: 2px;
}

.newsletter-form button {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: var(--tc-accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}

.newsletter-form button:hover {
  opacity: 0.9;
}

/* ==========================================================================
   Footer oscuro
   ========================================================================== */

.footer {
  position: relative;
  margin-top: 72px;
  overflow: hidden;
  color: #eadff0;
  background:
    radial-gradient(circle at 88% -30%, rgba(255, 255, 255, .18), transparent 36%),
    linear-gradient(125deg, #3a0b60 0%, var(--tc-primary) 54%, #421069 100%);
}

.footer::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: '';
  background: #26063f;
}

.footer-main-wrap,
.footer .last-line {
  position: relative;
}

.footer-main {
  display: flex;
  align-items: flex-start;
  min-height: 228px;
  padding-top: 58px;
  padding-bottom: 52px;
}

.footer .footer-brand,
.footer .footer-about,
.footer .footer-partners-wrap {
  float: none;
}

.footer .footer-brand {
  flex: 0 0 35%;
  width: 35%;
}

.footer .footer-about {
  flex: 1 1 auto;
  width: auto;
  margin-top: 2px;
  padding-left: 46px;
  border-left: 1px solid rgba(255, 255, 255, .24);
}

.footer .logo-footer {
  width: 100%;
  max-width: 204px;
  margin: 0;
}

.footer-logo-link {
  display: inline-block;
}

.footer .social-footer {
  display: flex;
  gap: 10px;
  margin: 23px 0 0;
  padding: 0;
}

.footer .social-footer > li {
  display: block;
  margin: 0;
  padding: 0;
}

.footer .social-footer > li > a {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.footer .footer-title {
  margin: 0 0 15px;
  color: var(--tc-white);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.footer .footer-text {
  max-width: 510px;
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: .95rem;
  line-height: 1.75;
}

.footer .footer-partners { margin: 0; padding: 0; }
.footer .footer-partners li { margin: 0 0 8px; }
.footer .footer-partners a {
  color: #b6afb9;
  font-size: .86rem;
}

.footer .footer-partners a:hover {
  color: var(--tc-white);
}

.footer .social-footer > li > a {
  color: #ffffff;
}

.footer .social-footer > li > a:hover {
  border-color: #ffffff;
  background: #ffffff;
  color: var(--tc-primary);
  transform: translateY(-2px);
}

/* Font Awesome dibuja los otros accesos del footer a ~18 px; el SVG de
   TikTok necesita la misma medida para no verse más pequeño o desaparecer
   visualmente dentro de su botón circular. */
.footer .social-tiktok-icon {
  width: 18px;
  height: 18px;
}

.footer .last-line {
  background: rgba(34, 4, 57, .32);
  border-top: 1px solid rgba(255, 255, 255, .18);
}

.footer-bottom {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 66px;
}

.footer .footer-legal {
  width: auto;
  text-align: center;
}

.footer .footer-nav {
  display: block;
  position: absolute;
  right: 15px;
  width: auto;
}

.footer .last-line-text {
  margin: 0;
  padding: 0;
  color: rgba(255, 255, 255, .72);
  font-size: .74rem;
}

.footer .last-line-text a,
.footer .menu-footer > li > a {
  color: #ffffff;
}

.footer .last-line-text a:hover,
.footer .menu-footer > li > a:hover {
  color: #f4cffd;
}

.footer .last-line-text,
.footer .menu-footer > li > a {
  color: rgba(255, 255, 255, .72);
}

.footer .menu-footer > li > a:hover {
  color: var(--tc-white);
}

.footer .menu-footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  margin: 0;
}

.footer .menu-footer > li { margin: 0; }
.footer .menu-footer > li > a { font-size: .75rem; }

@media (max-width: 991px) {
  .top-bar {
    height: 5px;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 10002;
  }

  .top-bar .container {
    display: none;
  }

  .head-mobil {
    top: 5px;
  }

  body.single #main-content {
    padding-top: 0;
  }

  body.home .home-most-viewed,
  body.home .home-pagination {
    display: none;
  }

  body.home .home-infinite-scroll-status {
    display: flex;
    clear: both;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    margin: 0 15px 30px;
    border: 1px solid #e6dceb;
    border-radius: 12px;
    color: var(--tc-primary);
    background: #fbf9fc;
    font-size: .8rem;
    font-weight: 700;
  }

  body.home .home-infinite-scroll-status.is-loading span::before {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid rgba(106, 27, 154, .25);
    border-top-color: var(--tc-primary);
    border-radius: 50%;
    content: '';
    animation: tecache-spin .7s linear infinite;
  }

  body.category .pagination-post,
  body.tax-futbol_categories .pagination-post,
  body.search-results .pagination-post,
  body.author .pagination-post,
  body.tag .pagination-post {
    display: none;
  }

  .archive-infinite-scroll-status {
    display: flex;
    clear: both;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    margin: 0 15px 30px;
    border: 1px solid #e6dceb;
    border-radius: 12px;
    color: var(--tc-primary);
    background: #fbf9fc;
    font-size: .8rem;
    font-weight: 700;
  }

  .archive-infinite-scroll-status.is-loading span::before {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid rgba(106, 27, 154, .25);
    border-top-color: var(--tc-primary);
    border-radius: 50%;
    content: '';
    animation: tecache-spin .7s linear infinite;
  }

  .infinite-load-more {
    display: none;
  }

  .footer-main,
  .footer-bottom {
    display: block;
  }

  .footer .footer-brand,
  .footer .footer-about,
  .footer .footer-partners-wrap { margin-bottom: 34px; }
  .footer .footer-partners-wrap { margin-bottom: 0; }
  .footer .footer-brand {
    width: 100%;
    flex-basis: auto;
    text-align: center;
  }
  .footer .footer-logo-link { margin: 0 auto; }
  .footer .logo-footer {
    max-width: 250px;
    margin: 0 auto;
  }
  .footer .social-footer {
    justify-content: center;
  }
  .footer .footer-about {
    width: 100%;
    padding-left: 0;
    border-left: 0;
    text-align: center;
  }
  .footer-bottom { padding: 22px 15px; }
  .footer .footer-nav {
    position: static;
    width: 100%;
    margin-top: 14px;
  }
  .footer .menu-footer { justify-content: center; }
}

/* Páginas institucionales: información clara y formularios funcionales sin
   heredar el estilo antiguo de páginas genéricas. */
.institutional-page {
  min-height: 58vh;
  background: var(--tc-bg);
}

.institutional-hero {
  padding: 80px 0 72px;
  color: #ffffff;
  background: linear-gradient(125deg, #3a0b60, var(--tc-primary) 58%, #421069);
}

.institutional-eyebrow {
  margin: 0 0 12px;
  color: var(--tc-accent);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.institutional-hero .institutional-eyebrow { color: #f5ceff; }
.institutional-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.3rem, 5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -.06em;
  line-height: 1;
}

.institutional-lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .84);
  font-size: 1.08rem;
  line-height: 1.6;
}

.institutional-content { padding-top: 52px; padding-bottom: 8px; }
.institutional-intro {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 52px;
  align-items: center;
  margin-bottom: 46px;
}

.institutional-intro h2,
.institutional-form-card h2 {
  margin: 0;
  color: var(--tc-text-main);
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.15;
}

.institutional-intro p { margin: 16px 0 0; color: var(--tc-text-muted); font-size: 1rem; line-height: 1.7; }
.institutional-metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.institutional-metrics > div { min-height: 112px; padding: 19px; border: 1px solid #e5dceb; border-radius: 14px; background: #ffffff; box-shadow: 0 9px 22px rgba(39, 16, 51, .05); }
.institutional-metrics strong { display: block; color: var(--tc-primary); font-size: 1.28rem; font-weight: 800; letter-spacing: -.04em; }
.institutional-metrics span { display: block; margin-top: 6px; color: #746b79; font-size: .78rem; font-weight: 600; line-height: 1.35; }
.institutional-form-card { max-width: 820px; margin: 0 auto 72px; padding: 38px; border: 1px solid #e8e0ed; border-radius: 20px; background: #ffffff; box-shadow: var(--tc-shadow); }
.institutional-form-heading { margin-bottom: 26px; }
.institutional-form-heading .institutional-eyebrow { margin-bottom: 8px; }
.institutional-form-card .wpcf7-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.institutional-form-card .wpcf7-form > p { display: grid; gap: 7px; margin: 0; color: #4f4655; font-size: .8rem; font-weight: 700; }
.institutional-form-card .wpcf7-form > p:nth-of-type(4),
.institutional-form-card .wpcf7-form > p:nth-of-type(5) { grid-column: 1 / -1; }
.institutional-form-card .wpcf7-form > p > label { display: grid; gap: 7px; margin: 0; }
.institutional-form-card .wpcf7-form-control-wrap { display: block; }
.institutional-form-card input,
.institutional-form-card textarea { width: 100%; padding: 12px 13px; border: 1px solid #ded6e3; border-radius: 9px; outline: 0; color: var(--tc-text-main); background: #fcfbfd; font: inherit; font-size: .92rem; }
.institutional-form-card textarea { min-height: 126px; resize: vertical; }
.institutional-form-card input:focus,
.institutional-form-card textarea:focus { border-color: var(--tc-primary); box-shadow: 0 0 0 3px rgba(106, 27, 154, .12); }
.institutional-form-card .wpcf7-submit { width: auto; min-width: 154px; border: 0; border-radius: 9px; color: #ffffff; background: var(--tc-primary); font-weight: 800; cursor: pointer; transition: background-color .16s ease; }
.institutional-form-card .wpcf7-submit:hover { background: var(--tc-primary-dark); }
.institutional-form-card .wpcf7-response-output { grid-column: 1 / -1; margin: 0 !important; }
.institutional-form-notice { margin: 0; color: var(--tc-text-muted); }

@media (max-width: 767px) {
  .institutional-hero { padding: 54px 0 50px; }
  .institutional-content { padding-top: 34px; }
  .institutional-intro { grid-template-columns: 1fr; gap: 28px; }
  .institutional-metrics { gap: 10px; }
  .institutional-metrics > div { min-height: 100px; padding: 15px; }
  .institutional-form-card { margin-bottom: 46px; padding: 26px 20px; border-radius: 16px; }
  .institutional-form-card .wpcf7-form { grid-template-columns: 1fr; }
  .institutional-form-card .wpcf7-form > p:nth-of-type(4),
  .institutional-form-card .wpcf7-form > p:nth-of-type(5) { grid-column: auto; }
}

@keyframes tecache-spin {
  to { transform: rotate(360deg); }
}

/* Navegacion movil: un panel editorial compacto, con jerarquia de secciones
   y una busqueda visible sin los controles heredados. */
@media (max-width: 715px) {
  /* La franja y la navegacion se comportan como una sola cabecera fija.
     Dos elementos sticky consecutivos pueden solaparse al hacer scroll en
     Safari/Chrome móvil y dejar visible solo una parte del encabezado. */
  .top-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10003;
  }

  .head-mobil {
    position: fixed !important;
    top: 5px;
    right: 0;
    left: 0;
    width: 100%;
    z-index: 10002;
  }

  .mobile-header-spacer {
    display: block;
    height: 69px;
  }

  .admin-bar .top-bar {
    top: 46px;
  }

  .admin-bar .head-mobil {
    top: 51px;
  }

  body.mobile-panel-open {
    overflow: hidden;
  }

  .head-mobil {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 16px;
    border-top: 0;
    border-bottom: 1px solid #e9e5eb;
    box-shadow: 0 3px 14px rgba(27, 20, 31, .05);
  }

  .head-mobil > a {
    display: flex;
    align-items: center;
    height: 100%;
  }

  .head-mobil .mobil-logo {
    width: 148px !important;
    margin: 0;
  }

  .head-mobil .header-icon-button {
    display: grid;
    width: 40px;
    height: 40px;
    padding: 0;
    place-items: center;
    border: 1px solid #e5e0e8;
    border-radius: 50%;
    color: var(--tc-text-main);
    background: #ffffff;
    font-size: 17px !important;
  }

  .head-mobil .btn-bar,
  .head-mobil .btn-search {
    position: static;
    margin: 0 !important;
  }

  .menu-left {
    display: flex;
    flex-direction: column;
    position: fixed;
    /* Overlay full-screen: cubre top-bar (10003) y head-mobil (10002) para
       que la X del panel quede siempre accesible. */
    z-index: 10004;
    inset: 0;
    width: auto;
    height: 100dvh;
    padding: 0 22px 28px;
    overflow-y: auto;
    color: #ffffff;
    background: linear-gradient(145deg, #1c1222 0%, #321242 58%, #521879 100%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }

  .menu-left.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
  }

  .mobile-panel-brand {
    display: grid;
    color: #ffffff;
    font-family: var(--tc-font);
    line-height: 1.1;
    text-decoration: none;
  }

  .mobile-panel-brand span {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -.04em;
  }

  .mobile-panel-brand small {
    margin-top: 4px;
    color: #d9c6e5;
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
  }

  .menu-left .btn-close {
    display: grid;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
    font-size: 17px;
  }

  .mob-nav-content {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
  }

  .mob-nav-content,
  .mob-search-content {
    padding: 28px 0 0;
  }

  .mobile-panel-eyebrow {
    margin: 0 0 18px;
    color: #cfa7e4;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  .mobil-social {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
  }

  .mobil-social > li {
    display: block;
    padding: 0;
  }

  .mobil-social > li > a {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(255, 255, 255, .08);
  }

  .mobil-menu {
    margin: 0 0 16px;
    padding: 0 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    list-style: none;
  }

  .mobil-menu > li {
    padding: 0;
    color: #d9c6e5;
    font-size: .72rem;
  }

  .mobile-menu {
    margin: 0;
    padding: 0;
  }

  .mobile-menu > li,
  .mobile-menu > li:nth-child(7) {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
  }

  .mobile-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
    color: #ffffff;
    font-family: var(--tc-font);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -.01em;
    text-decoration: none;
    text-transform: none;
  }

  .mobile-menu > li > a::after {
    color: #d7b8e9;
    content: '›';
    font-size: 1.6rem;
    font-weight: 400;
  }

  .mobile-panel-footer {
    margin-top: auto;
    padding: 22px 0 2px;
    border-top: 1px solid rgba(255, 255, 255, .16);
  }

  .search-mobile {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .mobile-search-kicker {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.04em;
  }

  .search-field-mobile {
    height: 54px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, .1);
  }

  .search-field-mobile::placeholder {
    color: #d8cce0;
  }

  .search-mobile .search-input-wrap > .fa {
    color: #e4d6ec;
  }

  .search-field-mobile:focus {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .16);
  }

  .btn-search-mobile {
    height: 52px;
    margin-top: 12px;
    border-radius: 12px;
    color: var(--tc-primary-dark);
    background: #ffffff;
  }
}

/* ==========================================================================
   Articulo (single.php)
   ========================================================================== */

/* El lienzo del articulo coincide con la referencia editorial: blanco limpio
   de borde a borde, para que titulo e imagen sean los protagonistas. */
body.single {
  background: #ffffff;
}

body.single #main-content {
  background: #ffffff;
  padding: 24px 0 48px;
}

.infinite-scroll-post {
  background: var(--tc-white);
}

/* Las miniaturas sin archivo usan un fallback editorial oscuro, nunca blanco. */
.post-image,
.related-card img,
.img-post-crop,
.img-post-crop-mob {
  background: #201222;
}

.post-image img,
.related-card img,
.img-post-crop img,
.img-post-crop-mob img {
  object-fit: cover;
}

.contenido-post {
  padding-top: 40px;
}

.category-label {
  display: inline-block;
  color: var(--tc-primary);
  text-transform: uppercase;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.single-title {
  font-size: 2.8rem;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 15px;
}

.single-subtitle {
  font-size: 0.9rem;
  color: #666666;
  border-bottom: 1px solid var(--tc-border);
  padding-bottom: 20px;
}

.single-subtitle .article-author-link {
  border-bottom: 1px solid rgba(106, 27, 154, .35);
  color: var(--tc-primary);
  font-weight: 800;
  text-decoration: none;
}

.single-subtitle .article-author-link:hover {
  border-bottom-color: var(--tc-primary);
  color: var(--tc-primary-dark);
}

.img-post-crop.post-portada {
  border-radius: var(--tc-radius);
  overflow: hidden;
}

/* Cuerpo del texto en serif para mejor lectura, como en la referencia */
.post-content {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.15rem;
  color: #333333;
  line-height: 1.8;
}

/* Enlaces dentro del contenido de la nota: morado de marca con subrayado
   sutil (el hover global del sitio quita subrayados; aqui se restituye
   porque en texto corrido el color solo no basta para distinguirlos). */
.post-content a {
  color: var(--tc-primary);
  text-decoration: underline;
  text-decoration-color: rgba(106, 27, 154, .35);
  text-underline-offset: 2px;
}

.post-content a:hover,
.post-content a:focus {
  color: var(--tc-primary-dark);
  text-decoration-color: var(--tc-primary-dark);
}

.post-content > p {
  font-size: 1.15rem;
  margin-bottom: 25px;
}

.post-content blockquote {
  background: #f4f4f7;
  border-left: 5px solid var(--tc-primary);
  padding: 30px;
  margin: 40px 0;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--tc-primary);
  border-radius: 0 8px 8px 0;
}

/* Compartir y etiquetas: una superficie breve, legible y consistente con
   el resto del articulo, sin depender de los botones heredados. */
.article-engagement {
  display: grid;
  gap: 24px;
  margin: 42px 0;
  padding: 26px 28px;
  border: 1px solid #eeeaf0;
  border-radius: 16px;
  background: #faf9fb;
}

.social-share,
.article-tags {
  display: flex;
  align-items: center;
  gap: 18px;
}

.article-engagement-title {
  flex: 0 0 auto;
  margin: 0;
  color: var(--tc-text-main);
  font-size: 0.95rem;
  font-weight: 800;
}

.share-actions,
.article-engagement .tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-actions a,
.share-actions .native-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  margin: 0;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  font-family: var(--tc-font);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  text-transform: none;
  transform: none;
  transition: background-color .16s ease, box-shadow .16s ease;
}

.share-actions .native-share { background: var(--tc-primary); }
.share-actions .facebook-share { background: #385898; }
.share-actions .twitter-share { background: #000000; }
.share-actions .whatsapp-share { background: #20b857; }
.share-actions .share-x { font-size: .92rem; font-weight: 800; line-height: 1; }
.share-actions a:hover,
.share-actions .native-share:hover {
  color: #ffffff;
  filter: none;
  transform: none;
  box-shadow: 0 4px 10px rgba(22, 18, 25, .14);
}
.share-actions .native-share:hover { background: var(--tc-primary-dark); }
.share-actions .facebook-share:hover { background: #2e4a7d; }
.share-actions .twitter-share:hover { background: #252525; }
.share-actions .whatsapp-share:hover { background: #169b48; }

/* Las marcas sociales no deben cambiar de caja al interactuar: solo varía
   el tono para comunicar hover, sin efecto de encogimiento. */
.share-actions > .whatsapp-share,
.share-actions > .facebook-share,
.share-actions > .twitter-share,
.share-actions > .whatsapp-share:hover,
.share-actions > .facebook-share:hover,
.share-actions > .twitter-share:hover,
.share-actions > .whatsapp-share:focus,
.share-actions > .facebook-share:focus,
.share-actions > .twitter-share:focus {
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 13px !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  transition: background-color .16s ease !important;
}

.article-engagement .tags > li {
  display: block;
  margin: 0;
  border: 0;
}

.article-engagement .tags > li > a {
  display: block;
  margin: 0;
  padding: 8px 11px;
  border: 1px solid #ded9e2;
  border-radius: 999px;
  color: #5d5663;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.article-engagement .tags > li > a:hover {
  border-color: var(--tc-primary);
  background: #f3edf6;
  color: var(--tc-primary);
}

.article-related {
  margin-top: 36px;
  padding-top: 0;
  border-top: 0;
}

.article-related-list {
  margin: 0 -15px;
}

/* Sidebar del articulo: se queda fija al hacer scroll junto al contenido */
.sidebar-sticky {
  position: sticky;
  top: 24px;
}

.related-card {
  display: flex;
  gap: 15px;
  text-decoration: none;
  color: inherit;
  margin-bottom: 18px;
}

.related-card img.post-image {
  width: 72px;
  height: 72px;
  max-width: none;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 auto;
}

.related-card h4 {
  font-size: 0.9rem;
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 4px;
  color: var(--tc-text-main);
}

.related-card:hover h4 {
  color: var(--tc-primary);
}

.related-card small {
  color: #999999;
  font-size: 0.75rem;
}

/* "Ultimas noticias" bajo el articulo */
.article-latest {
  margin-top: 36px;
  padding-top: 0;
  border-top: 0;
}

.article-latest .article-latest-grid {
  margin-top: 0;
}

.single-mobile-discover {
  display: none;
}

.single-latest-infinite-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  margin: 12px 0 4px;
  border: 1px solid #e6dceb;
  border-radius: 12px;
  color: var(--tc-primary);
  background: #fbf9fc;
  font-size: .8rem;
  font-weight: 700;
}

.single-latest-infinite-status.is-loading span::before {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid rgba(106, 27, 154, .25);
  border-top-color: var(--tc-primary);
  border-radius: 50%;
  content: '';
  animation: tecache-spin .7s linear infinite;
}

/* Sentinel invisible que dispara la carga de la siguiente nota */
.infinite-scroll-sentinel {
  height: 1px;
}

.infinite-scroll-loading {
  text-align: center;
  padding: 30px 0;
  color: #999999;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

.topic-hub-intro { max-width: 760px; margin: 0 0 18px; }
.topic-breadcrumbs { clear: both; margin: 0 0 24px; color: #6b7280; font-size: 14px; }
.topic-breadcrumbs a, .article-topics a { color: var(--tc-primary, #6a1b9a); }
.article-topics { margin: 16px 0; font-size: 14px; }
.article-topics a { display: inline-block; margin: 0 4px 5px; font-weight: 700; }
.author-profile { overflow: hidden; }
body.author { background: #f5f5f6; }
.author-archive-page { background: transparent !important; padding-top: 38px; padding-bottom: 60px; }
.author-profile { display: flex; align-items: center; gap: 22px; margin: 0 0 40px; padding: 28px; border-radius: 18px; background: var(--tc-white); box-shadow: var(--tc-shadow); }
.author-profile-avatar { flex: 0 0 auto; }
.author-profile .avatar { display: block; width: 112px; height: 112px; margin: 0; border: 4px solid #f0e7f5; border-radius: 50%; }
.author-profile-details { min-width: 0; }
.author-kicker { margin: 0 0 5px; color: var(--tc-primary); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.author-profile h1 { margin: 0; color: var(--tc-text-main); font-size: 2rem; font-weight: 800; letter-spacing: -.04em; }
.author-role { margin: 5px 0 0; color: #6b6470; font-size: .9rem; font-weight: 700; }
.author-bio { max-width: 660px; margin-top: 10px; color: var(--tc-text-muted); font-size: .9rem; line-height: 1.6; }
.author-bio p { margin: 0; }
.author-posts .section-title { margin-bottom: 20px; }
.author-posts-grid { margin-top: 0; }
@media (min-width: 992px) {
  .author-archive-page .sidebar-top,
  .category-archive-page .sidebar-top,
  .search-results-page .sidebar-top,
  .tag-archive-page .sidebar-top,
  .editorial-ranking-page .sidebar-top { padding-top: 0; }
}
.social-tiktok-icon { display: block; width: 15px; height: 15px; fill: currentColor; }

@media (max-width: 991px) {
  .single-desktop-sidebar {
    display: none;
  }

  .single-mobile-discover {
    display: block;
    margin-top: 28px;
  }

  .single-mobile-discover .sidebar-box {
    margin-top: 0;
    margin-bottom: 24px;
  }

  .single-mobile-discover .newsletter-box {
    margin-bottom: 0;
  }

  .single-mobile-discover + .row {
    margin-top: 0;
  }

  .article-latest {
    margin-top: 28px;
  }

  .author-profile { align-items: flex-start; flex-direction: column; }

  .tag-archive-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .tag-archive-image {
    width: 100%;
    flex-basis: auto;
  }

  .tag-archive-image img {
    width: 100%;
    height: auto;
    max-height: 220px;
  }

  /* En portada movil se prioriza la actualidad: Tendencias aparece antes del
     bloque principal, mientras el orden de escritorio se mantiene intacto. */
  body.home #main-content.contenido {
    display: flex;
    flex-wrap: wrap;
  }

  body.home #main-content.contenido > h1 {
    order: 0;
    width: 100%;
  }

  body.home #main-content.contenido > .sidebar-top {
    order: 1;
    width: 100%;
    padding-top: 0;
  }

  body.home #main-content.contenido > .mob-margin {
    order: 2;
    width: 100%;
  }

  .social-share,
  .article-tags {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .sidebar-box {
    margin-top: 20px;
  }

  .sidebar-sticky {
    position: static;
  }

  .single-title {
    font-size: 1.8rem;
  }
}
