
/* =========================
 Layout global: header, menú, footer
========================= */

/* Header base */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Estado transparente (home antes del scroll) */
.header-transparent { background: transparent; }

/* Estado con scroll (home tras el scroll) */
.header.scrolled {
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* === NUEVO: estado estático para páginas secundarias (Servicio/Contacto) === */
.header--static {
  background: #fff !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Contenedor interno del header */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

/* Logo (solo imagen) */
.logo { display: flex; align-items: center; }
.logo-img { width: 180px; height: auto; transition: filter 0.3s; }

/* Navegación desktop */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-desktop a {
  font-weight: 500;
  position: relative;
  transition: color 0.3s;
}

/* Home antes del scroll → enlaces blancos */
.header:not(.scrolled):not(.header--static) .nav-desktop a { color: #fff; }

/* Con scroll o estático → enlaces corporativos */
.header.scrolled .nav-desktop a,
.header.header--static .nav-desktop a {
  color: var(--color-primary);
}

/* Subrayado animado en hover (desktop y móvil) */
.nav-desktop a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width 0.3s;
  position: absolute;
  left: 0;
  bottom: -4px;
}
.nav-desktop a:hover::after { width: 100%; }
.nav-desktop a:hover { color: var(--color-secondary); }

/* Botón hamburguesa */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-btn span {
  width: 24px;
  height: 2px;
  transition: background 0.3s;
  /* En home transparente → blanco, en scroll/estático → corporativo */
  background: #fff;
}
.header.scrolled .menu-btn span,
.header.header--static .menu-btn span {
  background: var(--color-primary);
}

/* Menú móvil (off-canvas) */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  padding: 5rem 2rem;
  transition: right 0.3s ease;
  z-index: 1001;
}
.mobile-menu.open { right: 0; }
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
/* Enlaces del móvil: corporativos */
.mobile-menu a {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-primary);
  position: relative;
  transition: color 0.3s;
}
.mobile-menu a::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width 0.3s;
  position: absolute;
  left: 0;
  bottom: -4px;
}
.mobile-menu a:hover::after { width: 100%; }
.mobile-menu a:hover { color: var(--color-secondary); }

/* Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
.menu-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Footer */


/* Footer base que ya tienes */
.footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--color-muted);
  background: #fff;
  font-size: 0.95rem;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

/* Enlaces legales del footer */
.footer a {
  color: var(--color-primary);
  text-decoration: underline;
  margin: 0 0.25em;
  transition: color 0.2s ease;
}
.footer a:hover,
.footer a:focus-visible {
  color: var(--color-secondary);
}

/* Bloque redes sociales */
.footer-social {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Botones/iconos de redes */
.footer-social .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;   /* tamaño del botón */
  height: 40px;
  border-radius: 50%;
  color: var(--color-primary);      /* controla el color del icono via currentColor */
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.footer-social .social-link:hover,
.footer-social .social-link:focus-visible {
  color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(31,58,77,0.12);
}

/* SVG iconos */
.footer-social .icon {
  width: 22px;
  height: 22px;
  fill: currentColor; /* usa el color del enlace (primary/secondary) */
}

/* Accesibilidad (si quieres resaltar el foco teclado) */
.footer-social .social-link:focus-visible {
  outline: 3px solid #7aa0b9;
  outline-offset: 2px;
}

/* Responsive */
@media (max-width: 480px) {
  .footer-social .social-link {
    width: 36px;
    height: 36px;
  }
  .footer-social .icon {
    width: 20px;
    height: 20px;
  }
}



/* ===== Hero simple (sin imagen) para páginas estáticas ===== */
.hero.hero-simple {
  background: #fff;
  /* Evita solape con header fijo (≈ 80px). Pon 100px para respirar. */
  padding-top: 100px;
  padding-bottom: 3rem;
  text-align: center;
}
.hero.hero-simple .hero-grid {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}
.hero.hero-simple .hero-text h1 {
  color: var(--color-primary);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero.hero-simple .hero-text p {
  color: var(--color-text);
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .menu-btn { display: flex; }
  .logo-img { width: 150px; }
}
