/* ============================================================
   AYC GROUP — TIPOGRAFÍA CENTRALIZADA (MOBILE/TABLET ONLY)
   IMPORTANTE: Desktop NO se toca. Las reglas de tamaño solo
   se aplican bajo 1025px de viewport. El diseño desktop
   queda exactamente como lo tenía overrides.css + Elementor.
   ============================================================ */

/* ---------- VARIABLES (FUENTE ÚNICA DE LA VERDAD) ----------
   Estas variables se DECLARAN siempre, pero solo se USAN dentro
   de los @media a continuación. Desktop ignora estos valores. */
:root {
  --fs-base: 17px;
  --fs-lead: 19px;
  --fs-small: 15px;
  --fs-xs: 12px;
  --fs-h1: 48px;
  --fs-h2: 36px;
  --fs-h3: 26px;
  --fs-h4: 22px;
  --fs-h5: 18px;
  --fs-h6: 16px;
  --fs-btn: 16px;
  --lh-tight: 1.25;
  --lh-base: 1.6;
  --lh-loose: 1.8;
}

/* ============================================================
   TABLET (768px - 1024px) — ajustes intermedios
   ============================================================ */
@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --fs-h1: 40px;
    --fs-h2: 32px;
    --fs-h3: 24px;
  }
}

/* ============================================================
   MOBILE (≤ 767px) — reduce defaults
   ============================================================ */
@media (max-width: 767px) {
  :root {
    --fs-base: 16px;
    --fs-lead: 17px;
    --fs-small: 14px;
    --fs-xs: 12px;
    --fs-h1: 32px;
    --fs-h2: 26px;
    --fs-h3: 22px;
    --fs-h4: 19px;
    --fs-h5: 17px;
    --fs-h6: 15px;
    --fs-btn: 15px;
  }
}

/* ============================================================
   APLICACIÓN DE TAMAÑOS — SOLO BAJO 1025px
   Todas las reglas font-size están envueltas para no afectar
   desktop. Desktop conserva tamaños originales de overrides.css.
   ============================================================ */
@media (max-width: 1024px) {

  /* ---------- BODY / PÁRRAFOS BASE ---------- */
  body,
  body p,
  body li,
  .elementor-widget-container p,
  .elementor-widget-text-editor,
  .elementor-widget-text-editor p,
  .elementor-widget-text-editor li,
  .elementor-widget-text-editor span:not([class*="elementor-icon"]),
  .elementor-widget-icon-box .elementor-icon-box-description,
  .elementor-widget-image-box .elementor-image-box-description,
  .elementor-widget-icon-list .elementor-icon-list-text,
  .elementor-tab-content,
  .elementor-tab-content p,
  .elementor-accordion .elementor-tab-content p {
    font-size: var(--fs-base) !important;
    line-height: var(--lh-base) !important;
  }

  /* ---------- HEADINGS GLOBALES ---------- */
  body h1,
  .elementor-widget-heading h1.elementor-heading-title {
    font-size: var(--fs-h1) !important;
    line-height: var(--lh-tight) !important;
  }
  body h2,
  .elementor-widget-heading h2.elementor-heading-title {
    font-size: var(--fs-h2) !important;
    line-height: var(--lh-tight) !important;
  }
  body h3,
  .elementor-widget-heading h3.elementor-heading-title {
    font-size: var(--fs-h3) !important;
    line-height: 1.3 !important;
  }
  body h4,
  .elementor-widget-heading h4.elementor-heading-title {
    font-size: var(--fs-h4) !important;
    line-height: 1.35 !important;
  }
  body h5,
  .elementor-widget-heading h5.elementor-heading-title {
    font-size: var(--fs-h5) !important;
    line-height: 1.4 !important;
  }
  body h6,
  .elementor-widget-heading h6.elementor-heading-title {
    font-size: var(--fs-h6) !important;
    line-height: 1.4 !important;
  }

  /* ---------- BOTONES ---------- */
  .elementor-button,
  .elementor-button-text,
  button.ayc-btn-primary,
  button.ayc-btn-outline-navy,
  a.ayc-btn-primary,
  a.ayc-btn-outline-navy {
    font-size: var(--fs-btn) !important;
  }

  /* ---------- CLASES UTILITARIAS (mobile/tablet) ---------- */
  .ayc-text-lead, .ayc-lead {
    font-size: var(--fs-lead) !important;
    line-height: var(--lh-base) !important;
  }
  .ayc-text-small, .ayc-small,
  .elementor-image-box-description.ayc-small {
    font-size: var(--fs-small) !important;
    line-height: var(--lh-base) !important;
  }
  .ayc-text-xs, .ayc-disclaimer, .ayc-legal,
  .faq-hero-legal, .faq-hero-legal p,
  .qs-hero-legal-text {
    font-size: var(--fs-xs) !important;
    line-height: 1.5 !important;
  }

  /* ---------- DISCLAIMERS (mismo data-id-based pattern) ---------- */
  .elementor-13 .elementor-element.elementor-element-qt1e2jbl,
  .elementor-13 .elementor-element.elementor-element-qt1e2jbl p,
  .elementor-element[data-id="qt1e2jbl"] p,
  .elementor-6 .elementor-element.elementor-element-ftr_disclaimer,
  .elementor-6 .elementor-element.elementor-element-ftr_disclaimer p,
  .elementor-element[data-id="ftr_disclaimer"] p,
  .elementor-element[data-id="ftr_disclaimer"] span,
  .elementor-element[data-id="advhc46abe"] p,
  .elementor-element[data-id="acchc46abe"] p {
    font-size: var(--fs-xs) !important;
  }

  /* ---------- ICONOS / NO TOCAR ---------- */
  .elementor-icon i,
  .elementor-icon svg,
  .elementor-icon-box .elementor-icon,
  .elementor-widget-icon-list .elementor-icon-list-icon,
  .elementor-widget-icon-list .elementor-icon-list-icon i,
  .elementor-widget-icon-list .elementor-icon-list-icon svg,
  .elementor-counter-number,
  .elementor-counter-number-prefix,
  .elementor-counter-number-suffix,
  .elementor-counter-title,
  .elementor-star-rating {
    font-size: revert !important;
  }

  /* ---------- HTML BASE ---------- */
  html { font-size: 16px; }
}

/* ---------- FOOTER (excepciones permitidas) ----------
   El footer puede tener microcopy a --fs-xs en cualquier viewport.
   No afecta layout desktop, solo aplica al microcopy diferenciado. */
@media (max-width: 1024px) {
  footer .elementor-widget-text-editor p.ayc-footer-fine,
  footer .ayc-footer-fine {
    font-size: var(--fs-xs) !important;
  }
}

/* ============================================================
   FIXES ESPECÍFICOS POR PÁGINA — solo mobile/tablet.
   Desktop conserva exactamente los px originales del per-page CSS.
   ============================================================ */

/* FAQ (Preguntas Frecuentes) — selectores específicos mobile/tablet */
@media (max-width: 1024px) {
  body.page-id-90 .faq-q {
    font-size: var(--fs-lead) !important;  /* 19px tablet, 17px mobile */
  }
  body.page-id-90 .faq-a {
    font-size: var(--fs-base) !important;  /* 17px tablet, 16px mobile */
  }
  body.page-id-90 [data-id="faq-hero-legal"] p {
    font-size: var(--fs-xs) !important;    /* 12px ambos — antes 13px desktop, 10px mobile */
  }
}

/* Quiénes Somos — selectores específicos mobile/tablet */
@media (max-width: 1024px) {
  body.page-id-87 .qs-diff-body {
    font-size: var(--fs-base) !important;  /* 17px tablet, 16px mobile (antes 13px) */
  }
  body.page-id-87 .qs-value-body {
    font-size: var(--fs-base) !important;  /* 17px tablet, 16px mobile (antes 13.5px) */
  }
  body.page-id-87 .qs-hero-legal-text {
    font-size: var(--fs-xs) !important;    /* 12px (antes 11px) */
  }
  body.page-id-87 .qs-philo-bubble span {
    font-size: var(--fs-xs) !important;    /* 12px (antes 11px) */
  }
}
