/* CSS compartido para header y footer */

/* ── Topbar ── */
.topbar{
  background: var(--g);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.topbar__row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar__left{ display: flex; gap: 14px; flex-wrap: wrap }
.topbar__item{
  display: inline-flex; gap: 6px;
  align-items: center;
  text-decoration: none;
  color: rgba(255,255,255,.85);
  font-size: 12px;
  min-height: 44px;
}
.topbar__item .ico{ opacity: .9 }
.topbar__item:hover{ color: #fff }

/* Social icons */
.sico{
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 999px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  background: rgba(255,255,255,.08);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.sico:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.50);
  background: rgba(255,255,255,.18);
}
.sico svg{ width: 16px; height: 16px; fill: rgba(255,255,255,.90) }

/* Topbar social en footer (fondo claro) */
.fsocial .sico{
  border-color: var(--line);
  background: var(--g-light);
}
.fsocial .sico svg{ fill: var(--g) }
.fsocial .sico:hover{
  background: var(--g);
  border-color: var(--g);
}
.fsocial .sico:hover svg{ fill: #fff }

/* ── Header sticky ── */
.header{
  position: sticky;
  top: 0;
  z-index: 60;
  transition: all .22s ease;
}
.header__row{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: padding .22s ease;
}
.header.is-compact .header__row{
  padding: 8px 0;
}

/* Logo — tamaño correcto */
.brand{ display: flex; align-items: center; gap: 10px; text-decoration: none }
.brand__logo{
  height: 48px;   /* móvil */
  width: auto;
  display: block;
  object-fit: contain;
}

/* Nav desktop — oculto en móvil por defecto */
.nav--desktop{ display: none; align-items: center; gap: 6px }
.nav__link{
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 10px;
  border-radius: 10px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  transition: background .12s;
}
.nav__link:hover{ background: var(--g-light) }
.nav__link.is-active{ color: var(--g) }

/* Dropdown desktop */
.nav__dd{ position: relative }
.nav__menu{
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 200;   /* por encima de todo */
}
.nav__dd.is-open .nav__menu{ display: block }
.nav__menu a{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav__menu a:hover{ background: var(--g-light); color: var(--g) }
.caret{ opacity: .55; font-size: 11px; margin-left: 2px }

/* Burger */
.burger{
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--g-light);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.burger span{
  width: 20px; height: 2px;
  background: var(--g);
  border-radius: 99px;
  transition: transform .18s, opacity .18s;
}

/* ── Menú móvil ── */
.mnav{
  position: fixed; inset: 0;
  z-index: 90;
  pointer-events: none;
}
.mnav.is-open{ pointer-events: auto }
.mnav__backdrop{
  position: absolute; inset: 0;
  background: rgba(0,0,0,.40);
  opacity: 0;
  transition: opacity .18s ease;
}
.mnav.is-open .mnav__backdrop{ opacity: 1 }
.mnav__panel{
  position: absolute; top: 0; right: 0;
  height: 100%;
  width: min(360px, 92vw);
  background: var(--card);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .22s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mnav.is-open .mnav__panel{ transform: translateX(0) }
.mnav__top{
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--g);
}
.mnav__title{ font-weight: 900; letter-spacing: .02em; color: #fff }
.mnav__close{
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.12);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
}
.mnav__list{ padding: 10px 14px 24px; overflow: auto; flex: 1 }
.mnav__link{
  display: flex;
  align-items: center;
  padding: 12px 12px;
  margin: 4px 0;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  font-size: 15px;
  min-height: 44px;
}
.mnav__link:hover{ background: var(--g-light); color: var(--g) }
.mnav__sublink{
  display: flex;
  align-items: center;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
  min-height: 44px;
}
.mnav__sublink:hover{ background: var(--g-light); color: var(--g) }
.mnav__acc{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  margin: 4px 0;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: var(--g-light);
  color: var(--g);
  font-weight: 900;
  font-size: 15px;
  min-height: 44px;
}
.mnav__acc:hover{ background: var(--g-mid) }
.mnav__panel2{ margin: 0 0 8px 0; padding-left: 10px }
.mnav__cta{ width: 100%; margin-top: 14px; justify-content: center }


/* ── Footer ── */
.footer{
  padding: 32px 0 28px;
  border-top: 2px solid var(--line);
  background: var(--g);
  color: rgba(255,255,255,.90);
  margin-top: 10px;
}
.footer__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.fhead{
  font-weight: 900;
  margin-bottom: 10px;
  color: rgba(255,255,255,.60);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.flink{
  display: block;
  padding: 6px 0;
  text-decoration: none;
  color: rgba(255,255,255,.80);
  font-weight: 700;
  font-size: 14px;
  min-height: 36px;
  display: flex;
  align-items: center;
}
.flink:hover{ color: #fff }
.fmicro{ color: rgba(255,255,255,.65); margin-top: 8px; font-size: 13px; line-height: 1.5 }
.flogoRow{ display: flex; align-items: center; gap: 10px }
.flogo{
  height: 52px;
  width: auto;
  /* logo sobre fondo verde: si es oscuro, invertir */
  filter: brightness(0) invert(1);
}
.fsocial{ display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap }
.fcontact{ display: flex; flex-direction: column; gap: 8px; margin-top: 12px }
.fcontact a{
  color: rgba(255,255,255,.80);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fcontact a:hover{ color: #fff }
.fcopy{ margin-top: 14px; color: rgba(255,255,255,.50); font-size: 13px; font-weight: 700 }

/* Footer social override (fondo verde) */
.footer .sico{
  border-color: rgba(255,255,255,.20);
  background: rgba(255,255,255,.10);
}
.footer .sico svg{ fill: rgba(255,255,255,.85) }
.footer .sico:hover{
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.50);
}
.footer .sico:hover svg{ fill: #fff }


@media (min-width: 860px){
  .topbar__item{ font-size: 13px }

  /* Mostrar nav desktop, ocultar burger */
  .nav--desktop{ display: flex }
  .burger{ display: none }

  /* Logo más grande en desktop */
  .brand__logo{ height: 60px }

  /* Header sticky: top:0 (topbar no es sticky en desktop) */
  .header{ top: 0 }

  /* Footer: 4 columnas */
  .footer__grid{
    grid-template-columns: 1.3fr 1fr 1fr .9fr;
    align-items: start;
  }
}