/* ==========================================================
   ESCUELA DE GIMNASIA — GLOBAL.CSS NORMALIZADO
   Únicamente estilos compartidos, sin reglas específicas de páginas.
   Inicio, Programas, Sedes, La Escuela, Contacto y Eventos usan sus CSS propios.
   ========================================================== */

/* ==========================================================
   01. TOKENS, RESET Y FUNDAMENTOS
   ========================================================== */

:root {
  --navy: #102d59;
  --ink: #173150;
  --pink: #e7377d;
  --cyan: #31c5e9;
  --soft: #eef6fb;
  --line: rgba(16,45,89,.14);
  --muted: #5d718b;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

img {
  max-width: 100%;
}

.wrap {
  width: min(1160px,calc(100% - 48px));
  margin: auto;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--pink);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  overflow-wrap: break-word;
}

h1 {
  max-width: 700px;
  margin-bottom: 22px;
  font-size: clamp(3rem,6vw,5.8rem);
  line-height: .92;
  letter-spacing: -.065em;
}

h2 {
  max-width: 760px;
  margin-bottom: 17px;
  font-size: clamp(2.15rem,4.2vw,4rem);
  line-height: .96;
  letter-spacing: -.06em;
}

h3 {
  letter-spacing: -.04em;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.63;
}

.button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 21px;
  background: var(--pink);
  color: #fff;
  font-size: .82rem;
  font-weight: 850;
  cursor: pointer;
  transition: .2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(231,55,125,.28);
}

.button.white {
  background: #fff;
  color: var(--navy);
}

.button.outline {
  border: 1px solid var(--navy);
  background: transparent;
  color: var(--navy);
}

.button.outline.white {
  border-color: rgba(255,255,255,.55);
  color: #fff;
}

.plain-link {
  font-size: .86rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.text-link {
  display: inline-flex;
  gap: 8px;
  color: var(--navy);
  font-size: .78rem;
  font-weight: 850;
}

.text-link:after {
  content: "→";
  color: var(--pink);
  font-size: 1.1rem;
}

.skip {
  position: absolute;
  z-index: 100;
  top: -60px;
  left: 18px;
  padding: 10px 14px;
  background: #fff;
  color: var(--navy);
}

.skip:focus {
  top: 10px;
}

.intro {
  color: var(--muted);
  line-height: 1.6;
}

/* ==========================================================
   02. HEADER Y NAVEGACIÓN — BASE COMPARTIDA
   ========================================================== */

header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(16,45,89,.97);
  backdrop-filter: blur(12px);
}

.navbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.real-logo {
  display: block;
  width: 145px;
  height: 47px;
  object-fit: contain;
  object-position: left center;
}

.brand .real-logo,
.footer-brand .real-logo {
  filter: brightness(0) invert(1);
}

nav {
  display: flex;
  color: rgba(255,255,255,.84);
  font-weight: 750;
  font-size: .86rem;
  gap: 23px;
}

nav a:hover,
nav a[aria-current=page] {
  color: #fff;
}

.nav-cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  font-weight: 850;
  padding: 0 22px;
  font-size: .84rem;
}

.menu-toggle {
  display: none;
  width: 43px;
  height: 43px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.menu-toggle span {
  display: block;
  width: 17px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

header .navbar {
  min-height: 82px;
}

.brand:after {
  content: "Escuela de\A Gimnasia";
  white-space: pre;
  color: #fff;
  font-size: .72rem;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -.03em;
}

.brand .real-logo {
  width: 42px;
  height: 48px;
  object-fit: cover;
  object-position: left center;
}

.navbar .real-logo {
  width: 42px;
  height: 25px;
  object-fit: cover;
  object-position: top center;
}

/* ==========================================================
   03. LAYOUT Y COMPONENTES COMPARTIDOS
   ========================================================== */

.view {
  display: none;
}

.view.is-active {
  display: block;
  animation: reveal .3s ease;
}

section {
  padding: 104px 0;
}

.dark .eyebrow {
  color: var(--cyan);
}

.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 30px;
}

.anchor-nav a {
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: 10px 13px;
  color: #fff;
  font-size: .76rem;
  font-weight: 800;
}

.anchor-nav a:hover {
  border-color: var(--cyan);
  background: rgba(49,197,233,.12);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 42px;
}

.section-head .lead {
  margin: 0;
}

.soft {
  background: #f8fbfd;
}

.dark {
  background: var(--navy);
  color: #fff;
}

.dark .lead {
  color: rgba(255,255,255,.7);
}

@keyframes reveal {
  from {
    opacity: .35;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}


/* Tabs compartidos — usados por componentes de horarios en distintas páginas */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tab {
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 9px 12px;
  background: transparent;
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
}

.tab.is-active {
  border-color: var(--cyan);
  background: var(--cyan);
  color: var(--navy);
}

/* Enlaces de mapas compartidos por componentes legacy */
.actions .maps-link {
  justify-content: center;
}

/* ==========================================================
   04. FOOTER — BASE COMPARTIDA
   ========================================================== */

footer {
  padding: 66px 0 28px;
  background: #0b264c;
  color: rgba(255,255,255,.7);
  font-size: .78rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1.05fr 1.05fr;
  gap: 36px;
  padding-bottom: 47px;
}

.footer-brand .real-logo {
  width: 205px;
  height: auto;
  max-height: 60px;
  margin: 0 0 20px;
  object-fit: contain;
  object-position: left center;
  filter: none;
}

.footer-brand p {
  max-width: 245px;
  margin: 0;
  color: rgba(255,255,255,.66);
  font-size: .84rem;
  line-height: 1.6;
  order: 2;
}

.footer-title {
  margin: 10px 0 17px;
  color: var(--cyan);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.footer-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.45;
}

.footer-list b {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 22px;
  color: rgba(255,255,255,.48);
  font-size: .7rem;
}

.floating {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 39;
  display: grid;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  place-items: center;
  background: #fff;
  box-shadow: 0 14px 30px rgba(7,36,78,.22);
  color: var(--navy);
  font-size: .68rem;
  font-weight: 900;
}

.footer-venue-link {
  display: inline-block;
  margin-bottom: 2px;
}

.footer-venue-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-socials {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.footer-socials a {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 50%;
  font-size: .62rem;
  font-weight: 900;
}

.footer-email {
  display: inline-block;
  margin-top: 10px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
}

.footer-brand::before {
  display: none;
  content: none;
}

/* ==========================================================
   05. WORDPRESS / HELLO ELEMENTOR — SHELL Y HEADER/FOOTER ACTUAL
   ========================================================== */

.eg-custom-shell #site-header,
.eg-custom-shell #site-footer,
.eg-custom-shell header.site-header,
.eg-custom-shell footer.site-footer {
  display: none !important;
}

.eg-site-header .navbar {
  min-height: 72px;
  gap: 30px;
}

.eg-site-header .eg-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  line-height: 0;
}

.eg-site-header .eg-brand::after {
  display: none;
  content: none;
}

.eg-site-header .navbar .real-logo {
  width: 220px;
  height: auto;
  max-height: 50px;
  object-fit: contain;
  object-position: left center;
  filter: none;
}

.eg-brand-name {
  color: #fff;
  font-size: .93rem;
  font-weight: 850;
  letter-spacing: -.02em;
}

.eg-site-header .eg-main-nav {
  margin-left: auto;
  gap: 26px;
  font-size: .83rem;
  font-weight: 780;
}

.eg-site-header .eg-main-nav a {
  position: relative;
  padding: 23px 0 20px;
}

.eg-site-header .eg-main-nav a::after {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--cyan);
  content: "";
  transition: transform .2s ease;
}

.eg-site-header .eg-main-nav a:hover::after,
.eg-site-header .eg-main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.eg-site-header .eg-nav-cta {
  min-height: 44px;
  padding: 0 19px;
  white-space: nowrap;
}

.eg-site-header .eg-menu-toggle {
  position: relative;
  display: none;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  padding: 0;
  background: var(--pink);
  box-shadow: none;
  transition: background .2s ease, transform .2s ease;
}

.eg-site-header .eg-menu-toggle:hover {
  transform: translateY(-1px);
  background: #d92f72;
}

.eg-site-header .eg-menu-toggle span {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 1.5px;
  margin: 0;
  border-radius: 999px;
  background: #fff;
  transform: translateX(-50%);
  transition: transform .24s ease, opacity .18s ease, top .24s ease;
}

.eg-site-header .eg-menu-toggle span:nth-child(1) {
  top: 17px;
}

.eg-site-header .eg-menu-toggle span:nth-child(2) {
  top: 24px;
}

.eg-site-header .eg-menu-toggle span:nth-child(3) {
  top: 31px;
}

.eg-site-header .eg-menu-toggle.is-open span:nth-child(1) {
  top: 24px;
  transform: translateX(-50%) rotate(45deg);
}

.eg-site-header .eg-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.eg-site-header .eg-menu-toggle.is-open span:nth-child(3) {
  top: 24px;
  transform: translateX(-50%) rotate(-45deg);
}

.footer-wa-label,
.footer-phone,
.eg-footer-wa-title,
.eg-footer-phone {
  display: inline-block;
}

.footer-phone,
.eg-footer-phone {
  margin-top: 4px;
  color: rgba(255,255,255,.78);
}

.footer-phone:hover,
.footer-wa-label:hover,
.eg-footer-phone:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.eg-footer-wa-title {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.42);
  text-underline-offset: 4px;
}

/* ==========================================================
   06. RESPONSIVE GLOBAL
   Breakpoints canónicos: 1040 / 900 / 780 / 480
   ========================================================== */

@media (max-width: 1040px) {
  /* 05. WORDPRESS / HELLO ELEMENTOR — SHELL Y HEADER/FOOTER ACTUAL */
  .eg-site-header .navbar {
    gap: 20px;
  }

  .eg-site-header .eg-main-nav {
    gap: 18px;
    font-size: .78rem;
  }

  .eg-site-header .eg-nav-cta {
    display: none;
  }

}

@media (max-width:900px) {
  /* 02. HEADER Y NAVEGACIÓN — BASE COMPARTIDA */
  nav {
    gap: 12px;
  }

  .nav-cta {
    padding: 0 15px;
  }

  /* 04. FOOTER — BASE COMPARTIDA */
  .footer-grid {
    grid-template-columns: 1.45fr 1fr 1fr;
  }

}

@media (max-width:780px) {
  /* 01. TOKENS, RESET Y FUNDAMENTOS */
  .wrap {
    width: min(100% - 36px,620px);
  }

  nav,
  .nav-cta {
    display: none;
  }

  h1 {
    font-size: 3.35rem;
  }

  /* 02. HEADER Y NAVEGACIÓN — BASE COMPARTIDA */
  .navbar {
    min-height: 66px;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-menu {
    position: fixed;
    z-index: 39;
    right: 18px;
    left: 18px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 22px;
    padding: 14px;
    background: rgba(9,34,71,.98);
    box-shadow: 0 20px 40px rgba(2,17,38,.28);
    top: 70px;
  }

  .mobile-menu.is-open {
    display: grid;
    gap: 4px;
  }

  .mobile-menu a {
    border-radius: 12px;
    padding: 15px;
    color: #fff;
    font-size: .9rem;
    font-weight: 800;
  }

  .mobile-menu .mobile-cta {
    margin-top: 7px;
    background: var(--pink);
    text-align: center;
  }

  header .navbar {
    min-height: 70px;
  }

  .brand .real-logo {
    width: 39px;
    height: 43px;
  }

  .brand:after {
    font-size: .68rem;
  }

  .navbar .real-logo {
    width: 39px;
    height: 23px;
  }

  /* 03. LAYOUT Y COMPONENTES COMPARTIDOS */
  section {
    padding: 76px 0;
  }

  .section-head {
    display: block;
  }

  .section-head .lead {
    margin-top: 15px;
  }

  /* 04. FOOTER — BASE COMPARTIDA */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .floating {
    right: 16px;
    bottom: 16px;
  }

  .footer-brand .real-logo {
    width: 45px;
  }

}

@media (max-width: 780px) {
  /* 04. FOOTER — BASE COMPARTIDA */
  .footer-brand .real-logo {
    width: 190px;
    max-height: 54px;
  }

  /* 05. WORDPRESS / HELLO ELEMENTOR — SHELL Y HEADER/FOOTER ACTUAL */
  .eg-site-header .navbar {
    min-height: 78px;
  }

  .eg-site-header .eg-brand {
    max-width: 245px;
  }

  .eg-site-header .navbar .real-logo {
    width: min(205px,58vw);
    max-height: 48px;
  }

  .eg-site-header .eg-brand-name {
    font-size: .8rem;
  }

  .eg-site-header .eg-menu-toggle {
    display: block;
  }

  .eg-site-header .mobile-menu {
    top: 78px;
    padding: 20px 16px 16px;
  }

  .eg-site-header .eg-mobile-cta {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    margin: 14px 6px 4px;
    border-radius: 999px;
    background: var(--pink);
    color: #fff;
    text-align: center;
    box-shadow: 0 10px 22px rgba(231,55,125,.18);
  }

  .eg-site-header .mobile-menu a:not(.eg-mobile-cta) {
    padding: 16px 18px;
  }

}

@media (max-width:480px) {
  /* 04. FOOTER — BASE COMPARTIDA */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

}
