/* ============================================================
    1. VARIABLES Y AJUSTES GLOBALES
   ============================================================ */
:root {
  --azul-principal: #003285; /* Azul solicitado para títulos y barra */
  --azul-oscuro: #2A629A;
  --amarillo-hg: #FAE251;
  --blanco: #ffffff;
  --gris-fondo: #f4f4f4;
  --negro-footer: #1a1a1a;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', Arial, sans-serif;
  color: #333;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--gris-fondo);
  overflow-x: hidden;
}

/* Títulos unificados con el azul de la barra */
h1, h2, h3, h4 {
  font-weight: 700;
  color: var(--azul-principal) !important;
  text-align: center;
  margin-bottom: 20px;
}

/* ============================================================
    2. HEADER Y NAVEGACIÓN
   ============================================================ */
header {
  background-color: var(--blanco);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #eee; 
}

.logo img { 
  max-width: 180px; 
  height: auto; 
}

nav { 
  background-color: var(--azul-principal); 
  width: 100%;
  border-radius: 50px; 
  overflow: hidden; 
}

nav ul { 
  list-style: none; 
  display: flex; 
  justify-content: center; 
  margin: 0; 
  padding: 0; 
}

nav a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 25px; 
  display: inline-block;
  transition: all 0.3s ease;
  text-transform: capitalize; 
  letter-spacing: 0.5px;
}

nav a:hover, nav a.active { 
  background-color: var(--azul-oscuro); 
  box-shadow: inset 0 -3px 0 var(--amarillo-hg); 
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span { 
  width: 30px; 
  height: 3px; 
  background-color: var(--azul-principal); 
  border-radius: 10px; 
}

/* ============================================================
    3. INICIO: BANNER HERO ESTILO ZEBRA
   ============================================================ */
.hero {
  position: relative;
  background-image: url('img/banner-logistico-hg.webp'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 80vh; 
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  z-index: 1; /* Agregado para detección de clic */
}

.hero-overlay {
  background: rgba(0, 50, 133, 0.65); 
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hero-content {
  max-width: 900px;
  text-align: center;
  color: var(--blanco);
}

.hero-content h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--blanco) !important;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  line-height: 1.2;
}

.hero-content h1 span {
  display: block; 
  font-size: clamp(2.5rem, 6vw, 4rem); 
  color: var(--amarillo-hg) !important;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.6;
  margin-bottom: 30px;
  color: var(--blanco);
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 25px;
}

.btn-azul {
  background-color: var(--amarillo-hg); 
  color: var(--azul-principal) !important;
  border-radius: 50px; 
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  padding: 16px 32px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  text-transform: uppercase;
}

.btn-azul:hover {
  background-color: var(--blanco);
  transform: translateY(-4px);
}

.icono-whatsapp {
  width: 65px;
  height: 65px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.icono-whatsapp:hover { 
  transform: scale(1.2) rotate(8deg); 
}

.hero-footer-text {
  margin-top: 25px;
  font-size: 0.9rem !important;
  font-style: italic;
  color: var(--amarillo-hg) !important;
}

/* ============================================================
    4. SECCIÓN NOSOTROS
   ============================================================ */
.nosotros { 
  padding: 60px 20px; 
  position: relative;
  z-index: 1; /* Agregado para detección de clic */
}

.nosotros-contenido {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 60px auto;
  gap: 40px;
}

.nosotros-contenido.reverse { 
  flex-direction: row-reverse; 
}

.nosotros-imagen { 
  flex: 1 1 45%; 
}

.nosotros-imagen img { 
  width: 100%; 
  border-radius: 8px; 
  box-shadow: 0 6px 12px rgba(0,0,0,0.1); 
}

.nosotros-texto { 
  flex: 1 1 50%; 
  text-align: left; 
}

.nosotros-texto h2 { 
  text-align: left; 
}

/* ============================================================
    5. SECCIÓN SERVICIOS
   ============================================================ */
.container { 
  padding: 40px 20px; 
  max-width: 1200px; 
  margin: 0 auto; 
  position: relative;
  z-index: 1; /* Agregado para detección de clic */
}

.container p {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px auto;
  display: block;
}

.servicios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.producto-card {
    background: var(--blanco);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #ddd;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); 
}

.producto-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 50, 133, 0.15);
    border-color: var(--azul-principal);
}

.producto-card img {
    max-width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.producto-card:hover img {
    transform: scale(1.05);
}

/* ============================================================
    6. FORMULARIOS
   ============================================================ */
.cotizador, .contacto-form {
  max-width: 600px; 
  margin: 60px auto; 
  padding: 35px; 
  background: var(--blanco); 
  border-radius: 10px; 
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
}

.cotizador label, .contacto-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
  font-size: 15px;
  text-align: left;
}

input, select, textarea { 
  width: 100%; 
  padding: 12px; 
  margin-bottom: 15px; 
  border: 1px solid #ccc; 
  border-radius: 6px; 
}

button[type="submit"] {
    background-color: var(--azul-principal);
    color: #ffffff !important;
    border: none;
    padding: 14px 30px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    background-color: var(--azul-oscuro);
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 50, 133, 0.3);
}

.contacto-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  align-items: flex-start;
  margin-top: 40px;
}

.contacto-imagen { 
  flex: 1; 
  max-width: 550px; 
}

.contacto-imagen img { 
  width: 100%; 
  border-radius: 10px; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.contacto-form { 
  flex: 1; 
  max-width: 450px; 
  margin: 0; 
}

/* ============================================================
    7. FOOTER
   ============================================================ */
footer {
  background-color: var(--negro-footer);
  color: var(--blanco);
  padding: 25px 20px 15px 20px; 
  margin-top: 40px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 10px;
}

.footer-column {
  flex: 1 1 200px;
}

.footer-column h3 {
  color: var(--amarillo-hg) !important;
  text-align: left;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.footer-column h4 {
  color: var(--blanco) !important;
  border-bottom: 2px solid var(--amarillo-hg);
  display: inline-block;
  margin-bottom: 10px;
  font-size: 16px;
  text-align: left;
}

.footer-column p, .footer-column li a {
  font-size: 13px;
  color: #cccccc;
  text-decoration: none;
  line-height: 1.5;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li a:hover {
  color: var(--amarillo-hg);
  padding-left: 5px;
  transition: 0.3s;
}

.footer-column a[href^="mailto:"] {
    color: var(--amarillo-hg) !important;
    font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid #333;
  margin-top: 15px;
  padding-top: 15px;
  text-align: center;
}

.footer-bottom p {
  font-size: 12px;
  color: #666 !important;
}

/* ============================================================
    8. RESPONSIVE
   ============================================================ */
@media screen and (max-width: 768px) {
  .menu-toggle { 
    display: flex; 
  }

  /* ============================================================
    8. RESPONSIVE
   ============================================================ */
@media screen and (max-width: 768px) {
  .menu-toggle { 
    display: flex; 
  }

  .nav-container {
    position: fixed; 
    top: 10px; 
    right: -100%; 
    width: 260px; 
    background-color: var(--azul-principal); 
    transition: 0.4s; 
    z-index: 99999 !important; 
    pointer-events: all !important;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    border-radius: 15px 0 15px 15px;
    padding-bottom: 8px;
  }

  /* ... el resto del código sigue igual ... */
}

  .nav-container.active { 
    right: 0; 
  }

  .nav-container::before {
    content: "¡Hola!";
    display: block;
    color: #FAE251;
    font-size: 20px;
    font-weight: bold;
    padding: 15px 25px 8px 25px; 
    text-align: left;
    line-height: 1.2;
  }

  nav ul { 
    flex-direction: column; 
    padding: 0; 
  }

  nav a { 
    width: 100%; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    padding: 12px 25px; 
  }

  .nosotros-contenido, .contacto-grid, .servicios-grid {
    flex-direction: column !important;
    grid-template-columns: 1fr;
  }

  .nosotros-texto, .nosotros-texto h2, .footer-column h3, .footer-column h4, .container p { 
    text-align: center; 
  }

  .hero {
    height: 70vh;
  }

  .hero-content h1 span {
    font-size: 2.2rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
}

/* ============================================================
    9. ANIMACIONES Y SOLUCIÓN DE SCROLL
   ============================================================ */
.animado { opacity: 0; transition: 0.8s ease-out; }
.animado.visible { opacity: 1; transform: none; }
.slide-left { transform: translateX(-50px); }
.slide-right { transform: translateX(50px); }
.zoom { transform: scale(0.8); }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

@media screen and (max-width: 768px) {
    .nosotros-contenido, .servicios-grid, .contacto-grid {
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }
}