/**
 * TALIQ — responsive + CSS correctivo global
 * Cargar al final. Landing, vacantes públicas y modales.
 */

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* ——— Navbar landing: opaco y sin bleed ——— */
body.landing-enterprise .navbar-mpg.navbar-landing,
body.landing-enterprise .navbar-mpg.navbar-landing.scrolled {
  background: #ffffff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.landing-enterprise .navbar-mpg.navbar-landing {
  z-index: 1030;
}

/* ——— Tipografía legible ——— */
body.landing-enterprise .section-lead,
body.landing-enterprise .service-card p,
body.landing-enterprise .process-item p,
body.landing-enterprise .trust-text,
body.landing-enterprise .faq-entry dd,
body.landing-enterprise .contact-lead {
  color: #4b5563 !important;
}

body.landing-enterprise .service-note {
  opacity: 1 !important;
  color: #4b5563 !important;
}

/* ——— Hero contraste ——— */
body.landing-enterprise .hero-section,
body.landing-enterprise .hero-section .hero-title,
body.landing-enterprise .hero-section h1 {
  color: #fff !important;
}

body.landing-enterprise .hero-section .hero-lead {
  color: rgba(255, 255, 255, 0.84) !important;
}

/* ——— Cards vacantes ——— */
body.landing-enterprise .vacantes-section .row.g-4 > [class*="col-"],
body.vacantes-page .vacantes-section .row.g-4 > [class*="col-"] {
  display: flex;
}

body.landing-enterprise .vacante-card,
body.vacantes-page .vacante-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(13, 17, 23, 0.1);
  border-radius: 10px;
}

body.landing-enterprise .vacante-card .vacante-sueldo,
body.vacantes-page .vacante-card .vacante-sueldo {
  margin-top: auto;
}

body.landing-enterprise .vacante-card-actions,
body.vacantes-page .vacante-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

body.landing-enterprise .vacante-card .btn-mpg-primary,
body.vacantes-page .vacante-card .btn-mpg-primary {
  background: #0A2540 !important;
  color: #fff !important;
  border: none !important;
}

body.landing-enterprise .vacante-card .btn-outline-secondary,
body.vacantes-page .vacante-card .btn-outline-secondary {
  border-color: rgba(10, 37, 64, 0.18) !important;
  color: #0A2540 !important;
  background: #fff !important;
}

/* ——— Página vacantes ——— */
body.vacantes-page .navbar-mpg {
  background: #fff !important;
  box-shadow: 0 1px 0 rgba(13, 17, 23, 0.1);
}

body.vacantes-page .navbar-mpg .btn-mpg-primary {
  background: #0A2540 !important;
  color: #fff !important;
  border-radius: 6px;
  text-transform: none;
  font-weight: 600;
}

body.vacantes-page .vacantes-page-hero {
  padding-top: 5.5rem;
}

/* ——— Modales: fondo sólido y footer usable ——— */
.modal-backdrop {
  background-color: rgba(6, 16, 24, 0.55) !important;
}

.vacante-detalle-modal .modal-content,
.postulacion-modal .modal-content,
.app-vacante-preview-modal .modal-content {
  background: #fff !important;
  color: #1a1f26;
}

.vacante-detalle-modal .btn-mpg-green,
.postulacion-modal .btn-mpg-green,
.vacante-detalle-modal .btn-mpg-primary {
  background: #0A2540 !important;
  color: #fff !important;
  border: none !important;
}

/* ——— Forms ——— */
body.landing-enterprise .forms-section .btn,
body.landing-enterprise .form-mpg .btn {
  border-radius: 6px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

body.landing-enterprise .form-mpg .form-control {
  min-height: 2.75rem;
  border-radius: 6px;
}

/* ——— CTA / Footer ——— */
body.landing-enterprise .cta-band-item h2,
body.landing-enterprise .cta-band-item p,
body.landing-enterprise .cta-link {
  color: #fff !important;
}

body.landing-enterprise .footer-mpg a {
  display: block;
  margin-bottom: 0.35rem;
}

/* ——— Tablet ——— */
@media (max-width: 991.98px) {
  body.landing-enterprise .trust-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }

  body.landing-enterprise .process-layout {
    grid-template-columns: 1fr !important;
  }

  body.landing-enterprise .services-grid {
    grid-template-columns: 1fr !important;
  }

  body.landing-enterprise .faq-layout {
    grid-template-columns: 1fr !important;
  }

  body.landing-enterprise .hero-section {
    padding-top: 5.5rem;
  }

  body.vacantes-page .navbar-mpg .navbar-collapse {
    background: #fff;
    border: 1px solid rgba(13, 17, 23, 0.1);
    border-radius: 10px;
    margin-top: 0.5rem;
    padding: 0.75rem;
    box-shadow: 0 12px 32px rgba(6, 16, 24, 0.1);
  }

  body.vacantes-page .navbar-mpg .navbar-nav {
    margin-bottom: 0.75rem;
  }

  body.vacantes-page .navbar-mpg .btn-mpg-primary {
    width: 100%;
  }
}

/* ——— Móvil ——— */
@media (max-width: 767.98px) {
  body.landing-enterprise .cta-band-grid {
    grid-template-columns: 1fr !important;
  }

  body.landing-enterprise .cta-band-item + .cta-band-item {
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  body.landing-enterprise .container,
  body.vacantes-page .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  body.vacantes-page .vacantes-page-title {
    font-size: clamp(1.5rem, 7vw, 2rem);
  }

  body.vacantes-page .vacantes-page-lead {
    font-size: 0.95rem;
  }
}

@media (max-width: 575.98px) {
  body.landing-enterprise .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  body.landing-enterprise .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  body.landing-enterprise .vacante-card-actions,
  body.vacantes-page .vacante-card-actions {
    flex-direction: column;
  }

  body.landing-enterprise .vacante-card-actions .btn,
  body.vacantes-page .vacante-card-actions .btn {
    width: 100%;
  }

  body.landing-enterprise .forms-section .d-flex,
  body.landing-enterprise .form-mpg .row > [class*="col-"] .btn {
    width: 100%;
  }

  body.landing-enterprise .forms-section .btn,
  body.landing-enterprise .form-tabs {
    width: 100%;
  }

  body.landing-enterprise .vacantes-section .row.mb-4 .btn {
    width: 100%;
  }

  .vacante-detalle-modal .modal-footer,
  .app-vacante-preview-modal .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .vacante-detalle-modal .modal-footer .btn,
  .postulacion-modal .modal-footer .btn,
  .app-vacante-preview-modal .modal-footer .btn,
  .postulacion-modal .d-grid .btn {
    width: 100%;
    margin: 0 !important;
  }

  body.landing-enterprise .whatsapp-float,
  body.vacantes-page .whatsapp-float {
    width: 3.25rem;
    height: 3.25rem;
    right: 0.85rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  body.landing-enterprise.has-pwa-banner .whatsapp-float {
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .vacantes-search-submit,
  .vacantes-search-bar .btn {
    width: 100%;
  }

  body.landing-enterprise .footer-mpg .col-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Evita que overlays tapen CTAs de formularios */
body.landing-enterprise.has-pwa-banner .forms-section {
  padding-bottom: 2rem;
}

body.modal-open {
  overflow: hidden;
  padding-right: 0 !important;
}
