/* Lead-first mobile experience shared by home and pricing. */
.mobile-nav-cta,
.mobile-sticky-cta {
  display: none;
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .mobile-sticky-cta {
    position: fixed;
    right: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 16px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 9999px;
    background: var(--green, #00db8e);
    box-shadow: 0 12px 30px -12px rgba(0, 219, 142, 0.72);
    color: #08090a;
    font-family: var(--font-roboto, inherit);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
  }

  /* Modern marketing header (Spanish home and pricing pages). */
  .mkt-header {
    height: 64px !important;
    padding: 0 16px !important;
  }

  .mkt-header .mkt-header-divider,
  .mkt-header .mkt-lang-switcher,
  .mkt-header .mkt-theme-toggle {
    display: none !important;
  }

  /* Nav móvil: los links quedan en la esquina izquierda, tras el logo,
     scrolleables horizontalmente si no caben. El CTA queda a la derecha. */
  .mkt-header {
    gap: 10px;
  }

  .mkt-header .mkt-nav {
    display: flex !important;
    align-items: center;
    gap: 12px !important;
    flex: 0 0 auto;
    margin-left: 12px;
  }

  /* En móvil solo dejamos Precios visible; ocultamos Producto y Recursos */
  .mkt-header .mkt-nav a {
    font-size: 13px !important;
    padding: 6px 0 !important;
    white-space: nowrap;
    display: none;
  }

  .mkt-header .mkt-nav a[href*="pricing" i],
  .mkt-header .mkt-nav a[href*="precio" i] {
    display: inline-block;
  }

  .mkt-header-actions {
    margin-left: auto !important;
    flex: 0 0 auto;
  }

  .mkt-header-actions {
    margin-left: auto;
  }

  .mkt-header-actions .btn-mkt {
    height: 32px;
    min-width: 0;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .mkt-header .mkt-brand-logo {
    width: 96px;
  }

  /* Home ES: hero, social proof, three key capabilities and final CTA only. */
  #home-root > section:first-child {
    gap: 28px !important;
    padding: 44px 0 8px !important;
  }

  #home-root .mkt-hero-inner {
    gap: 20px !important;
    padding: 0 20px !important;
  }

  #home-root .mkt-hero-title {
    font-size: clamp(2.35rem, 11vw, 3rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -1px !important;
  }

  #home-root .mkt-hero-desc-row {
    gap: 0 !important;
  }

  #home-root .mkt-hero-ctas {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  #home-root .mkt-hero-ctas .btn-mkt {
    width: 100%;
  }

  #home-root .mkt-hero-ctas .mkt-hero-demo-video {
    justify-content: center;
    width: 100%;
    min-height: 44px;
  }

  #home-root > section:first-child .mkt-mockup-scroll {
    --mkt-mockup-scale: calc((min(100vw, 560px) - 40px) / 1200);
    display: block;
    position: relative;
    width: 100%;
    max-width: 560px;
    height: calc(560px * var(--mkt-mockup-scale));
    margin: 0 auto 12px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    background: var(--card-surface);
    box-shadow: var(--shadow-mockup, var(--shadow-card));
  }

  #home-root > section:first-child .mkt-mockup-scroll > div {
    display: grid !important;
    width: 1200px;
    height: 560px;
    max-width: none;
    transform: scale(var(--mkt-mockup-scale));
    transform-origin: top center;
    margin: 0 auto;
  }

  #home-root > section:nth-of-type(3),
  #home-root > section:nth-of-type(n+5):not(:last-child) {
    display: none !important;
  }

  #home-root > section:nth-of-type(2),
  #home-root > section:nth-of-type(4),
  #home-root > section:last-child {
    padding: 56px 20px !important;
  }

  #home-root .mkt-logostrip-section {
    padding: 32px 20px 48px !important;
  }

  #home-root .mkt-feature-grid {
    grid-template-columns: 1fr !important;
  }

  #home-root .mkt-feature-grid > :nth-child(n + 4) {
    display: none !important;
  }

  /* Value grid: 3 columnas colapsan a 1 sola en móvil */
  #home-root .mkt-value-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  #home-root .mkt-value-grid > div > div[style*="font-size: 18px"] {
    font-size: 17px !important;
  }

  #home-root .mkt-value-grid > div > div[style*="font-size: 15px"] {
    font-size: 15px !important;
    line-height: 23px !important;
  }

  /* Press grid: 3 columnas colapsan a 1 sola */
  #home-root .mkt-press-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Padding lateral coherente en todas las secciones del home */
  #home-root > section {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Títulos H2 gigantes (44–56px) → escala móvil */
  #home-root section h2,
  #home-root section h3,
  #home-root [style*="font-size: 56px"],
  #home-root [style*="font-size: 44px"],
  #home-root [style*="font-size: 40px"] {
    font-size: clamp(1.75rem, 7vw, 2.25rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.6px !important;
  }

  /* Mission statement: es un <p> con font-size: 44px inline */
  #home-root .mkt-mission-statement {
    font-size: clamp(1.75rem, 7.5vw, 2.25rem) !important;
    line-height: 1.18 !important;
    letter-spacing: -0.6px !important;
  }

  /* Los <br> forzados hacen saltos de línea antinaturales en móvil */
  #home-root .mkt-mission-statement br {
    display: none;
  }

  #home-root .mkt-mission-statement + p {
    font-size: 15px !important;
    line-height: 22px !important;
  }

  /* Secciones grandes: reducir padding vertical */
  #home-root > section:nth-of-type(2),
  #home-root > section:nth-of-type(4),
  #home-root > section:last-child {
    padding: 44px 20px !important;
  }

  /* Descripciones bajo títulos grandes: normalizar */
  #home-root section p[style*="font-size: 18px"],
  #home-root section p[style*="font-size: 17px"],
  #home-root section p[style*="font-size: 20px"] {
    font-size: 15px !important;
    line-height: 22px !important;
  }

  #home-root .mkt-section-cta,
  #home-root .mkt-cta-buttons {
    display: block !important;
  }

  #home-root .mkt-cta-buttons .btn-mkt {
    display: none;
  }

  #home-root .mkt-cta-buttons .btn-mkt:first-child {
    display: inline-flex;
    width: 100%;
  }

  /* Home EN legacy structure: keep the compact hero, brands, three features and final CTA. */
  body.home-dark-hero .navbar-toggler,
  body.home-dark-hero .navbar-collapse {
    display: none !important;
  }

  body.home-dark-hero .navbar {
    top: 0 !important;
    min-height: 64px;
    padding: 0 !important;
    background: #08090a !important;
  }

  body.home-dark-hero .navbar .container {
    height: 64px;
    padding: 0 16px;
    justify-content: space-between;
  }

  body.home-dark-hero .navbar-brand img {
    width: 112px;
  }

  body.home-dark-hero .mobile-nav-cta {
    position: fixed;
    top: 15px;
    right: 16px;
    left: auto;
    z-index: 1031;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 112px;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 9999px;
    background: #00db8e;
    color: #08090a;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
  }

  body.home-dark-hero .hero-section {
    padding-top: 112px !important;
    padding-bottom: 48px !important;
  }

  body.home-dark-hero .linear-hero-title {
    font-size: clamp(2.25rem, 11vw, 3rem);
    line-height: 1.06;
  }

  body.home-dark-hero .linear-hero-experience {
    margin-top: 28px !important;
  }

  body.home-dark-hero .edtools-assistant-panel,
  body.home-dark-hero .assistant-actions-panel,
  body.home-dark-hero .linear-stage-glass {
    display: none !important;
  }

  body.home-dark-hero .linear-product-stage {
    min-height: 0;
  }

  body.home-dark-hero .integrations-hub,
  body.home-dark-hero .pain-points-section,
  body.home-dark-hero .home-news-section {
    display: none !important;
  }

  body.home-dark-hero .features-grid-section .payment-reminders-card,
  body.home-dark-hero .features-grid-section .academic-operations-card,
  body.home-dark-hero .features-grid-section .retention-agent-card,
  body.home-dark-hero .features-grid-section .digital-signatures-card,
  body.home-dark-hero .features-grid-section .hybrid-team-card {
    display: none !important;
  }

  /* Pricing: readable hero and collapsed module categories. */
  .mkt-breadcrumb {
    display: none;
  }

  .pricing-model {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .pricing-model .ctas,
  .pricing-final .ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .pricing-model .ctas .btn-mkt,
  .pricing-final .ctas .btn-mkt {
    width: 100%;
  }

  .pricing-final .ctas .btn-mkt:not(:first-child) {
    display: none;
  }

  .pricing-facts {
    display: grid;
    gap: 8px;
    margin-top: 32px;
  }

  .pricing-facts .fact + .fact::before {
    display: none;
  }

  .modules-header {
    display: none !important;
  }

  .modules-group {
    margin-top: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    overflow: hidden;
  }

  .module-accordion-trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 17px 16px;
    border: 0;
    background: var(--raised);
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
  }

  .module-accordion-trigger .count {
    color: var(--text-tertiary);
    font-weight: 400;
  }

  .module-accordion-summary {
    display: block;
    margin-top: 4px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
  }

  .module-accordion-icon {
    flex: 0 0 auto;
    color: var(--green);
    transition: transform 180ms ease;
  }

  .module-accordion-trigger[aria-expanded="true"] .module-accordion-icon {
    transform: rotate(45deg);
  }

  .module-accordion-panel {
    padding: 0 16px;
    background: var(--card-surface);
  }

  .module-accordion-panel[hidden] {
    display: none;
  }

  .module-accordion-panel .modules-row {
    grid-template-columns: 1fr 32px 40px;
    padding: 13px 0;
  }

  .module-accordion-panel .mod-name {
    font-size: 13px;
  }
}
