/* Arena Gym V10.1.1 — saneamiento visual y experiencia responsive.
   Se carga al final para neutralizar reglas históricas incompatibles. */

:root{
  --ag-ux-width:1320px;
  --ag-ux-gutter:clamp(14px,3vw,32px);
}

html{min-width:320px;overflow-x:hidden}
body{min-width:320px;overflow-x:hidden}
body *{min-width:0}

h1,h2,h3,h4,p,li,span,strong,a,button,label,td,th{max-width:100%}
h1,h2,h3,h4{text-wrap:balance;overflow-wrap:break-word}
p,li,td,th{overflow-wrap:break-word}
img,svg,video,canvas{max-width:100%;height:auto}

/* Cabecera */
.site-header{display:block!important;width:100%}
.header-shell{position:relative;width:min(100%,var(--ag-ux-width));margin-inline:auto}
.brand,.brand-copy,.brand-name{min-width:0}
.brand-copy{display:block!important}
.brand-name{display:block!important;line-height:1.05;white-space:nowrap}
.brand-name strong{display:inline!important}
.primary-nav{max-width:100%}
.primary-nav>a,.primary-nav button{line-height:1.2}

/* Portada */
.page-home .hub-hero.wow-hub{
  position:relative;
  isolation:isolate;
  min-height:unset;
  margin:0;
  overflow:hidden;
  background-position:center;
  background-size:cover;
}
.page-home .hub-hero.wow-hub::before{display:none}
.page-home .hub-overlay{
  position:relative;
  z-index:1;
  min-height:clamp(610px,72vh,760px);
  padding:clamp(30px,5vw,68px);
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(270px,360px);
  gap:clamp(28px,4vw,56px);
  align-items:center;
  background:
    linear-gradient(90deg,rgba(4,4,6,.97) 0%,rgba(4,4,6,.90) 44%,rgba(4,4,6,.67) 72%,rgba(4,4,6,.48) 100%),
    radial-gradient(circle at 78% 18%,rgba(212,166,55,.18),transparent 34%);
}
.page-home .hero-copy.wide{width:100%;max-width:820px}
.page-home .home-hero-title{
  display:grid;
  gap:.12em;
  width:100%;
  max-width:820px;
  margin:16px 0 22px;
  font-family:Impact,Haettenschweiler,"Arial Narrow Bold",sans-serif;
  font-size:clamp(42px,5.4vw,76px);
  line-height:.98;
  letter-spacing:.01em;
  text-transform:uppercase;
}
.page-home .home-hero-title>span{display:block;max-width:100%}
.page-home .hero-accent-line{color:var(--gold);text-shadow:0 0 28px rgba(212,166,55,.14)}
.page-home .hero-copy.wide p{max-width:750px;margin:0 0 26px;font-size:clamp(16px,1.35vw,19px);line-height:1.62;color:#e0ddd6}
.page-home .hero-actions{display:flex;flex-wrap:wrap;gap:10px}
.page-home .hero-actions .btn{min-height:48px;display:inline-flex;align-items:center;justify-content:center}
.page-home .hero-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%;align-self:center}
.page-home .hero-kpis article{min-height:126px;padding:18px;display:flex;flex-direction:column;justify-content:center;border:1px solid rgba(212,166,55,.32);border-radius:18px;background:rgba(10,10,13,.84);backdrop-filter:blur(10px)}
.page-home .hero-kpis strong{display:block;font-size:clamp(30px,3vw,42px);line-height:1;color:var(--gold);overflow-wrap:normal}
.page-home .hero-kpis span{display:block;margin-top:8px;font-size:13px;line-height:1.35;color:#d4d0c7}

/* Entradas por tipo de usuario */
.home-journeys{margin-top:clamp(28px,4vw,48px)}
.home-section-heading{max-width:820px;margin-bottom:20px}
.home-section-heading h2{margin:8px 0;font-size:clamp(28px,4vw,44px)}
.home-section-heading p{margin:0;color:var(--muted);line-height:1.55}
.journey-entry-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.journey-entry-card{display:grid;grid-template-columns:52px minmax(0,1fr);gap:14px;align-items:start;min-height:190px;padding:20px;border:1px solid #393b42;border-radius:20px;background:linear-gradient(145deg,#1b1d22,#111216);color:var(--bone)}
.journey-entry-card:hover{border-color:var(--gold);color:var(--bone);transform:translateY(-2px)}
.journey-entry-card img{width:52px;height:52px;object-fit:contain}
.journey-entry-copy{display:flex;flex-direction:column;gap:8px;height:100%}
.journey-entry-copy strong{font-size:20px;line-height:1.15;color:var(--bone)}
.journey-entry-copy>span{font-size:14px;line-height:1.48;color:#c6c2ba}
.journey-entry-copy b{margin-top:auto;color:var(--gold);font-size:13px}

/* Ciclo de valor */
.page-home .cycle-strip.panel{padding:18px 20px;overflow:hidden}
.page-home .cycle-grid{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;margin-top:14px}
.page-home .cycle-grid span{display:flex;align-items:center;justify-content:center;min-height:42px;padding:8px;border-radius:12px;font-size:12px;line-height:1.2;white-space:normal}

/* Tarjetas del ecosistema */
.page-home .roles-panel{overflow:hidden}
.page-home .home-panel-head{display:block}
.page-home .home-panel-head>div{max-width:900px}
.page-home .home-panel-head h2{font-size:clamp(28px,4vw,44px);line-height:1.1}
.page-home .ecosystem-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:24px}
.page-home .ecosystem-card{position:relative;min-height:350px;overflow:hidden;background-size:cover;background-position:center;border-radius:22px}
.page-home .ecosystem-card>div{position:relative;min-height:350px;padding:24px;display:flex;flex-direction:column;justify-content:flex-end;background:linear-gradient(180deg,rgba(5,5,7,.16) 0%,rgba(5,5,7,.78) 42%,rgba(5,5,7,.98) 76%)}
.page-home .ecosystem-card img{width:52px;height:52px;object-fit:contain;margin-bottom:12px}
.page-home .ecosystem-card h3{margin:6px 0 8px;font-size:clamp(24px,2.3vw,30px);line-height:1.08}
.page-home .ecosystem-card p{min-height:unset;margin:0 0 20px;line-height:1.48;color:#e0ddd6}
.page-home .ecosystem-card .btn{align-self:flex-start;margin-top:auto}
.page-home .ecosystem-card.locked{opacity:.78;filter:saturate(.55)}

.page-home .showcase-panel{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);gap:clamp(24px,4vw,48px);align-items:center}
.page-home .showcase-media img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:20px}
.page-home .showcase-copy h2{font-size:clamp(28px,4vw,44px);line-height:1.12}
.page-home .bullet-list{margin:18px 0;padding-left:20px}
.page-home .bullet-list li{margin:10px 0;line-height:1.5}

/* Saneamiento global */
.panel,.auth,.module-hero,.care-card,.crud-entity-card,.program-card,.ecosystem-card{max-width:100%}
.grid,.cards,.stats,.admin-actions,.product-grid,.badge-grid,.challenge-grid,.care-grid,.care-summary,.crud-card-grid{min-width:0}
.grid>*,.cards>*,.stats>*,.admin-actions>*,.product-grid>*,.badge-grid>*,.challenge-grid>*,.care-grid>*,.care-summary>*,.crud-card-grid>*{min-width:0}
input,select,textarea,button,.btn{max-width:100%}
pre,code{max-width:100%;overflow-wrap:anywhere}
.table,.responsive-table-wrap,.care-table-wrap{max-width:100%}
:focus-visible{outline:3px solid rgba(212,166,55,.72);outline-offset:3px}

@media(max-width:1180px){
  .page-home .hub-overlay{grid-template-columns:1fr;min-height:unset;padding-block:clamp(42px,7vw,72px)}
  .page-home .hero-copy.wide{max-width:900px}
  .page-home .home-hero-title{max-width:900px;font-size:clamp(44px,7vw,72px)}
  .page-home .hero-kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
  .page-home .hero-kpis article{min-height:112px}
  .journey-entry-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-home .ecosystem-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-home .cycle-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}

@media(max-width:820px){
  .page-home .hub-hero.wow-hub{background-position:62% center}
  .page-home .hub-overlay{padding:36px 24px;background:linear-gradient(180deg,rgba(4,4,6,.93),rgba(4,4,6,.82))}
  .page-home .home-hero-title{font-size:clamp(39px,9.5vw,60px)}
  .page-home .hero-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-home .ecosystem-card-grid{grid-template-columns:1fr}
  .page-home .ecosystem-card,.page-home .ecosystem-card>div{min-height:310px}
  .page-home .showcase-panel{grid-template-columns:1fr}
}

@media(max-width:600px){
  .page-home .hub-overlay{padding:30px 18px}
  .page-home .home-hero-title{font-size:clamp(34px,11.5vw,49px);line-height:1.02}
  .page-home .hero-actions{display:grid;grid-template-columns:1fr}
  .page-home .hero-actions .btn{width:100%}
  .journey-entry-grid{grid-template-columns:1fr}
  .journey-entry-card{min-height:unset}
  .page-home .cycle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .page-home .ecosystem-card,.page-home .ecosystem-card>div{min-height:290px}
  .page-home .ecosystem-card>div{padding:20px}
  .page-home .ecosystem-card .btn{width:100%;text-align:center}
}

@media(max-width:390px){
  .page-home .hero-kpis{grid-template-columns:1fr}
  .journey-entry-card{grid-template-columns:44px minmax(0,1fr);padding:17px}
  .journey-entry-card img{width:44px;height:44px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
