/* ==========================================================================
   ARTÍCULO 0 MEDIA - RESPONSIVE EDITORIAL
   Tablet y móvil. Mantiene la identidad visual sin convertir cada bloque
   en un cartel tamaño espectacular.
   ========================================================================== */

@media (max-width: 992px) {
  html {
    font-size: 16px;
  }

  body {
    font-size: 1rem;
    line-height: 1.6;
  }

  .a0-container,
  .a0-container-reading {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Header compacto y horizontal */
  .a0-topbar {
    display: none !important;
  }

  .a0-header-main {
    padding: 0 !important;
  }

  .a0-header-inner {
    min-height: 72px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
  }

  .a0-brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: left !important;
  }

  .a0-logo-badge {
    width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    object-fit: contain !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    flex: 0 0 40px !important;
  }

  .a0-logo-text {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    min-width: 0 !important;
    text-align: left !important;
  }

  .a0-brand-title {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.35px !important;
    white-space: nowrap !important;
  }

  .a0-brand-tagline {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    font-size: 8px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
    letter-spacing: .75px !important;
    margin-top: 4px !important;
    white-space: nowrap !important;
  }

  #btn-hamburguesa {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #8b0000 !important;
    border-radius: 3px !important;
    background: #8b0000 !important;
    color: #fff !important;
    font-size: 21px !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  #a0-primary-nav {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    background: #0a0a0a !important;
    border-top: 2px solid #8b0000 !important;
    box-shadow: 0 16px 28px rgba(0,0,0,.45) !important;
    z-index: 100000 !important;
  }

  #a0-primary-nav.is-open {
    display: block !important;
  }

  #a0-primary-nav ul {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #a0-primary-nav li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    border-bottom: 1px solid #222 !important;
  }

  #a0-primary-nav a {
    display: block !important;
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  /* Ritmo editorial */
  .a0-section {
    padding: 2.5rem 0;
  }

  .a0-section-header {
    margin-bottom: 1.5rem;
  }

  .a0-section-title {
    font-size: 1.45rem;
  }

  /* Portada */
  .a0-hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.75rem;
    margin-bottom: 2rem;
  }

  .a0-hero-title {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    line-height: 1.14;
  }

  .a0-hero-excerpt {
    font-size: 1rem;
  }

  .a0-latest-grid,
  .a0-grid-3,
  .a0-newsletter-grid,
  .a0-routes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }

  .a0-grid-2 {
    gap: 1.25rem;
  }

  .a0-newsletter-block {
    padding: 1.75rem;
  }

  .a0-publish-box {
    padding: 2rem;
  }

  /* Artículo individual */
  .a0-single-article {
    padding-top: 1.75rem;
    padding-bottom: 3rem;
  }

  .a0-article-title {
    font-size: clamp(2rem, 6.5vw, 2.75rem);
    line-height: 1.12;
  }

  .a0-article-subtitle {
    font-size: 1.12rem;
    line-height: 1.5;
  }

  .a0-article-body {
    font-size: 1.08rem;
    line-height: 1.72;
  }

  .a0-article-featured-image {
    margin: 1.5rem 0 2.25rem;
  }

  .a0-author-box {
    padding: 1.5rem;
  }

  /* Footer */
  .a0-footer .a0-container {
    gap: 28px !important;
  }

  .a0-footer-brand-section {
    flex-basis: 100% !important;
  }

  .a0-footer-menus {
    flex-basis: 100% !important;
    gap: 24px !important;
  }

  .a0-footer-menu-col {
    flex: 1 1 30%;
    min-width: 180px;
  }
}

@media (max-width: 700px) {
  .a0-container,
  .a0-container-reading {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .a0-section {
    padding: 2rem 0;
  }

  .a0-section-header {
    align-items: flex-start;
    gap: .65rem;
  }

  .a0-section-title {
    font-size: 1.3rem;
    line-height: 1.1;
  }

  .a0-latest-grid,
  .a0-grid-3,
  .a0-grid-2,
  .a0-newsletter-grid,
  .a0-routes-grid {
    grid-template-columns: 1fr;
  }

  /* Hero móvil con composición editorial real, no escritorio encogido */
  .a0-home-main > .a0-section:first-child {
    padding-top: 1rem;
    padding-bottom: 1.5rem;
  }

  .a0-hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "image"
      "content";
    gap: 0;
    padding: 0;
    margin-bottom: 0;
    border-left: 0;
    border-top: 4px solid var(--a0-red);
    background: #121212;
    overflow: hidden;
  }

  .a0-hero-content {
    grid-area: content;
    padding: 1.15rem 1.1rem 1.25rem;
  }

  .a0-hero-image-wrap {
    grid-area: image;
    aspect-ratio: 16 / 9;
    border-radius: 0;
  }

  .a0-hero-title {
    font-size: 1.55rem;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: .8rem;
  }

  .a0-hero-excerpt {
    font-size: .96rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .a0-hero-content .a0-article-badge-wrap {
    margin-bottom: .7rem;
  }

  .a0-hero-content .a0-meta {
    gap: .45rem .7rem;
    font-size: .72rem;
    line-height: 1.35;
  }

  .a0-hero-content .a0-meta-dot {
    display: none;
  }

  .a0-hero-content .a0-meta-author {
    flex-basis: 100%;
  }

  .a0-latest-card,
  .a0-card-body,
  .a0-newsletter-card,
  .a0-route-card {
    padding: 1.15rem;
  }

  .a0-newsletter-block {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .a0-newsletter-block-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
  }

  .a0-newsletter-brand h3 {
    font-size: 1.5rem;
  }

  .a0-publish-box {
    padding: 1.35rem;
    text-align: left;
  }

  .a0-publish-title {
    font-size: 1.65rem;
  }

  .a0-publish-actions {
    justify-content: flex-start;
  }

  .a0-btn {
    width: 100%;
  }

  /* Single realmente legible en teléfono */
  .a0-single-article {
    padding-top: 1.25rem;
    padding-bottom: 2.5rem;
  }

  .a0-article-header {
    margin-bottom: 1.4rem;
  }

  .a0-article-title {
    font-size: 2rem;
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
  }

  .a0-article-subtitle {
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .a0-article-byline-bar {
    align-items: flex-start;
    padding: .9rem 0;
  }

  .a0-byline-left {
    gap: .7rem;
  }

  .a0-byline-meta {
    line-height: 1.4;
  }

  .a0-article-featured-image {
    margin: 1.25rem 0 1.75rem;
  }

  .a0-article-featured-image img {
    max-height: none;
  }

  .a0-article-body {
    font-size: 1.02rem;
    line-height: 1.7;
  }

  .a0-article-body p {
    margin-bottom: 1.35rem;
  }

  .a0-article-body h2 {
    font-size: 1.45rem;
    line-height: 1.2;
    margin-top: 2rem;
  }

  .a0-article-body h3 {
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .a0-article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.1rem;
    font-size: 1.05rem;
  }

  .a0-sources-box {
    padding: 1.25rem;
    margin: 2rem 0;
  }

  .a0-author-box {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    margin: 2rem 0;
  }

  .a0-share-buttons {
    align-items: stretch;
  }

  .a0-share-btn {
    flex: 1 1 calc(50% - .5rem);
    justify-content: center;
  }

  .a0-footer {
    padding: 32px 0 !important;
  }

  .a0-footer .a0-container {
    flex-direction: column !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
    gap: 24px !important;
  }

  .a0-footer .a0-brand {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
  }

  .a0-footer .a0-logo-badge {
    width: 52px !important;
    max-width: 52px !important;
    height: auto !important;
    flex-basis: auto !important;
  }

  .a0-footer-menus {
    flex-direction: column !important;
    gap: 22px !important;
  }

  .a0-footer-menu-col {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 420px) {
  .a0-header .a0-container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .a0-header-inner {
    min-height: 66px !important;
  }

  .a0-logo-badge {
    width: 36px !important;
    max-width: 36px !important;
    height: 36px !important;
    flex-basis: 36px !important;
  }

  .a0-brand-title {
    font-size: 14px !important;
    letter-spacing: -0.25px !important;
  }

  .a0-brand-tagline {
    font-size: 7px !important;
    letter-spacing: .55px !important;
  }

  #btn-hamburguesa {
    flex-basis: 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    font-size: 20px !important;
  }

  #a0-primary-nav a {
    padding: 13px 16px !important;
  }

  .a0-hero-grid {
    padding: 0;
  }

  .a0-hero-content {
    padding: 1rem .95rem 1.1rem;
  }

  .a0-hero-title {
    font-size: 1.42rem;
    line-height: 1.12;
  }

  .a0-hero-excerpt {
    font-size: .92rem;
    -webkit-line-clamp: 3;
  }

  .a0-article-title {
    font-size: 1.78rem;
  }

  .a0-article-subtitle {
    font-size: 1rem;
  }

  .a0-share-btn {
    flex-basis: 100%;
  }
}

/* Blindaje móvil. Evita que estilos heredados de Blocksy o reglas antiguas
   conviertan la portada en un lienzo de escritorio recortado. */
@media screen and (max-width: 1100px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: clip !important;
  }

  body {
    display: block !important;
  }

  .a0-header,
  .a0-header-main,
  .a0-home-main,
  .site-main,
  .a0-section,
  .a0-footer {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .a0-container,
  .a0-container-reading,
  .a0-section > .a0-container,
  .a0-footer > .a0-container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .a0-header-inner {
    min-height: 68px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .a0-brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    width: auto !important;
    max-width: calc(100% - 54px) !important;
  }

  .a0-logo-badge {
    width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    flex: 0 0 38px !important;
  }

  .a0-brand-title {
    font-size: 15px !important;
    white-space: nowrap !important;
  }

  .a0-brand-tagline {
    font-size: 7.5px !important;
    white-space: nowrap !important;
  }

  #btn-hamburguesa {
    display: flex !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
  }

  .a0-hero-grid,
  .a0-latest-grid,
  .a0-grid-3,
  .a0-grid-2,
  .a0-newsletter-grid,
  .a0-routes-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 18px !important;
  }

  .a0-hero-grid,
  .a0-latest-card,
  .a0-card,
  .a0-card-body,
  .a0-newsletter-block,
  .a0-newsletter-card,
  .a0-route-card,
  .a0-publish-box,
  .a0-footer-brand-section,
  .a0-footer-menus,
  .a0-footer-menu-col {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .a0-newsletter-block {
    padding: 22px !important;
  }

  .a0-newsletter-card,
  .a0-route-card,
  .a0-latest-card,
  .a0-card-body {
    padding: 20px !important;
  }

  .a0-newsletter-card-title,
  .a0-card-title,
  .a0-latest-card-title,
  .a0-route-card h4,
  .a0-hero-title,
  .a0-publish-title {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
  }

  .a0-hero-title {
    font-size: clamp(1.85rem, 8vw, 2.35rem) !important;
    line-height: 1.08 !important;
  }

  .a0-hero-excerpt {
    font-size: 1rem !important;
    line-height: 1.55 !important;
  }

  .a0-publish-box {
    padding: 28px 20px !important;
  }

  .a0-publish-box .a0-routes-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .a0-footer > .a0-container,
  .a0-footer-menus {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
  }

  .a0-footer-menu-col {
    flex: 0 0 auto !important;
  }
}
