/* =========================================
   1. VARIABLES Y CONFIGURACIÓN GENERAL
   ========================================= */
:root {
  --naranja: #f36f21;
  --azul: #0f2c59;
  --blanco: #ffffff;
  --gris-fondo: #f4f6f8;
  --gris-linea: #e0e0e0;
  --texto: #333333;
  --texto-suave: #555555;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: var(--texto);
  background-color: var(--blanco);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================================
   2. HEADER (FIJO)
   ========================================= */
header {
  background: var(--blanco);
  padding: 10px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  padding: 0 5%;
}

.logo-img {
  max-height: 75px;
  width: auto;
  mix-blend-mode: multiply;
}

nav ul {
  display: flex;
  list-style: none;
  align-items: center;
}

nav ul li a {
  color: var(--texto);
  text-decoration: none;
  margin-left: 25px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: 0.3s;
}

nav ul li a:hover {
  color: var(--naranja);
}

.btn-nav {
  background: var(--naranja);
  color: white !important;
  padding: 12px 28px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(243, 111, 33, 0.3);
  transition: 0.3s;
}

.btn-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 111, 33, 0.5);
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
  height: 100vh;
  background:
    linear-gradient(rgba(243, 111, 33, 0.2), rgba(15, 44, 89, 0.7)),
    url("flota-centralcoop.png");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--blanco);
  padding: 0 20px;
  padding-top: 90px; /* Esto empuja el contenido hacia abajo para que no lo tape el header */
  height: 100vh;
  display: flex;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  max-width: 900px;
  margin-bottom: 25px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 35px;
}

.hero-btns {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-main {
  background: var(--azul);
  color: white;
  padding: 16px 35px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: 0.3s;
}

/* =========================================
   4. SECCIONES (ESTILOS GLOBALES)
   ========================================= */
.section-padding {
  padding: 100px 0;
}

.bg-white {
  background-color: var(--blanco);
}
.bg-light {
  background-color: var(--gris-fondo);
}

/* SECCIÓN QUÉ ES */
.about-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  text-align: left;
}

.about-image img {
  width: 100%;
  border-radius: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.subtitle {
  color: var(--azul);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 10px;
}

.about-features {
  list-style: none;
  margin-top: 30px;
}

.about-features li {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.about-features i {
  color: var(--naranja);
  font-size: 1.4rem;
}

/* Reemplaza y añade esto a tu sección de audiencia */

.grid-target {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.target-card {
  background: white;
  padding: 50px 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s ease;
  text-align: center;
  position: relative;
  border: 1px solid transparent;
}

.target-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--naranja);
}

/* Tarjeta Destacada (la del centro) */
.target-card.featured {
  background: var(--azul);
  color: white;
}

.target-card.featured h3, 
.target-card.featured p {
  color: white;
}

.target-card.featured .card-icon {
  background: rgba(255, 255, 255, 0.1);
  color: var(--naranja);
}

.card-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--naranja);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.card-icon {
  width: 80px;
  height: 80px;
  background: var(--gris-fondo);
  color: var(--azul);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
  font-size: 35px;
  transition: 0.3s;
}

.target-card:hover .card-icon {
  background: var(--naranja);
  color: white;
}

.target-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
}

.target-card p {
  font-size: 0.95rem;
  color: var(--texto-suave);
  margin-bottom: 25px;
}

/* Lista de beneficios dentro de la tarjeta */
.card-list {
  list-style: none;
  text-align: left;
  display: inline-block;
  margin-top: 20px;
}

.card-list li {
  margin-bottom: 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-list i {
  color: var(--naranja);
  font-size: 14px;
}

.target-card.featured .card-list i {
  color: var(--naranja);
}

/* SECCIÓN INFO (STATS) */
.info-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.info-card {
  background: var(--naranja);
  color: white;
  padding: 40px;
  border-radius: 15px;
  min-width: 280px;
  text-align: center;
}

.stat {
  font-size: 3.2rem;
  font-weight: 800;
  display: block;
}

/* =========================================
   5. FORMULARIO FIJO (ANTES DEL FOOTER)
   ========================================= */
.form-container-fijo {
  max-width: 700px;
  margin: 0 auto;
  background: white;
  padding: 50px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.form-container-fijo h2 {
  margin-bottom: 10px;
}

.contact-form {
  margin-top: 30px;
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--gris-linea);
  border-radius: 8px;
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  outline-color: var(--naranja);
}

.btn-submit {
  width: 100%;
  background: var(--naranja);
  color: white;
  padding: 18px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.3s;
}

.btn-submit:hover {
  background: var(--azul);
}

/* Contenedor principal: alinea formulario y mapa */
.contacto-wrapper {
  display: flex;
  align-items: stretch; /* Crucial: estira ambos hijos a la misma altura */
  gap: 20px;            /* Espacio entre ellos */
  flex-wrap: wrap;      /* Permite que se apilen en móviles */
}

/* Caja del formulario */
.form-container-fijo {
  flex: 1;
  min-width: 300px;
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Caja del mapa */
.map-container {
  flex: 1;
  min-width: 300px;
  border-radius: 15px;
  overflow: hidden;
  display: flex; /* Convierte el contenedor en flex para el iframe */
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* El mapa dentro del contenedor */
.map-container iframe {
  width: 100%;
  height: 100%; /* Ahora ocupará el 100% del alto que dicte el formulario */
  border: none;
}

/* Ajuste para que en móviles no se vea demasiado alto o bajo */
@media (max-width: 768px) {
  .map-container {
    height: 350px; /* Altura fija solo cuando están uno debajo del otro */
  }
}

/* =========================================
   6. MODAL (VENTANA EMERGENTE) - CORREGIDO
   ========================================= */
.modal {
  display: none;
  position: fixed;
  z-index: 3000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: white;
  margin: 5% auto;
  padding: 40px;
  max-width: 500px;
  width: 90%; /* Asegura que en móvil no se salga */
  border-radius: 20px;
  position: relative;
  /* ARREGLOS PARA QUE NO SE CORTE EN MÓVIL */
  max-height: 90vh;
  overflow-y: auto;
}

.close {
  position: absolute;
  right: 25px;
  top: 15px;
  font-size: 35px;
  cursor: pointer;
  color: #888;
}

/* =========================================
   7. FOOTER
   ========================================= */
.main-footer {
  background: white;
  padding: 80px 0 0;
  border-top: 1px solid var(--gris-linea);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 50px;
  margin-bottom: 50px;
}

.footer-col h3 {
  color: var(--naranja);
  margin-bottom: 20px;
}

.divider {
  width: 50px;
  height: 3px;
  background: var(--azul);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
}
.footer-links a {
  text-decoration: none;
  color: var(--texto-suave);
  display: block;
  margin-bottom: 12px;
  transition: 0.2s;
}

.footer-links a:hover {
  color: var(--naranja);
  padding-left: 5px;
}

.copyright-bar {
  background: var(--naranja);
  color: white;
  padding: 20px;
  text-align: center;
  font-size: 0.9rem;
}

/* =========================================
   8. BOTONES FLOTANTES
   ========================================= */
.floating-contact {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: 0.4s;
}

.btn-float {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 28px;
  text-decoration: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.whatsapp {
  background: #25d366;
}
.phone {
  background: var(--naranja);
}

/* =========================================
   9. RESPONSIVE - ARREGLADO
   ========================================= */
@media (max-width: 900px) {
  .about-wrapper {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  .section-padding {
    padding: 60px 0;
  }
}

@media (max-width: 600px) {
  /* CAMBIO: En lugar de ocultar todo el menú, solo ocultamos los links de texto */
  nav ul li:not(:last-child) {
    display: none;
  }
  nav ul li {
    margin-left: 0;
  }
  .stat {
    font-size: 2.5rem;
  }
  .form-container-fijo {
    padding: 30px 20px;
  }
  /* Ajuste de logo para que quepa bien con el botón */
  .logo-img {
    max-height: 55px;
  }
}
/* Ajuste específico para móviles */
@media (max-width: 600px) {
  .hero {
    padding-top: 80px; /* Un poco menos en móvil si el logo reduce su tamaño */
    height: auto; /* En móvil a veces es mejor que la altura sea fluida */
    min-height: 100vh;
    padding-bottom: 50px;
  }
}

/* Contenedor para las dos columnas */
.contacto-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
  gap: 40px;
  align-items: stretch;
}

/* Ajuste del contenedor del formulario */
.form-container-fijo {
  max-width: 100%; /* Ahora ocupa su columna */
  margin: 0;
  text-align: left;
}

/* Contenedor del mapa */
.map-container {
  min-height: 450px;
  width: 100%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  overflow: hidden;
}

/* Responsive para móviles */
@media (max-width: 900px) {
  .contacto-wrapper {
    grid-template-columns: 1fr; /* Una sola columna en móvil */
  }
  
  .map-container {
    height: 350px; /* Reducimos altura en móvil */
  }
}

/* --- FOOTER LEGAL --- */
.footer-legal-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.legal-links {
    display: flex;
    gap: 8px;
    align-items: center;
    color: #fff;
    font-size: 0.85rem;
}

.legal-links a {
    color: #fff;
    text-decoration: none;
    transition: opacity 0.3s;
}

.legal-links a:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .footer-legal-flex {
        flex-direction: column;
        text-align: center;
    }
}

/* --- ESTILO PARA PÁGINAS LEGALES (Basado en la imagen) --- */
.legal-page {
    background-color: #ffffff;
}

.legal-content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    font-family: 'Montserrat', sans-serif;
    color: #666666; /* Gris de la imagen */
    font-size: 16px;
    line-height: 1.65;
}

.legal-content-wrapper h1 {
    color: #333333;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 45px;
    text-align: left;
}

.legal-content-wrapper h2 {
    color: #333333;
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
    text-transform: uppercase; /* Formato 1. OBJETO */
}

.legal-content-wrapper h3 {
    color: #444444;
    font-size: 1.15rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
}

.legal-content-wrapper p {
    margin-bottom: 25px; /* Espaciado generoso entre párrafos como en la imagen */
    text-align: justify;
}

.legal-content-wrapper ul {
    margin-bottom: 25px;
    padding-left: 20px;
    list-style-type: disc;
}

.legal-content-wrapper li {
    margin-bottom: 12px;
}

.legal-content-wrapper strong {
    color: #444444;
    font-weight: 700;
}

/* --- BARRA LEGAL EN EL COPYRIGHT --- */
.footer-legal-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.legal-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0 5px;
    transition: opacity 0.3s;
}

.legal-links a:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .footer-legal-flex {
        flex-direction: column;
        text-align: center;
    }
}

/* Ajuste de lectura para textos legales en móviles */
@media (max-width: 600px) {
    .legal-content-wrapper {
        padding: 0 5px; /* Pequeño margen interno para el texto */
    }
    
    .legal-content-wrapper h1 {
        font-size: 1.8rem; /* Reducimos el título principal para que no rompa líneas feamente */
        margin-bottom: 25px;
    }

    .legal-content-wrapper h2 {
        font-size: 1.2rem; /* Subtítulos más proporcionados */
    }

    /* Ajuste para que los enlaces legales en el copyright no se amontonen */
    .legal-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
}