/* ==========================================================================
   ALCA SISTEMAS SAS - SISTEMA DE EXPERIENCIA DE USUARIO PARA EL BLOG (HUB)
   Inspirado en: HubSpot, Backlinko, Smashing Magazine, Neil Patel, Platzi
   Estándar: Blueprint CAD / WCAG 2.1 AA / Core Web Vitals LCP < 1.0s
   ========================================================================== */

/* Enlaces dentro del contenido del blog (sin interferir con el header corporativo) */
.blog-hero a,
.learning-paths-section a,
.catalog-control-hub a,
.catalog-grid a,
.cohort-banner a {
  color: #38BDF8;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.blog-hero a:hover,
.learning-paths-section a:hover,
.catalog-control-hub a:hover,
.catalog-grid a:hover,
.cohort-banner a:hover {
  color: #D4AF37;
}

/* Blindaje de Logotipo Institucional */
.brand-logo-img {
  width: 52px !important;
  height: 52px !important;
  max-width: 52px !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: contain !important;
  display: block !important;
}

/* HERO SECTION */
.blog-hero {
  padding: 50px 20px 35px;
  text-align: center;
  background: radial-gradient(circle at 50% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 70%);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  position: relative;
}

.blog-badge-cad {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: #D4AF37;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 5px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.blog-hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: #FFFFFF;
  margin: 0 0 14px;
  line-height: 1.25;
}

.blog-hero-lead {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: #CBD5E1;
  max-width: 820px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

.blog-editorial-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #94A3B8;
  text-decoration: none;
  transition: color 0.2s ease;
}
.blog-editorial-link:hover {
  color: #38BDF8;
}

/* BUSCADOR PREDICTIVO MAESTRO */
.search-hub-container {
  max-width: 760px;
  margin: 28px auto 14px;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-hub-input {
  width: 100%;
  background: #070F1A;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 16px 85px 16px 48px;
  color: #FFFFFF;
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.search-hub-input:focus {
  border-color: #D4AF37;
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.25);
}

.search-icon-left {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #38BDF8;
  pointer-events: none;
  width: 20px;
  height: 20px;
}

.search-shortcut-badge {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94A3B8;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #94A3B8;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.2s ease;
}
.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

/* CHIPS RÁPIDOS */
.search-quick-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 12px auto 0;
  max-width: 860px;
}

.quick-tag-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  background: rgba(11, 25, 44, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #94A3B8;
  padding: 4px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-tag-chip:hover {
  border-color: #38BDF8;
  color: #FFFFFF;
  background: rgba(56, 189, 248, 0.18);
  transform: translateY(-1px);
}

/* RUTAS GUIADAS DE APRENDIZAJE (PLATZI STYLE) */
.learning-paths-section {
  padding: 36px 0 20px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}

.paths-header {
  text-align: center;
  margin-bottom: 24px;
}

.paths-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #38BDF8;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.paths-title {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: #FFFFFF;
  margin: 4px 0 0;
}

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

.path-card {
  background: linear-gradient(135deg, rgba(11, 25, 44, 0.95), rgba(7, 15, 26, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 10px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.path-card:hover {
  border-color: #D4AF37;
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 175, 55, 0.15);
}

.path-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38BDF8, #D4AF37);
  opacity: 0.8;
}

.path-icon-badge {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.path-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: #FFFFFF;
  margin: 0 0 8px;
}

.path-card-desc {
  font-size: 0.85rem;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0 0 16px;
  flex-grow: 1;
}

.path-card-btn {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #D4AF37;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* BARRA DE NAVEGACIÓN Y FILTROS DEL CATÁLOGO */
.catalog-control-hub {
  margin: 35px 0 25px;
}

.cluster-tabs-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.cluster-tabs-scroll::-webkit-scrollbar {
  height: 4px;
}
.cluster-tabs-scroll::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 4px;
}

.theme-tab-btn {
  background: rgba(11, 25, 44, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: #94A3B8;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.theme-tab-btn:hover {
  border-color: #38BDF8;
  color: #FFFFFF;
  background: rgba(56, 189, 248, 0.15);
}
.theme-tab-btn.active {
  background: rgba(212, 175, 55, 0.16);
  border-color: #D4AF37;
  color: #D4AF37;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.theme-tab-count {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 10px;
  color: inherit;
}

/* FILTROS FACETADOS RÁPIDOS */
.facet-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #0B192C;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 12px 18px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.facet-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.facet-label {
  color: #64748B;
  font-size: 0.74rem;
  text-transform: uppercase;
}

.facet-select {
  background: #070F1A;
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #CBD5E1;
  padding: 5px 10px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.78rem;
  outline: none;
  cursor: pointer;
}
.facet-select:focus {
  border-color: #D4AF37;
}

.catalog-status-text {
  color: #94A3B8;
  font-size: 0.8rem;
}
.catalog-status-text strong {
  color: #D4AF37;
}

.clear-facets-btn {
  background: transparent;
  border: 1px solid #38BDF8;
  color: #38BDF8;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.74rem;
  display: none;
  transition: all 0.2s ease;
}
.clear-facets-btn:hover {
  background: #38BDF8;
  color: #070F1A;
}

/* GRID DEL CATÁLOGO DINÁMICO */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
  margin: 24px 0 35px;
}

.catalog-card {
  background: #0B192C;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.catalog-card:hover {
  transform: translateY(-4px);
  border-color: #D4AF37;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 18px rgba(212, 175, 55, 0.12);
}

.catalog-card-header {
  padding: 16px 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.card-cluster-pill {
  font-size: 0.66rem;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card-cluster-pill.dolar { background: rgba(244, 63, 94, 0.12); color: #F43F5E; border: 1px solid rgba(244, 63, 94, 0.3); }
.card-cluster-pill.bonos { background: rgba(56, 189, 248, 0.12); color: #38BDF8; border: 1px solid rgba(56, 189, 248, 0.3); }
.card-cluster-pill.etfs { background: rgba(16, 185, 129, 0.12); color: #10B981; border: 1px solid rgba(16, 185, 129, 0.3); }
.card-cluster-pill.reits { background: rgba(245, 158, 11, 0.12); color: #F59E0B; border: 1px solid rgba(245, 158, 11, 0.3); }
.card-cluster-pill.legal { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; border: 1px solid rgba(139, 92, 246, 0.3); }
.card-cluster-pill.biblioteca { background: rgba(212, 175, 55, 0.12); color: #D4AF37; border: 1px solid rgba(212, 175, 55, 0.3); }
.card-cluster-pill.valor-intrinseco { background: rgba(234, 179, 8, 0.12); color: #EAB308; border: 1px solid rgba(234, 179, 8, 0.3); }

.card-level-tag {
  font-size: 0.62rem;
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  color: #94A3B8;
  padding: 3px 6px;
  border-radius: 4px;
}

.catalog-card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.08rem;
  line-height: 1.35;
  color: #FFFFFF;
  margin: 4px 0 0;
}
.catalog-card-title a {
  color: #FFFFFF !important;
  text-decoration: none !important;
  transition: color 0.2s ease !important;
}
.catalog-card-title a:hover {
  color: #D4AF37 !important;
}

.catalog-card-body {
  padding: 12px 18px;
  flex-grow: 1;
}

.catalog-card-excerpt {
  color: #94A3B8;
  font-size: 0.84rem;
  line-height: 1.5;
  margin: 0;
}

.catalog-card-footer {
  padding: 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: #64748B;
  font-family: var(--font-mono);
}

.catalog-read-link {
  color: #38BDF8;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.catalog-read-link:hover {
  color: #D4AF37;
}

/* PAGINACIÓN MODERNA */
.catalog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 30px auto 40px;
  flex-wrap: wrap;
}

.page-btn {
  background: #0B192C;
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #94A3B8;
  padding: 8px 14px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.page-btn:hover:not(:disabled) {
  border-color: #38BDF8;
  color: #FFFFFF;
  background: rgba(56, 189, 248, 0.15);
}
.page-btn.active {
  border-color: #D4AF37;
  color: #070F1A;
  background: #D4AF37;
  font-weight: 700;
}
.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* BANNER COHORTE */
.cohort-banner {
  background: linear-gradient(135deg, rgba(11, 25, 44, 0.95), rgba(7, 15, 26, 0.98));
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  border-radius: 12px;
  padding: 32px 28px;
  margin: 40px auto 30px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(212, 175, 55, 0.1);
}
