/* =====================================================
   GIMNASIO ATHLETIC · SISTEMA DE TEMA CANÓNICO V14
   -----------------------------------------------------
   app.min.css conserva estructura, composición y tema oscuro.
   Esta hoja contiene únicamente:
   1) selector de tema;
   2) variantes claras por componente;
   3) reglas responsive del header relacionadas con el tema.

   No redefine --white/--black ni duplica reglas históricas.
===================================================== */

:root{
  --theme-duration:.22s;
  --light-page:#f3f5f8;
  --light-surface:#ffffff;
  --light-surface-soft:#e9edf2;
  --light-text:#171b23;
  --light-muted:#596271;
  --light-line:rgba(20,27,38,.15);
  --light-shadow:0 16px 42px rgba(24,32,45,.10);
  --dark-footer:#080a0e;
}

html{color-scheme:dark;}
html[data-theme="light"]{color-scheme:light;}

/* =====================================================
   1. SELECTOR CLARO / OSCURO
===================================================== */
.theme-toggle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-width:112px;
  min-height:44px;
  padding:5px 9px 5px 7px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:999px;
  background:rgba(255,255,255,.07);
  color:#fff;
  cursor:pointer;
  box-sizing:border-box;
  transition:transform var(--theme-duration) ease,border-color var(--theme-duration) ease,background var(--theme-duration) ease;
}
.theme-toggle:hover{transform:translateY(-1px);border-color:rgba(255,255,255,.36);}
.theme-toggle:focus-visible{outline:3px solid rgba(225,6,0,.35);outline-offset:3px;}
.theme-toggle__track{
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  align-items:center;
  flex:0 0 52px;
  width:52px;
  height:28px;
  padding:0 7px;
  border-radius:999px;
  background:#07080a;
  color:#fff;
  box-sizing:border-box;
  font-size:13px;
}
.theme-toggle__sun,.theme-toggle__moon{position:relative;z-index:2;text-align:center;}
.theme-toggle__thumb{
  position:absolute;
  z-index:1;
  top:3px;
  left:3px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.32);
  transition:transform var(--theme-duration) ease,background var(--theme-duration) ease;
}
.theme-toggle__copy{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;min-width:46px;line-height:1;}
.theme-toggle__caption{display:block;color:rgba(255,255,255,.66);font:700 8px/1 Montserrat,Arial,sans-serif;letter-spacing:.12em;text-transform:uppercase;}
.theme-toggle__label{display:block;color:#fff;font:800 10px/1 Montserrat,Arial,sans-serif;letter-spacing:.045em;text-transform:uppercase;white-space:nowrap;}
html[data-theme="light"] .theme-toggle{background:#fff;color:#171b23;border-color:var(--light-line);box-shadow:0 7px 18px rgba(20,27,38,.08);}
html[data-theme="light"] .theme-toggle__track{background:#e7ebf0;color:#202630;}
html[data-theme="light"] .theme-toggle__thumb{transform:translateX(24px);background:#e10600;}
html[data-theme="light"] .theme-toggle__caption{color:#66707d;}
html[data-theme="light"] .theme-toggle__label{color:#171b23;-webkit-text-fill-color:#171b23;}

/* =====================================================
   2. LOGOS OFICIALES POR TEMA
===================================================== */
.theme-logo--dark{display:block!important;}
.theme-logo--light{display:none!important;}
html[data-theme="light"] .theme-logo--dark{display:none!important;}
html[data-theme="light"] .theme-logo--light{display:block!important;}
.brand__logo-wrap{
  position:relative;
  display:grid;
  place-items:center;
  width:68px;
  height:68px;
  flex:0 0 68px;
  overflow:visible;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.brand__logo-wrap .brand__logo{
  grid-area:1/1;
  display:block;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  object-fit:contain;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
.brand--corporate,.hero-mobile-mark,.hero-mobile-mark img,.footer-brand,.footer-logo{
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  outline:0!important;
}

/* =====================================================
   3. BASE CLARA
===================================================== */
html[data-theme="light"] body,
html[data-theme="light"] body.corporate-internal-page,
html[data-theme="light"] .page-shell,
html[data-theme="light"] main{
  background:var(--light-page)!important;
  color:var(--light-text)!important;
}
html[data-theme="light"] body::before,
html[data-theme="light"] body::after{opacity:.025!important;}

/* =====================================================
   4. HEADER Y NAVEGACIÓN
===================================================== */
.site-header--corporate .brand{order:1;}
.site-header--corporate .nav-links{order:3;}
.site-header--corporate .theme-toggle--header{order:4;}
.site-header--corporate .menu-toggle{order:5;}
html[data-theme="light"] .site-header,
html[data-theme="light"] .site-header--corporate{
  background:rgba(255,255,255,.96)!important;
  border-bottom-color:var(--light-line)!important;
  box-shadow:0 8px 24px rgba(20,27,38,.08)!important;
  backdrop-filter:blur(18px);
}
html[data-theme="light"] .brand__name{color:#171b23!important;}
html[data-theme="light"] .brand__branch{color:#6a7280!important;}
html[data-theme="light"] .nav-main a{color:#202630!important;}
html[data-theme="light"] .nav-main a:hover,
html[data-theme="light"] .nav-main a.active,
html[data-theme="light"] .nav-main a.is-active,
html[data-theme="light"] .nav-main a[aria-current]{color:#a90702!important;background:rgba(225,6,0,.08)!important;}
html[data-theme="light"] .nav-actions{border-left-color:var(--light-line)!important;}
html[data-theme="light"] .header-shop{color:#202630!important;background:#eef1f5!important;border-color:#cdd3dc!important;box-shadow:0 8px 20px rgba(20,27,38,.08)!important;}
html[data-theme="light"] .header-shop span{color:initial!important;filter:none!important;opacity:1!important;}
html[data-theme="light"] .header-member{color:#fff!important;-webkit-text-fill-color:#fff!important;background:linear-gradient(135deg,#ff2a2a,#e10600 48%,#8f0000)!important;border-color:rgba(143,0,0,.30)!important;box-shadow:0 10px 26px rgba(225,6,0,.25)!important;}
html[data-theme="light"] .header-member span{color:initial!important;filter:none!important;opacity:1!important;}
html[data-theme="light"] .menu-toggle.menu-toggle--premium{color:#202630!important;background:#fff!important;border-color:#bcc4cf!important;box-shadow:0 8px 20px rgba(20,27,38,.10)!important;}
html[data-theme="light"] .menu-toggle__label{color:#202630!important;-webkit-text-fill-color:#202630!important;}
html[data-theme="light"] .menu-toggle__line{background:#202630!important;}

/* =====================================================
   5. HEROES Y TARJETAS FOTOGRÁFICAS
===================================================== */
html[data-theme="light"] :is(.hero,.corporate-secondary-hero,.corporate-page-title),
html[data-theme="light"] :is(.hero,.corporate-secondary-hero,.corporate-page-title) *{color:#fff;}
html[data-theme="light"] :is(.hero,.corporate-secondary-hero,.corporate-page-title) :is(h1,h2,h3,p,.eyebrow,.page-breadcrumb,.page-breadcrumb span,.page-breadcrumb a){color:#fff!important;text-shadow:0 3px 22px rgba(0,0,0,.76)!important;}
html[data-theme="light"] :is(.hero,.corporate-secondary-hero) .btn--ghost{color:#fff!important;background:rgba(0,0,0,.24)!important;border-color:rgba(255,255,255,.50)!important;}
html[data-theme="light"] :is(.branch-card,.tool-feature-card){background:#080a0e!important;border-color:rgba(20,27,38,.22)!important;box-shadow:0 22px 55px rgba(20,27,38,.18)!important;}
html[data-theme="light"] :is(.branch-card,.tool-feature-card) :is(h2,h3,h4,strong,b,p,small,span){color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:0 2px 16px rgba(0,0,0,.72)!important;}
html[data-theme="light"] .branch-content p,
html[data-theme="light"] .tool-feature-content p{color:rgba(255,255,255,.86)!important;}
html[data-theme="light"] .contact-map-visual{background:#0d1118!important;border-color:rgba(20,27,38,.20)!important;}
html[data-theme="light"] .contact-map-visual :is(strong,span){color:#fff!important;-webkit-text-fill-color:#fff!important;text-shadow:0 2px 14px rgba(0,0,0,.72)!important;}

/* =====================================================
   6. SECCIONES Y TARJETAS DE SUPERFICIE
===================================================== */
html[data-theme="light"] :is(.section,.section--graphite,.experience,.services-section,.athletic-hub,.calories-section,.imc-section,.macros-section,.tools-section,.contact-fast-section,.contact-main-section,.contact-faq-section,.about-intro-section,.about-services-section,.about-philosophy-section,.about-why-section,.branches-detail-section,.services-page-section,.service-method-section,.location-section,.tools-progress-section,.tools-education-section){background-color:var(--light-page)!important;background-image:none!important;color:var(--light-text)!important;}
html[data-theme="light"] :is(.section,.section--graphite)::before,
html[data-theme="light"] :is(.section,.section--graphite)::after,
html[data-theme="light"] :is(.services-blur,.tools-glow,.about-services-glow){opacity:.035!important;}
html[data-theme="light"] main :is(.section,.section--graphite,.experience,.services-section,.athletic-hub,.calories-section,.imc-section,.macros-section,.tools-section,.contact-fast-section,.contact-main-section,.contact-faq-section,.about-intro-section,.about-services-section,.about-philosophy-section,.about-why-section,.branches-detail-section,.services-page-section,.service-method-section,.location-section,.tools-progress-section,.tools-education-section) :is(h1,h2,h3,h4,h5,h6,strong,b){color:var(--light-text)!important;text-shadow:none!important;}
html[data-theme="light"] main :is(.section,.section--graphite,.experience,.services-section,.athletic-hub,.calories-section,.imc-section,.macros-section,.tools-section,.contact-fast-section,.contact-main-section,.contact-faq-section,.about-intro-section,.about-services-section,.about-philosophy-section,.about-why-section,.branches-detail-section,.services-page-section,.service-method-section,.location-section,.tools-progress-section,.tools-education-section) :is(p,li,small,span:not(.eyebrow)){color:var(--light-muted);}
html[data-theme="light"] :is(.corporate-access-card,.service-card,.tool-card,.hub-card,.calories-form-card,.calories-result-card,.calorie-card,.calorie-info-box,.imc-card,.imc-result-card,.imc-insights,.imc-note,.macro-calories-box,.macro-results,.contact-fast-card,.contact-form-card,.contact-map-card,.faq-item,.about-value-card,.about-philosophy-card,.branch-detail-card,.services-detail-card,.location-info,.location-map,.info-card){background:var(--light-surface)!important;color:var(--light-text)!important;border:1px solid var(--light-line)!important;box-shadow:var(--light-shadow)!important;}
html[data-theme="light"] :is(.corporate-access-card,.service-card,.tool-card,.hub-card,.calories-form-card,.calories-result-card,.calorie-card,.calorie-info-box,.imc-card,.imc-result-card,.imc-insights,.imc-note,.macro-calories-box,.macro-results,.contact-fast-card,.contact-form-card,.contact-map-card,.faq-item,.about-value-card,.about-philosophy-card,.branch-detail-card,.services-detail-card,.location-info,.location-map,.info-card) :is(h2,h3,h4,h5,strong,b){color:var(--light-text)!important;text-shadow:none!important;}
html[data-theme="light"] :is(.corporate-access-card,.service-card,.tool-card,.hub-card,.calories-form-card,.calories-result-card,.calorie-card,.calorie-info-box,.imc-card,.imc-result-card,.imc-insights,.imc-note,.macro-calories-box,.macro-results,.contact-fast-card,.contact-form-card,.contact-map-card,.faq-item,.about-value-card,.about-philosophy-card,.branch-detail-card,.services-detail-card,.location-info,.location-map,.info-card) :is(p,li,small,dd){color:var(--light-muted)!important;}
html[data-theme="light"] :is(.method-list,.progress-list) article{background:#fff!important;border:1px solid rgba(20,27,38,.18)!important;box-shadow:0 10px 26px rgba(20,27,38,.08)!important;}
html[data-theme="light"] :is(.method-list,.progress-list) article strong{color:#b70600!important;}
html[data-theme="light"] :is(.method-list,.progress-list) article span{color:var(--light-muted)!important;}
html[data-theme="light"] :is(.branch-card--soon,.contact-fast-card--disabled){background:#e7eaef!important;border-color:rgba(20,27,38,.12)!important;opacity:1!important;}
html[data-theme="light"] :is(.branch-card--soon,.contact-fast-card--disabled) :is(h3,p,span){color:#666f7c!important;}
html[data-theme="light"] .faq-item summary{color:var(--light-text)!important;-webkit-text-fill-color:var(--light-text)!important;}
html[data-theme="light"] .faq-item p{color:var(--light-muted)!important;-webkit-text-fill-color:var(--light-muted)!important;}

/* =====================================================
   7. FORMULARIOS, RESULTADOS Y BOTONES
===================================================== */
html[data-theme="light"] label,
html[data-theme="light"] .checkbox-label{color:#252b35!important;}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea{color:var(--light-text)!important;background:#f7f8fa!important;border-color:rgba(20,27,38,.18)!important;box-shadow:none!important;}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{color:#858d98!important;}
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus{border-color:#d20a04!important;box-shadow:0 0 0 3px rgba(225,6,0,.12)!important;}
html[data-theme="light"] :is(.calorie-main-box,.imc-dashboard,.imc-result-number,.imc-scale,.imc-progress-track,.macro-results--pro,.calorie-extra-info,.imc-disclaimer){background:var(--light-surface-soft)!important;color:var(--light-text)!important;border-color:var(--light-line)!important;}
html[data-theme="light"] main .btn--ghost:not(.hero .btn--ghost):not(.corporate-secondary-hero .btn--ghost):not(.cta .btn--ghost){color:#202630!important;background:#fff!important;border-color:rgba(20,27,38,.20)!important;}
html[data-theme="light"] hr{border-color:var(--light-line)!important;}

/* =====================================================
   8. CTA FINAL CAMBIA CON EL TEMA
===================================================== */
html[data-theme="light"] .cta,
html[data-theme="light"] .corporate-internal-page .cta{background:var(--light-surface-soft)!important;color:var(--light-text)!important;border-top:1px solid var(--light-line)!important;border-bottom:1px solid var(--light-line)!important;box-shadow:none!important;}
html[data-theme="light"] .cta::before,
html[data-theme="light"] .cta::after,
html[data-theme="light"] .cta .cta-shadow{opacity:.04!important;}
html[data-theme="light"] .cta :is(h2,h3,h4,strong){color:var(--light-text)!important;text-shadow:none!important;}
html[data-theme="light"] .cta :is(p,li,small){color:var(--light-muted)!important;}
html[data-theme="light"] .cta .eyebrow{color:#b70600!important;text-shadow:none!important;}
html[data-theme="light"] .cta .btn--ghost{color:#202630!important;background:#fff!important;border-color:rgba(20,27,38,.22)!important;}

/* =====================================================
   9. FOOTER SIEMPRE OSCURO
===================================================== */
.site-footer,
html[data-theme="light"] .site-footer{background:radial-gradient(circle at 10% 0%,rgba(225,6,0,.10),transparent 30%),var(--dark-footer)!important;color:#fff!important;border-top-color:rgba(255,255,255,.08)!important;}
.site-footer :is(h2,h3,h4,h5,strong),
html[data-theme="light"] .site-footer :is(h2,h3,h4,h5,strong){color:#fff!important;}
.site-footer :is(p,li,small,span),
html[data-theme="light"] .site-footer :is(p,li,small,span){color:rgba(255,255,255,.72)!important;}
.site-footer a,
html[data-theme="light"] .site-footer a{color:rgba(255,255,255,.82)!important;}
.site-footer a:hover,
html[data-theme="light"] .site-footer a:hover{color:#ff4a45!important;}
.site-footer .footer-brand{max-width:380px;padding:0!important;margin:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;}
.site-footer .footer-logo{display:block;width:118px;height:auto;margin:0 0 22px;padding:0!important;background:transparent!important;border:0!important;border-radius:0!important;box-shadow:none!important;filter:none!important;}
.site-footer .footer-mini,
.site-footer .footer-link{background:#11151b!important;border-color:rgba(255,255,255,.10)!important;box-shadow:none!important;}
.site-footer .footer-bottom{background:#050609!important;border-top-color:rgba(255,255,255,.08)!important;}
.footer-social .social-icon{color:#fff!important;border-color:rgba(255,255,255,.16)!important;}
.footer-social .social-icon.facebook{background:linear-gradient(145deg,#1877F2,#0B4CB8)!important;box-shadow:0 14px 34px rgba(24,119,242,.30),inset 0 1px 0 rgba(255,255,255,.24)!important;}
.footer-social .social-icon.instagram{background:linear-gradient(135deg,#F58529 0%,#DD2A7B 42%,#8134AF 72%,#515BD4 100%)!important;box-shadow:0 14px 34px rgba(221,42,123,.30),inset 0 1px 0 rgba(255,255,255,.24)!important;}
.footer-social .social-icon.tiktok{background:linear-gradient(145deg,#050505,#151515)!important;box-shadow:9px 0 22px rgba(254,44,85,.22),-9px 0 22px rgba(37,244,238,.20),inset 0 1px 0 rgba(255,255,255,.18)!important;}

/* =====================================================
   10. TABLET Y MÓVIL
===================================================== */
@media(max-width:1100px){
  .site-header--corporate .nav{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center!important;gap:8px!important;}
  .site-header--corporate .brand{grid-column:1;grid-row:1;min-width:0;width:auto!important;max-width:max-content!important;padding:0!important;margin:0!important;}
  .site-header--corporate .brand__logo-wrap{width:48px;height:48px;flex-basis:48px;min-width:48px;}
  .site-header--corporate .theme-toggle--header{grid-column:2;grid-row:1;}
  .site-header--corporate .menu-toggle{grid-column:3;grid-row:1;}
  .site-header--corporate .nav-links{grid-column:1/-1;}
  .site-header--corporate .menu-toggle.menu-toggle--premium{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;width:92px!important;min-width:92px!important;max-width:92px!important;height:44px!important;padding:0 9px!important;overflow:hidden!important;box-sizing:border-box!important;white-space:nowrap!important;}
  .site-header--corporate .menu-toggle__icon{flex:0 0 20px!important;width:20px!important;min-width:20px!important;margin:0!important;}
  .site-header--corporate .menu-toggle__label{display:block!important;flex:0 1 auto!important;min-width:0!important;max-width:48px!important;margin:0!important;overflow:hidden!important;white-space:nowrap!important;font-size:10px!important;line-height:1!important;letter-spacing:.055em!important;text-align:center!important;}
  html[data-theme="light"] .nav-links.nav-links--corporate{background:#fff!important;background-image:none!important;border-color:var(--light-line)!important;box-shadow:0 28px 70px rgba(20,27,38,.22)!important;}
  html[data-theme="light"] .nav-actions{border-top-color:var(--light-line)!important;}
  html[data-theme="light"] .nav-main a,
  html[data-theme="light"] .nav-actions a{color:#202630!important;background:#f3f5f8!important;border-color:rgba(20,27,38,.12)!important;border-left-color:#e10600!important;box-shadow:none!important;}
  html[data-theme="light"] .nav-actions .header-shop{color:#202630!important;background:#eef1f5!important;border-left:0!important;}
  html[data-theme="light"] .nav-actions .header-member{color:#fff!important;background:linear-gradient(135deg,#ff2a2a,#e10600 48%,#8f0000)!important;border-color:rgba(143,0,0,.28)!important;border-left:0!important;}
  html[data-theme="light"] .mobile-overlay{background:rgba(20,26,36,.42)!important;}
}

@media(max-width:600px){
  .site-header--corporate .nav{display:flex!important;align-items:center!important;gap:7px!important;}
  .site-header--corporate .brand{flex:0 0 auto!important;margin-right:auto!important;}
  .site-header--corporate .brand__logo-wrap{width:44px;height:44px;flex:0 0 44px;min-width:44px;}
  .site-header--corporate .theme-toggle--header{position:relative!important;flex:0 0 88px!important;width:88px!important;min-width:88px!important;max-width:88px!important;height:42px!important;margin:0!important;padding:4px 7px!important;inset:auto!important;transform:none!important;}
  .site-header--corporate .theme-toggle__track{flex-basis:28px;width:28px;min-width:28px;height:22px;padding:0 2px;font-size:9px;}
  .site-header--corporate .theme-toggle__thumb{width:16px;height:16px;}
  html[data-theme="light"] .site-header--corporate .theme-toggle__thumb{transform:translateX(7px);}
  .site-header--corporate .theme-toggle__copy{min-width:39px;gap:1px;}
  .site-header--corporate .theme-toggle__caption{font-size:7px;}
  .site-header--corporate .theme-toggle__label{font-size:8px;}
  .site-header--corporate .menu-toggle.menu-toggle--premium{flex:0 0 84px!important;width:84px!important;min-width:84px!important;max-width:84px!important;height:42px!important;}
  .site-header--corporate .nav-links{position:fixed!important;}
  html[data-theme="light"] body.corporate-internal-page,
  html[data-theme="light"] body.corporate-internal-page .page-shell,
  html[data-theme="light"] body.corporate-internal-page main,
  html[data-theme="light"] body.corporate-internal-page .corporate-secondary-hero + .section,
  html[data-theme="light"] body.corporate-internal-page .corporate-secondary-hero + section{background:var(--light-page)!important;color:var(--light-text)!important;}
  html[data-theme="light"] body.corporate-internal-page .corporate-secondary-hero{background-color:#08090b!important;}
}

@media(max-width:380px){
  .site-header--corporate .nav{gap:5px!important;}
  .site-header--corporate .brand__logo-wrap{width:40px;height:40px;flex-basis:40px;min-width:40px;}
  .site-header--corporate .theme-toggle--header{flex-basis:76px!important;width:76px!important;min-width:76px!important;max-width:76px!important;padding-inline:5px!important;}
  .site-header--corporate .menu-toggle.menu-toggle--premium{flex-basis:78px!important;width:78px!important;min-width:78px!important;max-width:78px!important;gap:5px!important;padding-inline:7px!important;}
  .site-header--corporate .menu-toggle__icon{flex-basis:18px!important;width:18px!important;min-width:18px!important;}
  .site-header--corporate .menu-toggle__label{max-width:43px!important;font-size:9px!important;}
}

@media(prefers-reduced-motion:reduce){.theme-toggle,.theme-toggle__thumb{transition:none;}}
