/* ============================================================
   Blog Santa Fe — Sistema de diseño base
   Paleta oficial Santa Fe Energy · Aurora + glassmorphism
   sobre Bootstrap 5 (tema oscuro). Tipografía: Raleway.
   ============================================================ */

:root {
  /* --- Paleta oficial de marca --- */
  --brand-teal:  #00443F; /* Verde oscuro — estabilidad */
  --brand-gray:  #333333; /* Gris oscuro — confianza    */
  --brand-light: #f4f4f4; /* Gris claro  — humanidad     */
  --brand-orange:#ff6700; /* Naranja     — energía        */
  --brand-neon:  #daff03; /* Verde neón  — evolución      */

  /* Fondo profundo derivado del verde oscuro */
  --bg-950: #02120f;
  --bg-900: #04211d;

  /* Aurora (usa colores de marca) */
  --aurora-1: var(--brand-teal);
  --aurora-2: var(--brand-orange);
  --aurora-3: var(--brand-neon);
  --aurora-4: var(--brand-teal);

  /* Texto */
  --text: var(--brand-light);
  --text-muted: #93a8a2; /* gris verdoso tenue */

  /* Vidrio */
  --glass-bg: rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(255, 255, 255, 0.09);
  --glass-border: rgba(255, 255, 255, 0.13);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);

  /* Gradientes de énfasis */
  --accent-grad: linear-gradient(135deg, #ff7a1a 0%, #ff6700 100%);   /* acción (texto blanco legible) */
  --brand-grad:  linear-gradient(135deg, var(--brand-teal) 0%, var(--brand-orange) 100%); /* estabilidad → energía */
  --heading-grad:linear-gradient(120deg, #ff8a2b 0%, var(--brand-neon) 100%);

  --radius: 20px;

  /* Puentes con Bootstrap */
  --bs-body-bg: transparent;
  --bs-body-color: var(--text);
  --bs-border-radius: 14px;
  --bs-primary: #ff6700;
  --bs-link-color: var(--brand-neon);
  --bs-link-hover-color: #eaff6b;
}

* { scroll-behavior: smooth; }

html { background: var(--bg-950); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: transparent;
  font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Fondo aurora animado ---------- */
.aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, #063a33 0%, var(--bg-900) 45%, var(--bg-950) 100%);
}

.aurora__blob {
  position: absolute;
  width: 46vw;
  height: 46vw;
  min-width: 360px;
  min-height: 360px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  mix-blend-mode: screen;
  will-change: transform;
}

.aurora__blob--1 { background: var(--aurora-1); top: -12%;  left: -8%;  opacity: 0.75; animation: drift1 22s ease-in-out infinite; }
.aurora__blob--2 { background: var(--aurora-2); top: -6%;   right: -10%; opacity: 0.5;  animation: drift2 26s ease-in-out infinite; }
.aurora__blob--3 { background: var(--aurora-3); bottom: -18%; left: 18%; opacity: 0.28; animation: drift3 30s ease-in-out infinite; }
.aurora__blob--4 { background: var(--aurora-4); bottom: -22%; right: 6%; opacity: 0.6;  animation: drift1 34s ease-in-out infinite reverse; }

/* Viñeta para dar profundidad */
.aurora::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.6) 100%);
}

@keyframes drift1 {
  0%,100% { transform: translate(0, 0) scale(1); }
  50%     { transform: translate(8vw, 6vh) scale(1.15); }
}
@keyframes drift2 {
  0%,100% { transform: translate(0, 0) scale(1.05); }
  50%     { transform: translate(-7vw, 8vh) scale(0.9); }
}
@keyframes drift3 {
  0%,100% { transform: translate(0, 0) scale(1); }
  50%     { transform: translate(6vw, -7vh) scale(1.2); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora__blob { animation: none !important; }
  * { scroll-behavior: auto; }
}

/* ---------- Layout ---------- */
.page {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  min-height: calc(100vh - 70px);
}

/* ---------- Navbar glass ---------- */
.navbar-glass {
  position: sticky;
  top: 0;
  z-index: 1030;
  padding: 0.65rem 0;
  background: rgba(4, 25, 22, 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}
.navbar-glass.scrolled {
  background: rgba(2, 18, 15, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  padding: 0.4rem 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  color: var(--text) !important;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 0.85rem;
  font-weight: 900;
  color: #fff;
  background: var(--brand-grad);
  box-shadow: 0 6px 18px rgba(255, 103, 0, 0.4);
}
.brand-text { font-size: 1.05rem; opacity: 0.96; font-weight: 700; }
.brand-text strong { font-weight: 900; }

.navbar-glass .nav-link {
  position: relative;
  color: var(--text-muted) !important;
  font-weight: 600;
  padding: 0.5rem 0.9rem !important;
  transition: color 0.2s ease;
}
.navbar-glass .nav-link:hover,
.navbar-glass .nav-link.active { color: var(--text) !important; }
.navbar-glass .nav-link.active::after {
  content: "";
  position: absolute;
  left: 0.9rem;
  right: 0.9rem;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-neon);
  box-shadow: 0 0 10px rgba(218, 255, 3, 0.6);
}

.navbar-toggler {
  border: 1px solid var(--glass-border);
  padding: 0.35rem 0.6rem;
}
.navbar-toggler:focus { box-shadow: none; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(244,244,244,0.85)' stroke-width='2' stroke-linecap='round' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* Botón/avatar de usuario */
.btn-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text) !important;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.3rem 0.85rem 0.3rem 0.35rem;
  font-weight: 600;
}
.btn-user:hover { background: var(--glass-bg-strong); }
.avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  background: var(--brand-grad);
}

.dropdown-glass {
  background: rgba(6, 30, 26, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: var(--glass-shadow);
  padding: 0.4rem;
}
.dropdown-glass .dropdown-item {
  color: var(--text);
  border-radius: 9px;
  padding: 0.5rem 0.8rem;
}
.dropdown-glass .dropdown-item:hover { background: var(--glass-bg-strong); color: #fff; }
.dropdown-glass form { margin: 0; }

/* ---------- Superficies de vidrio (cards, etc.) ---------- */
.glass,
.card {
  background: var(--glass-bg) !important;
  border: 1px solid var(--glass-border) !important;
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-radius: var(--radius) !important;
  box-shadow: var(--glass-shadow);
  color: var(--text);
}
.card .card-body { padding: 1.75rem; }

/* ---------- Tipografía / titulares ---------- */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; }
.text-gradient {
  background: var(--heading-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-muted { color: var(--text-muted) !important; }

/* ---------- Botones ---------- */
.btn {
  border-radius: 12px;
  font-weight: 700;
  padding: 0.6rem 1.2rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  border: none;
  color: #fff;
  background: var(--accent-grad);
  box-shadow: 0 8px 22px rgba(255, 103, 0, 0.4);
}
.btn-primary:hover { filter: brightness(1.07); box-shadow: 0 10px 28px rgba(255, 103, 0, 0.55); }

/* Botón "evolución" (verde neón, texto oscuro) para acentos secundarios */
.btn-neon {
  border: none;
  color: var(--brand-teal);
  background: var(--brand-neon);
  box-shadow: 0 8px 22px rgba(218, 255, 3, 0.3);
}
.btn-neon:hover { filter: brightness(1.05); color: var(--brand-teal); }

.btn-outline-secondary {
  color: var(--text);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}
.btn-outline-secondary:hover { background: var(--glass-bg-strong); color: #fff; border-color: var(--glass-border); }

.btn-outline-danger { border-color: rgba(248, 113, 113, 0.5); color: #fca5a5; }
.btn-outline-danger:hover { background: rgba(248, 113, 113, 0.15); color: #fecaca; }

/* ---------- Formularios ---------- */
.form-label { color: var(--text-muted); font-weight: 600; margin-bottom: 0.35rem; }
.form-control {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: 12px;
  padding: 0.7rem 0.9rem;
}
.form-control::placeholder { color: rgba(147, 168, 162, 0.6); }
.form-control:focus {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 103, 0, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(255, 103, 0, 0.2);
  color: var(--text);
}

/* Grupo de contraseña con botón para mostrar/ocultar */
.password-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
}
.btn-toggle-pass {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-left: 0;
  color: var(--text-muted);
  border-radius: 0 12px 12px 0;
  padding: 0 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.btn-toggle-pass:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.btn-toggle-pass:focus-visible { outline: 2px solid rgba(255, 103, 0, 0.6); outline-offset: -2px; }
.password-group:focus-within .form-control,
.password-group:focus-within .btn-toggle-pass {
  border-color: rgba(255, 103, 0, 0.7);
}
.btn-toggle-pass svg { width: 20px; height: 20px; }

/* ---------- Tablas ---------- */
.table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  color: var(--text);
  border-color: var(--glass-border);
  overflow: hidden;
  border-radius: var(--radius);
}
.table > thead th {
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border-color: var(--glass-border);
}
.table > tbody td { border-color: rgba(255, 255, 255, 0.06); vertical-align: middle; }
.table.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(255, 255, 255, 0.03);
  color: var(--text);
}
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover td { background: rgba(255, 255, 255, 0.05); }

/* ---------- Badges / alerts ---------- */
.badge.bg-primary { background: var(--accent-grad) !important; padding: 0.4em 0.7em; border-radius: 999px; }

.alert {
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.alert-success { border-color: rgba(218, 255, 3, 0.4); color: #eaffa0; }
.alert-danger  { border-color: rgba(248, 113, 113, 0.4); color: #fecaca; }
.alert-info    { border-color: rgba(0, 68, 63, 0.6);  color: #a7d8d0; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 1.5rem 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-900); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; border: 3px solid var(--bg-900); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ---------- Componentes del home / dashboard ---------- */
.hero-tagline { color: var(--text-muted); font-weight: 600; }

.icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--brand-neon);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  flex: 0 0 auto;
}
.icon-badge svg { width: 22px; height: 22px; }

.stat-value { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat-label {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.activity-list { list-style: none; margin: 0; padding: 0; }
.activity-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.activity-item:last-child { border-bottom: 0; }
.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.4rem;
  flex: 0 0 auto;
  background: var(--brand-neon);
  box-shadow: 0 0 8px rgba(218, 255, 3, 0.6);
}
.activity-title { font-weight: 600; }
.activity-meta { color: var(--text-muted); font-size: 0.8rem; }

/* Mini ranking (top 3) */
.rank-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.rank-row:last-child { border-bottom: 0; }
.rank-pos {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  flex: 0 0 auto;
}
.rank-row--1 .rank-pos { background: var(--accent-grad); color: #fff; border: 0; }
.rank-row--2 .rank-pos { color: var(--brand-neon); }
.me-highlight { color: var(--brand-neon); }

.big-rank { font-size: 3.2rem; font-weight: 900; line-height: 1; letter-spacing: -0.04em; }

/* Entrada suave del contenido */
.fade-up { animation: fadeUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
