/* =========================
   FORSÉNTICO — DIAGNÓSTICO OPERATIVO
   ========================= */

.page-diagnostico {
  background: #f4f7fb;
  color: #102048;
}

.diag-container {
  width: min(calc(100% - 2rem), 1240px);
  margin: 0 auto;
}

/* =========================
   HERO
   ========================= */

.diag-hero {
  position: relative;
  padding: 7rem 0 5rem;
  overflow: hidden;
  background:
    linear-gradient(rgba(5, 15, 50, 0.76), rgba(5, 15, 50, 0.82)),
    url("../images/diagnostico-operativo/hero-industrial.webp");
  background-size: cover;
  background-position: center;
}

.diag-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(47, 91, 255, 0.18), transparent 28%);
}

.diag-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 4rem;
  align-items: center;
}

.diag-label {
  display: inline-flex;
  width: fit-content;
  padding: 0.72rem 1rem 0.68rem;
  border-radius: 0 14px 14px 14px;
  background: rgba(47, 91, 255, 0.12);
  border: 1px solid rgba(47, 91, 255, 0.24);
  color: #7ea0ff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.diag-label-light {
  color: #ffffff;
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
}

.diag-hero-content h1 {
  max-width: 12ch;
  margin: 1.2rem 0 1.2rem;
  color: #ffffff;
  font-size: clamp(3rem, 5vw, 5.4rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
}

.diag-hero-content p {
  max-width: 56ch;
  margin: 0 0 1.8rem;
  color: rgba(255,255,255,0.82);
  font-size: 1.05rem;
  line-height: 1.78;
}

/* =========================
   BOTONES
   ========================= */

.diag-btn-primary,
.diag-btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 1.6rem;
  border-radius: 999px;
  background: #2f5bff;
  border: 1px solid #2f5bff;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 900;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.diag-btn-primary:hover,
.diag-btn-submit:hover {
  transform: translateY(-2px);
  background: #2049e5;
}

.diag-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 1.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
}

/* =========================
   FORMULARIO
   ========================= */

.diag-form {
  padding: 2rem;
  border-radius: 0 28px 28px 28px;
  background: rgba(10, 20, 56, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 22px 52px rgba(0,0,0,0.28);
}

.diag-form h2 {
  margin: 0 0 1.6rem;
  color: #ffffff;
  font-size: 1.45rem;
}

.diag-form-group {
  margin-bottom: 1rem;
}

.diag-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.diag-form label {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(255,255,255,0.84);
  font-size: 0.85rem;
  font-weight: 700;
}

.diag-form input,
.diag-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 0.95rem;
}

.diag-form textarea {
  resize: vertical;
}

.diag-form input:focus,
.diag-form textarea:focus {
  outline: none;
  border-color: #2f5bff;
}

.diag-consent {
  margin: 1rem 0 1.4rem;
}

.diag-consent label {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: rgba(255,255,255,0.72);
  font-size: 0.78rem;
  line-height: 1.55;
}

.diag-consent a {
  color: #7ea0ff;
}

/* =========================
   SECCIONES
   ========================= */

.diag-section {
  padding: 5.5rem 0;
}

.diag-heading {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.diag-heading h2 {
  margin: 1rem 0 0;
  color: #071b68;
  font-size: clamp(2.2rem, 3.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

/* =========================
   PROBLEMAS
   ========================= */

.diag-problems {
  background: #ffffff;
}

.diag-problem-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.diag-problem-grid article {
  padding: 1.4rem;
  border-radius: 0 18px 18px 18px;
  background: #f4f7fb;
  border: 1px solid rgba(7, 27, 104, 0.08);
  color: #071b68;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.45;
  transition: all 0.25s ease;
}

.diag-problem-grid article:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(7, 27, 104, 0.08);
}

/* =========================
   SPLIT LAYOUT
   ========================= */

.diag-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1fr);
  gap: 4rem;
  align-items: center;
}

.diag-split-reverse {
  grid-template-columns: minmax(420px, 1fr) minmax(0, 0.95fr);
}

.diag-image-card {
  overflow: hidden;
  border-radius: 0 30px 30px 30px;
  border: 1px solid rgba(7, 27, 104, 0.08);
  background: #dfe7f5;
  box-shadow: 0 24px 52px rgba(7, 27, 104, 0.1);
}

.diag-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.diag-copy h2 {
  margin: 1rem 0 1.2rem;
  color: #071b68;
  font-size: clamp(2.2rem, 3.2vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.diag-copy p {
  margin: 0 0 1rem;
  color: #5d6b88;
  font-size: 1rem;
  line-height: 1.8;
}

/* =========================
   BENEFICIOS
   ========================= */

.diag-benefits {
  background: #ffffff;
}

.diag-benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.diag-benefit-grid span {
  padding: 1.2rem 1.3rem;
  border-radius: 0 18px 18px 18px;
  background: #071b68;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.45;
}

/* =========================
   METODOLOGÍA
   ========================= */

.diag-method {
  background: #ffffff;
}

.diag-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}

.diag-method-grid article {
  padding: 2rem;
  border-radius: 0 22px 22px 22px;
  background: #f4f7fb;
  border: 1px solid rgba(7, 27, 104, 0.08);
}

.diag-method-grid span {
  display: inline-flex;
  margin-bottom: 1rem;
  color: #2f5bff;
  font-size: 0.9rem;
  font-weight: 900;
}

.diag-method-grid h3 {
  margin: 0 0 0.8rem;
  color: #071b68;
  font-size: 1.1rem;
}

.diag-method-grid p {
  margin: 0;
  color: #5d6b88;
  line-height: 1.7;
}

/* =========================
   CTA FINAL
   ========================= */

.diag-final-cta {
  position: relative;
  overflow: hidden;
  padding: 6rem 0;
  background:
    linear-gradient(rgba(5,15,50,0.86), rgba(5,15,50,0.9)),
    url("../images/diagnostico-operativo/planta-lean.webp");
  background-size: cover;
  background-position: center;
}

.diag-final-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 82% 20%, rgba(47,91,255,0.16), transparent 26%);
}

.diag-final-content {
  position: relative;
  z-index: 2;
  max-width: 860px;
}

.diag-final-content h2 {
  max-width: 12ch;
  margin: 1rem 0;
  color: #ffffff;
  font-size: clamp(2.6rem, 4vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.diag-final-content p {
  max-width: 58ch;
  margin: 0 0 1.8rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.8;
}

.diag-final-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =========================
   STICKY MOBILE
   ========================= */

.diag-mobile-sticky {
  display: none;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1100px) {

  .diag-hero-grid,
  .diag-split,
  .diag-split-reverse {
    grid-template-columns: 1fr;
  }

  .diag-problem-grid,
  .diag-benefit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .diag-method-grid {
    grid-template-columns: 1fr;
  }

  .diag-hero-content h1,
  .diag-copy h2,
  .diag-heading h2,
  .diag-final-content h2 {
    max-width: 100%;
  }
}

@media (max-width: 768px) {

  .diag-hero {
    padding: 5.5rem 0 4rem;
  }

  .diag-section {
    padding: 4rem 0;
  }

  .diag-form-row,
  .diag-problem-grid,
  .diag-benefit-grid {
    grid-template-columns: 1fr;
  }

  .diag-form {
    padding: 1.5rem;
  }

  .diag-hero-content h1 {
    font-size: clamp(2.4rem, 10vw, 3.4rem);
  }

  .diag-mobile-sticky {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border-radius: 999px;
    background: #2f5bff;
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 18px 34px rgba(0,0,0,0.22);
  }
}
.diag-success-message {
  margin-bottom: 1rem;
  padding: 1rem 1.2rem;
  border-radius: 14px;
  background: rgba(32, 201, 151, 0.12);
  border: 1px solid rgba(32, 201, 151, 0.3);
  color: #20c997;
  font-size: 0.92rem;
  font-weight: 700;
}