/* ─────────────────────────────────────────────────────────────────────────────
   Tema público "cálido y divertido" (chicos, adolescentes y familias)
   Base: Tabler. Acá se pisan colores, tipografías, formas y se suman animaciones.
   ───────────────────────────────────────────────────────────────────────────── */

:root, [data-bs-theme=light] {
  /* Paleta */
  --c-cream: #f8f4ec;
  --c-ink: #1d3f3a;          /* verde petróleo oscuro: textos y botones */
  --c-teal: #24584f;
  --c-teal-soft: #dcebe6;
  --c-mustard: #f2b134;
  --c-coral: #ec7a5c;
  --c-lavender: #dedbf7;
  --c-sky: #d5e9f6;
  --c-mint: #dff0e4;
  --c-sand: #f4ebdd;
  --c-butter: #fbe8b5;
  --c-purple: #5b4bc4;

  /* Tabler */
  --tblr-body-bg: var(--c-cream);
  --tblr-body-color: #2c3e3b;
  --tblr-primary: #24584f;
  --tblr-primary-rgb: 36, 88, 79;
  --tblr-primary-darken: #1d3f3a;
  --tblr-primary-lt: #dcebe6;
  --tblr-primary-lt-rgb: 220, 235, 230;
  --tblr-primary-text-emphasis: #1d3f3a;
  --tblr-primary-bg-subtle: #dcebe6;
  --tblr-primary-border-subtle: #b9d6cd;
  --tblr-link-color: #24584f;
  --tblr-link-color-rgb: 36, 88, 79;
  --tblr-link-hover-color: #1d3f3a;
  --tblr-border-color: #ebe3d6;
  --tblr-border-radius: .9rem;
  --tblr-card-border-radius: 1.5rem;
  --tblr-font-sans-serif: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
}

body { background: var(--c-cream); font-size: .95rem; }
.page, .page-wrapper { background: transparent; }

/* Tipografía */
h1, h2, h3, .h1, .h2, .h3, .page-title, .card-title, .display-6, .brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--c-ink);
}
.card-title { font-size: 1.15rem; }
.text-ink { color: var(--c-ink) !important; }

/* Botones: píldora y con un pequeño rebote */
.btn { border-radius: 999px; font-weight: 700; transition: transform .18s cubic-bezier(.34,1.56,.64,1), box-shadow .18s, background-color .18s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.97); }
.btn-primary { --tblr-btn-bg: var(--c-ink); --tblr-btn-hover-bg: #142d29; box-shadow: 0 6px 16px -8px rgba(29,63,58,.6); }
.btn-mustard { background: var(--c-mustard); color: var(--c-ink); border: 0; box-shadow: 0 6px 16px -8px rgba(242,177,52,.9); }
.btn-mustard:hover { background: #f5bf55; color: var(--c-ink); }
.btn-outline-primary { --tblr-btn-border-color: rgba(36,88,79,.35); }
.btn-lg { padding: .8rem 1.6rem; }

/* Tarjetas */
.card { border-radius: var(--tblr-card-border-radius); border-color: var(--tblr-border-color); box-shadow: 0 1px 0 rgba(29,63,58,.04); }
.card-header, .card-footer { border-color: var(--tblr-border-color); background: transparent; }
.card-footer { border-bottom-left-radius: var(--tblr-card-border-radius); border-bottom-right-radius: var(--tblr-card-border-radius); }
.card-link-pop { transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s; }
.card-link-pop:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 18px 36px -18px rgba(29,63,58,.35); }

.bg-lavender { background: var(--c-lavender) !important; }
.bg-sky { background: var(--c-sky) !important; }
.bg-mint { background: var(--c-mint) !important; }
.bg-sand { background: var(--c-sand) !important; }
.bg-butter { background: var(--c-butter) !important; }
.bg-ink { background: var(--c-ink) !important; color: #fff; }
.card.bg-lavender, .card.bg-sky, .card.bg-mint, .card.bg-sand, .card.bg-butter { border: 0; }

/* Formularios */
.form-control, .form-select { border-radius: .9rem; border-color: #e4dccd; background-color: #fff; }
.form-check-input:checked { background-color: var(--c-ink); border-color: var(--c-ink); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: rgba(36,88,79,.5);
  box-shadow: 0 0 0 .25rem rgba(242,177,52,.25);
}
.form-selectgroup-label { border-radius: 1rem; }
.form-selectgroup-input:checked + .form-selectgroup-label { border-color: var(--c-ink); background: var(--c-teal-soft); }

.alert { border-radius: 1.1rem; border: 0; background: #fff; box-shadow: 0 1px 0 rgba(29,63,58,.05); }
.alert-info { background: var(--c-sky); color: var(--c-ink); }
.alert-success { background: var(--c-mint); color: var(--c-ink); }
.alert-warning { background: var(--c-butter); color: var(--c-ink); }
.alert-danger { background: #fde2da; color: #7a2e1c; }
.alert-icon { color: inherit; }

.avatar { border-radius: 1rem; font-family: var(--font-display); font-weight: 600; }
.badge { border-radius: 999px; font-weight: 700; }

/* Navbar */
.navbar { background: transparent; border-bottom: 0; padding-top: 1rem; padding-bottom: .5rem; }
.brand-word { font-size: 1.6rem; font-weight: 700; color: var(--c-ink); line-height: 1; }
.brand-word .dot { color: var(--c-mustard); }
.nav-pill { border-radius: 999px; padding: .35rem .9rem; color: var(--c-ink); font-weight: 700; }
.nav-pill:hover { background: #fff; }
.nav-pill.active { background: #ebe4d6; }

/* Pasos */
.steps { --tblr-steps-color: var(--c-ink); font-weight: 700; }
.steps .step-item.active::before { background: var(--c-mustard); color: var(--c-ink); }

.page-body { min-height: calc(100vh - 8rem); }
.hp-field { position: absolute; left: -10000px; }

/* Selector de días y horarios */
.day-picker { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem .1rem .5rem; scrollbar-width: thin; }
.day-picker .btn { flex: 0 0 auto; min-width: 4.4rem; flex-direction: column; line-height: 1.15; padding: .55rem .25rem; border-radius: 1.1rem; }
.day-picker .btn small { text-transform: capitalize; opacity: .8; font-weight: 600; }
.day-picker .btn.btn-primary { background: var(--c-mustard); border-color: var(--c-mustard); color: var(--c-ink); box-shadow: 0 8px 18px -10px rgba(242,177,52,1); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: .55rem; }
.slot-grid .btn { justify-content: center; font-variant-numeric: tabular-nums; background: #fff; }
.slot-grid .btn:hover { background: var(--c-ink); color: #fff; }
.slot-grid .btn:hover .text-secondary { color: rgba(255,255,255,.75) !important; }

/* Fecha destacada en tarjetas */
.date-badge {
  width: 3.6rem; text-align: center; border-radius: 1rem;
  background: var(--c-butter); color: var(--c-ink); padding: .4rem 0; flex-shrink: 0;
}
.date-badge .day { font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; line-height: 1; }
.date-badge .month { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }

.status-icon { width: 4.5rem; height: 4.5rem; font-size: 2.2rem; animation: pop .6s cubic-bezier(.34,1.56,.64,1) both; }
.hero-auth { max-width: 28rem; }

/* ── Portada ────────────────────────────────────────────────────────────── */
.hero { position: relative; padding: 2.5rem 0 3.5rem; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); line-height: 1.1; max-width: 46rem; margin: 0 auto .9rem; }
.hero .lead { color: #5c6d69; font-size: 1.15rem; max-width: 36rem; margin: 0 auto 1.6rem; }
.hero .squiggle { color: var(--c-mustard); }

.float-tile {
  position: absolute; width: 7.5rem; height: 5.5rem; border-radius: 1.25rem;
  display: grid; place-items: center; font-size: 2.4rem; color: #fff;
  box-shadow: 0 18px 30px -16px rgba(29,63,58,.45);
  animation: float 6s ease-in-out infinite;
}
.float-tile.t1 { left: 2%; top: 1.5rem; background: linear-gradient(135deg, #f8b53c, #ec7a5c); --r: -12deg; }
.float-tile.t2 { right: 2%; top: .5rem; background: linear-gradient(135deg, #2f7d74, #1d3f3a); --r: 10deg; animation-delay: -2s; }
.float-tile.t3 { left: 7%; top: 13rem; width: 5rem; height: 5rem; border-radius: 50%; background: var(--c-purple); --r: 0deg; animation-delay: -4s; font-size: 1.8rem; }
.float-tile.t4 { right: 8%; top: 14rem; width: 4.2rem; height: 4.2rem; background: var(--c-mustard); color: var(--c-ink); --r: 14deg; animation-delay: -3s; font-size: 1.6rem; }
.confetti { position: absolute; border-radius: 50%; animation: float 7s ease-in-out infinite; }

.preview-card {
  display: inline-flex; align-items: center; gap: .85rem; text-align: left;
  background: #fff; border-radius: 1.25rem; padding: .85rem 1.1rem; margin-top: 2rem;
  box-shadow: 0 20px 40px -22px rgba(29,63,58,.5);
  transform: rotate(-2deg); animation: float 7s ease-in-out infinite; --r: -2deg;
}

.section-title { font-size: clamp(1.6rem, 3.5vw, 2.3rem); text-align: center; margin-bottom: .5rem; }
.section-lead { text-align: center; color: #5c6d69; max-width: 34rem; margin: 0 auto 2rem; }
.divider-dash { width: 4rem; height: 3px; border-radius: 3px; background: #e2d8c6; margin: 3rem auto; }

.place-card { border-radius: 1.75rem; overflow: hidden; }
.place-card .card-body { padding: 1.75rem; }
.place-card .illus { font-size: 3rem; line-height: 1; margin-bottom: 1rem; display: inline-grid; place-items: center;
  width: 5rem; height: 5rem; border-radius: 1.5rem; background: rgba(255,255,255,.65); color: var(--c-ink); }
.place-card:hover .illus { animation: wiggle .6s ease-in-out; }

.step-card { border-radius: 1.75rem; padding: 1.75rem; height: 100%; }
.step-card .num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; line-height: 1; color: var(--c-ink); opacity: .9; }
.step-card i { font-size: 2.2rem; }

.mission { background: var(--c-ink); color: #e9f1ee; border-radius: 2rem 2rem 0 0; margin-top: 4rem; padding: 4rem 1.5rem 0; text-align: center; overflow: hidden; position: relative; }
.mission h2 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.3rem); max-width: 36rem; margin: 0 auto 1rem; }
.mission p { max-width: 34rem; margin: 0 auto 1.5rem; color: #cfe0db; }
.mission .hills { display: block; width: 100%; height: auto; margin-top: 2rem; }
.mission .cloud { animation: drift 18s linear infinite; }
.mission .sun { transform-origin: center; animation: spin 40s linear infinite; }

.footer-site { background: #fff; padding: 2rem 0; }
.footer-site .brand-word { font-size: 1.3rem; }

/* ── Animaciones ────────────────────────────────────────────────────────── */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-12px) rotate(calc(var(--r, 0deg) + 3deg)); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes drift { from { transform: translateX(-15%); } to { transform: translateX(115%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Aparición escalonada: agregar .rise y opcionalmente style="--d:2" */
.rise { animation: rise .7s cubic-bezier(.22,1,.36,1) both; animation-delay: calc(var(--d, 0) * 90ms); }
.row-cards > [class*=col] { animation: rise .7s cubic-bezier(.22,1,.36,1) both; }
.row-cards > [class*=col]:nth-child(2) { animation-delay: 90ms; }
.row-cards > [class*=col]:nth-child(3) { animation-delay: 180ms; }
.row-cards > [class*=col]:nth-child(4) { animation-delay: 270ms; }
.row-cards > [class*=col]:nth-child(n+5) { animation-delay: 360ms; }

@media (max-width: 767px) {
  .float-tile.t1, .float-tile.t2 { width: 4.5rem; height: 3.5rem; font-size: 1.5rem; top: -.5rem; }
  .float-tile.t3, .float-tile.t4 { display: none; }
  .hero { padding-top: 3.5rem; }
}

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

/* Ajustes */
.avatar-list-stacked .avatar:last-child { margin-right: 0 !important; }
.hero h1, .hero .lead { position: relative; z-index: 1; }

@media (max-width: 767px) {
  .confetti { display: none; }
  .preview-card { flex-wrap: wrap; max-width: 100%; }
  .preview-card .badge { margin-left: 0 !important; }
  .mission .hills { height: 170px; width: 100%; }
}

/* Ícono de modalidad (presencial / online) */
.modality-icon { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.35rem; flex-shrink: 0; color: var(--c-ink); }
.modality-in_person { background: var(--c-lavender); }
.modality-online { background: var(--c-sky); }

/* Tarjeta flotante clickeable */
.preview-link { text-decoration: none; color: inherit; cursor: pointer; transition: box-shadow .25s; }
.preview-link:hover { text-decoration: none; box-shadow: 0 26px 46px -20px rgba(29,63,58,.6); }
.preview-link:hover .preview-arrow { transform: translateX(3px); }
.preview-arrow { transition: transform .2s; font-size: 1.2rem; }
.preview-link:focus-visible { outline: 3px solid var(--c-mustard); outline-offset: 3px; }

/* Próximo turno como protagonista de la portada */
.preview-main { padding: 1.25rem 1.5rem; gap: 1.1rem; margin-top: .5rem; transform: rotate(-1.5deg); --r: -1.5deg;
  border: 2px solid var(--c-butter); }
.preview-main .date-badge { width: 4.4rem; padding: .55rem 0; }
.preview-main .date-badge .day { font-size: 1.9rem; }
.preview-main .modality-icon { width: 3.2rem; height: 3.2rem; font-size: 1.6rem; }
.preview-main .fw-bold { font-family: var(--font-display); font-size: 1.25rem; }
.preview-main .small { font-size: .95rem !important; }
@media (max-width: 767px) { .preview-main { transform: none; --r: 0deg; } }
.preview-link:hover, .preview-link:focus-visible { animation-play-state: paused; }
@media (max-width: 767px) {
  .preview-main { display: grid; grid-template-columns: auto auto 1fr auto; column-gap: .75rem; row-gap: .35rem;
    align-items: center; padding: 1rem; width: 100%; }
  .preview-main .date-badge { grid-row: 1 / span 2; }
  .preview-main .modality-icon { grid-row: 1 / span 2; }
  .preview-main .date-badge { width: 3.6rem; }
  .preview-main .date-badge .day { font-size: 1.5rem; }
  .preview-main .modality-icon { width: 2.6rem; height: 2.6rem; font-size: 1.3rem; }
  .preview-main > div:not(.date-badge) { min-width: 0; grid-column: 3; grid-row: 1; }
  .preview-main .fw-bold { font-size: 1.05rem; }
  .preview-main .badge { grid-column: 3; grid-row: 2; justify-self: start; margin-left: 0 !important; }
  .preview-main .preview-arrow { grid-column: 4; grid-row: 1 / span 2; }
}

/* ── Escena dibujada a mano detrás de la portada ───────────────────────── */
.hero { padding-bottom: 12rem; }
.hero > *:not(.hero-scene):not(.float-tile):not(.confetti) { position: relative; z-index: 2; }
.hero-scene {
  position: absolute; z-index: 0; pointer-events: none;
  left: 50%; bottom: 0; width: 100vw; transform: translateX(-50%);
  height: 260px; opacity: .85;
}
.hero-scene svg { width: 100%; height: 100%; display: block; }
.hero-scene .head { fill: #fffaf1; }

/* Sol: cruza el cielo en arco y sonríe */
.sun-rays { transform-box: fill-box; transform-origin: center; animation: spin 24s linear infinite; }
@keyframes sun-arc {
  0%   { transform: translate(-80px, 150px); }
  25%  { transform: translate(300px, 60px); }
  50%  { transform: translate(600px, 40px); }
  75%  { transform: translate(900px, 60px); }
  100% { transform: translate(1280px, 150px); }
}

/* Nubes y pajaritos */
@keyframes drift-px { from { transform: translate(-140px, 0); } to { transform: translate(1340px, 0); } }
@keyframes birds-fly { from { transform: translate(1260px, 70px); } to { transform: translate(-120px, 40px); } }
.bird { transform-box: fill-box; transform-origin: center; animation: flap .5s ease-in-out infinite alternate; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(-.4); } }

/* Gente caminando */
@keyframes walk { from { transform: translateX(-160px); } to { transform: translateX(1360px); } }
@keyframes walk-back { from { transform: translateX(1360px); } to { transform: translateX(-160px); } }
.bob { animation: bob .55s ease-in-out infinite alternate; }
.leg-a, .arm-b { animation: swing .55s ease-in-out infinite alternate; }
.leg-b, .arm-a { animation: swing .55s ease-in-out infinite alternate-reverse; }
@keyframes swing { from { transform: rotate(24deg); } to { transform: rotate(-24deg); } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-2.5px); } }

/* Hormigas en fila */
.ant-legs { animation: ant-step .18s steps(2) infinite; }
@keyframes ant-step { from { transform: translateX(0); } to { transform: translateX(1.2px); } }

/* Mariposa que pasea */
@keyframes butterfly-route {
  0%   { transform: translate(-60px, 170px); }
  20%  { transform: translate(220px, 120px); }
  40%  { transform: translate(470px, 175px); }
  60%  { transform: translate(720px, 110px); }
  80%  { transform: translate(980px, 160px); }
  100% { transform: translate(1260px, 120px); }
}
.wing { transform-box: fill-box; transform-origin: right center; animation: wing-flap .22s ease-in-out infinite alternate; }
.wing-r { transform-origin: left center; }
@keyframes wing-flap { from { transform: scaleX(1); } to { transform: scaleX(.25); } }

@media (max-width: 767px) {
  .hero { padding-bottom: 9rem; }
  .hero-scene { height: 190px; opacity: .75; }
}

/* Actores de la escena: cada uno cruza una vez cuando el script le agrega .go */
.actor { visibility: hidden; }
.actor.go { visibility: visible; }
.sun-path.go { animation: sun-arc 24s linear 1 both; }
.clouds.go { animation: drift-px 22s linear 1 both; }
.birds.go { animation: birds-fly 11s linear 1 both; }
.butterfly-path.go { animation: butterfly-route 15s ease-in-out 1 both; }
.walker-family.go { animation: walk 21s linear 1 both; }
.walker-teen.go { animation: walk 17s linear 1 both; }
.walker-back.go { animation: walk-back 19s linear 1 both; }
.ants.go { animation: walk-back 26s linear 1 both; }
.hero-scene svg { shape-rendering: geometricPrecision; }
.actor.go { will-change: transform; }
/* El pasto se funde con el fondo en vez de cortar en seco */
.hero-scene { -webkit-mask-image: linear-gradient(to bottom, #000 93%, transparent); mask-image: linear-gradient(to bottom, #000 93%, transparent); }
