/* --- VARIABLES DE COLOR (CORREGIDAS PARA CONTRASTE) --- */
:root {
  --color-principal: #004a99;
  --color-acento: #d35400; /* Naranja más profundo para legibilidad */
  --color-whatsapp: #128c7e; /* Verde oscuro para cumplir contraste WCAG */
  --color-texto: #222222; /* Texto principal casi negro */
  --color-texto-secundario: #444444; /* Gris oscuro accesible (antes era #666) */
  --color-fondo-ligero: #f9f9f9;
  --color-blanco: #ffffff;
  --fuente-principal: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

/* --- ESTILOS GLOBALES --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--fuente-principal);
  color: var(--color-texto);
  line-height: 1.1;
  overflow-x: hidden;
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  transition: 0.3s;
}

h2,
h3,
h4 {
  margin-bottom: 15px;
  color: #111;
}

/* --- HEADER Y NAVEGACIÓN --- */
.main-header {
  background: #fff;
  padding: 15px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-text {
  font-size: 24px;
  font-weight: 800;
  color: #111;
}

.logo-text span {
  color: var(--color-principal);
}

.header-contact {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* --- HERO SECTION --- */
/* --- AJUSTE PARA QUITAR ESPACIO SUPERIOR --- */
.hero-complex {
  padding: 20px 0 80px 0; /* Bajamos de 80px a 20px arriba */
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  margin-top: 0; /* Aseguramos que no haya margen externo */
}

/* Si el contenedor de la imagen tiene márgenes internos, quítalos */
.hero-image {
  margin-top: 0;
  padding-top: 0;
}

.hero-image img {
  display: block; /* Elimina un pequeño espacio que los navegadores ponen debajo de las imágenes */
  margin-top: 0;
}

.grid-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-form-container h1 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--color-principal);
}

.btn-cta-main {
  display: inline-block;
  background: var(--color-principal);
  color: #fff;
  padding: 15px 30px;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 20px;
}

.sello-garantia {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: var(--color-principal);
  color: white;
  padding: 20px;
  border-radius: 50%;
  text-align: center;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  box-shadow: 0 10px 20px rgba(0, 74, 153, 0.3);
}

/* --- CARDS Y SERVICIOS --- */
.servicios-garantia {
  padding: 80px 0;
  background: #fff;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 50px;
}

.section-title span {
  color: var(--color-principal);
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
}

.card {
  background: #fff;
  padding: 35px;
  border-radius: 15px;
  text-align: center;
  border: 1px solid #ddd;
  transition: 0.3s;
}

.card:hover {
  transform: translateY(-10px);
  border-color: var(--color-principal);
}

.card h3 {
  color: var(--color-principal);
}

.card p {
  color: var(--color-texto-secundario);
}

.card-highlight {
  background: #f0f7ff;
  border-color: #a0c4ff;
}

/* --- SECCIÓN TRAYECTORIA --- */
.trayectoria-experiencia {
  padding: 100px 0;
  background-color: #fff;
}

.grid-trayectoria {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.badge {
  background: #004a99;
  color: #fff;
  padding: 8px 15px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 15px;
}

.p-destacado {
  font-size: 1.2rem;
  color: #333;
  margin-bottom: 30px;
}

.punto {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.punto-icon {
  font-size: 24px;
  color: var(--color-acento);
  background: #fff0ed;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.stat-card {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  text-align: center;
  border: 2px solid var(--color-principal);
  margin-bottom: 20px;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-principal);
}

/* --- MARCAS --- */
.trusted-brands {
  padding: 60px 0;
  background: var(--color-fondo-ligero);
  text-align: center;
}

.brands-carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
}

/* El contenedor define el tamaño */
.brand-logo {
  width: 150px; /* Ancho deseado para los logos */
  height: 80px; /* Alto deseado */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Evita que logos gigantes se salgan */
  margin: 10px;
}

/* La imagen se adapta al contenedor */
.brand-logo img {
  max-width: 100%; /* No permite que sea más ancha que los 150px */
  max-height: 100%; /* No permite que sea más alta que los 80px */
  width: auto; /* Mantiene la proporción */
  height: auto; /* Mantiene la proporción */
  display: block;
  object-fit: contain; /* Este es el truco: centra y ajusta la imagen sin deformar */
}

/* --- UBICACIÓN --- */
.grid-mapa-nueva {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
  border: 1px solid #ddd;
}

.col-info {
  padding: 50px;
}

.col-mapa {
  min-height: 400px;
}

.map-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- FOOTER --- */
.footer-moderno {
  background-color: #002b5c; /* Fondo oscuro para contraste de texto blanco */
  padding: 60px 0 0;
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 40px;
}

.footer-moderno a,
.footer-moderno p {
  color: #e0e0e0 !important;
}

.footer-bottom {
  background: #001a38;
  padding: 20px;
  text-align: center;
  color: white;
}

/* --- MENÚ MÓVIL --- */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background: #ffffff;
  z-index: 9999;
  transition: 0.4s;
  padding: 30px;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
  right: 0;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  display: none;
}

.mobile-overlay.active {
  display: block;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-nav-links a {
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
}

/* --- BOTONES FLOTANTES --- */
.contacto-flotante {
  position: fixed;
  bottom: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 9999;
}

.btn-flotante {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: none;
}

.btn-flotante.llamada {
  background-color: var(--color-principal);
  animation: pulse-azul 2s infinite;
}

.btn-flotante.whatsapp {
  background-color: var(--color-whatsapp);
}

@keyframes pulse-azul {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 74, 153, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(0, 74, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 74, 153, 0);
  }
}

/* --- MODAL FORMULARIO --- */
.modal-form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.mini-form-container {
  background: #ffffff;
  padding: 30px;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.btn-cerrar-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 20px;
  cursor: pointer;
  color: #444;
  background: none;
  border: none;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 5px;
  color: var(--color-principal);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  color: #222;
}

.btn-enviar-wa {
  width: 100%;
  background-color: var(--color-whatsapp);
  color: white;
  border: none;
  padding: 16px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-flotante.formulario {
  background-color: var(--color-acento);
  cursor: pointer;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  .grid-hero,
  .grid-trayectoria,
  .grid-mapa-nueva {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .desktop-only,
  .header-phone,
  .btn-whatsapp-top {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* --- SERVICIOS ESPECÍFICOS --- */
.grid-servicios-especificos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.card-servicio-v2 {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  border-bottom: 5px solid #eee;
  transition: 0.3s;
}

.card-servicio-v2:hover {
  border-color: var(--color-acento);
  transform: translateY(-5px);
}

.card-servicio-v2 i {
  font-size: 3rem;
  color: var(--color-principal);
  margin-bottom: 20px;
}

.card-servicio-v2 p {
  color: var(--color-texto-secundario);
}
