/* ==========================================
   0.B PREVENCIÓN RESPONSIVE Y RESET
   ========================================== */
/* Previene scroll horizontal indeseado en móviles */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Fuerza a los elementos multimedia a no desbordar sus contenedores */
img, iframe, video {
  max-width: 100%;
  height: auto;
}

/* En el caso de los iframes (como el mapa de Google), permitimos que hereden su altura del wrapper */
iframe {
  height: 100%;
}

/* ==========================================
   1. CABECERA
   ========================================== */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 26, 51, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea-oscura);
}

.cabecera-fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.3rem 6%;
}

.marca {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.marca b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--blanco);
  letter-spacing: 0.02em;
  line-height: 1;
}

.marca i {
  font-style: normal;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--oro);
  text-transform: uppercase;
}

.menu {
  display: flex;
  gap: 2.4rem;
}

.menu a {
  font-size: 1.2rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
}

.menu a:hover {
  color: var(--oro);
  border-bottom-color: var(--oro);
}

.menu a[aria-current="page"] {
  color: var(--blanco);
  border-bottom-color: var(--oro);
}

.cabecera .boton {
  padding: 0.75rem 1.5rem;
}

.hamburguesa {
  display: none;
  background: none;
  border: 1px solid var(--linea-oscura);
  color: var(--oro);
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ==========================================
   2. FOOTER (PANEL BENTO)
   ========================================== */
.pie-industrial {
  background-color: #0b0d0f;
  border-top: 1px solid rgba(200, 162, 74, 0.25);
  padding: 1rem 0 2rem;
  color: var(--texto-claro, #e2e8f0);
}

.pie-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bento-card {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-label {
  font-family: monospace;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: #8892b0;
  margin-bottom: 1rem;
}

.bento-val {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.35rem;
}

.bento-sub {
  font-size: 0.88rem;
  color: #8892b0;
  line-height: 1.5;
  margin: 0;
}

.enlace-directo {
  text-decoration: none;
  transition: color 0.2s;
}

.enlace-directo:hover {
  color: var(--oro, #c8a24a);
}

.coordenadas {
  font-family: monospace;
  font-size: 1rem;
  color: var(--oro, #c8a24a);
  opacity: 0.85;
  margin-top: 1.2rem;
  display: block;
}

.guardia-tag {
  font-size: 0.9rem;
  color: #4ade80;
  font-family: monospace;
  margin-top: 1.2rem;
}

.nav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.nav-chips a {
  font-size: 0.84rem;
  color: #ccd6f6;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 0.85rem;
  transition: all 0.2s;
}

.nav-chips a:hover {
  border-color: var(--oro, #c8a24a);
  color: var(--oro, #c8a24a);
}

.pie-cierre {
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #8892b0;
}

.pie-fiscal {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.pie-logo-mini {
  height: 22px;
  width: auto;
  filter: grayscale(100%);
}

.copy {
  margin: 0;
}

/* ==========================================
   3. BOTÓN FLOTANTE WHATSAPP
   ========================================== */
.btn-wsp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #25d366;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  font-weight: 600;
  z-index: 9999;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-wsp .wsp-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.btn-wsp:hover {
  background-color: #20ba5a;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  color: #ffffff;
}

@media (max-width: 576px) {
  .btn-wsp {
    bottom: 16px;
    right: 16px;
    padding: 12px;
    border-radius: 50%;
  }

  .btn-wsp .wsp-text {
    display: none;
  }

  .btn-wsp .wsp-icon {
    width: 26px;
    height: 26px;
  }
}

/* ==========================================
   4. MEDIA QUERIES GLOBALES (Cabecera y Footer)
   ========================================== */

/* --- TABLETS (Pantallas medianas) --- */
@media (max-width: 1000px) {
  /* Footer: Pasa de 3 a 2 columnas */
  .pie-bento {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  /* La lista de "Servicios" ocupa todo el ancho abajo */
  .bento-nav {
    grid-column: 1 / -1; 
  }
}

/* --- MENÚ MÓVIL (Se activa en 860px) --- */
@media (max-width: 860px) {
  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--noche);
    border-bottom: 1px solid var(--linea-oscura);
    padding: 0.5rem 6% 1.2rem;
    z-index: 1000;
  }
  
  .menu.abierto {
    display: flex;
  }
  
  .menu a {
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }
  
  .cabecera .boton {
    display: none;
  }
  
  .hamburguesa {
    display: flex;
  }
}

/* --- MÓVILES (Pantallas pequeñas) --- */
@media (max-width: 680px) {
  /* Footer: Pasa a 1 sola columna vertical */
  .pie-bento {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  
  /* Franja legal del footer apilada */
  .pie-cierre {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
}