/* =========================================================
   Paleta y base
========================================================= */
:root {
  --brand-blue: #2c4f9d;
  --brand-orange: #e8511b;
  --text: #333;
  --bg: #f4f4f4;
  --white: #fff;
}

html, body {
  font-family: Arial, sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
}

.padding-top { padding-top: 2rem; }

h1 { text-align: left; margin: 0; }
h3 { color: var(--brand-blue); font-size: 1.75rem; }

/* =========================================================
   HERO (header .principal) — Imagen con overlay + títulos
========================================================= */
.principal {
  position: relative;
  isolation: isolate;
  background: url('images/section1-background.jpg') no-repeat center center;
  background-size: cover;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 20px;
  height: 100vh;
}

/* Overlay para contraste de texto */
.principal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.55) 35%,
    rgba(0,0,0,0.20) 65%,
    rgba(0,0,0,0.00) 100%
  );
  z-index: 0;
}

/* Asegura que logo y textos queden por encima del overlay */
.principal > * { position: relative; z-index: 1; }

/* Logo */
.principal img { width: 15rem; height: auto; margin: 0; }

/* Contenedor de títulos del hero — 2 columnas */
.titles-container {
  position: absolute;
  top: clamp(8rem, 18vh, 12rem);
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Columna izquierda: título + subtítulo */
.hero-left {
  flex: 1;
  max-width: 50%;
}

/* Columna derecha: caja checks + botón */
.hero-right {
  flex: 0 0 auto;
  width: clamp(240px, 32%, 380px);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  box-sizing: border-box;
}

.hero-right-title {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.hero-right-title::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-orange);
  flex-shrink: 0;
}

/* Wrappers para las líneas de título */
.title-main-container,
.title-subtitle-container {
  display: flex;
  justify-content: flex-start;
  text-align: left;
}

/* Segunda línea con separación */
.title-subtitle-container { margin-top: 1rem; }

/* Títulos en blanco y tamaños fluidos */
.main-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
  margin-right: 10px;
}

.sub-title {
  font-size: clamp(1.25rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--bg);
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
  margin-top: 0.25rem;
}

/* Neutraliza reglas absolutas antiguas */
.principal h1 {
  position: static !important;
  color: inherit !important;
  font-size: inherit !important;
}

/* Copete del hero (si lo usas) */
.hero-copy {
  margin-top: 1rem;
  color: var(--white);
  font-size: clamp(1rem, 2.6vw, 1.125rem);
  text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/* CTAs del hero (si los usas) */
.hero-cta { margin-top: 1.5rem; display: flex; gap: 0.75rem; }

.btn-hero-primary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  background: var(--brand-orange);
  color: var(--white);
  letter-spacing: 0.02em;
  box-shadow: 0 4px 18px rgba(232,81,27,0.45);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-hero-primary:hover {
  background: #cf4515;
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(232,81,27,0.55);
}

/* Checks destacados del hero */
.hero-checks {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hero-checks li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--white);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
}
.hero-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(232,81,27,0.5);
}

/* Feedback del formulario */
.form-feedback {
  padding: 12px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 16px;
  text-align: center;
}
.form-feedback.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.form-feedback.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* =========================================================
   Secciones generales
========================================================= */
.contact { padding: 2rem; text-align: center; }

/* “Quiénes somos” */
.about {
  background-color: var(--bg);
  text-align: center;
  min-height: 100vh;      /* más flexible que height fija */
  align-items: center;
  display: flex;
  padding: 0 2rem;
}

/* Layout de “Quiénes somos” */
.about-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Imagen dentro de “Quiénes somos” */
.about-container img {
  width: 50%;
  height: auto;
  display: block;
  border-radius: 15px;
  object-fit: cover;
}

.about-text { width: 50%; text-align: left; padding: 0 2rem 0 0; }

.about .about-text h2,
.services h2,
.contact h2 {
  color: var(--brand-blue);
  font-size: 3rem;
  margin: 0;
  text-align: center;
  padding: .5rem 0;
}
 .services-title{
  padding: 2rem 0 !important;
 }
.about .about-text p {
  text-align: justify;
  text-indent: 30px;
  line-height: 1.6;
}

.about h2 { color: var(--brand-blue); font-size: 2rem;  }
.about p  { color: var(--text); font-size: 1rem; line-height: 1.6; }

/* Bullets corporativos */
.about-bullets {
  list-style: none; margin: 1rem 0 0; padding: 0;
}
.about-bullets li {
  position: relative; color: var(--text); line-height: 1.6;
  padding: 0.2rem 0 0.2rem 1.25rem;
}
.about-bullets li::before {
  content: ""; position: absolute; left: 0; top: 1.05em; transform: translateY(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(44,79,157,0.15);
}
.about-bullets li + li {
  border-top: 1px dashed rgba(44,79,157,0.18);
  margin-top: 0.35rem; padding-top: 0.6rem;
}
.about-bullets strong { color: var(--brand-blue); font-weight: 700; }
.about-bullets em { color: #555; }

/* =========================================================
   Cards de servicios
========================================================= */
.services { padding: 0.5rem; text-align: center; }

.services .section-cards {
  display: flex; justify-content: space-between; flex-wrap: wrap;
}

.section-cards {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.card {
  width: 30%;
  margin: 10px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  border: none; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.services .card { flex: 1 1 30%; height: 100%; }

.card img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: top;
}

.card p { padding: 0.5rem; }

/* =========================================================
   Footer y redes
========================================================= */
footer {
  background-color: var(--brand-blue);
  color: white;
  text-align: center;
  padding: 20px 0;
}

footer a { color: var(--brand-orange); text-decoration: none; margin: 0 5px; }
footer a:hover { text-decoration: underline; }

.footer-text { font-size: 18px; margin-bottom: 10px; }

.social-link {
  text-decoration: none; color: white; font-size: 16px;
  margin: 0 10px; display: inline-flex; align-items: center;
}
.social-icon {
  width: 30px; height: 30px; margin-right: 8px; transition: transform 0.3s ease;
}
.social-link:hover .social-icon { transform: scale(1.2); }
.social-link:hover { color: var(--brand-orange); }

/* Botón flotante de WhatsApp */
.whatsapp-button {
  position: fixed; bottom: 20px; right: 20px;
  background-color: #25d366; padding: 10px; border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); z-index: 1000;
}
.whatsapp-icon { width: 50px; height: 50px; }

/* =========================================================
   Contacto (flex clásico) + Grid B2B opcional
========================================================= */
.contact { background-color: var(--bg); }

.contact form {
  display: flex;
  flex-direction: column;
  padding: 50px;
  border-radius: 10px;
  background-color: #fafafa;
  max-width: 600px;
  margin: 0 auto;

  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}


/* Si usas .form-grid (del HTML), 2 columnas en desktop */
.form-grid {
  display: grid; gap: 16px;
}
.form-field--full { grid-column: 1 / -1; }

.form-field { display: flex; align-items: center; margin-bottom: 15px; width: 100%; }
.form-field label { width: 150px; margin-right: 15px; font-weight: bold; text-align: right; }
.form-field input, .form-field textarea, .form-field select {
  padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 1rem; width: 100%; background: #fff;
}
.form-field textarea { resize: vertical; height: 120px; }

button {
  padding: 10px 20px;
  background-color: var(--brand-blue);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 10px;
  width: 50%;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  background-color: #254b83;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.form-button { display: flex; justify-content: center; width: 100%; margin-top: 20px; }

.install-block {
  margin-top: 3rem;
  text-align: center;
}

.install-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a2b3c;
  margin-bottom: 1.5rem;
}

.install-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.install-item {
  background: #1a2b3c;
  color: #fff;
  border-radius: 8px;
  padding: 0.7rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}


/* =========================================================
   CLIENTES — "Atendemos a"
   Mismo fondo var(--bg), mismas cards blancas con sombra
========================================================= */
.clients {
  background-color: var(--bg);
  padding: 3rem 2rem;
  text-align: center;
}

.clients-title {
  color: var(--brand-blue);
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  padding: .5rem 0;
}

.clients-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}

.client-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border-radius: 10px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.client-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.client-icon { font-size: 1.4rem; }

.clients-subtitle {
  max-width: 650px;
  margin: 0 auto 2rem;
  color: #666;
  font-size: 1rem;
  line-height: 1.7;
}

/* =========================================================
   PROBLEMAS + SOLUCIÓN
   Dos columnas de cards blancas sobre fondo var(--bg)
========================================================= */
.problems {
  background-color: var(--white);
  padding: 3rem 2rem;
  text-align: center;
}

.problems-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: stretch;
}

/* Título de sección — mismo estilo que .services h2 */
.problems-section-title {
  color: var(--brand-blue);
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 2rem 0;
  padding: .5rem 0;
  grid-column: 1 / -1;
}

/* Cada columna es una card igual que .card */
.problems-text,
.problems-solution {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  padding: 1.5rem;
  text-align: left;
}

.problems-text h2 {
  color: var(--brand-blue);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1.2rem 0;
}

.problems-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem 0;
}

.problems-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  font-size: 1rem;
  color: var(--text);
  border-bottom: 1px dashed rgba(44,79,157,0.18);
}

.problems-list li:last-child { border-bottom: none; }

/* Círculo naranja con ✕ — igual a hero-check-icon */
.problems-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(232,81,27,0.4);
}

.problems-closing {
  font-size: 0.92rem;
  color: #666;
  font-style: italic;
  line-height: 1.6;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(44,79,157,0.18);
}

/* Columna solución */
.problems-solution h3 {
  color: var(--brand-blue);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 1.2rem 0;
}

.solution-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.solution-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  font-size: 1rem;
  color: var(--text);
  border-bottom: 1px dashed rgba(44,79,157,0.18);
}

.solution-list li:last-child { border-bottom: none; }

/* Círculo azul con ✓ — mismo tamaño que problems-icon */
.solution-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(44,79,157,0.35);
}

/* =========================================================
   INSTALACIÓN DE SISTEMAS — bloque extra en services
   Mismo estilo que el resto de la sección services
========================================================= */
.install-block {
  margin-top: 1rem;
  padding: 2rem 0.5rem 3rem;
  text-align: center;
}

.install-title {
  color: var(--brand-blue);
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 1.5rem 0;
}

.install-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.install-item {
  background: var(--white);
  color: var(--brand-blue);
  border-radius: 10px;
  padding: 1rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.install-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.install-subtitle {
  max-width: 650px;
  margin: 0 auto 2rem;
  color: #666;
  font-size: 1rem;
  line-height: 1.7;
}

/* =========================================================
   Responsive — secciones nuevas
========================================================= */

/* ====== Tablet grande / laptop chico (<= 1024px) ====== */
@media (max-width: 1024px) {
    .form-grid { grid-template-columns: 1fr;padding: 1rem; }
  /* Hero un poco más bajo y overlay más fuerte para fotos claras */
  .principal { height: 80vh; }
  .principal::before {
    background: linear-gradient(
      90deg,
      rgba(0,0,0,0.78) 0%,
      rgba(0,0,0,0.58) 40%,
      rgba(0,0,0,0.20) 70%,
      rgba(0,0,0,0.00) 100%
    );
  }
  .titles-container {
    top: clamp(4rem, 18vh, 9rem);
    left: 20px;
    right: 20px;
    gap: 1.5rem;
  }
  .hero-left { max-width: 55%; }
  .hero-right { width: clamp(200px, 38%, 320px); padding: 1.25rem; }

  /* About más flexible, sin forzar altura completa */
  .about { min-height: auto; padding: 2rem; }
  .about-container { gap: 1.5rem; }
  .about-container img { width: 60%; }     /* << foto más grande */
  .about-text { width: 40%; padding: 0; }

  /* Servicios en 2 columnas */
  .services .card { flex: 1 1 45%; }
}

/* ====== Tablet / phablet (<= 768px) ====== */
@media (max-width: 768px) {
  .problems-container { grid-template-columns: 1fr; gap: 2rem; }
  .problems { padding: 2.5rem 1.5rem; }
  .clients { padding: 2rem 1rem; }

  .contact form { padding: 5px; }
  .contact { padding: 1rem; }

  /* “Quiénes somos” en columna, foto grande */
  .about { padding: 1rem; text-align: center; min-height: auto; }
  .about-container { flex-direction: column; text-align: center; }
  .about-container img {
    width: 100%;
    height: auto;
    margin-top: 20px;
  }
  .about-text { order: 2; margin-top: 10px; width: 100%; }
  .about-video { order: 3; margin-top: 20px; width: 100%; }
  h2 { order: 1; }

  /* Hero en tablets */
  .principal {
    background-size: cover;
    background-position: center top;
    height: 70vh;
  }
  .principal::before {
    background: linear-gradient(
      90deg,
      rgba(0,0,0,0.72) 0%,
      rgba(0,0,0,0.50) 40%,
      rgba(0,0,0,0.18) 70%,
      rgba(0,0,0,0.00) 100%
    );
  }
  .titles-container {
    top: clamp(3rem, 20vh, 10rem);
    left: 20px;
    right: 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .hero-left { max-width: 100%; }
  .hero-right { width: auto; box-sizing: border-box; }

  .services .section-cards { justify-content: space-around; }
  .services .card { flex: 1 1 100%; margin: 10px 0; }
}


@media (max-width: 600px) {
  .problems-container { grid-template-columns: 1fr; gap: 1.5rem; }
  .problems { padding: 2rem 1rem; }
  .clients-grid { gap: 0.5rem; }
  .client-item { font-size: 0.85rem; padding: 0.45rem 1rem; }
  .install-block { padding: 1.5rem 1rem; }

  /* Hero móvil */
  .principal {
    background: url('images/section1-background.jpg') no-repeat center center;
    background-size: cover;
    height: auto;
    min-height: 600px;
    padding: 10px 10px 3rem;
  }
  .principal::before {
    background: linear-gradient(
      0deg,
      rgba(0,0,0,0.65) 0%,
      rgba(0,0,0,0.50) 50%,
      rgba(0,0,0,0.10) 100%
    );
  }
  .titles-container {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    box-sizing: border-box;
  }
  .hero-left { max-width: 100%; }
  .hero-right { width: 100%; padding: 1rem; box-sizing: border-box; }

  footer { padding: 10px 0; }
  footer .footer-text { text-align: center; font-size: 14px; }
  footer .social-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
  footer .social-icon { width: 30px; height: 30px; margin-right: 10px; }

  .about .about-text h2,
  .services h2,
  .contact h2 { font-size: 2.25rem; }

  /* Formulario en una columna */
  .form-grid { grid-template-columns: 1fr;padding: 1rem; }
  .form-field { display: block; text-align: start; width: 100%; margin-bottom: 20px; }
  .form-field label {
    width: auto; margin-right: 0; display: block; text-align: left; margin-bottom: 6px;
  }
  .form-field input, .form-field textarea, .form-field select {
    font-size: 1rem; padding: 12px; width: -webkit-fill-available;
  }

  .section-cards { flex-direction: column; align-items: center; margin-bottom: 0.25rem; }
  .card { width: 90%; margin-bottom: 20px; }
  .services p { margin: 0.5rem; }

  /* Bullets compactos */
  .about-bullets li { padding-left: 1.5rem; }
  .about-bullets li::before { width: 8px; height: 8px; top: 1.1em; }

  /* Logo del hero más pequeño */
  .principal img { width: 10rem; }
}

