/* =================================================
   CORRECCIONES TÉCNICAS – Von Hesse Consultores
   Se carga después de la hoja de estilos de cada página.
   Octubre 2026.
   ================================================= */

/* ---------- Global ---------- */
html, body { overflow-x: clip; }
img { max-width: 100%; height: auto; }

/* Botón "subir": no tapar el texto, tamaño táctil */
.scroll-top-btn {
  width: 44px;
  height: 44px;
  line-height: 44px;
  font-size: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 14px rgba(1, 39, 62, .25);
  text-align: center;
  padding: 0;
}

/* ---------- Contacto (escritorio y celular) ---------- */
/* La foto original del hero no existe en el servidor: se usa una foto real del equipo */
body.contacto .hero-wrapper {
  background-image: url("../img/hero-contacto.jpg") !important;
  background-position: center 40% !important;
}
body.contacto .hero-wrapper::after,
body.nosotros .hero-wrapper::after {
  background-image: none !important;   /* referencia a img/10603.jpg (archivo inexistente) */
}

/* ---------- Página "Gracias" ---------- */
body.gracias { overflow: visible; overflow-x: clip; height: auto; min-height: 100vh; padding: 32px 0; }
html:has(body.gracias) { background: #f5f5f0; }
body.gracias::before, body.gracias::after { opacity: .3; }
body.gracias .checkmark { position: relative; z-index: 1; }
body.gracias .container { width: 100%; max-width: 640px; padding: 40px 20px; box-sizing: border-box; }
body.gracias .btn-group { flex-wrap: wrap; justify-content: center; }
body.gracias .visit-btn,
body.gracias .social-links {
  min-width: 0 !important;
  margin-left: 0 !important;
  width: 100%;
  max-width: 520px;
  box-sizing: border-box;
}
body.gracias h1 { font-size: clamp(1.6rem, 6vw, 2.4rem); }

/* ================= CELULAR ================= */
@media (max-width: 900px) {

  /* ---------- Home: portada ---------- */
  body.inicio .hero-wrapper {
    background-image: url("../img/hero-home-movil.jpg") !important;  /* foto vertical, sin deformar */
    background-position: center 30% !important;
    min-height: 78vh !important;
    padding: 24px 20px 40px !important;
    justify-content: flex-end !important;
  }
  body.inicio .hero-wrapper::before { background: linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.6)) !important; }
  body.inicio .hero-text {
    margin: 0 !important;            /* antes: margin-left -90px (cortaba el texto) */
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
  }
  body.inicio .hero-text h1 {
    white-space: normal !important;  /* antes: nowrap + ellipsis (letras cortadas) */
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: clamp(1.75rem, 7.5vw, 2.3rem) !important;
    line-height: 1.15 !important;
    margin-bottom: 14px !important;
  }
  body.inicio .hero-text p {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
    max-width: 100% !important;
  }

  /* ---------- Home: bloque de Milton (antes quedaba invisible en celular) ---------- */
  .authority-content,
  .authority-image {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .authority-section { padding: 40px 0 10px !important; opacity: 1 !important; transform: none !important; animation: none !important; }
  .authority-image img { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }

  /* ---------- Servicios: separación bajo la portada ---------- */
  body.servicios .services-intro-mobile:first-of-type { margin-top: 32px !important; }
  body.servicios .services-intro-mobile { max-width: calc(100% - 40px) !important; }
  body.servicios .services-row { padding-top: 24px !important; }
  body.servicios .services-header { margin-top: 0 !important; padding-top: 0 !important; }

  /* ---------- Contacto: foto arriba del formulario, a altura reducida ---------- */
  body.contacto .contact-container { display: flex !important; flex-direction: column !important; gap: 0 !important; }
  body.contacto .contact-image {
    order: -1;
    height: 230px !important;
    max-height: 230px;
    overflow: hidden;
    border-radius: 12px;
    margin: 0 auto 24px !important;
    width: 100% !important;
  }
  body.contacto .contact-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center 15% !important;
    transform: none !important;
  }
  body.contacto .contact-form-pro input,
  body.contacto .contact-form-pro textarea,
  body.contacto .contact-form-pro button,
  body.servicios .contact-form-pro input,
  body.servicios .contact-form-pro textarea,
  body.servicios .contact-form-pro button { font-size: 16px; min-height: 44px; }  /* evita zoom automático en iPhone */

  /* ---------- Nosotros: texto alineado a la izquierda (sin huecos entre palabras) ---------- */
  body.nosotros p { text-align: left !important; hyphens: auto; }
  body.nosotros .mision p,
  body.nosotros .vision p { text-align: center !important; }

  /* ---------- Perfiles del equipo ---------- */
  .profile-page .profile-image img { width: 100%; max-width: 360px; height: auto; margin: 0 auto; display: block; }
}
