/* ===== Blog Detalle - Moderno ===== */

/* HERO */
.article-hero {
  position: relative;
  background: linear-gradient(180deg, #0a0e1a 0%, #1a1f2e 100%);
  padding: 8rem 0 4rem;
  overflow: hidden;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(107, 74, 124, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(233, 165, 58, 0.12), transparent 50%);
  pointer-events: none;
}

.article-hero .container {
  position: relative;
  z-index: 1;
}

/* Breadcrumb moderno */
.breadcrumb-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  font-size: 0.9rem;
}

.breadcrumb-modern li {
  color: rgba(248, 247, 243, 0.6);
  display: flex;
  align-items: center;
}

.breadcrumb-modern li:not(:last-child)::after {
  content: '/';
  margin: 0 0.5rem;
  color: rgba(248, 247, 243, 0.3);
}

.breadcrumb-modern li:last-child {
  color: rgba(248, 247, 243, 0.9);
  font-weight: 600;
}

.breadcrumb-modern a {
  color: rgba(248, 247, 243, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-modern a:hover {
  color: var(--starlight);
}

/* Título */
.article-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -1px;
  color: var(--starlight);
  margin-bottom: 2rem;
  text-wrap: balance;
}

/* Meta info */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.meta-avatar,
.meta-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(77, 208, 225, 0.15), rgba(171, 71, 188, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.meta-avatar i,
.meta-icon i {
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--liquid-cyan), var(--liquid-purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-size: 0.75rem;
  color: rgba(248, 247, 243, 0.6);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-value {
  font-size: 0.95rem;
  color: var(--starlight);
  font-weight: 700;
}

/* PORTADA */
.article-cover {
  margin-top: 4rem;
  padding-bottom: 4rem;
}

.cover-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cover-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 21/9;
  object-fit: cover;
}

.cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
}

/* CONTENIDO */
.article-content {
  padding: 4rem 0;
  background: #f8f7f3;
}

/* Reading progress */
.reading-progress {
  position: sticky;
  top: 5px;
  left: 0;
  right: 0;
  height: 4px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 999px;
  margin-bottom: 3rem;
  z-index: 100;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--liquid-cyan), var(--liquid-purple), var(--liquid-pink));
  border-radius: 999px;
  width: 0%;
  transition: width 0.2s ease;
}

/* Prose (contenido del artículo) */
.prose {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--areya-text);
  font-weight: 500;
  overflow-wrap: anywhere;   /* moderna: corta palabras larguísimas */
  word-break: break-word;    /* fallback */
  hyphens: auto;             /* divide palabras si el idioma lo permite */
  max-width: 100%;

}

.prose h2 {
  font-size: 2rem;
  font-weight: 800;
  margin: 3rem 0 1.5rem;
  color: var(--areya-text);
  scroll-margin-top: 100px;
}

.prose h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--areya-text);
  scroll-margin-top: 100px;
}

.prose h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  scroll-margin-top: 100px;
}

.prose p {
  margin-bottom: 1.5rem;
}

.prose a {
  color: var(--liquid-purple);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(171, 71, 188, 0.3);
  text-underline-offset: 3px;
  transition: all 0.2s;
}

.prose a:hover {
  color: var(--liquid-cyan);
  text-decoration-color: var(--liquid-cyan);
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 2rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.prose blockquote {
  border-left: 4px solid var(--liquid-purple);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--areya-muted);
  font-size: 1.2rem;
}

.prose ul,
.prose ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.prose li {
  margin-bottom: 0.75rem;
}

.prose code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 12px;
  overflow-x: auto;
  margin: 2rem 0;
}

.prose pre code {
  background: none;
  padding: 0;
}

/* Tags */
.article-tags {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 2px solid rgba(0, 0, 0, 0.08);
}

.tags-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--areya-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: white;
  border: 2px solid rgba(0, 0, 0, 0.08);
  color: var(--areya-text);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s;
}

.tag-pill:hover {
  background: linear-gradient(135deg, var(--liquid-cyan), var(--liquid-purple));
  border-color: transparent;
  color: white;
  transform: translateY(-2px);
}

/* Share */
.share-section {
  margin-top: 3rem;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.share-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--areya-text);
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.share-btn {
  flex: 1;
  min-width: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: white;
  color: var(--areya-text);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.share-btn i {
  font-size: 1.2rem;
}

.share-btn--facebook:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: white;
  transform: translateY(-3px);
}

.share-btn--twitter:hover {
  background: #000;
  border-color: #000;
  color: white;
  transform: translateY(-3px);
}

.share-btn--whatsapp:hover {
  background: #25d366;
  border-color: #25d366;
  color: white;
  transform: translateY(-3px);
}

.share-btn--link:hover {
  background: linear-gradient(135deg, var(--liquid-cyan), var(--liquid-purple));
  border-color: transparent;
  color: white;
  transform: translateY(-3px);
}

/* Navigation */
.article-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 4rem;
}

.nav-card {
  padding: 1.5rem;
  background: white;
  border-radius: 16px;
  border: 2px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.nav-card:hover {
  border-color: var(--liquid-cyan);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(77, 208, 225, 0.2);
}

.nav-label {
  font-size: 0.85rem;
  color: var(--areya-muted);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.nav-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--areya-text);
}

.nav-card--next {
  text-align: right;
}

.nav-card--next .nav-label {
  justify-content: flex-end;
}

/* SIDEBAR */
.article-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--areya-text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

/* Table of Contents */
.toc-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-nav a {
  display: block;
  padding: 0.5rem 0;
  color: var(--areya-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-left: 2px solid transparent;
  padding-left: 1rem;
}

.toc-nav a:hover {
  color: var(--liquid-purple);
  border-left-color: var(--liquid-purple);
  padding-left: 1.2rem;
}

.toc-nav a.active {
  color: var(--liquid-cyan);
  border-left-color: var(--liquid-cyan);
  padding-left: 1.2rem;
}

/* Related Articles */
.related-articles {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.related-card {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s;
}

.related-card:hover {
  background: rgba(0, 0, 0, 0.03);
}

.related-image {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.related-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--areya-text);
  margin: 0 0 0.3rem;
  line-height: 1.4;
}

.related-date {
  font-size: 0.8rem;
  color: var(--areya-muted);
  margin: 0;
}

/* CTA Card */
.sidebar-card--cta {
  background: linear-gradient(135deg, rgba(77, 208, 225, 0.08), rgba(171, 71, 188, 0.08));
  border: 2px solid rgba(77, 208, 225, 0.2);
  text-align: center;
}

.cta-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--liquid-cyan), var(--liquid-purple));
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-icon i {
  font-size: 2rem;
  color: white;
}

.cta-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--areya-text);
  margin-bottom: 1rem;
}

.cta-text {
  color: var(--areya-muted);
  font-weight: 600;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--liquid-cyan), var(--liquid-purple));
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(77, 208, 225, 0.3);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(77, 208, 225, 0.4);
}

/* RESPONSIVE */
@media (max-width: 991.98px) {
  .article-hero {
    padding: 6rem 0 3rem;
  }

  .article-meta {
    gap: 1rem;
  }

  .meta-avatar,
  .meta-icon {
    width: 40px;
    height: 40px;
  }

  .article-cover {
    margin-top: 0;
  }

  .article-sidebar {
    position: static;
    margin-top: 3rem;
  }

  .share-buttons {
    flex-direction: column;
  }

  .share-btn {
    flex: auto;
    min-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .article-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}