/* ==========================================================================
   RECURSOS SOLVITU — ESTILOS DEL PORTAL (recursos.solvitu.com)
   Tema Claro (Light Theme) Elegante con Glassmorphism, Micro-animaciones
   y Tipografía Premium basada en el Sistema de Diseño Solvitu
   ========================================================================== */

:root {
  /* Paleta Base Light Theme */
  --bg: #f5f5f7;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.88);
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(124, 58, 237, 0.35);
  --text: #1a1a1e;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  /* Acentos de Marca */
  --purple: #7c3aed;
  --purple-soft-rgb: 124, 58, 237;
  --purple-glow: rgba(124, 58, 237, 0.2);
  --purple-gradient: linear-gradient(135deg, #7c3aed, #9333ea);
  
  --blue: #2563eb;
  --blue-glow: rgba(37, 99, 235, 0.2);
  --blue-gradient: linear-gradient(135deg, #2563eb, #3b82f6);
  
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.2);
  
  --amber: #f59e0b;
  
  /* Sombras */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 16px 36px rgba(124, 58, 237, 0.12), 0 4px 12px rgba(0, 0, 0, 0.03);
  
  /* Tipografía */
  --font-heading: 'Sora', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Radios */
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 9999px;
  
  --container-max: 1240px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Gradients & Glows (Sutiles y limpios para Light Theme) */
.bg-ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-blob-1 {
  position: absolute;
  top: -150px;
  left: 15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.07) 0%, rgba(124, 58, 237, 0) 70%);
  filter: blur(80px);
  border-radius: 50%;
}

.ambient-blob-2 {
  position: absolute;
  top: 35%;
  right: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, rgba(37, 99, 235, 0) 70%);
  filter: blur(90px);
  border-radius: 50%;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 40%, transparent 80%);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 1rem;
  z-index: 100;
  margin-bottom: 2rem;
}

.nav-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: border-color 0.3s ease;
}

.nav-glass:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--purple-gradient);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-family: var(--font-heading);
  box-shadow: 0 4px 12px var(--purple-glow);
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.25);
  color: var(--purple);
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover {
  color: var(--text);
}

.btn-nav {
  padding: 0.5rem 1.1rem;
  background: #1a1a1e;
  border: 1px solid #1a1a1e;
  border-radius: var(--radius-pill);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.25s ease;
}

.btn-nav:hover {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
  box-shadow: 0 4px 16px var(--purple-glow);
  transform: translateY(-1px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  text-align: center;
  padding: 3.5rem 0 2.5rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple);
  margin-bottom: 1.25rem;
}

.hero-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.gradient-text {
  background: var(--purple-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-blue {
  background: var(--blue-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* ==========================================================================
   SEARCH & FILTER BAR
   ========================================================================== */
.search-filter-wrapper {
  max-width: 840px;
  margin: 0 auto 3.5rem;
}

.search-box-outer {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 8px 6px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  transition: all 0.3s ease;
}

.search-box-outer:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15), 0 8px 25px rgba(0, 0, 0, 0.06);
}

.search-icon {
  color: var(--text-muted);
  display: grid;
  place-items: center;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
}

.search-input::placeholder {
  color: var(--text-subtle);
}

.search-shortcut {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 1.25rem;
}

.filter-btn {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.filter-btn:hover {
  color: var(--text);
  border-color: rgba(0, 0, 0, 0.2);
  background: #fafafa;
}

.filter-btn.active {
  background: rgba(124, 58, 237, 0.08);
  border-color: var(--purple);
  color: var(--purple);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(124, 58, 237, 0.15);
}

.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding: 0 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   RESOURCES GRID & CARDS
   ========================================================================== */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.resource-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.resource-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

/* Card Visual Header */
.card-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  background: #f1f3f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.resource-card:hover .card-img {
  transform: scale(1.04);
}

.card-badge-type {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.badge-blue {
  background: rgba(37, 99, 235, 0.9);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.badge-purple {
  background: rgba(124, 58, 237, 0.9);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
}

.badge-emerald {
  background: rgba(16, 185, 129, 0.9);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.card-badge-count {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  z-index: 2;
}

/* Card Content Body */
.card-content {
  padding: 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title-wrap {
  margin-bottom: 0.75rem;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.card-description {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 1.5rem;
  list-style: none;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 9px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--border);
  color: #475569;
  border-radius: 6px;
  font-weight: 600;
}

/* Card Action Footer */
.card-footer {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-meta-text {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.btn-card-action {
  padding: 8px 18px;
  background: var(--purple-gradient);
  border: none;
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px var(--purple-glow);
}

.btn-card-action:hover {
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.btn-card-blue {
  background: var(--blue-gradient);
  box-shadow: 0 4px 12px var(--blue-glow);
}
.btn-card-blue:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

/* ==========================================================================
   ACADEMIA CTA BANNER (Light Editorial Style)
   ========================================================================== */
.academy-cta-section {
  margin-bottom: 5rem;
}

.academy-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f1f4fd 100%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.academy-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.academy-banner-content {
  max-width: 600px;
}

.academy-banner-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--purple);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.academy-banner-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.academy-banner-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.btn-academy-cta {
  padding: 12px 28px;
  background: var(--purple);
  color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 4px 16px var(--purple-glow);
}

.btn-academy-cta:hover {
  background: #6d28d9;
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  transform: translateY(-2px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text);
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .resources-grid {
    grid-template-columns: 1fr;
  }
  .academy-banner {
    padding: 2rem 1.5rem;
  }
  .search-shortcut {
    display: none;
  }
}
