/* ==========================================================================
   J&J — estructura compartida
   Header, navegación principal, estructura de página y footer.
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--navy-900);
  border-bottom: 1px solid var(--border-dark);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-block: clamp(0.6rem, 1.4vw, 0.9rem);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  min-width: 0;
}

.brand__logo {
  width: clamp(38px, 4vw, 50px);
  height: clamp(38px, 4vw, 50px);
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 0.2rem;
  background: #020509;
}

.brand__logo-frame {
  width: clamp(54px, 5.2vw, 72px);
  height: clamp(54px, 5.2vw, 72px);
  flex: 0 0 auto;
  border: 1px solid rgba(114, 175, 208, 0.65);
  background-color: #020509;
  background-image: url("../../img/brand-jj/identidad-jj.png");
  background-repeat: no-repeat;
  background-position: center 38%;
  background-size: 232px auto;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.04);
}

.brand__name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  white-space: nowrap;
}

.brand__name strong {
  font-family: var(--font-heading);
  font-size: clamp(0.78rem, 1vw, 0.98rem);
  font-weight: 700;
  letter-spacing: 0.015em;
}

.brand__name span {
  font-size: clamp(0.55rem, 0.8vw, 0.65rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.2rem);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 1.6vw, 1.8rem);
  flex-wrap: nowrap;
}

.site-nav__list a {
  color: var(--ink-soft);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="page"] {
  color: var(--white);
  border-color: var(--gold-500);
}

.site-nav__contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-pill);
  color: var(--gold-400);
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.site-nav__contact svg {
  width: 16px;
  height: 16px;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  color: var(--white);
  border: 1px solid var(--border-dark);
  transition: background var(--transition), border-color var(--transition);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-400);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .nav-toggle__icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon-close {
  display: block;
}

main,
#contenido {
  flex: 1 0 auto;
  display: block;
  width: 100%;
}

.site-footer {
  margin-top: auto;
  background: var(--navy-950);
  color: var(--ink-soft);
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(2.2rem, 4.5vw, 3.5rem);
  position: relative;
  z-index: 20;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(250px, 1.45fr) repeat(4, minmax(140px, 1fr));
  gap: clamp(1.2rem, 2.4vw, 2.2rem);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer__grid > * {
  min-width: 0;
}

@media (max-width: 1160px) {
  .site-footer__grid {
    grid-template-columns: minmax(260px, 1fr) repeat(2, minmax(160px, 1fr));
    gap: 2rem 1.5rem;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
    max-width: 60ch;
  }
}

@media (max-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1.25rem;
  }
  .site-footer__brand {
    grid-column: 1 / -1;
    max-width: none;
  }
  .site-footer__contact {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .site-footer__brand,
  .site-footer__contact {
    grid-column: auto;
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  max-width: 34ch;
}

.site-footer__professional { color: var(--gold-300); font-weight: 600; }

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.site-footer__social a {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  color: var(--white);
  border: 1px solid rgba(221, 187, 86, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  transition: color var(--transition), background var(--transition), transform var(--transition);
}

.site-footer__social a:hover,
.site-footer__social a:focus-visible {
  color: var(--navy-950);
  background: var(--gold-400);
  transform: translateY(-2px);
}

.site-footer__social svg {
  width: 1.1rem;
  height: 1.1rem;
}

.site-footer__social a:nth-child(-n + 2) svg { fill: currentColor; }

.site-footer__brand .brand__name strong {
  color: var(--white);
}

.site-footer__section > h2 {
  color: var(--white);
  font-size: var(--fs-base);
  margin-bottom: var(--space-sm);
}

.site-footer__contact h3 {
  margin: 1.1rem 0 .65rem;
  color: var(--white);
  font-size: var(--fs-sm);
}

.site-footer__legal-note {
  max-width: 28ch;
  margin-top: 1rem;
  color: var(--ink-faint);
  font-size: var(--fs-xs);
  line-height: 1.55;
}

.site-footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.site-footer__list a,
.site-footer__list .site-footer__schedule {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  transition: color var(--transition);
}

.site-footer__list a:hover {
  color: var(--gold-400);
}

.site-footer__list svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--gold-400);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  font-size: var(--fs-xs);
  color: var(--ink-faint);
}

.site-footer__bottom a {
  color: var(--ink-faint);
}

.site-footer__bottom a:hover {
  color: var(--gold-400);
}

/* WhatsApp flotante */
.whatsapp-float {
  position: fixed;
  right: clamp(0.9rem, 3vw, 1.6rem);
  bottom: clamp(0.9rem, 3vw, 1.6rem);
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(52px, 6vw, 60px);
  height: clamp(52px, 6vw, 60px);
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}

.whatsapp-float:hover {
  transform: translateY(-3px) scale(1.04);
}

.whatsapp-float svg {
  width: 26px;
  height: 26px;
}


/* Encabezado compartido y estable en todas las páginas. */
.site-header > .container {
  max-width: 1536px;
  padding-inline: clamp(1rem, 3.8vw, 3.8rem);
}
.site-header__bar {
  min-height: 4.75rem;
  padding-block: 0.55rem;
}
.brand__logo {
  width: clamp(46px, 4vw, 58px);
  height: clamp(46px, 4vw, 58px);
}
.brand__name strong { font-size: clamp(0.78rem, 1vw, 0.98rem); }
.brand__name span { font-size: clamp(0.52rem, 0.65vw, 0.64rem); }
.site-nav__list a { font-size: clamp(0.78rem, 0.85vw, 0.9rem); }
.site-nav__contact {
  padding: clamp(0.55rem, 0.8vw, 0.75rem) clamp(0.9rem, 1.45vw, 1.35rem);
  border-color: rgba(221, 187, 86, 0.48);
}
@media (max-width: 1120px) {
  .site-header__bar { min-height: 4.1rem; }
  .brand__logo { width: 46px; height: 46px; }
}
