/* ==========================================================================
   COMPONENTES COMPARTIDOS: HEADER Y FOOTER
   ========================================================================== */

/* ══════════════════════════════
   NAVBAR (Glassmorphism Pill)
══════════════════════════════ */
.nav-wrapper {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  justify-content: center;
  padding: 0 20px;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

.nav-wrapper.nav-hidden {
  transform: translateY(calc(-100% - 20px));
}

#navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  height: 64px;
  padding: 0 1rem 0 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  box-shadow: 0 4px 24px -6px rgba(0, 11, 51, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all .3s ease;
}

#navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
}

.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-img { height: 50px; width: auto; object-fit: contain; }

.nav-links { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { font-size: 0.875rem; color: var(--muted); font-weight: 500; transition: color .2s; text-decoration: none;}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }

.nav-right { display: flex; gap: 0.5rem; align-items: center; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none;
  background: none;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all .25s;
}

/* ══════════════════════════════════════════════
   FOOTER (GIANT CARD STYLE)
══════════════════════════════════════════════ */
.footer-wrapper { padding: 2rem; background: var(--white); }
.footer-card { background: radial-gradient(circle at bottom left, #004d5d 0%, transparent 55%), linear-gradient(135deg, #00B3BD 0%, #007E9A 100%); border-radius: 2.5rem; padding: 5rem 4rem; color: var(--white); display: flex; flex-direction: column; /* Importante */ height: auto; min-height: 0; max-height: none; overflow: visible; box-shadow: 0 25px 50px -12px rgba(0, 126, 154, 0.25); position: relative; }

.footer-copyright {
  display: flex; justify-content: space-between; width: 100%; padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.9rem; color: rgba(255, 255, 255, 0.7);
  margin-top: auto; /* Esto empuja ÚNICAMENTE el copyright al fondo de los 800px */
}

.footer-top { display: flex; justify-content: space-between; gap: 4rem; }
.footer-links-container { display: flex; gap: 6rem; }
.footer-links-col { display: flex; flex-direction: column; gap: 1rem; }
.footer-links-col h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--white); opacity: 0.6; }
.footer-links-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; padding: 0; margin: 0; }
.footer-links-col a { font-size: 1rem; font-weight: 500; color: var(--white); opacity: 0.9; transition: opacity 0.2s; text-decoration: none;}
.footer-links-col a:hover { opacity: 1; text-decoration: underline; }

.footer-promo { max-width: 450px; }
.footer-promo h3 { font-size: clamp(2rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.2; margin-bottom: 1.5rem; letter-spacing: -0.02em; }

.footer-avatars { 
  display: flex; 
  flex-wrap: wrap; /* Permite que los avatares pasen a la siguiente línea si no entran */
  gap: 0; /* Eliminamos el gap base para manejar el solapamiento con márgenes negativos */
}

.f-avatar {
  width: 90px; 
  height: 90px; 
  border-radius: 50%; 
  border: 3px solid #00B3BD; 
  background: var(--sky);
  display: flex; 
  align-items: center; 
  justify-content: center; 
  font-size: 0.9rem; 
  font-weight: 700;
  color: var(--white); 
  margin-left: -15px; /* Aumentamos el solapamiento para que entren más fácil */
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
  object-fit: cover;
  position: relative; /* Asegura el orden de apilamiento con el margen negativo */
}

.f-avatar:first-child { 
  margin-left: 0; 
}

.footer-bottom { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 6rem; /* Evita que otro estilo lo oculte */ height: auto; min-height: 0; max-height: none; overflow: visible; position: relative; z-index: 1; }
.footer-brand { 
  display: flex; align-items: center; gap: 1rem; 
}
.footer-brand-img { height: 48px; filter: brightness(0) invert(1); }
.footer-brand-name { font-size: 1.8rem; font-weight: 200; letter-spacing: -0.03em; }

.footer-contact { display: flex; flex-direction: column; justify-content: flex-start; gap: 1.2rem; font-size: 1.05rem; opacity: 0.9; height: auto; min-height: 0; max-height: none; overflow: visible; position: relative; z-index: 2; } .footer-contact a, .footer-contact span { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: inherit; position: relative; z-index: 3; visibility: visible; }
.footer-contact svg, .footer-icon { width: 20px; height: 20px; object-fit: contain; }
.footer-icon { filter: brightness(0) invert(1); }
.footer-contact a:hover { opacity: 1; text-decoration: underline; }

.footer-copyright { display: flex; justify-content: space-between; width: 100%; padding-top: 2rem; margin-top: 4rem; border-top: 1px solid rgba(255, 255, 255, 0.15); font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); height: auto; min-height: 0; max-height: none; overflow: visible; visibility: visible; position: relative; z-index: 2; }
.footer-legal { display: flex; gap: 1.5rem; }
.footer-legal a { color: rgba(255, 255, 255, 0.7); transition: color 0.2s; text-decoration: none;}
.footer-legal a:hover { color: var(--white); text-decoration: underline; }

/* ══════════════════════════════
   RESPONSIVE HEADER & FOOTER
══════════════════════════════ */
@media (max-width: 1024px) {
  .footer-card { padding: 3.5rem 3rem 2.5rem 3rem; }
  .footer-top { flex-direction: column; gap: 3rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 2rem; margin-top: 3rem; margin-bottom: 2rem; }
}

@media (max-width: 768px) {
  /* NAVBAR RESPONSIVE */
  .nav-wrapper { top: 0; padding: 0; }
  #navbar { border-radius: 0; border: none; border-bottom: 1px solid var(--border); padding: 0 1rem; }
  .nav-right .btn-nav-ghost { display: none; }
  .nav-right { display: flex; align-items: center; gap: 0; }
  .nav-right .btn-primary { padding: 0 1rem; font-size: 0.825rem; height: 38px; line-height: 1; margin-right: 10px; }
  
  /* AQUÍ ESTABA EL ERROR: Faltaba la llave de cierre para .footer-legal */
  .footer-legal { 
    padding-top: 0.8rem; 
    border-top: 1px solid rgba(255, 255, 255, 0.15); 
    font-size: 0.9rem; 
    color: rgba(255, 255, 255, 0.7);
  } /* <-- Esta es la llave que faltaba */

  .hamburger {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer; border: none;
    background: rgba(0, 126, 154, 0.05); width: 40px; height: 40px; border-radius: 50%;
    align-items: center; justify-content: center; transition: all 0.3s; padding: 0;
  }
  .hamburger:hover, .hamburger.active { background: rgba(0, 126, 154, 0.12); transform: scale(1.05); }
  .hamburger span { display: block; width: 18px; height: 2px; background: var(--navy); border-radius: 2px; transition: transform 0.4s, opacity 0.3s, width 0.4s; transform-origin: center; }
  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; width: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links, .nav-right .btn-white { display: none; }

  /* FOOTER RESPONSIVE */
  .footer-wrapper { padding: 1rem; }
  .footer-card { padding: 2.5rem 1.5rem 2rem 1.5rem; border-radius: 1.5rem; }
  .footer-links-container { flex-direction: column; gap: 2rem; }
  .footer-brand { flex-direction: column; align-items: flex-start; }
  .footer-copyright { flex-direction: column; gap: 1rem; text-align: center; padding-top: 1.5rem; }
  .footer-legal { justify-content: center; border-top: none; padding-top: 0; }
  
  /* Ajustes para los avatares en móvil */
  .footer-avatars {
    margin-top: 1rem;
    justify-content: flex-start;
  }
  .f-avatar {
    width: 65px; 
    height: 65px;
    margin-left: -10px; 
    margin-bottom: 10px; 
  }
}

@media (max-width: 728px) {
  .footer-brand-name { display: none; }
}
/* =====================================================
   DEBUG FOOTER - FORZAR VISIBILIDAD
   ===================================================== */

.footer-contact {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    visibility: visible !important;
}

.footer-contact a {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
}

.footer-contact a:nth-child(3),
.footer-contact a:nth-child(4),
.footer-contact a:nth-child(5) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}