/* ==========================================================================
   Central Gym — INDEX (Scoped: #inicio-home)
   Estructura: Tokens -> Base -> Utilidades -> Hero -> Actividades -> HI/Galería
   -> Opiniones (carrusel) -> FAQ -> Responsive -> Accesibilidad
   ========================================================================== */


/* ===== TOKENS ===== */
:root{
  --bg: #0b0b0b;
  --brand: #f07f19;
  --brand-2: #ff9433;
  --text: #f8fafc;
  --muted: #9ca3af;
  --glass: rgba(255,255,255,.05);
  --glass-2: rgba(255,255,255,.04);
  --border: rgba(255,255,255,.10);
  --radius: 18px;
  --cg-max: 1200px;
  --gap: 20px;
  --pv: 3;                 /* cards por vista (ajustado por media queries) */
  --thumb-size: 64px;      /* tamaño thumbnails (responsive más abajo) */
}

/* ===== BASE / SCOPING ===== */
#inicio-home{
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  box-sizing: border-box;
}
#inicio-home *, #inicio-home *::before, #inicio-home *::after{box-sizing:inherit}
#inicio-home img{max-width:100%;height:auto;display:block}

/* ===== UTILIDADES DE SECCIÓN ===== */
#inicio-home .cg-section{padding:48px 0;border-top:1px solid var(--border)}
#inicio-home .cg-container{max-width:var(--cg-max);margin:0 auto;padding:0 16px}
#inicio-home .section-title{font-size:30px;margin:0 0 14px;text-align:center;color:#fff}
#inicio-home .section-lead{max-width:900px;margin:0 auto 30px;text-align:center;color:#d1d5db}

/* ===== BOTONES COMUNES ===== */
#inicio-home .btn{
  display:inline-flex;align-items:center;justify-content:center;
  padding:10px 18px;border-radius:999px;font-weight:800;text-decoration:none;
  cursor:pointer;transition:all .18s ease;font-size:15px;
}
#inicio-home .btn--primary{
  background:linear-gradient(180deg,var(--brand),var(--brand-2));
  color:#0b0b0b;box-shadow:0 6px 18px rgba(240,127,25,.4)
}
#inicio-home .btn--primary:hover{filter:brightness(1.06)}
#inicio-home .btn--ghost{
  border:1px solid rgba(255,255,255,.3);color:#fff;background:transparent
}
#inicio-home .btn--ghost:hover{background:rgba(255,255,255,.08)}

/* ===== HERO ===== */

/* ===== HERO ===== */

#inicio-home .hero{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  width:100%;
  padding:30px 5%;
  min-height:65vh;
  text-align:center;
  overflow:hidden;
  background:#000; /* color base por si tarda la imagen */
}

/* capa de imagen + degradado, mismo efecto que antes */
#inicio-home .hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  background:linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.9));
}

#inicio-home .hero__bg{
  position:absolute;
  inset:0;
  z-index:0;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* imita tu antiguo background-size: auto 65vh */
#inicio-home .hero__bg img{
  height:65vh;
  width:auto;
  max-width:none;
}

/* contenido por encima */
#inicio-home .hero__content{
  max-width:780px;
  position:relative;
  z-index:2;
}


#inicio-home .hero__content{
  max-width:780px;
  position:relative;
  z-index:2;
}

#inicio-home .hero__title{
  font-weight:900;
  text-transform:uppercase;
  color:var(--brand);
  font-size:clamp(34px,5vw,58px);
  line-height:1.1;
  margin:0 0 10px;
  text-shadow:0 2px 8px rgba(0,0,0,.6);
}

#inicio-home .hero__subtitle{
  color:#fff;
  font-size:clamp(16px,2vw,22px);
  margin:0 0 20px;
  text-shadow:0 2px 8px rgba(0,0,0,.6);
}

#inicio-home .hero__lead{
  font-size:clamp(14px,1.8vw,18px);
  color:rgba(255,255,255,.95);
  margin:0 auto 20px;
  max-width:640px;
  text-shadow:0 2px 8px rgba(0,0,0,.6);
}

#inicio-home .hero__cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
  margin:0 0 10px;
}

#inicio-home .hero__kpis{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  margin:12px 0 0;
}

#inicio-home .kpi{
  background:rgba(255,255,255,.08);
  padding:8px 12px;
  border-radius:999px;
  font-weight:700;
  font-size:13px;
  backdrop-filter:blur(4px);
}


/* ===== ACTIVIDADES (grid) ===== */
#inicio-home .cg-class-grid{
  display:grid;gap:18px;margin-top:24px;
  grid-template-columns:repeat(2,1fr);
}
@media (min-width:600px){ #inicio-home .cg-class-grid{grid-template-columns:repeat(3,1fr)} }
@media (min-width:900px){ #inicio-home .cg-class-grid{grid-template-columns:repeat(4,1fr)} }
@media (min-width:1280px){ #inicio-home .cg-class-grid{grid-template-columns:repeat(5,1fr)} }

#inicio-home .cg-class-card{
  position:relative;min-height:240px;display:flex;flex-direction:column;justify-content:center;align-items:center;
  text-align:center;padding:22px;border-radius:var(--radius);overflow:hidden;

  background:linear-gradient(145deg, rgba(255,255,255,0.07), rgba(255,255,255,0.02)),
             radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 40%),
             rgba(20,20,20,0.55);

  border:1px solid rgba(255,255,255,0.14);
  box-shadow:0 8px 28px rgba(0,0,0,.35);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#inicio-home .cg-class-card > *{position:relative}
#inicio-home .cg-class-card:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 38px rgba(0,0,0,.45);
  border-color:rgba(255,255,255,0.35);
}
#inicio-home .cg-class-card h3{
  color:var(--brand);margin:6px 0 8px;font-size:20px;
  text-shadow:0 1px 10px rgba(0,0,0,.5)
}
#inicio-home .cg-class-card p{
  color:var(--text);font-size:14px;margin:0;opacity:.98;text-shadow:0 1px 8px rgba(0,0,0,.45)
}
#inicio-home .cg-link{color:var(--brand);text-decoration:none}

#inicio-home .cg-class-card.has-bg{
  background-size:cover;background-position:center;background-repeat:no-repeat;
  background-blend-mode:overlay;
  border-color:rgba(255,255,255,.12)
}

#inicio-home .cg-class-card.has-bg::before{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,
     rgba(0,0,0,.35),
     rgba(0,0,0,.75)
  );
  backdrop-filter:blur(2.5px) saturate(140%);
}


/* ===== HORARIOS E INSTALACIONES / GALERÍA ===== */
#inicio-home .cg-horarios-instalaciones{background:var(--bg);color:#fff;padding:56px 16px}
#inicio-home .cg-inner{max-width:1100px;margin:0 auto}
#inicio-home .cg-hi-header{text-align:center;margin:0 0 18px}
#inicio-home .cg-hi-header h2{font-size:1.85rem;margin:0 0 6px}
#inicio-home .cg-hi-lead{color:#bdbdbd;margin:0 0 12px}

/* Grid internals */
#inicio-home .cg-hi-grid{display:grid;grid-template-columns:1fr;gap:18px;align-items:start}
#inicio-home .cg-card{background:rgba(255,255,255,.02);padding:16px;border-radius:10px;border:1px solid rgba(255,255,255,.03);box-shadow:0 8px 20px rgba(0,0,0,.55)}
#inicio-home .cg-card h3{margin:0 0 10px;font-size:1.05rem}
#inicio-home .cg-open{display:block;color:#ffffff;margin-bottom:6px;font-weight:600}
#inicio-home .cg-small{color:#bdbdbd;font-size:.95rem;margin:10px 0}

/* Galería */
#inicio-home .cg-gallery{margin:10px 0}
#inicio-home .cg-gallery-main{position:relative;border-radius:10px;overflow:hidden;background:#0f0f0f}
#inicio-home .cg-gallery-main img{width:100%;height:360px;object-fit:cover;display:block;transition:transform .35s ease}
#inicio-home .cg-gallery-main:hover img{transform:scale(1.03)}
#inicio-home .cg-overlay{position:absolute;left:0;right:0;bottom:0;padding:14px;background:linear-gradient(0deg,rgba(11,11,11,.85),rgba(11,11,11,.2))}
#inicio-home .cg-overlay-text{max-width:70%}
#inicio-home .cg-overlay-text strong{color:var(--brand);display:block;font-size:1.05rem}
#inicio-home .cg-overlay-text span{color:#ffffff;opacity:.95}

/* Thumbs */
#inicio-home .cg-gallery-thumbs{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
#inicio-home .cg-thumb{
  background:transparent;border:0;padding:0;width:var(--thumb-size);height:var(--thumb-size);
  border-radius:8px;overflow:hidden;cursor:pointer;box-shadow:0 4px 10px rgba(0,0,0,.6);display:inline-flex
}
#inicio-home .cg-thumb img{width:100%;height:100%;object-fit:cover;display:block}
#inicio-home .cg-thumb[aria-selected="true"]{outline:2px solid var(--brand);transform:scale(1.02)}
#inicio-home .cg-mini-list{margin-top:10px;color:#bdbdbd;font-size:.95rem}

/* ===== OPINIONES (CARRUSEL) ===== */
/* Wrapper */
#inicio-home .cg-opiniones{background:var(--bg);color:#fff;padding:48px 16px}
#inicio-home .cg-opiniones .cg-container{max-width:var(--cg-max);margin:0 auto;padding:0 16px}

/* Header */
#inicio-home .cg-header h2{font-size:2rem;margin:0 0 6px;color:#fff}
#inicio-home .cg-header .cg-sub{margin:0 0 18px;color:#d1d5db;font-size:1.05rem}

/* Layout del carrusel (grid para posicionar controles) */
#inicio-home .cg-carousel{
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  grid-template-rows:auto 56px;
  align-items:center;
  gap:0;
}

/* Viewport y slides (implementación flex para fila scrollable) */
#inicio-home .cg-viewport{overflow:hidden;width:100%;grid-column:1/4;grid-row:1;padding:0}
#inicio-home .cg-slides{
  display:flex;gap:var(--gap);
  padding-inline:calc(var(--gap)/4);
  transition:transform .45s cubic-bezier(.2,.9,.2,1);
  list-style:none;margin:0;will-change:transform;transform:translateZ(0);align-items:stretch;
}

/* Slides y tarjetas (flexible para igualar alturas) */
#inicio-home .cg-slide{
  flex:0 0 calc((100% - ((var(--pv) - 1) * var(--gap))) / var(--pv));
  padding-inline:calc(var(--gap)/4);box-sizing:border-box;min-width:0;display:flex;align-items:stretch;
}
#inicio-home .cg-review{
  background:rgba(255,255,255,.02);
  box-shadow:inset 0 0 0 1px rgba(240,127,25,.22), 0 6px 18px rgba(0,0,0,.45);
  padding:20px;border-radius:10px;height:100%;display:flex;flex-direction:column;gap:8px;flex:1;
}

/* Meta */
#inicio-home .cg-review-header{display:flex;gap:12px;align-items:center;margin-bottom:10px}
#inicio-home .cg-meta{display:block;font-size:.85rem;color:#bdbdbd}
#inicio-home .cg-rating{margin-left:auto;color:var(--brand);font-weight:700}
#inicio-home .cg-review p{margin:0;color:#e6e6e6;line-height:1.5;font-size:1rem}

/* Controles */
#inicio-home .cg-btn{
  background:transparent;border:2px solid rgba(255,255,255,.06);color:#fff;
  width:44px;height:44px;border-radius:8px;cursor:pointer;display:inline-grid;place-items:center;position:static
}
#inicio-home .cg-prev{grid-column:1;grid-row:2;justify-self:end}
#inicio-home .cg-next{grid-column:3;grid-row:2;justify-self:start}
#inicio-home .cg-btn:hover{background:rgba(240,127,25,.08)}

/* Dots */
#inicio-home .cg-dots{display:flex;gap:8px;justify-content:center;margin-top:12px;grid-column:1/4;grid-row:2}
#inicio-home .cg-dot{
  width:10px;height:10px;border-radius:50%;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.04);cursor:pointer
}
#inicio-home .cg-dot[aria-current="true"]{
  background:var(--brand);box-shadow:0 0 8px rgba(240,127,25,.22)
}

/* ===== FAQ ===== */
#inicio-home .cg-faq .card{
  background:var(--glass);border:1px solid var(--border);border-radius:var(--radius);
  overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,.3);backdrop-filter:blur(6px)
}
#inicio-home .cg-faq-header{padding:18px 20px;border-bottom:1px solid var(--border);text-align:center;background:var(--glass-2)}
#inicio-home .cg-faq-header h2{margin:0;font-size:clamp(18px,2.4vw,26px);text-transform:uppercase;color:var(--brand)}
#inicio-home .cg-faq-body{padding:20px}
#inicio-home details.ac{
  border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(255,255,255,.05);overflow:hidden;transition:.25s
}
#inicio-home details.ac + details.ac{margin-top:10px}
#inicio-home details.ac[open]{border-color:var(--brand);background:rgba(240,127,25,.08)}
#inicio-home details.ac>summary{
  list-style:none;padding:14px 18px;cursor:pointer;font-weight:700;display:flex;align-items:center;gap:10px;color:var(--text)
}
#inicio-home details.ac>summary::-webkit-details-marker{display:none}
#inicio-home details.ac>summary:after{
  content:"";margin-left:auto;width:10px;height:10px;border-right:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg);transition:.25s
}
#inicio-home details.ac[open]>summary:after{transform:rotate(45deg)}
#inicio-home .ac-content{padding:0 16px 16px;color:var(--muted)}

/* ===== ACCESIBILIDAD / MOTION PREF ===== */
@media (prefers-reduced-motion: reduce){
  #inicio-home .cg-slides,
  #inicio-home .cg-gallery-main img,
  #inicio-home .btn{transition:none}
}

/* ===== RESPONSIVE (ajustes de variables y layout consolidados) ===== */
/* mobile-first: pequeños ajustes */
@media (max-width:420px){
  :root{ --thumb-size:56px }
  #inicio-home .cg-hi-header h2{font-size:1.4rem}
  #inicio-home .hero{padding:24px 5%;min-height:55vh}
  #inicio-home .hero__lead{max-width:100%}
}

/* small -> medium */
@media (max-width:599px){
  :root{ --pv: 1 }
  #inicio-home .cg-carousel{grid-template-rows:auto 48px}
}

/* tablet */
@media (min-width:600px) and (max-width:999px){
  :root{ --pv: 2 }
  /* boton spacing etc. maintained */
}

/* desktop medium */
@media (min-width:1000px) and (max-width:1399px){
  :root{ --pv: 3; --gap: 18px }
  #inicio-home .cg-slides, #inicio-home .cg-slide { padding-inline:calc(var(--gap)/4) }
}

/* large desktop */
@media (min-width:1400px){
  :root{ --pv: 4 }
}

/* layout específico ancho >= 880 */
@media (min-width:880px){
  #inicio-home .cg-hi-grid{grid-template-columns:320px 1fr;gap:22px}
  #inicio-home .cg-card-horarios{position:sticky;top:84px;height:max-content}
  #inicio-home .cg-gallery-main img{height:420px}
  :root{ --thumb-size:72px }
}