/* ============================================================
   shared.css — navbar canónico (Solutions) + footer canónico (Impact)
   Cargado en CADA página DESPUÉS de su <style> interno → sobrescribe
   limpio cualquier diferencia de diseño entre páginas.
   ============================================================ */

/* Sobrescribimos el alto global del navbar (era 72px en cada página) para
   que el recuadro blanco quede ligeramente más grande en todas. */
:root {
  --nav-height: 80px;
  /* Tipografía unificada de soporte (la misma que usan los párrafos del
     Impact case detail). Los títulos (h1, h2 en .hero__title, .impact-index__title,
     .ev-hero__title, etc.) MANTIENEN Helvetica Neue Bold por su rule-set propio. */
  --font-body: -apple-system, BlinkMacSystemFont, system-ui, "SF Pro Text",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Aplicar tipografía system a TODO body + navbar + footer (no a los
   elementos con su propia regla de font-family). */
body, .navbar, .footer {
  font-family: var(--font-body);
}

/* Navbar links y CTA: misma tipografía, peso medio */
.navbar__links a,
.navbar__cta,
.navbar__lang-current,
.navbar__lang-option,
.mobile-dropdown a {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: -0.005em;
}
.navbar__logo { font-family: var(--font-body); }

/* Footer: títulos columnas en peso semibold, links en regular */
.footer__brand-desc,
.footer__email,
.footer__col a,
.footer__bottom {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: -0.003em;
}
.footer__col h4 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.005em;
}

/* ===== NAVBAR (estilo Solutions) ===== */
.navbar {
  position: fixed;
  top: 15px;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: none;
  box-shadow: none;
  transition:
    box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
    background  0.2s cubic-bezier(0.4, 0, 0.2, 1),
    top         0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform   0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar.nav-hidden { transform: translateY(calc(-100% - 20px)); }
.navbar::before {
  content: '';
  position: absolute;
  top: -15px; left: 0; right: 0;
  height: 15px;
  background: white;
}
.navbar.scrolled {
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
}
.navbar .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.navbar__logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 22px; font-weight: 700;
  text-decoration: none; height: 100%;
}
.navbar__logo img { height: 32px; width: auto; }
.navbar__right {
  display: flex; align-items: center; gap: 32px;
  position: relative;          /* ancla el .mobile-dropdown a la derecha de aquí */
}
.navbar__links {
  display: flex; align-items: center; gap: 32px; list-style: none;
}
.navbar__links a {
  font-size: 15px; font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s;
  position: relative;
}
.navbar__links a::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--color-primary);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 1px;
}
.navbar__links a:hover { color: var(--color-primary); }
.navbar__links a:hover::after { width: 100%; }
.navbar__lang {
  position: relative; display: flex; align-items: center; cursor: pointer;
}
.navbar__lang-current {
  display: flex; align-items: center; gap: 6px;
  transition: transform 0.2s;
}
.navbar__lang-current:hover { transform: scale(1.05); }
.navbar__lang-current img { width: 24px; height: auto; object-fit: contain; }
.navbar__lang-name { font-size: 15px; font-weight: 500; color: var(--color-text); }
.navbar__lang-arrow {
  width: 10px; height: 10px;
  fill: none; stroke: #555; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.2s;
}
.navbar__lang.open .navbar__lang-arrow { transform: rotate(180deg); }
.navbar__lang-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: white; border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 8px 0; min-width: 160px;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
.navbar__lang.open .navbar__lang-dropdown {
  opacity: 1; pointer-events: all; transform: translateY(0);
}
.navbar__lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 15px; font-weight: 400; color: #333;
  cursor: pointer; transition: background 0.15s;
}
.navbar__lang-option:hover { background: #f5f5f5; }
.navbar__lang-option.active { font-weight: 600; color: #000; }
.navbar__lang-option img { width: 22px; height: auto; object-fit: contain; }
.navbar__cta {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 22px;
  background: var(--color-primary);
  color: white;
  font-size: 15px; font-weight: 500;
  line-height: 1.4;
  border-radius: 100px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.navbar__cta:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 150, 255, 0.3);
}
.navbar__menu-toggle {
  display: none; flex-direction: column;
  gap: 5px; padding: 4px; cursor: pointer;
  border: none; background: none;
}
.navbar__menu-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--color-text); border-radius: 2px;
}

/* Mobile dropdown */
.mobile-dropdown {
  position: absolute; top: calc(100% + 4px); right: 0;
  background: #fff; border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  padding: 4px 0; min-width: 180px;
  opacity: 0; transform: translateY(-6px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 999;
}
.mobile-dropdown.open {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: all;
}
.mobile-dropdown a {
  display: block; padding: 10px 18px;
  font-size: 15px; font-weight: 500;
  color: #1d1d1f; text-decoration: none;
  transition: background 0.12s ease;
}
.mobile-dropdown a:active { background: #f5f5f7; }
.mobile-dropdown__divider {
  height: 1px; background: #e8e8e8; margin: 2px 0;
}
.mobile-dropdown .navbar__cta {
  display: block; margin: 2px 10px 4px;
  text-align: center; border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px; font-weight: 600;
  color: #fff; background: var(--color-primary);
}
/* Banderas dentro del menú móvil — fila compacta de 3 banderas pequeñas */
.mobile-dropdown__lang {
  display: flex;
  gap: 2px;
  padding: 2px 14px;
  justify-content: center;
}
.mobile-dropdown__lang-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
  font-size: 0;
}
.mobile-dropdown__lang-option:active { background: #f0f0f0; }
.mobile-dropdown__lang-option.active { background: #f0f0f5; }
.mobile-dropdown__lang-option img {
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
}

/* Mobile breakpoint para navbar */
@media (max-width: 768px) {
  .navbar__links,
  .navbar__cta,
  .navbar__lang { display: none; }
  .navbar__menu-toggle { display: flex; }
}

/* ============================================================
   FOOTER (estilo Impact, con tipografía más pequeña según pidió Judith)
   ============================================================ */
.footer {
  padding: 80px 0 0;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 60px;
}
.footer__brand {
  display: flex; flex-direction: column; gap: 16px;
}
.footer__brand-logo {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.footer__brand-logo img { height: 32px; }
.footer__brand-desc {
  font-size: 15px; font-weight: 400; color: #1a1a1a;
  line-height: 1.55; max-width: 300px;
}
.footer__email {
  font-size: 15px; font-weight: 500; color: #000;
  text-decoration: none; transition: color 0.2s;
}
.footer__email:hover { color: var(--color-primary); }
.footer__socials {
  display: flex; gap: 10px; margin-top: 4px;
}
.footer__socials a {
  width: 36px; height: 36px; border-radius: 50%;
  background: #f0f0f0;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
.footer__socials a:hover {
  background: #e0e0e0; transform: translateY(-2px);
}
.footer__socials svg { width: 16px; height: 16px; fill: #1a1a1a; }
.footer__col h4 {
  font-size: 14px; font-weight: 700;
  color: #1a1a1a; margin-bottom: 14px;
  letter-spacing: 0.01em;
}
.footer__col ul {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.footer__col a {
  font-size: 15px; font-weight: 400; color: #1a1a1a;
  text-decoration: none; transition: color 0.2s;
}
.footer__col a:hover { color: var(--color-primary); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 24px; padding: 14px 30px;
  background: #f0f0f0; border-radius: 100px;
  font-size: 14px; font-weight: 400; color: #525252;
}

@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .footer { padding: 48px 0 0; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__brand-desc { font-size: 14px; }
  .footer__col h4 { font-size: 13px; margin-bottom: 10px; }
  .footer__col a { font-size: 14px; }
  .footer__bottom {
    flex-direction: column; gap: 4px; text-align: center;
    padding: 12px 20px; font-size: 13px;
    border-radius: 16px; margin: 0 0 16px;
  }
}

/* ============================================================
   Utilidades responsive globales
   .desktop-only → visible solo en escritorio (≥769px)
   .mobile-only  → visible solo en móvil (≤768px)

   Aplicamos `display: none` SOLO dentro del media query opuesto, así
   en la otra resolución el elemento conserva su layout original (block,
   flex, grid…) sin necesidad de "reactivar" nada.
   ============================================================ */
@media (min-width: 769px) {
  .mobile-only { display: none !important; }
}

@media (max-width: 768px) {
  .desktop-only { display: none !important; }
}
