/* static/css/style.css */
:root {
  --bg: #0b0a12;
  --bg2: #121026;
  --card: #121129cc;
  --text: #f1f0ff;
  --muted: #bdb8e6;
  --muted2: #9a94c8;
  --accent: #7c5cff;
  --accent2: #ffcc66;
  --line: rgba(255,255,255,.10);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --radius: 18px;
  --max: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: 
    radial-gradient(900px 600px at 20% 15%, rgba(124,92,255,.22), transparent 60%),
    radial-gradient(900px 600px at 80% 10%, rgba(255,204,102,.12), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  color: var(--text);
  line-height: 1.6;
}

/* --- Layout Base --- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 18px; }
.divider { height: 1px; background: rgba(255,255,255,.12); margin: 24px 0; }

/* --- Navegación (Topbar) --- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,10,18,.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.sigil {
  width: 34px; height: 34px; border-radius: 12px;
  background: radial-gradient(12px 12px at 35% 35%, rgba(255,204,102,.9), transparent),
              linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18);
}
.brand b { letter-spacing: .2px; display: block; }
.brand small { color: var(--muted2); font-size: 12px; }

.btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: 14px; border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.04); color: var(--text); text-decoration: none;
  font-weight: 800; font-size: 13px; transition: all 0.2s ease;
  cursor: pointer;
}
.btn:hover { background: rgba(255,255,255,0.1); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, rgba(124,92,255,0.95), rgba(124,92,255,0.55)); border-color: rgba(124,92,255,0.65); }
.btn.gold { background: linear-gradient(135deg, rgba(255,204,102,0.92), rgba(255,204,102,0.45)); color: #1a1428; border-color: 
rgba(255,204,102,0.65); }

/* --- Componentes de Tarjetas --- */
.card {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(18,17,41,.72), rgba(15,14,31,.62));
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* --- Biblioteca / Filtros --- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.chip {
  padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04); color: var(--muted); font-size: 13px; font-weight: 800; cursor: pointer;
}
.chip.active { background: rgba(124,92,255,.3); border-color: var(--accent); color: var(--text); }

.pill { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: 
var(--muted); font-size: 12px; }

/* --- Artículos --- */
article h2 { font-size: 22px; margin: 32px 0 16px; color: var(--text); letter-spacing: -0.3px; }
article p { margin-bottom: 18px; color: var(--muted); line-height: 1.85; }
article strong { color: var(--text); }
article blockquote {
  margin: 24px 0; padding: 18px; border-left: 4px solid var(--accent2);
  background: rgba(255,204,102, 0.05); border-radius: 12px; color: var(--text); font-style: italic;
}
.callout {
  margin: 24px 0; padding: 20px; border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(135deg, rgba(124,92,255,.1), rgba(255,204,102,.05));
}

/* --- Responsividad --- */
@media (max-width: 768px) {
  .topbar .row { flex-direction: column; text-align: center; gap: 12px; }
  .btns { justify-content: center; }
  h1 { font-size: 28px; }
}

/* Botón Flotante de WhatsApp */
.wa-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50%;
  text-align: center;
  font-size: 30px;
  box-shadow: 0px 4px 15px rgba(0,0,0,0.4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s ease;
}

.wa-float:hover {
  transform: scale(1.1);
  background-color: #20ba5a;
  box-shadow: 0px 6px 20px rgba(37, 211, 102, 0.6);
}

/* Icono SVG simple de WhatsApp */
.wa-icon { width: 32px; height: 32px; fill: white; }

.modal-overlay{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.7);
  z-index:9999;
  justify-content:center;
  align-items:center;
}
.modal-content{
  background:var(--bg2);
  padding:25px;
  border-radius:12px;
  max-width:800px;
  width:90%;
  position:relative;
}
.modal-close{
  position:absolute;
  top:10px;
  right:15px;
  background:none;
  border:none;
  font-size:28px;
  color:var(--muted);
  cursor:pointer;
}
.book-excerpt{
  max-height:360px;
  overflow-y:auto;
  padding-right:10px;
  line-height:1.7;
}
.book-excerpt p{ margin-bottom:14px; }
.book-excerpt em{ color:var(--accent2); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 204, 102, 0.6);
  box-shadow: 0 0 12px rgba(255, 204, 102, 0.25);
}

.hero-photo{
  width: 260px;
  height: 360px;
  margin: 0 auto 26px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow:
    0 15px 40px rgba(0,0,0,0.45),
    0 0 30px rgba(255,204,102,0.25);
}

.hero-photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center 30%;
}
/* =========================
   BOOK SECTION RESPONSIVE
========================= */

@media (max-width: 768px) {

  .book-section .row,
  .book-card .row {
    flex-direction: column;
    text-align: center;
  }

  .book-section img,
  .book-card img {
    margin: 0 auto 20px;
    max-width: 240px;
    width: 100%;
  }

  .book-section h2,
  .book-section h3,
  .book-section p {
    text-align: center;
  }

  .book-section .btn,
  .book-section .btns {
    justify-content: center;
  }
}
/* =========================
   MOBILE NAVBAR – SLIM
========================= */
@media (max-width: 768px) {

  /* Topbar más liviano */
  .topbar {
    padding: 12px 0;
  }

  .topbar .row {
    flex-direction: column;
    gap: 10px;
  }

  /* Logo más pequeño */
  .profile-avatar {
    width: 42px;
    height: 42px;
  }

  .brand {
    flex-direction: column;
    text-align: center;
    gap: 6px;
  }

  .brand b {
    font-size: 16px;
  }

  .brand small {
    font-size: 12px;
    opacity: 0.7;
  }

  /* Botones tipo "chips" */
  .btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .btn {
    padding: 9px 12px;
    font-size: 14px;
    border-radius: 14px;
  }

  .btn.primary {
    box-shadow: none;
  }
}
/* =========================
   MOBILE COLLAPSIBLE MENU
========================= */
.extra-nav {
  display: none;
  margin-top: 10px;
}

.extra-nav.show {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.photo-reel{
  margin:60px 0;
}

.reel-title{
  text-align:center;
  margin-bottom:25px;
}

.reel-container{
  overflow:hidden;
  position:relative;
}

.reel-track{
  display:flex;
  gap:20px;
  animation: reelScroll 25s linear infinite;
}

.reel-card{
  min-width:260px;
  height:360px;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--line);
  box-shadow:0 15px 40px rgba(0,0,0,0.45);
  transition:transform .3s ease;
}

.reel-card:hover{
  transform:scale(1.05);
}

.reel-card img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* scroll automático */

@keyframes reelScroll{
  0%{
    transform:translateX(0);
  }
  100%{
    transform:translateX(-40%);
  }
}