/* ============================================================
   Sport Training Castellón — Estilos custom
   Paleta: negro (#0B0B0B) + dorado (#D4AF37)
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --st-black:       #0B0B0B;
  --st-charcoal:    #141414;
  --st-card-bg:     #1A1A1A;
  --st-border:      #2A2A2A;
  --st-gold:        #D4AF37;
  --st-gold-soft:   #E6C84F;
  --st-gold-dim:    #8B6914;
  --st-white:       #FAFAFA;
  --st-muted:       #B5B5B5;          /* antes #6E6E6E — ahora con suficiente contraste sobre negro */
  --bs-body-bg:     var(--st-black);
  --bs-body-color:  var(--st-white);
  --bs-border-color:var(--st-border);
  /* Override Bootstrap secondary-color (usado por text-muted) */
  --bs-secondary-color: #B5B5B5;
}

/* ── Base ──────────────────────────────────────────────────── */
html  { scroll-behavior: smooth; }
body  {
  background-color: var(--st-black);
  color: var(--st-white);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Contrast fixes (texto gris ilegible sobre fondo oscuro) ─ */
.text-muted        { color: #B5B5B5 !important; }
.text-light        { color: #E8E8E8 !important; }
.text-light-emphasis { color: #DADADA !important; }
.text-secondary    { color: #B5B5B5 !important; }
small.text-muted, .small.text-muted { color: #B5B5B5 !important; }

/* ── Utilities ─────────────────────────────────────────────── */
.text-gold    { color: var(--st-gold) !important; }
.bg-gold      { background-color: var(--st-gold) !important; }
.fw-black     { font-weight: 900 !important; }
.tracking-wide{ letter-spacing: .12em; }
.py-6         { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.mb-6         { margin-bottom: 5rem !important; }

/* ── Navbar ────────────────────────────────────────────────── */
.st-navbar {
  background-color: rgba(11,11,11,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--st-border);
}
.st-navbar .nav-link            { color: #DADADA; font-size: .9rem; transition: color .2s; }
.st-navbar .nav-link:hover,
.st-navbar .nav-link.active     { color: var(--st-gold); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn-gold {
  background-color: var(--st-gold);
  border-color: var(--st-gold);
  color: #000;
  font-weight: 700;
  transition: background-color .2s, transform .1s;
}
.btn-gold:hover          { background-color: var(--st-gold-soft); border-color: var(--st-gold-soft); color: #000; transform: translateY(-1px); }
.btn-outline-gold        { border-color: var(--st-gold); color: var(--st-gold); font-weight: 600; }
.btn-outline-gold:hover  { background-color: var(--st-gold); color: #000; }

/* ── Cards ─────────────────────────────────────────────────── */
.st-card {
  background-color: var(--st-card-bg);
  border: 1px solid var(--st-border);
  border-radius: 16px;
  color: var(--st-white);
}
.st-card-gold {
  background-color: var(--st-card-bg);
  border: 1px solid var(--st-gold);
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(212,175,55,.12);
}
.st-card-header {
  background-color: rgba(212,175,55,.07);
  border-bottom: 1px solid var(--st-border);
  padding: .75rem 1rem;
}

/* ── Hero (con video loop de fondo) ────────────────────────── */
.st-hero {
  min-height: 88vh;
  background-color: var(--st-black);
  position: relative;
  overflow: hidden;
}
.st-hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}
.st-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11,11,11,.60) 0%,
    rgba(11,11,11,.78) 60%,
    rgba(11,11,11,.95) 100%
  );
  z-index: 1;
  pointer-events: none;
}
/* Fallback para usuarios con prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .st-hero-video { display: none; }
  .st-hero { background-image: url('../img/gym-12.jpg'); background-size: cover; background-position: center; }
}

/* ── Stats bar ─────────────────────────────────────────────── */
.st-stats-bar {
  background-color: var(--st-charcoal);
  border-top: 1px solid var(--st-border);
  border-bottom: 1px solid var(--st-border);
}

/* ── Page header ───────────────────────────────────────────── */
.st-page-header {
  background: linear-gradient(135deg, var(--st-charcoal) 0%, var(--st-black) 100%);
  border-bottom: 1px solid var(--st-border);
}

/* ── CTA section ───────────────────────────────────────────── */
.st-cta {
  background:
    linear-gradient(135deg, rgba(212,175,55,.08) 0%, transparent 60%),
    var(--st-charcoal);
  border-top: 1px solid var(--st-border);
}

/* ── Footer ────────────────────────────────────────────────── */
.st-footer { background-color: var(--st-charcoal); border-top: 1px solid var(--st-border); }
.footer-link { color: #DADADA; text-decoration: none; transition: color .2s; }
.footer-link:hover { color: var(--st-gold); }

/* ── Forms ─────────────────────────────────────────────────── */
.st-input {
  background-color: #111;
  border: 1px solid var(--st-border);
  color: var(--st-white);
  border-radius: 8px;
}
.st-input:focus {
  background-color: #111;
  border-color: var(--st-gold);
  color: var(--st-white);
  box-shadow: 0 0 0 3px rgba(212,175,55,.18);
  outline: none;
}
.st-input::placeholder { color: #888; }

/* ── Schedule items ────────────────────────────────────────── */
.st-schedule-item {
  background: transparent;
  border-color: var(--st-border);
  padding: .7rem 1rem;
  transition: background .15s;
}
.st-schedule-item:hover { background-color: rgba(212,175,55,.05); }

/* ── Horario badge ─────────────────────────────────────────── */
.st-badge-horario {
  background-color: rgba(212,175,55,.1);
  border: 1px solid rgba(212,175,55,.3);
  color: var(--st-gold);
  font-weight: 500;
  font-size: .75rem;
  padding: .3em .65em;
  border-radius: 6px;
}

/* ── Service icon box (más grande + glow dorado) ──────────── */
.st-service-icon-box {
  width: 220px; height: 220px;
  background:
    radial-gradient(circle at center, rgba(212,175,55,.18) 0%, rgba(212,175,55,.04) 50%, transparent 70%);
  border: 2px solid rgba(212,175,55,.25);
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(212,175,55,.15), inset 0 0 30px rgba(212,175,55,.08);
  transition: transform .3s ease, box-shadow .3s ease;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.st-service-icon-box:hover {
  transform: scale(1.03);
  box-shadow: 0 0 80px rgba(212,175,55,.25), inset 0 0 40px rgba(212,175,55,.12);
}
.st-service-icon-box > span {
  font-size: 7rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.4));
}

/* ── Service card icon overlay (home cards) ───────────────── */
.st-service-overlay-icon {
  background: linear-gradient(135deg, var(--st-gold) 0%, var(--st-gold-soft) 100%);
  border-radius: 50%;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* ── Team avatar circles (sin foto real → iniciales doradas) ─ */
.team-avatar {
  height: 220px;
  background: linear-gradient(135deg, var(--st-charcoal) 0%, var(--st-black) 100%);
  display: flex; align-items: center; justify-content: center;
}
.team-avatar-circle {
  width: 130px; height: 130px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--st-gold) 0%, var(--st-gold-dim) 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(212,175,55,.25);
}
.team-avatar-circle span {
  font-size: 4rem;
  font-weight: 900;
  color: #000;
  line-height: 1;
}

/* ── Pillar cards (¿Por qué somos los mejores?) ───────────── */
.st-pillar-icon {
  width: 110px; height: 110px;
  background: radial-gradient(circle at center, rgba(212,175,55,.2) 0%, rgba(212,175,55,.05) 60%, transparent 80%);
  border: 1px solid rgba(212,175,55,.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  margin: 0 auto 1rem;
  box-shadow: 0 0 32px rgba(212,175,55,.15);
}

/* ── Gold alert ────────────────────────────────────────────── */
.st-alert-gold {
  background-color: rgba(212,175,55,.07);
  border: 1px solid rgba(212,175,55,.22);
  border-radius: 12px;
  padding: 1rem 1.5rem;
}

/* ── Bootstrap list-group dark override ────────────────────── */
.list-group-item { background: transparent; border-color: var(--st-border); color: var(--st-white); }

/* ── Alert overrides ───────────────────────────────────────── */
.alert-success { background-color: rgba(34,197,94,.1);  border-color: rgba(34,197,94,.3);  color: #86efac; }
.alert-danger  { background-color: rgba(239,68,68,.1);  border-color: rgba(239,68,68,.3);  color: #fca5a5; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--st-black); }
::-webkit-scrollbar-thumb { background: var(--st-gold-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--st-gold); }

/* ── Cookie consent banner (RGPD + LSSI-CE 22.2) ───────────── */
.st-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(11, 11, 11, 0.98);
  backdrop-filter: blur(12px);
  border-top: 2px solid var(--st-gold);
  padding: 1rem 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
  z-index: 9999;
}
.st-cookie-banner a { text-decoration: underline; }
.st-cookie-banner[hidden] { display: none; }

/* ── Chatbot widget ─────────────────────────────────────────── */
.st-chat-bubble {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--st-gold); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; box-shadow: 0 4px 20px rgba(212,175,55,.5);
  z-index: 9998; transition: transform .2s, box-shadow .2s;
}
.st-chat-bubble:hover { transform: scale(1.06); box-shadow: 0 6px 28px rgba(212,175,55,.65); }

.st-chat-proactive {
  position: fixed; bottom: 96px; right: 24px;
  background: var(--st-card-bg); border: 1px solid var(--st-gold);
  border-radius: 12px 12px 0 12px; padding: .65rem 1rem;
  color: var(--st-white); font-size: .875rem; font-family: inherit;
  white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.4);
  z-index: 9998; cursor: pointer;
}
.st-chat-proactive::after {
  content: ''; position: absolute; bottom: -8px; right: 16px;
  border-left: 8px solid transparent; border-top: 8px solid var(--st-gold);
}

.st-chat-window {
  position: fixed; bottom: 96px; right: 24px;
  width: 360px; height: 520px; background: var(--st-black);
  border: 1px solid var(--st-border); border-radius: 16px;
  display: none; flex-direction: column; z-index: 9999;
  box-shadow: 0 8px 40px rgba(0,0,0,.65); overflow: hidden;
}
.st-chat-window.st-chat-open { display: flex; }
@media (max-width: 640px) {
  .st-chat-window { width: 90vw; height: 70vh; right: 5vw; bottom: 90px; }
}

.st-chat-header {
  background: linear-gradient(135deg, var(--st-gold) 0%, var(--st-gold-dim) 100%);
  padding: .85rem 1rem; display: flex; align-items: center; gap: .75rem; flex-shrink: 0;
}
.st-chat-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #000;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .85rem; color: var(--st-gold); flex-shrink: 0;
}
.st-chat-header-info { flex: 1; }
.st-chat-header-info strong { display: block; font-size: .875rem; color: #000; font-weight: 700; }
.st-chat-header-info span  { font-size: .7rem; color: rgba(0,0,0,.65); }
.st-chat-close,
.st-chat-new {
  background: rgba(0,0,0,.15); border: none; border-radius: 50%;
  width: 26px; height: 26px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: .9rem; color: #000; font-weight: 700;
  flex-shrink: 0;
}
.st-chat-new { font-size: .8rem; margin-right: 4px; }
.st-chat-new:hover, .st-chat-close:hover { background: rgba(0,0,0,.3); }

.st-chat-messages {
  flex: 1; padding: 1rem; display: flex; flex-direction: column;
  gap: .75rem; overflow-y: auto; scroll-behavior: smooth;
}
.st-msg { display: flex; flex-direction: column; max-width: 82%; }
.st-msg-bot  { align-self: flex-start; }
.st-msg-user { align-self: flex-end; }
.st-msg-bubble {
  padding: .6rem .9rem; border-radius: 12px;
  font-size: .85rem; line-height: 1.5; word-break: break-word;
}
.st-msg-bot  .st-msg-bubble {
  background: var(--st-card-bg); border: 1px solid var(--st-border);
  color: var(--st-white); border-top-left-radius: 4px;
}
.st-msg-user .st-msg-bubble {
  background: var(--st-gold); color: #000; font-weight: 500; border-top-right-radius: 4px;
}

.st-chat-typing {
  display: flex; gap: 4px; padding: .6rem .9rem;
  background: var(--st-card-bg); border: 1px solid var(--st-border);
  border-radius: 12px; border-top-left-radius: 4px;
  align-self: flex-start; width: fit-content;
}
.st-chat-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--st-muted); animation: st-bounce 1.2s infinite;
}
.st-chat-typing span:nth-child(2) { animation-delay: .2s; }
.st-chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes st-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30%           { transform: translateY(-6px); opacity: 1; }
}

.st-chat-wa-btn {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .5rem;
  background: #25D366; color: #fff; border: none; border-radius: 8px;
  padding: .45rem .9rem; font-size: .8rem; font-weight: 600; cursor: pointer;
  text-decoration: none; width: fit-content; font-family: inherit;
}

.st-chat-input-area {
  display: flex; gap: .5rem; padding: .75rem 1rem;
  border-top: 1px solid var(--st-border); background: var(--st-charcoal); flex-shrink: 0;
}
.st-chat-input {
  flex: 1; background: #111; border: 1px solid var(--st-border);
  border-radius: 8px; padding: .5rem .75rem; color: var(--st-white);
  font-size: .85rem; font-family: inherit; outline: none;
}
.st-chat-input:focus { border-color: var(--st-gold); }
.st-chat-input::placeholder { color: #555; }
.st-chat-send {
  background: var(--st-gold); border: none; border-radius: 8px;
  width: 36px; height: 36px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 1rem; flex-shrink: 0;
  transition: background .15s;
}
.st-chat-send:hover    { background: var(--st-gold-soft); }
.st-chat-send:disabled { opacity: .5; cursor: default; }

/* ── Chatbot v3 additions ─────────────────────────────────────── */

/* Badge de mensajes no leídos */
.st-chat-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: #fff; font-size: .6rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px; pointer-events: none;
  border: 2px solid var(--st-black);
}

/* Quick-reply chips */
.st-chat-chips {
  display: flex; flex-wrap: wrap; gap: .4rem;
  padding: .25rem 0 .25rem .25rem;
}
.st-chat-chip {
  background: transparent; border: 1px solid var(--st-gold);
  color: var(--st-gold); border-radius: 20px;
  padding: .3rem .75rem; font-size: .75rem; cursor: pointer;
  font-family: inherit; transition: background .15s, color .15s;
  white-space: nowrap;
}
.st-chat-chip:hover { background: var(--st-gold); color: #000; }

/* Feedback 👍 👎 */
.st-chat-feedback {
  display: flex; gap: .35rem; margin-top: .3rem; padding-left: .1rem;
}
.st-chat-fb-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px; padding: .15rem .4rem; font-size: .8rem;
  cursor: pointer; transition: background .15s, border-color .15s;
  line-height: 1;
}
.st-chat-fb-btn:hover:not(:disabled) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); }
.st-fb-voted   { opacity: .35; }
.st-fb-selected { opacity: 1; background: rgba(212,175,55,.25); border-color: var(--st-gold); }

/* Micrófono */
.st-chat-mic {
  background: transparent; border: 1px solid var(--st-border);
  border-radius: 8px; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; color: #9CA3AF;
  transition: background .15s, border-color .15s, color .15s;
}
.st-chat-mic:hover { background: rgba(255,255,255,.08); border-color: var(--st-gold); color: #fff; }
.st-chat-mic-active {
  background: rgba(239,68,68,.2); border-color: #ef4444; color: #ef4444;
  animation: mic-pulse 1s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,.4); }
  50%       { box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}

/* Botón WhatsApp Verónica (masajes) — estilo distinto al de Christian */
.st-chat-wa-veronica {
  background: rgba(34, 139, 34, 0.15);
  border-color: #4CAF50;
  color: #81C784;
}
.st-chat-wa-veronica:hover { background: rgba(76, 175, 80, 0.25); color: #A5D6A7; }
