/**
 * Escala tipográfica móvil unificada.
 * Objetivo: evitar inconsistencias (unos textos enormes, otros diminutos) y reducir saltos de línea innecesarios.
 */

@media (max-width: 820px) {
  :root {
    --cgc-type-h1: clamp(1.6rem, 6.8vw, 2.15rem);
    --cgc-type-h2: clamp(1.35rem, 5.1vw, 1.75rem);
    --cgc-type-h3: clamp(1.08rem, 3.9vw, 1.25rem);
    --cgc-type-body: 1rem;
    --cgc-type-small: 0.9rem;
    --cgc-type-micro: 0.78rem;
  }

  body {
    font-size: 16px;
    line-height: 1.55;
  }

  /* Headings globales */
  body:not(.cgc-page-panel) main h1,
  body:not(.cgc-page-panel) .single-header h1 {
    font-size: var(--cgc-type-h1) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.04em;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  body:not(.cgc-page-panel) main h2,
  body:not(.cgc-page-panel) main h2.section-title {
    font-size: var(--cgc-type-h2) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  body:not(.cgc-page-panel) main h3 {
    font-size: var(--cgc-type-h3) !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  /* Texto cuerpo consistente */
  p,
  .entry-content,
  .blog-article-content,
  .section-sub,
  .hero-sub {
    font-size: var(--cgc-type-body) !important;
    line-height: 1.58 !important;
  }

  /* Microtextos: no bajar de 0.78rem para legibilidad */
  .card-kicker,
  .blog-kicker,
  .blog-tags span,
  .blog-card-tags span,
  .recipe-spotlight-card__badge,
  .editorial-feature-card__cat,
  .home-pro-hero__copy .section-kicker,
  body.cgc-page-tools .cg-calc-trustbar span {
    font-size: var(--cgc-type-micro) !important;
    line-height: 1.25 !important;
  }

  /* Meta / textos pequeños */
  .recipe-spotlight-card__meta,
  .recipe-spotlight-card__kcal,
  .recipe-spotlight-card__cta,
  .editorial-feature-card__cta,
  .saved-teaser p,
  .cg-medical-note,
  .cg-calc-subcopy {
    font-size: var(--cgc-type-small) !important;
    line-height: 1.45 !important;
  }

  /* Home cards: títulos a un tamaño coherente */
  .recipe-spotlight-card h3,
  .editorial-feature-card h3,
  .home-calc-grid a.home-calc-card.cg-catalog-card--photo h3,
  .saved-teaser strong {
    font-size: clamp(1.05rem, 4.2vw, 1.18rem) !important;
    line-height: 1.16 !important;
  }

  /* Blog artículo (tema legacy): frenar gigantismo */
  .blog-article-shell h1 {
    font-size: var(--cgc-type-h1) !important;
    line-height: 1.02 !important;
  }

  .blog-article-content h2 {
    font-size: var(--cgc-type-h2) !important;
  }

  .blog-article-content h3,
  .blog-summary h2 {
    font-size: clamp(1.12rem, 4.2vw, 1.35rem) !important;
  }

  /* Footer: evitar tamaños microscópicos */
  .cgc-premium-footer .footer-col h2 {
    font-size: var(--cgc-type-micro) !important;
    letter-spacing: 0.08em !important;
  }

  .cgc-premium-footer .footer-social__link {
    font-size: 0.78rem !important;
  }
}

