/* Touch UX — enlaces en un tap (sin hover transform, área clickeable amplia) */

/* Tarjetas y filas: overlay + enlace de título */
.dwr-card-hit,
.dwr-list-hit {
  position: relative;
}

.dwr-card-hit__overlay,
.dwr-list-hit__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.dwr-card-hit__link,
.dwr-list-hit__link {
  position: relative;
  z-index: 2;
}

.dwr-card-hit .dwr-category-chip,
.dwr-card-hit a.dwr-category-chip,
.dwr-list-hit .dwr-category-chip,
.dwr-list-hit a.dwr-category-chip {
  position: relative;
  z-index: 2;
}

/* Fallback stretched-link (título) */
.dwr-card-hit__link::after,
.dwr-list-hit__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* Anclas de la Guía rápida: scroll visible bajo header sticky */
.dwr-single-main .dw-content h2,
.dwr-single-main .dw-content h3,
.dwr-single-main .dw-content h2[id],
.dwr-single-main .dw-content h3[id] {
  scroll-margin-top: 96px;
}

html.dwr-touch a[href] {
  touch-action: manipulation;
}

@media (hover: none), (pointer: coarse) {
  a[href] {
    touch-action: manipulation;
  }
}

/* Header sticky: siempre por encima del contenido al hacer scroll (móvil) */
@media (max-width: 1024px) {
  header#top.dwr-header,
  .dwr-header {
    z-index: 1000 !important;
  }

  body.dw-menu-open header#top.dwr-header,
  body.dw-menu-open .dwr-header {
    z-index: 100000 !important;
    overflow: visible !important;
  }

  /* Panel fijo al viewport: el header tenía overflow:clip y recortaba el menú al scrollear */
  body.dw-menu-open header#top.dwr-header .dw-menu,
  body.dw-menu-open header#top.dwr-header .dwr-primary-menu,
  body.dw-menu-open .dwr-header .dw-menu {
    position: fixed !important;
    top: var(--dw-mobile-nav-top, 120px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }
}

/* —— Desactivar hover con movimiento en touch / móvil —— */
@media (max-width: 1024px), (hover: none), (pointer: coarse) {
  .dwr-story-card:hover,
  .dwr-featured-card:hover,
  .dwr-explore-card:hover,
  .dwr-archive-card:hover,
  .dwr-rank-card:hover,
  .dwr-hero-mini:hover,
  .dwr-panel:hover,
  .dwr-newsletter-card:hover,
  .dw-story:hover,
  .dw-story.dw-card:hover,
  .dwr-feature-card:hover,
  .dwr-home-social-card:hover,
  .dw-cat-card:hover,
  .dw-intel-card:hover,
  .dw-mini-post:hover,
  .dw-most-media:hover,
  .dwr-toc:hover,
  .dw-toc:hover,
  .dw-card:hover {
    transform: none !important;
  }

  .dwr-story-card:hover .dwr-story-card__media img,
  .dwr-featured-card:hover .dwr-featured-card__media img,
  .dwr-archive-card:hover .dwr-story-card__media img,
  .dwr-rank-card:hover .dwr-rank-card__media img,
  .dwr-hero-mini:hover .dwr-hero-mini__media img,
  .dw-story:hover .dw-story__media img,
  .dw-story:hover .dw-story__media .dw-thumb-placeholder {
    transform: none !important;
    filter: none !important;
  }

  .dwr-story-card:hover .dwr-category-chip,
  .dwr-featured-card:hover .dwr-category-chip,
  .dwr-explore-card:hover .dwr-explore-card__icon,
  .dwr-feature-card:hover .dwr-feature-card__icon,
  .dwr-rank-card:hover .dwr-rank-card__num,
  .dwr-section-head__more:hover,
  .dwr-section-front__more:hover,
  .dwr-list-block__more:hover,
  .dwr-panel__head a:hover,
  .dwr-cat-pill:hover,
  .dwr-client-chip:hover,
  .dwr-footer--v2 .dwr-footer-chip:hover,
  .dwr-home-social__link:hover,
  .dwr-share__btn:hover,
  .dw-post-nav__link:hover,
  a.dw-backtop.dwr-backtop:hover,
  .dw-menu a:hover,
  .dwr-header .dw-menu a:hover,
  .dwr-btn--primary:hover,
  .dwr-client-links-bar__link:hover,
  .dwr-ed-list__item--ranked:hover .dwr-ed-list__num,
  .dwr-toc a:hover,
  .dwr-compact-list a:hover,
  .dwr-ed-list__title:hover,
  .dwr-single-main .dw-content a:hover {
    transform: none !important;
  }

  .dw-story:hover::before {
    opacity: 0 !important;
  }
}

html.dwr-touch .dwr-story-card:hover,
html.dwr-touch .dwr-featured-card:hover,
html.dwr-touch .dwr-explore-card:hover,
html.dwr-touch .dwr-archive-card:hover,
html.dwr-touch .dwr-rank-card:hover,
html.dwr-touch .dwr-hero-mini:hover,
html.dwr-touch .dwr-panel:hover,
html.dwr-touch .dwr-newsletter-card:hover,
html.dwr-touch .dw-story:hover,
html.dwr-touch .dw-story.dw-card:hover,
html.dwr-touch .dwr-feature-card:hover,
html.dwr-touch .dwr-home-social-card:hover,
html.dwr-touch .dw-cat-card:hover,
html.dwr-touch .dw-intel-card:hover,
html.dwr-touch .dw-mini-post:hover,
html.dwr-touch .dw-most-media:hover,
html.dwr-touch .dwr-toc:hover,
html.dwr-touch .dw-toc:hover,
html.dwr-touch .dw-card:hover {
  transform: none !important;
}

html.dwr-touch .dwr-story-card:hover .dwr-story-card__media img,
html.dwr-touch .dwr-featured-card:hover .dwr-featured-card__media img,
html.dwr-touch .dwr-archive-card:hover .dwr-story-card__media img,
html.dwr-touch .dwr-rank-card:hover .dwr-rank-card__media img,
html.dwr-touch .dwr-hero-mini:hover .dwr-hero-mini__media img,
html.dwr-touch .dw-story:hover .dw-story__media img,
html.dwr-touch .dw-story:hover .dw-story__media .dw-thumb-placeholder {
  transform: none !important;
  filter: none !important;
}

html.dwr-touch .dwr-story-card:hover .dwr-category-chip,
html.dwr-touch .dwr-featured-card:hover .dwr-category-chip,
html.dwr-touch .dwr-explore-card:hover .dwr-explore-card__icon,
html.dwr-touch .dwr-feature-card:hover .dwr-feature-card__icon,
html.dwr-touch .dwr-rank-card:hover .dwr-rank-card__num,
html.dwr-touch .dwr-section-head__more:hover,
html.dwr-touch .dwr-section-front__more:hover,
html.dwr-touch .dwr-list-block__more:hover,
html.dwr-touch .dwr-panel__head a:hover,
html.dwr-touch .dwr-cat-pill:hover,
html.dwr-touch .dwr-client-chip:hover,
html.dwr-touch .dwr-footer--v2 .dwr-footer-chip:hover,
html.dwr-touch .dwr-home-social__link:hover,
html.dwr-touch .dwr-share__btn:hover,
html.dwr-touch .dw-post-nav__link:hover,
html.dwr-touch a.dw-backtop.dwr-backtop:hover,
html.dwr-touch .dw-menu a:hover,
html.dwr-touch .dwr-header .dw-menu a:hover,
html.dwr-touch .dwr-btn--primary:hover,
html.dwr-touch .dwr-client-links-bar__link:hover,
html.dwr-touch .dwr-ed-list__item--ranked:hover .dwr-ed-list__num,
html.dwr-touch .dwr-toc a:hover,
html.dwr-touch .dwr-compact-list a:hover,
html.dwr-touch .dwr-ed-list__title:hover,
html.dwr-touch .dwr-single-main .dw-content a:hover {
  transform: none !important;
}

html.dwr-touch .dw-story:hover::before {
  opacity: 0 !important;
}

/* —— Touch: un solo tap navega (sin :hover pegajoso que pinta naranja) —— */
@media (max-width: 1024px), (hover: none), (pointer: coarse) {
  .dwr-card-hit__link,
  .dwr-list-hit__link {
    pointer-events: none;
  }

  .dwr-card-hit .dwr-category-chip,
  .dwr-card-hit a.dwr-category-chip,
  .dwr-list-hit .dwr-category-chip,
  .dwr-list-hit a.dwr-category-chip {
    pointer-events: auto;
  }

  .dwr-ed-list__title:hover,
  .dwr-story-card__title a:hover,
  .dwr-story-card h3 a:hover,
  .dwr-featured-card__title a:hover,
  .dwr-hero-mini__title a:hover,
  .dwr-rank-card__title a:hover,
  .dwr-toc__list a:hover,
  .dwr-single-main .dw-toc a:hover,
  .dwr-compact-list a:hover,
  .nw-ticker__link:hover,
  .dwr-section-front__head h2 a:hover,
  .dwr-archive-card__title a:hover,
  .dwr-single-main .dw-content a:hover,
  .dwr-prose a:hover {
    color: var(--dwr-ink) !important;
    text-decoration: none !important;
  }

  .dwr-toc a.is-active,
  .dwr-single-main .dw-toc a.is-active {
    color: var(--dwr-primary) !important;
  }

  .dwr-ed-list__title:active,
  .dwr-story-card__title a:active,
  .dwr-toc__list a:active,
  .dwr-single-main .dw-toc a:active,
  .nw-ticker__link:active {
    color: var(--dwr-primary) !important;
  }
}

html.dwr-touch .dwr-ed-list__title:hover,
html.dwr-touch .dwr-story-card__title a:hover,
html.dwr-touch .dwr-story-card h3 a:hover,
html.dwr-touch .dwr-featured-card__title a:hover,
html.dwr-touch .dwr-hero-mini__title a:hover,
html.dwr-touch .dwr-toc__list a:hover,
html.dwr-touch .dwr-single-main .dw-toc a:hover,
html.dwr-touch .dwr-compact-list a:hover,
html.dwr-touch .nw-ticker__link:hover,
html.dwr-touch .dwr-single-main .dw-content a:hover {
  color: var(--dwr-ink) !important;
  text-decoration: none !important;
}

html.dwr-touch .dwr-toc a.is-active,
html.dwr-touch .dwr-single-main .dw-toc a.is-active {
  color: var(--dwr-primary) !important;
}

@media (max-width: 1024px) {
  html.dwr-touch .dwr-card-hit__link,
  html.dwr-touch .dwr-list-hit__link {
    pointer-events: none;
  }

  html.dwr-touch .dwr-card-hit .dwr-category-chip,
  html.dwr-touch .dwr-card-hit a.dwr-category-chip,
  html.dwr-touch .dwr-list-hit .dwr-category-chip,
  html.dwr-touch .dwr-list-hit a.dwr-category-chip {
    pointer-events: auto;
  }
}
