/* ==========================================================================
   Agenduy — Landing
   Sistema de temas: claro por defecto (:root) + oscuro ([data-theme="dark"])
   ========================================================================== */

/* ---------- Tokens de tema ---------- */
:root{
  /* Marca */
  --primary: #6d28d9;
  --primary-strong: #5b21b6;
  --primary-soft: rgba(109, 40, 217, .09);
  --primary-contrast: #ffffff;
  --brand-gradient: linear-gradient(120deg, #7c3aed, #6366f1);

  /* Superficies y texto */
  --bg: #f7f7fc;
  --bg-hero: radial-gradient(1100px 500px at 50% -10%, rgba(124, 58, 237, .10), transparent 65%), var(--bg);
  --surface: #ffffff;
  --surface-2: #f2f2f9;
  --surface-3: #e9e9f4;
  --border: #e4e4f0;
  --border-strong: #d3d3e4;
  --text: #211d3a;
  --text-muted: #5f5b7d;
  --text-soft: #8a86a8;

  /* Estado / feedback */
  --success: #0e9f6e;
  --success-soft: rgba(14, 159, 110, .12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, .12);
  --info-soft: rgba(99, 102, 241, .12);

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(33, 29, 58, .05), 0 2px 8px rgba(33, 29, 58, .05);
  --shadow-md: 0 6px 18px rgba(33, 29, 58, .08);
  --shadow-lg: 0 18px 48px rgba(33, 29, 58, .14);

  /* Modales */
  --overlay: rgba(24, 21, 45, .45);
  --modal-surface: var(--surface);
  --modal-border: var(--border);

  /* Radios */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;

  /* Controles */
  --input-bg: #fbfbfe;
  --input-border: var(--border-strong);
  --focus-ring: 0 0 0 3px rgba(109, 40, 217, .22);

  color-scheme: light;
}

[data-theme="dark"]{
  --primary: #8b5cf6;
  --primary-strong: #7c3aed;
  --primary-soft: rgba(139, 92, 246, .16);
  --primary-contrast: #ffffff;
  --brand-gradient: linear-gradient(120deg, #7c3aed, #4f46e5);

  --bg: #0f1022;
  --bg-hero: radial-gradient(1100px 520px at 50% -10%, rgba(124, 58, 237, .22), transparent 65%), var(--bg);
  --surface: #191b31;
  --surface-2: #20223c;
  --surface-3: #282a47;
  --border: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .16);
  --text: #edeafc;
  --text-muted: #aca9c9;
  --text-soft: #817da3;

  --success: #34d399;
  --success-soft: rgba(52, 211, 153, .14);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, .14);
  --info-soft: rgba(129, 140, 248, .16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-md: 0 8px 22px rgba(0, 0, 0, .35);
  --shadow-lg: 0 22px 55px rgba(0, 0, 0, .5);

  --overlay: rgba(5, 4, 16, .65);
  --modal-surface: var(--surface);
  --modal-border: var(--border);

  --input-bg: #14152a;
  --input-border: rgba(255, 255, 255, .16);
  --focus-ring: 0 0 0 3px rgba(139, 92, 246, .35);

  color-scheme: dark;
}

/* ---------- Base ---------- */
*{ margin:0; padding:0; box-sizing:border-box; font-family:'Poppins', sans-serif; }

html{ scroll-behavior:smooth; }

body{
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  background: var(--bg-hero);
  background-attachment: fixed;
  color: var(--text);
  overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  transition: background-color .3s ease, color .3s ease;
}

img{ max-width:100%; }

button{ font: inherit; color: inherit; }

:focus-visible{
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.modal-open{ overflow:hidden; }

/* Animación discreta de entrada */
@keyframes fade-up{
  from{ opacity:0; transform: translateY(14px); }
  to{ opacity:1; transform: translateY(0); }
}

.hero, .rubros-section, .trust-banner-section, .explore-section, .final-cta{
  animation: fade-up .6s ease both;
}
.rubros-section{ animation-delay:.08s; }
.trust-banner-section{ animation-delay:.14s; }
.explore-section{ animation-delay:.2s; }
.final-cta{ animation-delay:.26s; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior:auto; }
  *, *::before, *::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
}

/* ---------- Header ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom:1px solid var(--border);
}
.site-header__inner{
  width:min(1140px, 92vw);
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
}
.site-header__brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color: var(--text);
}
.brand-logo{
  display:block;
  width:38px;
  height:38px;
  object-fit:contain;
}
.brand-title{
  font-size:1.15rem;
  font-weight:700;
  letter-spacing:.02em;
}

/* Toggle de tema */
.theme-toggle{
  position:relative;
  width:42px;
  height:42px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--surface-2);
  cursor:pointer;
  display:grid;
  place-items:center;
  transition: background .25s ease, border-color .25s ease, transform .2s ease;
}
.theme-toggle:hover{ transform: translateY(-1px); border-color: var(--border-strong); }
.theme-toggle__icon{
  grid-area:1 / 1;
  font-size:1.3rem;
  color: var(--text-muted);
  transition: opacity .25s ease, transform .35s ease;
}
/* claro: se muestra la luna (acción: pasar a oscuro) */
.theme-toggle__icon--sun{ opacity:0; transform: rotate(-90deg) scale(.5); }
.theme-toggle__icon--moon{ opacity:1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle__icon--sun{ opacity:1; transform: rotate(0) scale(1); color:#fbbf24; }
[data-theme="dark"] .theme-toggle__icon--moon{ opacity:0; transform: rotate(90deg) scale(.5); }

/* ---------- Layout general ---------- */
.landing{
  flex:1;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: clamp(56px, 9vh, 110px);
  padding: clamp(40px, 7vh, 84px) 16px clamp(56px, 9vh, 110px);
}

.section-heading{
  text-align:center;
  display:grid;
  gap:8px;
  margin-bottom: clamp(24px, 4vh, 40px);
}
.section-heading__eyebrow{
  font-size:.8rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.16em;
  color: var(--primary);
}
.section-heading__title{
  font-size: clamp(1.4rem, 1.2vw + 1.1rem, 2rem);
  font-weight:700;
  color: var(--text);
}
.section-heading__text{
  color: var(--text-muted);
  font-size:.98rem;
}

/* ---------- Hero ---------- */
.hero{
  width:min(820px, 94vw);
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: clamp(16px, 2.6vh, 24px);
}
.hero__badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 18px;
  border-radius:999px;
  background: var(--primary-soft);
  border:1px solid color-mix(in srgb, var(--primary) 28%, transparent);
  color: var(--primary);
  font-size:.85rem;
  font-weight:600;
}
.hero__badge i{ font-size:1.05rem; }
.hero__title{
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight:700;
  line-height:1.14;
  letter-spacing:-.01em;
  color: var(--text);
}
.hero__title-accent{
  background: var(--brand-gradient);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.hero__subtitle{
  max-width:58ch;
  color: var(--text-muted);
  font-size: clamp(.98rem, .5vw + .85rem, 1.12rem);
  line-height:1.7;
}
.hero__actions{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-top:6px;
}
.hero__secondary{
  color: var(--text-muted);
  text-decoration:none;
  font-weight:600;
  font-size:.95rem;
  padding:12px 18px;
  border-radius:999px;
  transition: color .2s ease, background .2s ease;
}
.hero__secondary:hover{
  color: var(--primary);
  background: var(--primary-soft);
}

/* Botón principal. `.plan-btn` lo usa el JS de registro; `.btn-primary` es solo visual */
.btn-primary,
.plan-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  cursor:pointer;
  border-radius:999px;
  padding:12px 26px;
  font-weight:600;
  font-size:.95rem;
  color: var(--primary-contrast);
  background: var(--brand-gradient);
  box-shadow: 0 8px 22px rgba(109, 40, 217, .28);
  text-decoration:none;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-primary:hover,
.plan-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(109, 40, 217, .36);
  filter: brightness(1.04);
}
.btn-primary:active,
.plan-btn:active{ transform: translateY(0); }
.btn-primary i,
.plan-btn i{ font-size:1.2rem; }

.hero__cta{
  padding:14px 32px;
  font-size:1.02rem;
}

/* ---------- Carrusel de rubros ---------- */
.rubros-section{
  width:min(1140px, 96vw);
  scroll-margin-top:90px;
}
.hero-carousel{
  position:relative;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:10px;
}
.hc-viewport{
  overflow:hidden;
  padding:10px 4px 18px;
}
.hc-track{
  display:flex;
  gap:20px;
  will-change:transform;
}
.hero-carousel.is-single-page .hc-track{ justify-content:center; }

.hc-card{
  flex:0 0 calc((100% - (20px * (var(--perView,1) - 1))) / var(--perView,1));
}
.hc-card figure{
  width:clamp(230px, 24vw, 300px);
  margin:0 auto;
  padding: clamp(20px, 2vw, 28px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-md);
  display:grid;
  justify-items:center;
  gap:12px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.hc-card figure:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.hc-card img{
  width:96px;
  height:96px;
  object-fit:cover;
  border-radius:50%;
  border:3px solid var(--surface-3);
  box-shadow: var(--shadow-sm);
}
.hc-card figcaption{
  font-weight:600;
  font-size:1.05rem;
  color: var(--text);
}
.hc-highlight{
  padding:4px 14px;
  border-radius:999px;
  font-size:.8rem;
  font-weight:600;
  color: var(--primary);
  background: var(--primary-soft);
}
.hc-perks{
  display:grid;
  gap:8px;
  justify-items:start;
  margin:4px 0 6px;
}
.hc-perk{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.88rem;
  color: var(--text-muted);
}
.hc-perk i{
  font-size:1rem;
  color: var(--success);
  flex:0 0 auto;
}

/* Flechas */
.hc-btn{
  --size:44px;
  width:var(--size);
  height:var(--size);
  border-radius:50%;
  border:1px solid var(--border);
  cursor:pointer;
  display:grid;
  place-items:center;
  color: var(--text-muted);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size:1.5rem;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.hc-btn:hover{
  transform: translateY(-1px);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}
.hc-btn:active{ transform: scale(.96); }

/* Dots */
.hc-dots{
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:4px;
  grid-column:1 / -1;
}
.hc-dots .dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background: var(--border-strong);
  border:0;
  cursor:pointer;
  transition: transform .2s ease, background .2s ease;
}
.hc-dots .dot.active{
  background: var(--primary);
  transform: scale(1.3);
}

/* ---------- Banner de confianza ---------- */
.trust-banner-section{
  width:min(1140px, 96vw);
}
.trust-banner{
  padding: clamp(24px, 3vw, 36px) clamp(22px, 4vw, 44px);
  border-radius: var(--radius-xl);
  background: var(--brand-gradient);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: clamp(1rem, 2vw, 1.6rem);
  flex-wrap:wrap;
  box-shadow: 0 20px 45px rgba(93, 51, 190, .3);
}
.trust-banner__text{ flex:1 1 260px; }
.trust-banner__eyebrow{
  margin:0 0 .4rem;
  text-transform:uppercase;
  letter-spacing:.15em;
  font-size:.76rem;
  font-weight:600;
  color: rgba(255,255,255,.82);
}
.trust-banner__text h3{
  margin:0;
  font-size: clamp(1.15rem, 1vw + 1rem, 1.7rem);
  font-weight:700;
  line-height:1.35;
}
.trust-banner__avatars{
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
}
.trust-banner__avatar{
  width:52px;
  height:52px;
  border-radius:999px;
  border:3px solid rgba(255,255,255,.8);
  overflow:hidden;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.18);
  font-weight:600;
  font-size:.9rem;
  color:#fff;
  margin-left:-12px;
  box-shadow: 0 8px 18px rgba(0,0,0,.18);
}
.trust-banner__avatar:first-child{ margin-left:0; }
.trust-banner__avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.trust-banner__count{
  width:52px;
  height:52px;
  border-radius:999px;
  background: rgba(255,255,255,.22);
  border:3px solid rgba(255,255,255,.8);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:1.3rem;
  color:#fff;
  margin-left:-12px;
}

/* ---------- Categorías / Explorar ---------- */
.explore-section{
  width:min(1140px, 96vw);
}
.container{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}
.category{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  text-align:left;
  cursor:pointer;
  padding: clamp(18px, 2vw, 26px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.category:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}
.category__icon{
  width:46px;
  height:46px;
  border-radius: var(--radius-sm);
  display:grid;
  place-items:center;
  background: var(--primary-soft);
  margin-bottom:6px;
}
.category__icon i{
  font-size:1.5rem;
  color: var(--primary);
}
.category p{
  font-size:1rem;
  font-weight:600;
  color: var(--text);
}
.category__hint{
  font-size:.85rem;
  color: var(--text-muted);
  line-height:1.5;
}

/* ---------- CTA final ---------- */
.final-cta{
  width:min(760px, 94vw);
  text-align:center;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  padding: clamp(32px, 5vw, 52px);
  border-radius: var(--radius-xl);
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.final-cta__title{
  font-size: clamp(1.35rem, 1.4vw + 1rem, 1.9rem);
  font-weight:700;
}
.final-cta__text{
  color: var(--text-muted);
  font-size:.98rem;
}
.final-cta__btn{
  margin-top:8px;
  padding:14px 32px;
  font-size:1rem;
}

/* ---------- Footer ---------- */
.site-footer{
  border-top:1px solid var(--border);
  background: var(--surface);
}
.site-footer__inner{
  width:min(1140px, 92vw);
  margin:0 auto;
  padding:28px 0;
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
}
.site-footer__brand{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
  color: var(--text);
}
.site-footer__brand img{ width:26px; height:26px; object-fit:contain; }
.site-footer__tagline{
  color: var(--text-muted);
  font-size:.88rem;
  flex:1 1 auto;
}
.site-footer__social{
  display:flex;
  gap:8px;
}
.site-footer__social a{
  width:40px;
  height:40px;
  border-radius:999px;
  display:grid;
  place-items:center;
  color: var(--text-muted);
  background: var(--surface-2);
  border:1px solid var(--border);
  font-size:1.25rem;
  text-decoration:none;
  transition: color .2s ease, transform .2s ease, border-color .2s ease;
}
.site-footer__social a:hover{
  color: var(--primary);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}
.site-footer__admin{
  color: var(--text-soft);
  font-size:.8rem;
  text-decoration:none;
}
.site-footer__admin:hover{ color: var(--text-muted); }

/* ---------- Responsive del landing ---------- */
@media (min-width:600px){ .hero-carousel{ --perView:2; } }
@media (min-width:900px){ .hero-carousel{ --perView:3; } }

@media (max-width:900px){
  .container{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width:560px){
  .container{ grid-template-columns:1fr; }
  .hero__actions{ flex-direction:column; width:100%; }
  .hero__cta{ width:100%; }
  .hero__secondary{ width:100%; text-align:center; }
  .trust-banner{
    flex-direction:column;
    text-align:center;
  }
  .trust-banner__avatars{ justify-content:center; }
  .site-footer__inner{
    flex-direction:column;
    text-align:center;
  }
}
@media (max-width:420px){
  .hc-viewport{ padding:8px 2px 14px; }
  .hc-track{ gap:14px; }
  .hc-card figure{ width:clamp(190px, 76vw, 240px); }
  .hc-btn{ --size:38px; font-size:1.25rem; }
}

/* ==========================================================================
   Modales
   ========================================================================== */
.u-modal{ position:fixed; inset:0; z-index:999; display:grid; place-items:center; padding:16px; }
.u-modal.hidden{ display:none; }
.u-modal__overlay{
  position:absolute;
  inset:0;
  background: var(--overlay);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.u-modal__dialog{
  position:relative;
  width:min(1100px, 96vw);
  max-height:90vh;
}
.u-modal__content{
  position:relative;
  background: var(--modal-surface);
  border:1px solid var(--modal-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow:hidden;
  padding: clamp(22px, 3vw, 36px);
  color: var(--text);
  animation: fade-up .35s ease both;
}

/* Botón de cierre genérico reutilizado por los modales */
.courses-modal__close,
.benefits-modal__close,
.about-modal__close,
.search-modal__close,
.cat-close,
.plan-close{
  appearance:none;
  border:1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  border-radius:999px;
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  font-size:1.5rem;
  line-height:1;
  cursor:pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.courses-modal__close:hover,
.benefits-modal__close:hover,
.about-modal__close:hover,
.search-modal__close:hover,
.cat-close:hover,
.plan-close:hover{
  background: var(--surface-3);
  color: var(--text);
  transform: scale(1.05);
}

/* ---------- Modal rubros (categorias.php) ---------- */
#modal-rubros .u-modal__dialog{
  width:min(1020px, 96vw);
  max-height:min(90vh, 900px);
  display:flex;
  flex-direction:column;
  min-height:0;
}
#modal-rubros .u-modal__content{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
  overflow:visible;
  flex:1 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
}
.cat-modal{
  display:grid;
  grid-template-rows:auto minmax(0, 1fr);
  max-height:min(84vh, 860px);
  width:100%;
  margin:0 auto;
  padding: clamp(20px, 3.2vw, 32px);
  border-radius: var(--radius-xl);
  background: var(--modal-surface);
  border:1px solid var(--modal-border);
  box-shadow: var(--shadow-lg);
  overflow:hidden;
  min-height:0;
}
.cat-header{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: clamp(16px, 2vw, 24px);
  flex-shrink:0;
}
.cat-header__text{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  text-align:center;
  padding-inline:48px;
}
.cat-header h3{
  margin:0;
  font-size: clamp(1.05rem, 1.15vw + .6rem, 1.3rem);
  color: var(--text);
}
.cat-subtitle{
  margin:0;
  font-size:.9rem;
  color: var(--text-muted);
}
.cat-close{
  position:absolute;
  top:50%;
  right:0;
  transform:translateY(-50%);
}
.cat-close:hover{ transform: translateY(-50%) scale(1.05); }
.cat-empty{ padding:28px 22px; color: var(--text-muted); text-align:center; }

.cat-grid{
  display:grid;
  grid-template-columns:1fr;
  grid-auto-rows:max-content;
  gap: clamp(18px, 2.2vw, 28px);
  padding:6px 8px 24px;
  overflow-y:auto;
  overflow-x:hidden;
  min-height:0;
  align-items:start;
  align-content:start;
  scroll-behavior:smooth;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color: var(--border-strong) transparent;
}
.cat-grid::-webkit-scrollbar{ width:8px; }
.cat-grid::-webkit-scrollbar-thumb{ background: var(--border-strong); border-radius:999px; }

@media (min-width:640px){
  .cat-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (min-width:960px){
  .cat-grid{ grid-template-columns:repeat(3, minmax(0, 1fr)); }
}

/* Tarjetas foto + overlay. overflow:hidden + grid suele aplastar el min-size
   a 0: forzamos max-content para que el CTA no se recorte. */
.cat-card{
  position:relative;
  border-radius: var(--radius-md);
  overflow:hidden;
  isolation:isolate;
  border:1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display:flex;
  flex-direction:column;
  height:max-content;
  min-height:min-content;
  width:100%;
}
.cat-imgfill{
  position:relative;
  width:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  min-height:280px;
  height:auto;
  border-radius:inherit;
  overflow:hidden;
}
.cat-imgfill img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  z-index:0;
}
.cat-imgfill::after{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  background: linear-gradient(to top, rgba(10, 8, 25, .9) 6%, rgba(10, 8, 25, .52) 46%, rgba(10, 8, 25, .22) 100%);
  z-index:1;
  pointer-events:none;
}
.cat-overlay{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  align-items:stretch;
  gap:10px;
  padding: 18px 18px 20px;
  color:#fff;
  z-index:2;
  width:100%;
  box-sizing:border-box;
  flex:0 0 auto;
}
.cat-overlay__text{
  text-align:left;
  width:100%;
  max-width:100%;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.cat-ttl{
  margin:0;
  font-size:1.05rem;
  font-weight:700;
  line-height:1.25;
  text-shadow:0 1px 6px rgba(0,0,0,.5);
}
.cat-desc.small{
  margin:0;
  font-size:.88rem;
  line-height:1.4;
  color: rgba(255,255,255,.88);
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3;
  overflow:hidden;
}
.cat-planline{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  width:100%;
  margin-top:6px;
  flex:0 0 auto;
  padding-bottom:2px;
}
.pill{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.14);
  font-size:.78rem;
  color:#fff;
  white-space:nowrap;
}
.cat-overlay__cta{
  display:flex;
  justify-content:flex-start;
  align-self:flex-start;
}
.btn-contratar{
  appearance:none;
  border:0;
  cursor:pointer;
  border-radius:999px;
  padding:10px 20px;
  font-weight:600;
  font-size:.86rem;
  line-height:1.3;
  background: var(--brand-gradient);
  color:#fff;
  box-shadow:0 6px 16px rgba(93, 51, 190, .4);
  max-width:100%;
  white-space:normal;
  text-align:center;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.btn-contratar:hover{
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.btn-contratar:active{ transform: translateY(0); }

@media (max-width:639px){
  .cat-modal{
    padding: clamp(16px, 4vw, 22px);
    max-height:min(88vh, 860px);
  }
  .cat-header__text{ padding-inline:40px; }
  .btn-contratar{ width:100%; }
}

/* ---------- Modal planes (planes.php) ---------- */
#modal-planes .u-modal__content{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
}
.plan-modal{
  display:grid;
  grid-template-rows:auto 1fr;
  gap: clamp(14px, 2vw, 22px);
  max-height:min(84vh, 860px);
  width:min(1020px, 96vw);
  margin:0 auto;
  padding: clamp(22px, 3.4vw, 36px);
  border-radius: var(--radius-xl);
  background: var(--modal-surface);
  border:1px solid var(--modal-border);
  box-shadow: var(--shadow-lg);
}
.plan-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.plan-header__text{
  display:grid;
  gap:4px;
}
.plan-header h3{
  margin:0;
  font-size: clamp(1.15rem, 1.4vw + .7rem, 1.45rem);
  font-weight:700;
  color: var(--text);
}
.plan-subtitle{
  margin:0;
  font-size:.92rem;
  color: var(--text-muted);
  line-height:1.4;
}
.plan-body{
  overflow-y:auto;
  padding:2px 2px 4px;
}
.plan-empty{
  margin:0;
  color: var(--text-muted);
  text-align:center;
}
.plan-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
  align-items:stretch;
}
.plan-card{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:22px 20px 20px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.plan-card:hover{
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.plan-card--featured{
  border-color: var(--primary);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--brand-gradient) border-box;
  border: 2px solid transparent;
  box-shadow: 0 10px 28px rgba(109, 40, 217, .14);
}
.plan-card--featured:hover{
  box-shadow: 0 14px 34px rgba(109, 40, 217, .2);
}
.plan-card__badge{
  position:absolute;
  top:-11px;
  left:50%;
  transform:translateX(-50%);
  padding:4px 12px;
  border-radius:999px;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color: var(--primary-contrast);
  background: var(--brand-gradient);
  white-space:nowrap;
}
.plan-card__name{
  margin:0;
  font-size:1.15rem;
  font-weight:700;
  color: var(--text);
  line-height:1.25;
}
.plan-card__price{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  gap:4px 6px;
  line-height:1;
}
.plan-card__currency{
  font-size:.85rem;
  font-weight:600;
  color: var(--text-muted);
}
.plan-card__amount{
  font-size: clamp(1.75rem, 2vw + 1rem, 2.15rem);
  font-weight:800;
  color: var(--primary);
  letter-spacing:-.02em;
}
.plan-card__period{
  font-size:.88rem;
  font-weight:500;
  color: var(--text-muted);
}
.plan-card__trial{
  margin:0;
  font-size:.82rem;
  font-weight:600;
  color: var(--success);
}
.plan-card__desc{
  margin:0;
  flex:1;
  font-size:.9rem;
  line-height:1.45;
  color: var(--text-muted);
}
.plan-billing-toggle{
  display:inline-flex;
  gap:4px;
  padding:3px;
  margin:0 0 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--surface-2);
}
.plan-billing-toggle button{
  border:0;
  background:transparent;
  padding:7px 14px;
  border-radius:999px;
  font-weight:600;
  font-size:.85rem;
  cursor:pointer;
  color: var(--text-muted);
}
.plan-billing-toggle button.is-active{
  background: var(--primary);
  color:#fff;
}
.plan-card__annual-note{
  margin:0;
  font-size:.8rem;
  font-weight:600;
  color: var(--success);
}
.plan-card__limit{
  margin:0;
  font-size:.8rem;
  color: var(--text-muted);
}
.plan-card__features{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:4px;
  font-size:.85rem;
  color: var(--text-muted);
}
.plan-card__features li::before{
  content:"✓ ";
  color: var(--success);
  font-weight:700;
}
.plan-card__cta{
  width:100%;
  margin-top:auto;
  padding:11px 18px;
  font-size:.92rem;
}
.plan-card:not(.plan-card--featured) .plan-card__cta{
  background: var(--surface-2);
  color: var(--text);
  box-shadow:none;
  border:1px solid var(--border-strong);
}
.plan-card:not(.plan-card--featured) .plan-card__cta:hover{
  background: var(--primary-soft);
  color: var(--primary);
  border-color: transparent;
  filter:none;
  box-shadow:none;
}

@media (max-width:640px){
  .plan-grid{ grid-template-columns:1fr; }
  .plan-card{ padding:18px 16px; }
}

/* ---------- Modales informativos (cursos / beneficios / about) ---------- */
#modal-cursos .u-modal__content,
#modal-beneficios .u-modal__content,
#modal-about .u-modal__content{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
}

.courses-modal,
.benefits-modal,
.about-modal{
  width:min(540px, 92vw);
  margin:0 auto;
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--radius-xl);
  background: var(--modal-surface);
  border:1px solid var(--modal-border);
  box-shadow: var(--shadow-lg);
  display:flex;
  flex-direction:column;
  gap: clamp(16px, 2vw, 24px);
  color: var(--text);
}
.courses-modal__header,
.benefits-modal__header,
.about-modal__header{
  display:grid;
  gap:6px;
  position:relative;
  padding-right:48px;
}
.courses-modal__eyebrow,
.benefits-modal__eyebrow,
.about-modal__eyebrow{
  font-size:.76rem;
  letter-spacing:.18em;
  text-transform:uppercase;
  font-weight:600;
  color: var(--primary);
}
.courses-modal__title,
.benefits-modal__title,
.about-modal__title{
  margin:0;
  font-size: clamp(1.25rem, 1.2vw + .95rem, 1.55rem);
  color: var(--text);
}
.courses-modal__close,
.benefits-modal__close,
.about-modal__close{
  position:absolute;
  top:0;
  right:0;
}
.courses-modal__body,
.benefits-modal__body,
.about-modal__body{
  color: var(--text-muted);
  font-size:1rem;
  line-height:1.7;
}
.courses-modal__footer,
.benefits-modal__footer{
  display:flex;
  justify-content:flex-end;
}
.courses-modal__dismiss,
.benefits-modal__cta{
  border:0;
  border-radius:999px;
  padding:11px 24px;
  font-weight:600;
  font-size:.93rem;
  background: var(--brand-gradient);
  color: var(--primary-contrast);
  cursor:pointer;
  box-shadow:0 8px 20px rgba(109, 40, 217, .25);
  transition: transform .2s ease, filter .2s ease;
}
.courses-modal__dismiss:hover,
.benefits-modal__cta:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.about-modal__intro{
  margin-top:12px;
  font-weight:600;
  color: var(--text);
}
.about-modal__list{
  margin:10px 0 0;
  padding-left:20px;
  display:grid;
  gap:6px;
  color: var(--text-muted);
}
.about-modal__list li::marker{ color: var(--primary); }

/* ---------- Modal buscar servicios ---------- */
#modal-buscar .u-modal__content{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:0;
}
.search-modal{
  width:min(960px, 95vw);
  margin:0 auto;
  padding: clamp(22px, 4vw, 38px);
  border-radius: var(--radius-xl);
  background: var(--modal-surface);
  border:1px solid var(--modal-border);
  box-shadow: var(--shadow-lg);
  display:flex;
  flex-direction:column;
  gap: clamp(16px, 2vw, 24px);
  max-height:88vh;
  color: var(--text);
}
.search-modal__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.search-modal__eyebrow{
  text-transform:uppercase;
  letter-spacing:.2em;
  font-size:.74rem;
  font-weight:600;
  color: var(--primary);
  margin-bottom:6px;
}
.search-modal__header h3{
  margin:0;
  font-size: clamp(1.2rem, 1.2vw + .9rem, 1.55rem);
  color: var(--text);
}
.search-modal__hint{
  margin:.35rem 0 0;
  color: var(--text-muted);
  font-size:.92rem;
}
.search-modal__filter{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 16px;
  border-radius:999px;
  border:1px solid var(--input-border);
  background: var(--input-bg);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.search-modal__filter:focus-within{
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
.search-modal__filter i{
  font-size:1.2rem;
  color: var(--text-soft);
}
.search-modal__input{
  flex:1;
  border:0;
  background:transparent;
  color: var(--text);
  font-size:1rem;
}
.search-modal__input:focus{ outline:none; }
.search-modal__input::placeholder{ color: var(--text-soft); }
.search-modal__empty{
  padding:32px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border:1px solid var(--border);
  text-align:center;
  color: var(--text-muted);
}
.search-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(14px, 2vw, 20px);
  overflow-y:auto;
  padding:4px;
  scrollbar-width:thin;
  scrollbar-color: var(--border-strong) transparent;
}
.search-card{
  border-radius: var(--radius-lg);
  border:1px solid var(--border);
  background: var(--surface-2);
  padding:20px 16px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.search-card[hidden]{ display:none; }
.search-card:hover{
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  box-shadow: var(--shadow-md);
}
.search-card__link{
  text-decoration:none;
  color:inherit;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:14px;
}
.search-card__avatar{
  width:84px;
  height:84px;
  border-radius:50%;
  background: var(--brand-gradient);
  display:grid;
  place-items:center;
  overflow:hidden;
  position:relative;
  font-weight:700;
  font-size:1.3rem;
  color:#fff;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.search-card__avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.search-card__avatar.has-logo .search-card__initials{ opacity:0; }
.search-card__initials{ transition: opacity .2s ease; }
.search-card__meta{ text-align:center; }
.search-card__meta h4{
  margin:0 0 6px;
  font-size:1rem;
  color: var(--text);
}
.search-card__meta p{
  margin:0;
  font-size:.86rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modal de registro
   ========================================================================== */
#modal-registro .u-modal__dialog{
  width:min(720px, 94vw);
  max-height:calc(100vh - clamp(32px, 6vh, 80px));
  display:flex;
  flex-direction:column;
}
#modal-registro .u-modal__content{
  background: var(--modal-surface);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 28px);
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap: clamp(18px, 2vw, 26px);
  max-height:100%;
  flex:1 1 auto;
}
#modal-registro .reg-modal{ position:relative; }

.reg-progress{
  position:absolute;
  inset: clamp(10px, 1.5vw, 20px);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border:1px solid var(--border);
  border-radius: var(--radius-lg);
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:1.5rem;
  padding: clamp(24px, 3vw, 40px);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-lg);
  z-index:12;
}
.reg-progress.hidden{ display:none; }
.reg-progress__card{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
  max-width:28rem;
}
.reg-progress__bar{
  width:min(320px, 60vw);
  height:10px;
  border-radius:999px;
  background: var(--surface-3);
  overflow:hidden;
  position:relative;
}
.reg-progress__bar-fill{
  position:absolute;
  inset:0;
  background: var(--brand-gradient);
  transform:translateX(-100%);
  animation: reg-progress-bar 1.5s ease-in-out infinite;
  animation-play-state:paused;
}
.reg-progress__bar-fill.is-animating{ animation-play-state:running; }
.reg-progress__message{
  font-size: clamp(1rem, .9rem + .4vw, 1.1rem);
  font-weight:600;
  color: var(--text);
  line-height:1.4;
}
.reg-modal--loading .reg-close,
.reg-modal--loading [data-step-prev],
.reg-modal--loading [data-step-next],
.reg-modal--loading [data-reg-submit]{
  pointer-events:none;
  opacity:.5;
}
@keyframes reg-progress-bar{
  0%{ transform:translateX(-100%); }
  50%{ transform:translateX(-10%); }
  100%{ transform:translateX(100%); }
}

.reg-modal__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.reg-modal__header h3{
  margin-top:8px;
  font-size: clamp(1.08rem, 1.2vw + .8rem, 1.45rem);
  color: var(--text);
  line-height:1.35;
}
.reg-modal__header .reg-subtitle{
  margin-top:6px;
  font-size:.92rem;
  color: var(--text-muted);
}
.reg-plan{
  margin-top:6px;
  font-size:.85rem;
  font-weight:600;
  color: var(--success);
}
.reg-plan-note{
  margin-top:4px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:.82rem;
  color: var(--text-muted);
  font-weight:500;
}
.reg-plan-note .bx{
  font-size:1rem;
  color: var(--primary);
}
.reg-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 14px;
  border-radius:999px;
  background: var(--success-soft);
  color: var(--success);
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-size:.72rem;
}
.reg-close{
  background: transparent;
  border:0;
  color: var(--text-muted);
  font-size:1.6rem;
  line-height:1;
  cursor:pointer;
  transition: transform .15s ease, color .15s ease;
}
.reg-close:hover{
  color: var(--danger);
  transform: scale(1.05);
}

/* Stepper */
.reg-stepper{
  list-style:none;
  display:flex;
  justify-content:space-between;
  margin:0;
  padding:0;
  gap: clamp(8px, 1vw, 16px);
  position:relative;
}
.reg-stepper li{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  font-size:.72rem;
  color: var(--text-soft);
  text-transform:uppercase;
  letter-spacing:.05em;
  position:relative;
}
.reg-stepper li::after{
  content:'';
  position:absolute;
  top:15px;
  left:calc(50% + 20px);
  width:calc(100% - 40px);
  height:2px;
  background: var(--border);
}
.reg-stepper li:last-child::after{ display:none; }
.reg-stepper li span{
  width:32px;
  height:32px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background: var(--surface-2);
  border:1px solid var(--border);
  color: var(--text-soft);
  font-weight:600;
  transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}
.reg-stepper li.active span{
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
  box-shadow:0 0 0 4px var(--primary-soft);
}
.reg-stepper li.active{ color: var(--primary); }
.reg-stepper li.completed span{
  background: var(--success);
  border-color: var(--success);
  color:#fff;
}

/* Form */
.reg-form{
  display:flex;
  flex-direction:column;
  gap:24px;
}
.reg-form h4{
  color: var(--text);
  font-size:1.02rem;
}
.reg-step{ display:block; }
.reg-step[hidden]{ display:none !important; }
.reg-hint{
  font-size:.88rem;
  color: var(--text-muted);
  margin-top:6px;
}
.reg-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
  margin-top:16px;
}
.reg-field{
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:flex-start;
  text-align:left;
  font-size:.9rem;
  color: var(--text-muted);
}
.reg-field span{
  font-weight:600;
  font-size:.83rem;
  color: var(--text);
}
.reg-field small{
  font-weight:400;
  color: var(--text-soft);
}
.reg-field input,
.reg-field select{
  width:100%;
  border-radius: var(--radius-sm);
  border:1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  padding:12px 14px;
  font-size:.92rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.reg-phone-field{
  display:flex;
  gap:8px;
  align-items:center;
  width:100%;
}
.reg-phone-field select{
  min-width:120px;
  flex:0 0 38%;
  max-width:160px;
}
.reg-phone-field input{ flex:1; }
.reg-field [data-reg-phone-hint]{
  display:block;
  margin-top:6px;
  font-size:.78rem;
  color: var(--text-soft);
}
.reg-field input:focus,
.reg-field select:focus{
  outline:none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
.reg-field--file input{ padding:10px; }
.reg-field--full{ grid-column:1 / -1; }
.reg-field--compact span{ font-size:.78rem; }

#modal-registro .admin-form__grid{
  display:grid;
  gap: clamp(12px, 1vw + 6px, 18px);
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
}
#modal-registro .admin-form__field{
  display:flex;
  flex-direction:column;
  gap:6px;
  text-align:left;
}
#modal-registro .admin-form__label{
  font-weight:600;
  font-size:.85rem;
  color: var(--text);
}
#modal-registro .admin-form__field input,
#modal-registro .admin-form__field select{
  width:100%;
  border-radius: var(--radius-sm);
  border:1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  padding:.65rem .9rem;
  font-size:.95rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
#modal-registro .admin-form__field input:focus,
#modal-registro .admin-form__field select:focus{
  outline:none;
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}
#modal-registro .admin-form__hint{
  font-size:.82rem;
  color: var(--text-soft);
}
#modal-registro .admin-form__error{
  margin-top:.5rem;
  color: var(--danger);
  font-weight:600;
  font-size:.88rem;
}

.reg-collection-card{
  margin-top:1rem;
  padding: clamp(16px, 2vw, 24px);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  border:1px solid var(--border);
  display:grid;
  gap: clamp(16px, 1.5vw, 24px);
}
.reg-service-form{
  display:grid;
  gap: clamp(14px, 1.4vw, 20px);
}
.reg-collection-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  justify-content:flex-end;
}
.reg-collection{
  display:grid;
  gap:12px;
}
.reg-collection__item{
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:14px 16px;
  background: var(--surface);
  display:grid;
  gap:10px;
}
.reg-collection__item header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.reg-collection__title{
  margin:0;
  font-size:1rem;
  color: var(--text);
}
.reg-collection__remove{
  border:0;
  border-radius:999px;
  padding:6px 16px;
  font-weight:600;
  font-size:.85rem;
  background: var(--danger-soft);
  color: var(--danger);
  cursor:pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.reg-collection__remove:hover{
  background: var(--danger);
  color:#fff;
  transform: translateY(-1px);
}
.reg-collection__meta{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  font-size:.85rem;
}
.reg-collection__meta span{
  padding:4px 12px;
  border-radius:999px;
  background: var(--info-soft);
  color: var(--primary);
  border:1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}

#modal-registro input[type="file"]{
  border-radius: var(--radius-sm);
  border:1px solid var(--input-border);
  background: var(--input-bg);
  padding:.35rem;
  color: var(--text-muted);
}
#modal-registro input[type="file"]::file-selector-button{
  border:0;
  margin-right:.9rem;
  border-radius:8px;
  padding:.45rem 1.1rem;
  background: var(--brand-gradient);
  color:#fff;
  font-weight:600;
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
#modal-registro input[type="file"]::file-selector-button:hover{
  transform: translateY(-1px);
  box-shadow:0 8px 18px rgba(109, 40, 217, .3);
}

.reg-checkbox{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:18px;
  font-size:.85rem;
  color: var(--text-muted);
}
.reg-checkbox input{
  margin-top:3px;
  width:18px;
  height:18px;
  accent-color: var(--primary);
}
.reg-summary{
  background: var(--success-soft);
  border:1px solid color-mix(in srgb, var(--success) 35%, transparent);
  border-radius: var(--radius-md);
  padding:16px;
  text-align:left;
  color: var(--text);
  margin-bottom:18px;
}
.reg-summary__empty{
  margin:0;
  font-size:.9rem;
  color: var(--text-muted);
}
.reg-summary__list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}
.reg-summary__list li{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  font-size:.9rem;
}
.reg-summary__list span{
  color: var(--text-muted);
  font-weight:500;
}
.reg-summary__list strong{
  color: var(--text);
  font-weight:600;
}
.reg-summary__trial{
  margin-top:12px;
  font-size:.85rem;
  color: var(--success);
}
.reg-payment > p{
  margin-bottom:12px;
  font-size:.9rem;
  color: var(--text-muted);
}
.reg-card{
  margin-top:16px;
  padding:16px;
  border-radius: var(--radius-md);
  border:1px solid var(--border);
  background: var(--surface-2);
}
.reg-card__info{
  margin:0 0 12px 0;
  font-size:.8rem;
  color: var(--text-soft);
}
.reg-card__grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}
.reg-status{
  margin-top:16px;
  padding:12px 14px;
  border-radius: var(--radius-sm);
  font-size:.85rem;
  font-weight:500;
  background: var(--surface-2);
  color: var(--text);
}
.reg-status--info{ background: var(--info-soft); color: var(--primary); }
.reg-status--error{ background: var(--danger-soft); color: var(--danger); }
.reg-status--success{ background: var(--success-soft); color: var(--success); }
.reg-error{
  font-size:.85rem;
  color: var(--danger);
  text-align:left;
  margin-bottom:-6px;
}
.reg-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}
.reg-btn{
  border:0;
  border-radius: var(--radius-sm);
  padding:12px 22px;
  font-weight:600;
  font-size:.9rem;
  cursor:pointer;
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease;
}
.reg-btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
}
.reg-btn--ghost{
  background:transparent;
  color: var(--text-muted);
  border:1px solid var(--border-strong);
}
.reg-btn--ghost:hover{ color: var(--text); }
.reg-btn--primary{
  background: var(--brand-gradient);
  color: var(--primary-contrast);
  box-shadow:0 8px 20px rgba(109, 40, 217, .25);
}
.reg-btn--accent{
  background: var(--success);
  color:#fff;
  box-shadow:0 8px 20px rgba(14, 159, 110, .25);
}
.reg-btn:hover:not([disabled]){
  transform: translateY(-1px);
  filter: brightness(1.05);
}
.reg-btn:active:not([disabled]){
  transform: translateY(0);
  filter: brightness(.98);
}
.reg-btn--sm{
  padding:.4rem .9rem;
  font-size:.8rem;
}

/* Registro - horarios */
.reg-hours{
  display:grid;
  gap:1.4rem;
  margin-bottom:1.4rem;
}
.reg-hours__group{
  display:grid;
  gap:1rem;
  padding:1.2rem;
  border-radius: var(--radius-md);
  border:1px solid var(--border);
  background: var(--surface-2);
}
.reg-hours__title{
  margin:0;
  font-size:1rem;
  font-weight:600;
  color: var(--text);
}
.reg-hours__grid{ display:grid; gap:1rem; }
.reg-hours__grid--tz{
  grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
}
.reg-hours__hint,
.reg-hours-hint{
  margin:0;
  font-size:.85rem;
  color: var(--text-muted);
}
.reg-hours-days{
  display:grid;
  gap:1rem;
  max-height: clamp(320px, 48vh, 520px);
  overflow-y:auto;
  padding-right:.5rem;
  scrollbar-width:thin;
  scrollbar-color: var(--border-strong) transparent;
}
.reg-hours-day{
  border:1px solid var(--border);
  border-radius: var(--radius-md);
  padding:1rem;
  background: var(--surface);
  display:grid;
  gap:.8rem;
}
.reg-hours-day legend{
  font-weight:700;
  color: var(--text);
  padding:0 .2rem;
}
.reg-hours-toggle{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  font-weight:600;
  color: var(--text);
}
.reg-hours-toggle input{ accent-color: var(--primary); }
.reg-hours-slots{
  display:grid;
  gap:.75rem;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
}
.reg-hours-slots label{
  display:grid;
  gap:.35rem;
  font-size:.85rem;
  color: var(--text-muted);
}
.reg-hours-slots input[type="time"],
.reg-hours-holidays__input input[type="date"]{
  border:1px solid var(--input-border);
  border-radius:.7rem;
  padding:.45rem .6rem;
  background: var(--input-bg);
  color: var(--text);
}
.reg-hours-slots input[type="time"]:disabled{ opacity:.45; }
.reg-hours-break{
  display:grid;
  gap:.6rem;
  padding:.75rem .9rem;
  border-radius:.9rem;
  background: var(--surface-2);
}
.reg-hours-holidays{ display:grid; gap:.85rem; }
.reg-hours-holidays__input{
  display:flex;
  flex-wrap:wrap;
  gap:.6rem;
  align-items:center;
}
.reg-hours-holidays__list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:.55rem;
}
.reg-hours-holidays__item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  background: var(--surface-2);
  border:1px solid var(--border);
  border-radius:.8rem;
  padding:.55rem .75rem;
  color: var(--text);
}
.reg-hours-holidays__item button{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:999px;
  border:1px solid color-mix(in srgb, var(--danger) 45%, transparent);
  background: var(--danger-soft);
  color: var(--danger);
  font-size:1.05rem;
  cursor:pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.reg-hours-holidays__item button:hover{
  transform: translateY(-1px);
  background: var(--danger);
  color:#fff;
}

@media (max-width:768px){
  #modal-registro .reg-modal{
    border-radius: var(--radius-md);
    max-height:calc(100vh - 24px);
  }
  .reg-grid{
    grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
    gap:12px;
  }
  .reg-field{ font-size:.85rem; gap:4px; }
  .reg-field span{ font-size:.78rem; }
  .reg-field input,
  .reg-field select{ padding:10px 12px; font-size:.88rem; }
  .reg-phone-field select{ flex:0 0 34%; max-width:140px; }
  .reg-actions{ justify-content:center; gap:10px; }
  .reg-btn{ flex:1 1 auto; min-width:140px; }
}
@media (max-width:520px){
  .reg-modal__header{ flex-direction:column-reverse; align-items:flex-end; }
  .reg-modal__header > div{ width:100%; }
  .reg-stepper{
    flex-wrap:wrap;
    justify-content:center;
    gap:12px 18px;
  }
  .reg-stepper li{
    flex:0 1 45%;
    text-align:center;
  }
  .reg-stepper li::after{ display:none; }
  .reg-grid{ grid-template-columns:1fr; }
  .reg-field{ width:100%; }
  .reg-phone-field{
    flex-direction:column;
    align-items:stretch;
  }
  .reg-phone-field select,
  .reg-phone-field input{
    max-width:none;
    flex:1 1 auto;
    width:100%;
  }
  .reg-actions [data-step-prev],
  .reg-actions [data-step-next]{
    flex:1 1 calc(50% - 10px);
    min-width:140px;
  }
}
@media (max-width:640px){
  .reg-hours__grid--tz{ grid-template-columns:minmax(0, 1fr); }
}

/* ==========================================================================
   Loader de página
   ========================================================================== */
#page-loader{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  background: var(--bg);
  transition: opacity .6s ease, visibility .6s ease;
}
#page-loader.page-loader--hidden{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
.page-loader__glow{
  position:absolute;
  width:340px;
  height:340px;
  border-radius:50%;
  background: radial-gradient(circle, var(--primary-soft), transparent 70%);
  animation: pulseGlow 3s ease-in-out infinite;
}
.page-loader__card{
  position:relative;
  padding:32px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow-lg);
  max-width:320px;
  width:90%;
  text-align:center;
  color: var(--text);
  display:grid;
  gap:16px;
}
.page-loader__badge{
  justify-self:center;
  padding:6px 18px;
  border-radius:999px;
  background: var(--primary-soft);
  border:1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  font-weight:600;
  letter-spacing:.03em;
  color: var(--primary);
}
.page-loader__spinner{
  position:relative;
  width:88px;
  height:88px;
  margin:0 auto;
}
.page-loader__spinner span{
  position:absolute;
  inset:0;
  border-radius:50%;
  border:3px solid transparent;
  border-top-color: var(--primary);
  border-right-color: var(--primary);
  animation: rotateSpinner 1.1s linear infinite;
}
.page-loader__spinner span::after{
  content:'';
  position:absolute;
  inset:12px;
  border-radius:50%;
  border:2px solid var(--border);
}
.page-loader__title{
  font-size:1.1rem;
  font-weight:600;
}
.page-loader__hint{
  font-size:.9rem;
  color: var(--text-muted);
  margin:0;
}
.page-loader__progress{
  width:100%;
  height:8px;
  border-radius:999px;
  background: var(--surface-3);
  overflow:hidden;
}
.page-loader__progress-bar{
  width:30%;
  height:100%;
  border-radius:999px;
  background: var(--brand-gradient);
  animation: progressRun 1.6s ease-in-out infinite;
}
@keyframes rotateSpinner{ to{ transform:rotate(360deg); } }
@keyframes progressRun{
  0%{ transform:translateX(-120%); }
  50%{ transform:translateX(20%); }
  100%{ transform:translateX(220%); }
}
@keyframes pulseGlow{
  0%, 100%{ transform:scale(1); opacity:.6; }
  50%{ transform:scale(1.2); opacity:.3; }
}
