/*
 * STYLE.CSS — Sistema compartido H&FV Web Design
 * Header · Footer · Variables · Reset · Utilidades
 * Última actualización: 2026-03-21
 *
 * USO: incluir en cada página ANTES del <style> propio de la página
 * <link rel="stylesheet" href="/assets/css/style.css">
 */

/* ── VARIABLES ─────────────────────────────────── */
:root {
  --bg: #f0f5ff;
  --primary: #0066ff;
  --secondary: #ff3366;
  --text: #001240;
  --accent: #4d94ff;
  --white: #ffffff;
  --dark: #001240;
  --neutral: #e8eeff;
  --neutral2: #d8e4ff;
  --font-display: 'Unbounded', sans-serif;
  --font-body: 'Manrope', sans-serif;
}

/* ── RESET ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0;}
html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); }
a { text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── CONTAINER ──────────────────────────────────── */
.container {
  max-width: 1350px;
  margin: 0 auto;
  padding-left: 5%;
  padding-right: 5%;
}

/* ── SECTION LABEL ──────────────────────────────── */
.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  display: block;
}

/* ── REVEAL ANIMATIONS ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── BOTONES COMPARTIDOS ────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: #0055d4; transform: translateY(-2px); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  padding: 15px 32px;
  border-radius: 4px;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.05); }

/* ── HEADER ─────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
.header.scrolled {
  background: rgba(0,18,64,0.97);
  box-shadow: 0 2px 24px rgba(0,0,0,0.18);
  padding: 14px 5%;
}
.logo img {
  height: 40px;
  width: auto;
  display: block;
  transition: height 0.3s;
}
.header.scrolled .logo img { height: 32px; }

nav { display: flex; align-items: center; gap: 36px; }
nav a {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.2s;
}
nav a:hover, nav a.active { color: var(--primary); }
.header:not(.scrolled) nav a { color: rgba(255,255,255,0.85); }
.header:not(.scrolled) nav a:hover,
.header:not(.scrolled) nav a.active { color: #fff; }

.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 10px 22px;
  border-radius: 4px;
  font-weight: 700;
  transition: background 0.2s, transform 0.2s;
}
.nav-cta:hover { background: #0055d4 !important; transform: translateY(-1px); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--dark);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--primary); }

/* ── FOOTER ─────────────────────────────────────── */
footer {
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 60px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 40px;
}
.footer-brand .logo { font-size: 20px; display: inline-block; margin-bottom: 8px; }
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.45); }
.footer-nav { display: flex; gap: 28px; justify-content: flex-end; flex-wrap: wrap; }
.footer-nav a { font-family: var(--font-body); font-size: 14px; color: rgba(255,255,255,0.55); transition: color 200ms ease; }
.footer-nav a:hover { color: #ffffff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-copy { font-size: 13px; color: rgba(255,255,255,0.35); }
.footer-social { display: flex; gap: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms ease, transform 200ms ease;
}
.footer-social a:hover { background: var(--primary); transform: translateY(-2px); }
.footer-social svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.7); }
.footer-social a:hover svg { fill: #ffffff; }

/* ── WHATSAPP ────────────────────────────────────── */
.wa-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  text-decoration: none;
  animation: wa-pulse 2.5s ease-in-out infinite;
}
.wa-btn:hover { background: #1da851; animation: none; transform: scale(1.08); }
.wa-btn svg { width: 30px; height: 30px; }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4); }
  50% { box-shadow: 0 4px 32px rgba(37,211,102,0.7), 0 0 0 10px rgba(37,211,102,0.08); }
}

/* ── RESPONSIVE COMPARTIDO ──────────────────────── */
@media (max-width: 768px) {
  nav { display: none; }
  .hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-nav { justify-content: flex-start; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── LIGHTBOX (compartido — casos de estudio y landings) ─── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}
.lightbox-figure {
  max-width: 90vw;
  max-height: 90vh;
  text-align: center;
  margin: 0;
}
.lightbox-img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}
.lightbox-caption {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  margin-top: 12px;
  padding: 0 12px;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  padding: 0;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev  { left: 20px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-img  { max-width: 95vw; max-height: 70vh; }
}