/* =====================================================================
   RESPONSIVE — RECAUDACIÓN DE SERVICIOS (.recaudacion-servicios-page)
   ---------------------------------------------------------------------
   Móvil:  < 768px
   Tablet: 768px – 1199.98px
   Desktop ≥ 1200px: intacto (todo dentro de media queries).

   Scope: .rsp .recaudacion-servicios-page → las clases ps-* se
   comparten con Pólizas de Seguro (.polizas-seguro-page) y Botón/Link
   de Pago (.boton-link-pago-page), por eso TODO selector lleva la
   clase de página.

   Principio: ADAPTAR, no redimensionar. Secciones a flujo normal
   (columna) manteniendo colores, gradientes, tipografías (Outfit),
   imágenes y el mismo orden del DOM (que coincide con el visual):
   hero → título/desc moderno → carrusel de fotos → pill → título
   pasos → lista pasos → slider → modelo multisectorial → cierre →
   footer.
   ===================================================================== */

/* ═══════════════════════════════════════════════════════════
   BASE COMPARTIDA (móvil + tablet)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {

  /* ── Lienzo: la página pasa a columna en flujo normal ── */
  .rsp .recaudacion-servicios-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: relative;
    width: 100%;
    height: auto;
    min-height: 100vh;
    background: #ffffff;
  }

  /* ── Decorativos anclados a coordenadas del lienzo 1440px ──
     · ps-white-band: banda blanca auxiliar (la página ya es blanca).
     · ps-steps-bg: vector decorativo de 2133px anclado a coordenadas
       absolutas del diseño fijo; no re-ancla en flujo → oculto. */
  .rsp .recaudacion-servicios-page .ps-white-band,
  .rsp .recaudacion-servicios-page .ps-steps-bg {
    display: none;
  }

  /* ════════ SECCIÓN: HERO (foto + gradiente + textos) ════════ */
  .rsp .recaudacion-servicios-page .ps-hero-bg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 0;
    pointer-events: none;
  }

  .rsp .recaudacion-servicios-page .ps-hero-subtitle,
  .rsp .recaudacion-servicios-page .ps-hero-title {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: auto;
    text-align: center;
    z-index: 2;
  }

  /* ════════ SECCIÓN: TÍTULO + DESCRIPCIÓN "fin de las capturas" ════════
     Conservan el fade-in por opacity del IntersectionObserver;
     se neutraliza solo el transform (translateX de centrado absoluto). */
  .rsp .recaudacion-servicios-page .ps-modern-title,
  .rsp .recaudacion-servicios-page .ps-modern-desc {
    position: relative;
    left: auto;
    top: auto;
    transform: none !important;
    width: auto;
    align-self: center;
    text-align: center;
    z-index: 2;
  }

  /* ════════ SECCIÓN: CARRUSEL DE FOTOS ════════ */
  .rsp .recaudacion-servicios-page .ps-photo-carousel {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    align-self: center;
    z-index: 2;
  }

  /* Flechas: 46px ≥ 44px de área táctil, se conservan */

  /* ════════ SECCIÓN: ¿QUÉ INCLUYE? (pill + título de pasos) ════════ */
  .rsp .recaudacion-servicios-page .ps-pill {
    position: relative;
    left: auto;
    top: auto;
    align-self: flex-start;
    z-index: 2;
  }

  .rsp .recaudacion-servicios-page .ps-steps-title {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    z-index: 2;
  }

  /* ════════ SECCIÓN: PASOS — lista índice (tabs clicables) ════════ */
  .rsp .recaudacion-servicios-page .ps-steps-list {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    z-index: 2;
  }

  .rsp .recaudacion-servicios-page .ps-step-item {
    min-height: 44px; /* área táctil mínima */
  }

  /* ════════ SECCIÓN: PASOS — slider con crossfade JS ════════
     Las cards absolutas pasan a la misma celda de un grid: el alto
     se vuelve automático y el crossfade JS sigue funcionando. */
  .rsp .recaudacion-servicios-page .ps-slider {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    display: grid;
    z-index: 2;
  }

  .rsp .recaudacion-servicios-page .ps-slider .ps-step-card {
    position: relative;
    inset: auto;
    grid-area: 1 / 1;
    width: 100%;
    height: auto;
  }

  .rsp .recaudacion-servicios-page .ps-step-card-text {
    width: 100%;
  }

  /* ════════ SECCIÓN: MODELO MULTISECTORIAL (grid de cards) ════════
     Conserva el fade-in opacity/translateY del observer (sin
     translateX, funciona igual en flujo). */
  .rsp .recaudacion-servicios-page .ps-management-section {
    position: relative;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    z-index: 2;
  }

  .rsp .recaudacion-servicios-page .ps-management-title {
    width: auto;
  }

  /* ════════ SECCIÓN: CIERRE "Controla tu recaudación..." ════════ */
  .rsp .recaudacion-servicios-page .ps-alliance-text {
    position: relative;
    left: auto;
    top: auto;
    transform: none !important;
    align-self: center;
    z-index: 2;
  }

  /* ════════ SECCIÓN: FOOTER ════════
     (el layout interno lo resuelve core.css) */
  .rsp .recaudacion-servicios-page #global-footer {
    width: 100%;
  }
}

/* ═══════════════════════════════════════════════════════════
   MÓVIL  (< 768px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {

  /* ── HERO ── (homologado al patrón de Servicios: banner 555px,
     textos a 128px) */
  .rsp .recaudacion-servicios-page .ps-hero-bg {
    height: 555px;
  }

  .rsp .recaudacion-servicios-page .ps-hero-subtitle {
    margin: 128px 24px 0;
    font-size: clamp(17px, 4.8vw, 21px);
    line-height: 1.35;
  }

  .rsp .recaudacion-servicios-page .ps-hero-title {
    margin: 8px 24px 0;
    font-size: clamp(28px, 8vw, 36px);
    line-height: 1.15;
  }

  /* ── TÍTULO + DESCRIPCIÓN ── (margen que limpia el hero;
     crece junto con el banner homologado a 555px) */
  .rsp .recaudacion-servicios-page .ps-modern-title {
    margin: 325px auto 0;
    width: min(680px, calc(100% - 48px));
    font-size: clamp(22px, 6vw, 27px);
    line-height: 1.3;
  }

  .rsp .recaudacion-servicios-page .ps-modern-desc {
    margin: 16px auto 0;
    width: min(640px, calc(100% - 48px));
    font-size: clamp(16px, 4.4vw, 19px);
    line-height: 1.45;
  }

  /* ── CARRUSEL DE FOTOS ── */
  .rsp .recaudacion-servicios-page .ps-photo-carousel {
    margin: 36px 0 0;
    width: min(920px, calc(100% - 48px));
    height: clamp(210px, 58vw, 320px);
    border-radius: 22px;
  }

  .rsp .recaudacion-servicios-page .ps-photo-arrow-prev {
    left: 12px;
  }

  .rsp .recaudacion-servicios-page .ps-photo-arrow-next {
    right: 12px;
  }

  /* ── ¿QUÉ INCLUYE? ── */
  .rsp .recaudacion-servicios-page .ps-pill {
    margin: 72px 24px 0;
  }

  .rsp .recaudacion-servicios-page .ps-pill span {
    font-size: 17px;
    line-height: 1.4;
  }

  .rsp .recaudacion-servicios-page .ps-steps-title {
    margin: 20px 24px 0;
    max-width: 560px;
    font-size: clamp(22px, 6.2vw, 27px);
    line-height: 1.25;
  }

  /* ── PASOS: lista índice ── */
  .rsp .recaudacion-servicios-page .ps-steps-list {
    margin: 28px 24px 0;
  }

  /* ── PASOS: slider ── */
  .rsp .recaudacion-servicios-page .ps-slider {
    margin: 24px 24px 0;
    border-radius: 28px;
  }

  .rsp .recaudacion-servicios-page .ps-slider .ps-step-card {
    padding: 20px;
    border-radius: 28px;
    gap: 16px;
  }

  .rsp .recaudacion-servicios-page .ps-step-card-text {
    font-size: 16px;
    line-height: 1.45;
  }

  .rsp .recaudacion-servicios-page .ps-step-card-img {
    height: min(360px, 95vw);
    border-radius: 22px;
  }

  /* ── MODELO MULTISECTORIAL ── */
  .rsp .recaudacion-servicios-page .ps-management-section {
    margin: 72px 24px 0;
    gap: 0;
  }

  .rsp .recaudacion-servicios-page .ps-management-title {
    margin: 0 auto 24px;
    font-size: clamp(22px, 6vw, 27px);
    line-height: 1.3;
  }

  .rsp .recaudacion-servicios-page .ps-management-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .rsp .recaudacion-servicios-page .ps-management-card {
    min-height: 0;
    padding: 22px 20px;
  }

  .rsp .recaudacion-servicios-page .ps-management-card-media {
    padding: 0;
    height: 240px;
  }

  .rsp .recaudacion-servicios-page .ps-management-card-title {
    font-size: clamp(20px, 5.6vw, 24px);
  }

  .rsp .recaudacion-servicios-page .ps-management-card-desc {
    margin-top: 10px;
    font-size: clamp(16px, 4.4vw, 18px);
    line-height: 1.4;
  }

  /* ── CIERRE ── */
  .rsp .recaudacion-servicios-page .ps-alliance-text {
    margin: 72px 0 0;
    width: min(680px, calc(100% - 48px));
  }

  /* ── FOOTER ── */
  .rsp .recaudacion-servicios-page #global-footer {
    margin-top: 64px;
  }
}

/* ═══════════════════════════════════════════════════════════
   TABLET  (768px – 1199.98px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1199.98px) {

  /* ── HERO ── (homologado al patrón de Servicios: banner 640px,
     textos a 150px) */
  .rsp .recaudacion-servicios-page .ps-hero-bg {
    height: 640px;
  }

  .rsp .recaudacion-servicios-page .ps-hero-subtitle {
    margin: 150px 48px 0;
    font-size: clamp(20px, 2.6vw, 26px);
    line-height: 1.35;
  }

  .rsp .recaudacion-servicios-page .ps-hero-title {
    margin: 10px 48px 0;
    font-size: clamp(36px, 4.8vw, 52px);
    line-height: 1.1;
  }

  /* ── TÍTULO + DESCRIPCIÓN ── (limpia el banner homologado a 640px) */
  .rsp .recaudacion-servicios-page .ps-modern-title {
    margin: 400px auto 0;
    width: min(860px, calc(100% - 96px));
    font-size: clamp(26px, 3vw, 30px);
    line-height: 1.3;
  }

  .rsp .recaudacion-servicios-page .ps-modern-desc {
    margin: 16px auto 0;
    width: min(760px, calc(100% - 96px));
    font-size: clamp(18px, 2vw, 20px);
    line-height: 1.45;
  }

  /* ── CARRUSEL DE FOTOS ── */
  .rsp .recaudacion-servicios-page .ps-photo-carousel {
    margin: 44px 0 0;
    width: min(920px, calc(100% - 96px));
    height: 340px;
  }

  /* ── ¿QUÉ INCLUYE? ── */
  .rsp .recaudacion-servicios-page .ps-pill {
    margin: 80px 48px 0;
  }

  .rsp .recaudacion-servicios-page .ps-steps-title {
    margin: 20px 48px 0;
    max-width: 640px;
    font-size: 30px;
    line-height: 1.25;
  }

  /* ── PASOS: lista índice ── */
  .rsp .recaudacion-servicios-page .ps-steps-list {
    margin: 32px 48px 0;
    max-width: 560px;
  }

  /* ── PASOS: slider (card horizontal: texto + imagen) ── */
  .rsp .recaudacion-servicios-page .ps-slider {
    margin: 32px 48px 0;
  }

  .rsp .recaudacion-servicios-page .ps-slider .ps-step-card {
    flex-direction: row;
    align-items: center;
    gap: 28px;
    padding: 28px;
  }

  .rsp .recaudacion-servicios-page .ps-step-card-text {
    flex: 1 1 42%;
    font-size: 18px;
    line-height: 1.5;
  }

  .rsp .recaudacion-servicios-page .ps-step-card-img {
    flex: 1 1 58%;
    width: auto;
    height: 380px;
  }

  /* ── MODELO MULTISECTORIAL ── (mantiene las 2 columnas desktop) */
  .rsp .recaudacion-servicios-page .ps-management-section {
    margin: 88px 48px 0;
  }

  .rsp .recaudacion-servicios-page .ps-management-title {
    margin: 0 auto 28px;
    max-width: 680px;
    font-size: 30px;
    line-height: 1.3;
  }

  .rsp .recaudacion-servicios-page .ps-management-card {
    min-height: 260px;
  }

  /* ── CIERRE ── */
  .rsp .recaudacion-servicios-page .ps-alliance-text {
    margin: 88px 0 0;
    width: min(720px, calc(100% - 96px));
  }

  /* ── FOOTER ── */
  .rsp .recaudacion-servicios-page #global-footer {
    margin-top: 80px;
  }
}
