/* =========================================================
   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: center; 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 */
.titles-container {
  position: absolute;
  top: clamp(8rem, 18vh, 12rem);
  max-width: min(46rem, 92%);
  display: block;
}

/* 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: 1rem; display: flex; gap: 0.75rem; }
.btn {
  display: inline-block; padding: 10px 16px; border-radius: 6px;
  text-decoration: none; font-weight: 700; font-size: 0.95rem;
}
.btn.primary { background: var(--brand-blue); color: var(--white); }
.btn.outline { border: 2px solid var(--white); color: var(--white); background: transparent; }

/* =========================================================
   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;
}

.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; }

/* =========================================================
   Responsive
========================================================= */

/* ====== 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);
    max-width: min(40rem, 92%);
  }

  /* 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) {
  .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);
  
    max-width: 92%;
  }

  .services .section-cards { justify-content: space-around; }
  .services .card { flex: 1 1 100%; margin: 10px 0; }
}


@media (max-width: 600px) {
  /* Hero móvil */
  .principal {
    background: url('images/section1-background.jpg') no-repeat center center;
    background-size: cover;
    height: 350px;
    padding: 10px;
  }
  .principal::before {
    background: linear-gradient(
      0deg,
      rgba(0,0,0,0.60) 0%,
      rgba(0,0,0,0.45) 50%,
      rgba(0,0,0,0.00) 100%
    );
  }
  .titles-container {
    left: 1rem; top: clamp(4rem, 16vh, 8rem); max-width: 95%;
  }

  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; }
}

