@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;800;900&family=DM+Sans:wght@300;400;500;600&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; overflow-x: hidden; }
body { background: #060f28; color: #fff; font-family: 'DM Sans', sans-serif; }

/* HEADER */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(4,10,30,0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(1,219,254,0.1);
  min-height: 64px;
}
.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 36px; object-fit: contain; filter: drop-shadow(0 0 8px rgba(254,204,9,0.3)); }
.brand-text { display: flex; flex-direction: column; }
.brand-acronym { font-family: 'Barlow Condensed', sans-serif; font-size: 1.2rem; font-weight: 900; color: #fecc09; line-height: 1; letter-spacing: 0.06em; }
.brand-full { font-size: 0.55rem; color: rgba(186,185,186,0.6); letter-spacing: 0.04em; max-width: 150px; }
.header-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { padding: 6px 12px; border-radius: 6px; text-decoration: none; font-size: 0.78rem; font-weight: 500; color: rgba(186,185,186,0.8); transition: all 0.2s; white-space: nowrap; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-link.active { color: #01dbfe; }
.btn-admin { margin-left: 4px; background: transparent; border: 1.5px solid rgba(254,204,9,0.5); color: #fecc09; padding: 6px 14px; border-radius: 6px; font-size: 0.75rem; font-weight: 600; text-decoration: none; transition: all 0.2s; white-space: nowrap; }
.btn-admin:hover { background: #fecc09; color: #0e1235; }

/* HERO */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: 80px;
  background: linear-gradient(135deg, #020b1e 0%, #051228 55%, #020b1e 100%);
}
#particleCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.wave-left, .wave-right, .glow-center, .hero-grid { display: none; } /* simplificar en móvil */
.hero-body {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 2rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 28px;
}
.hero-left { width: 100%; max-width: 700px; margin: 0 auto; }
.hero-visual { display: none; } /* ocultar decoración en móvil para simplificar */
.hero-brand-row { display: flex; justify-content: center; margin-bottom: 10px; }
.hero-logo-big { height: 48px; object-fit: contain; filter: drop-shadow(0 0 14px rgba(254,204,9,0.4)); }
.hero-title-block { display: flex; flex-direction: column; line-height: 0.86; }
.hero-t1, .hero-t2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.8rem, 12vw, 6rem);
  font-weight: 900;
  letter-spacing: -0.01em;
}
.hero-t1 { color: #fff; }
.hero-t2 {
  background: linear-gradient(90deg, #01dbfe 0%, #60caff 45%, #01dbfe 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: grad 4s linear infinite;
}
@keyframes grad { 0% { background-position: 0%; } 100% { background-position: 200%; } }
.hero-divider { width: 60px; height: 3px; background: linear-gradient(90deg, #fecc09, transparent); border-radius: 2px; margin: 12px auto; }
.hero-tagline { font-family: 'Barlow Condensed', sans-serif; font-size: clamp(0.8rem, 3vw, 1.1rem); font-weight: 600; color: rgba(255,255,255,0.8); letter-spacing: 0.2em; text-transform: uppercase; }
.hero-sub { font-size: clamp(0.8rem, 3vw, 0.95rem); color: rgba(186,185,186,0.78); line-height: 1.5; max-width: 500px; margin: 0 auto; }
.hero-highlight { color: #fecc09; font-weight: 600; }
.hero-stats-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  background: rgba(3,10,28,0.72);
  border: 1px solid rgba(1,219,254,0.18);
  border-radius: 14px;
  padding: 14px 20px;
  backdrop-filter: blur(12px);
  margin: 10px 0;
}
.hstat { display: flex; align-items: center; gap: 10px; }
.hstat-icon-wrap { font-size: 1.5rem; }
.hstat-text { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.hstat-num { font-family: 'Barlow Condensed', sans-serif; font-size: 1.8rem; font-weight: 800; line-height: 1; color: #fff; }
.hstat-num.gold { color: #fecc09; }
.hstat-num.cyan { color: #01dbfe; }
.hstat-lbl { font-size: 0.6rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(186,185,186,0.5); }
.hstat-vsep { display: none; }
.hero-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0; }
.hero-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: rgba(186,185,186,0.68);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  padding: 5px 12px;
  transition: all 0.22s;
  white-space: nowrap;
}
.hero-cat:hover { border-color: #01dbfe; color: #01dbfe; background: rgba(1,219,254,0.08); }
.hcat-icon-svg { width: 12px; height: 12px; opacity: 0.6; }
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(135deg, #004d91, #2a4fff);
  border: 1px solid rgba(1,219,254,0.35);
  border-radius: 50px;
  text-decoration: none;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all 0.25s;
  box-shadow: 0 4px 28px rgba(42,79,255,0.3);
  margin-top: 8px;
}
.hero-cta svg { width: 16px; height: 16px; animation: bounce 1.6s ease infinite; }
.hero-cta:hover { border-color: #01dbfe; box-shadow: 0 6px 36px rgba(1,219,254,0.3); transform: translateY(-2px); }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* TABS y CATÁLOGO */
.tabs-bar {
  background: #040c1c;
  border-bottom: 1px solid rgba(1,219,254,0.11);
  position: sticky;
  top: 64px;
  z-index: 100;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tabs-inner { max-width: 1440px; margin: 0 auto; padding: 0 1rem; }
.tabs-nav { display: flex; gap: 2px; min-width: max-content; }
.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(186,185,186,0.5);
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.tab-btn svg { width: 14px; height: 14px; }
.tab-btn:hover { color: #01dbfe; }
.tab-btn.active { color: #01dbfe; border-bottom-color: #01dbfe; }
.tab-count { background: rgba(1,219,254,0.1); color: rgba(186,185,186,0.5); font-size: 0.65rem; font-weight: 700; padding: 2px 6px; border-radius: 50px; }

/* SEARCH SECTION */
.search-section { background: #070e1d; border-bottom: 1px solid rgba(255,255,255,0.05); padding: 20px 1rem; }
.search-form { max-width: 1440px; margin: 0 auto; }
.search-bar {
  display: flex;
  flex-direction: column;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(1,219,254,0.17);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
}
.search-icon { display: none; }
.search-input {
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-size: 0.9rem;
  color: #fff;
  outline: none;
  width: 100%;
}
.search-input::placeholder { color: rgba(186,185,186,0.28); }
.search-btn {
  background: linear-gradient(135deg, #004d91, #2a4fff);
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}
.filter-row { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: 0.7rem; font-weight: 700; color: rgba(186,185,186,0.38); letter-spacing: 0.1em; text-transform: uppercase; }
.filter-group select, .career-pills { width: 100%; }
.filter-group select {
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #fff;
  background: rgba(255,255,255,0.04);
  outline: none;
}
.career-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.career-pill {
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(186,185,186,0.6);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}
.career-pill.active { background: rgba(1,219,254,0.12); color: #01dbfe; border-color: #01dbfe; }
.clear-filters { align-self: flex-start; font-size: 0.75rem; color: rgba(149,26,54,0.8); text-decoration: none; padding: 6px 0; }

/* CATALOG */
.catalog { max-width: 1440px; margin: 0 auto; padding: 24px 1rem 60px; }
.results-info { font-size: 0.8rem; color: rgba(186,185,186,0.4); margin-bottom: 20px; }
.section-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.section-header.academic { background: rgba(0,77,145,0.13); border: 1px solid rgba(0,77,145,0.2); }
.section-header.cases { background: rgba(149,26,54,0.1); border: 1px solid rgba(149,26,54,0.18); }
.section-header-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.academic .section-header-icon { background: rgba(0,77,145,0.28); color: #01dbfe; }
.cases .section-header-icon { background: rgba(149,26,54,0.28); color: #ff7090; }
.section-header-icon svg { width: 20px; height: 20px; }
.section-header-title { font-family: 'Barlow Condensed', sans-serif; font-size: 1.2rem; font-weight: 700; color: #fff; }
.section-header-sub { font-size: 0.75rem; color: rgba(186,185,186,0.5); }

/* BOOKS GRID */
.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.book-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.book-card:hover { transform: translateY(-4px); border-color: rgba(1,219,254,0.28); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.book-cover-wrap { position: relative; width: 100%; aspect-ratio: 2/3; overflow: hidden; background: #0d1628; }
.book-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book-cover-placeholder { width: 100%; height: 100%; background: linear-gradient(145deg, #0e1235, #004d91); display: flex; }
.placeholder-spine { width: 6px; background: #fecc09; }
.placeholder-inner { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 12px; gap: 6px; }
.placeholder-title { font-size: 0.75rem; font-weight: 700; color: rgba(255,255,255,0.9); line-height: 1.3; }
.placeholder-author { font-size: 0.6rem; color: rgba(186,185,186,0.5); }
.cover-badges { position: absolute; top: 6px; right: 6px; display: flex; flex-direction: column; gap: 3px; }
.fmt-pill { font-size: 0.55rem; font-weight: 700; letter-spacing: 0.06em; padding: 2px 5px; border-radius: 3px; }
.fmt-pill.pdf { background: rgba(254,204,9,0.92); color: #3d2d00; }
.fmt-pill.epub { background: rgba(1,219,254,0.92); color: #003040; }
.cover-section-badge { position: absolute; bottom: 6px; left: 6px; font-size: 0.55rem; font-weight: 700; padding: 2px 6px; border-radius: 3px; background: rgba(0,0,0,0.6); color: #fff; }
.book-info { padding: 10px; display: flex; flex-direction: column; flex: 1; }
.book-category-tag { display: inline-block; background: rgba(1,219,254,0.1); color: #01dbfe; font-size: 0.55rem; font-weight: 700; padding: 2px 6px; border-radius: 50px; margin-bottom: 6px; width: fit-content; }
.book-title { font-size: 0.8rem; font-weight: 600; color: #fff; line-height: 1.3; margin-bottom: 2px; }
.book-author { font-size: 0.65rem; color: rgba(186,185,186,0.47); margin-bottom: 4px; }
.book-desc { font-size: 0.65rem; color: rgba(186,185,186,0.36); line-height: 1.4; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.book-meta { display: flex; gap: 8px; font-size: 0.6rem; color: rgba(186,185,186,0.28); margin-bottom: 8px; }
.book-downloads { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }
.btn-read, .btn-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  min-height: 36px;
}
.btn-read svg, .btn-download svg { width: 12px; height: 12px; }
.btn-read.pdf { background: rgba(42,79,255,0.15); color: #4eb8ff; border: 1px solid rgba(42,79,255,0.3); }
.btn-download.pdf { background: rgba(0,77,145,0.6); color: #fff; border: 1px solid rgba(0,77,145,0.8); }
.btn-read.epub { background: rgba(1,219,254,0.08); color: #01dbfe; border: 1px solid rgba(1,219,254,0.22); }
.btn-download.epub { background: rgba(1,219,254,0.08); color: #01dbfe; border: 1px solid rgba(1,219,254,0.28); }

/* FOOTER */
.site-footer { background: #020810; border-top: 1px solid rgba(1,219,254,0.07); padding: 24px 1rem; }
.footer-inner { max-width: 1440px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-logo { height: 32px; object-fit: contain; }
.footer-brand strong { font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; color: #fecc09; }
.footer-brand span { font-size: 0.65rem; color: rgba(186,185,186,0.38); display: block; }
.footer-copy { font-size: 0.65rem; color: rgba(186,185,186,0.26); }

/* MEDIA QUERIES */
@media (min-width: 768px) {
  .hero-visual { display: block; } /* restaurar en tablet/desktop */
  .hero-body { flex-direction: row; text-align: left; align-items: center; gap: 40px; }
  .hero-left { text-align: left; margin: 0; }
  .hero-divider { margin: 12px 0; }
  .hero-stats-box { justify-content: flex-start; }
  .hero-cats { justify-content: flex-start; }
  .search-bar { flex-direction: row; }
  .search-icon { display: block; margin: 0 12px; color: rgba(186,185,186,0.32); width: 20px; height: 20px; }
  .search-input { padding: 14px 0; }
  .search-btn { width: auto; padding: 0 28px; }
  .filter-row { flex-direction: row; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
  .filter-group { min-width: 180px; }
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
}

@media (min-width: 1024px) {
  .hero-body { padding: 3rem 3rem; }
  .books-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 480px) {
  .brand-full { display: none; }
  .header-nav .nav-link:not(.active) { display: none; } /* mostrar solo activo en móvil muy pequeño */
  .hero-stats-box { flex-direction: column; align-items: center; }
  .hstat { width: 100%; justify-content: center; }
  .hero-cat { font-size: 0.6rem; padding: 4px 10px; }
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .book-title { font-size: 0.7rem; }
  .btn-read, .btn-download { font-size: 0.6rem; padding: 4px 6px; }
}

/* ── HERO VISUAL (laptop + iconos flotantes) ─────────────────────── */
.hero-visual {
  flex-shrink: 0;
  width: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.visual-wrap {
  position: relative;
  width: 320px;
  height: 300px;
}

/* Órbitas decorativas */
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(1,219,254,0.08);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.orbit-1 { width: 280px; height: 280px; }
.orbit-2 { width: 220px; height: 220px; border-color: rgba(254,204,9,0.06); }
.orbit-3 { width: 160px; height: 160px; border-color: rgba(42,79,255,0.1); }

/* SVG del laptop */
.laptop-svg {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
}

/* Iconos flotantes — tamaño fijo y posición absoluta */
.ficon {
  position: absolute;
  width: 36px;
  height: 36px;
  background: rgba(1,219,254,0.08);
  border: 1px solid rgba(1,219,254,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  animation: float 3s ease-in-out infinite;
}
.ficon svg {
  width: 18px;
  height: 18px;
  stroke: #01dbfe;
  flex-shrink: 0;
}
.fi1 { top:  8px; left:  30px; animation-delay: 0s;    background: rgba(254,204,9,0.08);  border-color: rgba(254,204,9,0.25); }
.fi1 svg { stroke: #fecc09; }
.fi2 { top:  8px; right: 20px; animation-delay: 0.6s; }
.fi3 { top: 50%; left:   4px;  transform: translateY(-50%); animation-delay: 1.2s; }
.fi4 { bottom: 40px; left: 20px; animation-delay: 1.8s; }
.fi5 { bottom: 20px; right: 14px; animation-delay: 0.4s; background: rgba(42,79,255,0.1); border-color: rgba(42,79,255,0.25); }
.fi5 svg { stroke: #4eb8ff; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.fi3 { animation-name: float3; }
@keyframes float3 {
  0%,100% { transform: translateY(-50%); }
  50%      { transform: translateY(calc(-50% - 8px)); }
}

/* Orbes de fondo */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}
.orb-a { width: 120px; height: 120px; background: rgba(1,219,254,0.07);  top:  10px; right: 20px; }
.orb-b { width: 90px;  height: 90px;  background: rgba(254,204,9,0.06);  bottom: 20px; left: 10px; }
.orb-c { width: 70px;  height: 70px;  background: rgba(42,79,255,0.08);  top: 50%; left: 50%; transform: translate(-50%,-50%); }

/* Animaciones de entrada (data-anim) */
[data-anim] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-anim].visible { opacity: 1; transform: translateY(0); }
[data-anim][data-delay="1"] { transition-delay: 0.1s; }
[data-anim][data-delay="2"] { transition-delay: 0.2s; }
[data-anim][data-delay="3"] { transition-delay: 0.3s; }
[data-anim][data-delay="4"] { transition-delay: 0.4s; }
[data-anim][data-delay="5"] { transition-delay: 0.5s; }
[data-anim="right"] { transform: translateX(24px); }
[data-anim="right"].visible { transform: translateX(0); }

/* .hstat-vsep visible en desktop */
@media (min-width: 768px) {
  .hstat-vsep { display: block; width: 1px; height: 32px; background: rgba(255,255,255,0.08); }
  .hero-visual { width: 380px; }
  .visual-wrap { width: 360px; height: 340px; }
}
@media (min-width: 1024px) {
  .hero-visual { width: 420px; }
  .visual-wrap { width: 400px; height: 380px; }
  .ficon { width: 42px; height: 42px; }
  .ficon svg { width: 20px; height: 20px; }
}