/* ═══════════════════════════════════════════════════════════
   ClickNote Blog — estilos compartidos (listing + artículos)
   Depende de css/styles.css (nav, footer, btn, fuentes)
═══════════════════════════════════════════════════════════ */

/* ── Fondo general ── */
.blog-page {
  background: #f0ebe4;
  min-height: 100vh;
}

/* ═══════════════════════════════════
   BLOG INDEX — header mínimo
═══════════════════════════════════ */
.blog-index-header {
  padding: 7rem 0 2rem;
}

.blog-hero__eyebrow {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7c6af7;
  background: rgba(124, 106, 247, .1);
  border-radius: 99px;
  padding: .3rem .85rem;
}

/* ═══════════════════════════════════
   BLOG INDEX — grilla de cards
═══════════════════════════════════ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1.75rem;
  padding-bottom: 5rem;
}

/* ── Card ── */
.blog-card {
  background: #fff;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .055);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .22s ease;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 38px rgba(124, 106, 247, .13);
}

.blog-card__cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9fe 0%, #f3e8ff 100%);
  position: relative;
}

.blog-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.blog-card:hover .blog-card__cover img {
  transform: scale(1.04);
}

/* Placeholder cuando no hay imagen */
.blog-card__cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card__cover-placeholder svg {
  width: 2.5rem;
  height: 2.5rem;
  opacity: .25;
}

.blog-card__body {
  padding: 1.4rem 1.5rem 1.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.blog-card__category {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #7c6af7;
}

.blog-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: #0f0f1a;
}

.blog-card__excerpt {
  font-size: .875rem;
  color: #5a5a6e;
  line-height: 1.65;
  flex: 1;
  /* clamp a 3 líneas */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .72rem;
  color: #999;
}

.blog-card__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
}

.blog-card__read-more {
  font-size: .78rem;
  font-weight: 600;
  color: #7c6af7;
  display: inline-flex;
  align-items: center;
  gap: .2rem;
  white-space: nowrap;
  text-decoration: none;
}

/* ── Card destacada (primera, full-width) ── */
.blog-card--featured {
  grid-column: 1 / -1;
  border-radius: 1.75rem;
  box-shadow: 0 8px 40px rgba(124, 106, 247, .1);
}

.blog-card--featured .blog-card__cover {
  aspect-ratio: 21 / 8;
  min-height: 14rem;
}

.blog-card--featured .blog-card__body {
  padding: 2rem 2.5rem 2.25rem;
  gap: .8rem;
}

.blog-card--featured .blog-card__category {
  font-size: .72rem;
}

.blog-card--featured .blog-card__title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.25;
}

.blog-card--featured .blog-card__excerpt {
  -webkit-line-clamp: 3;
  font-size: .95rem;
  color: #4a4a62;
}

.blog-card--featured .blog-card__meta {
  font-size: .8rem;
}

.blog-card--featured .blog-card__read-more {
  font-size: .85rem;
}

@media (max-width: 640px) {
  .blog-card--featured .blog-card__body {
    padding: 1.5rem 1.5rem 1.75rem;
  }
}

/* ═══════════════════════════════════
   ARTÍCULO — layout
═══════════════════════════════════ */
.article-wrap {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header del artículo */
.article-header {
  padding-top: 5rem;
  margin-bottom: 2rem;
}

.article-category {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #7c6af7;
  margin-bottom: .85rem;
}

.article-title {
  font-size: clamp(1.75rem, 4.5vw, 2.65rem);
  font-weight: 800;
  line-height: 1.15;
  color: #0f0f1a;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  font-size: .78rem;
  color: #999;
}

.article-meta strong {
  color: #555;
  font-weight: 600;
}

.article-meta__dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
}

/* Imagen de portada */
.article-cover {
  margin: 0 -1.25rem 2.5rem;
  border-radius: 1.1rem;
  overflow: hidden;
  background: linear-gradient(135deg, #ede9fe 0%, #f3e8ff 100%);
  aspect-ratio: 16 / 9;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 640px) {
  .article-cover {
    margin-left: 0;
    margin-right: 0;
  }
}

/* ═══════════════════════════════════
   ARTÍCULO — prose (cuerpo)
═══════════════════════════════════ */
.article-body {
  font-size: 1.05rem;
  line-height: 1.78;
  color: #2d2d42;
  padding-bottom: 3rem;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f0f1a;
  margin: 2.75rem 0 .8rem;
  line-height: 1.25;
  scroll-margin-top: 5rem;
}

.article-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f0f1a;
  margin: 2rem 0 .6rem;
  line-height: 1.3;
  scroll-margin-top: 5rem;
}

.article-body p {
  margin: 0 0 1.3rem;
}

.article-body a {
  color: #7c6af7;
  text-decoration: underline;
  text-decoration-color: rgba(124, 106, 247, .4);
  text-underline-offset: 3px;
  font-weight: 500;
}

.article-body a:hover {
  text-decoration-color: #7c6af7;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1.3rem 1.6rem;
}

.article-body li {
  margin-bottom: .45rem;
}

.article-body blockquote {
  border-left: 3px solid #7c6af7;
  margin: 1.75rem 0;
  padding: .9rem 1.4rem;
  background: rgba(124, 106, 247, .07);
  border-radius: 0 .75rem .75rem 0;
  font-style: italic;
  color: #4a4a62;
}

.article-body strong {
  font-weight: 700;
  color: #0f0f1a;
}

.article-body code {
  font-family: 'Courier New', monospace;
  font-size: .88em;
  background: rgba(0, 0, 0, .07);
  padding: .15em .4em;
  border-radius: .3rem;
}

.article-body hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, .1);
  margin: 2.5rem 0;
}

/* ── Tabla pro / contra ── */
.article-procon {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (max-width: 520px) {
  .article-procon { grid-template-columns: 1fr; }
}

.article-procon__col {
  border-radius: .75rem;
  padding: 1.1rem 1.3rem;
}

.article-procon__col--pro {
  background: rgba(74, 222, 128, .1);
  border: 1px solid rgba(74, 222, 128, .3);
}

.article-procon__col--con {
  background: rgba(251, 113, 133, .08);
  border: 1px solid rgba(251, 113, 133, .25);
}

.article-procon__label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: .6rem;
}

.article-procon__col--pro .article-procon__label { color: #16a34a; }
.article-procon__col--con .article-procon__label { color: #e11d48; }

.article-procon ul {
  margin: 0;
  padding-left: 1.1rem;
}

.article-procon li {
  font-size: .875rem;
  line-height: 1.55;
  color: #3a3a52;
  margin-bottom: .3rem;
}

/* ── Callout box (tip / info) ── */
.article-callout {
  background: rgba(124, 106, 247, .08);
  border: 1px solid rgba(124, 106, 247, .2);
  border-radius: .75rem;
  padding: 1.1rem 1.4rem;
  margin: 1.75rem 0;
  font-size: .95rem;
}

.article-callout strong {
  color: #7c6af7;
}

/* ═══════════════════════════════════
   ARTÍCULO — CTA al final
═══════════════════════════════════ */
.article-cta {
  position: relative;
  overflow: hidden;
  border-radius: 1.75rem;
  margin-bottom: 3rem;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(255, 255, 255, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(167, 139, 250, 0.35) 0%, transparent 50%),
    linear-gradient(145deg, #5b4cdb 0%, #7c6af7 42%, #8b7cf8 100%);
  box-shadow:
    0 4px 6px rgba(79, 70, 229, 0.08),
    0 20px 48px rgba(79, 70, 229, 0.22);
}

.article-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.article-cta__inner {
  position: relative;
  z-index: 1;
  padding: 2.5rem 2rem 2.25rem;
  text-align: center;
  color: #fff;
}

@media (min-width: 640px) {
  .article-cta__inner {
    padding: 3rem 2.75rem 2.75rem;
  }
}

.article-cta__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ede9fe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 99px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.15rem;
}

.article-cta__eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.35);
  flex-shrink: 0;
}

.article-cta__title {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.article-cta__desc {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  max-width: 32rem;
  margin: 0 auto 1.5rem;
}

.article-cta__desc strong {
  color: #fff;
  font-weight: 600;
}

.article-cta__perks {
  list-style: none;
  margin: 0 auto 1.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  max-width: 36rem;
}

.article-cta__perk {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f5f3ff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 0.4rem 0.85rem 0.4rem 0.55rem;
  backdrop-filter: blur(6px);
}

.article-cta__perk-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.25);
  color: #bbf7d0;
  flex-shrink: 0;
}

.article-cta__perk-icon svg {
  width: 0.65rem;
  height: 0.65rem;
}

.article-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: #fff !important;
  color: #5b4cdb !important;
  font-weight: 700 !important;
  font-size: 0.95rem !important;
  padding: 0.85rem 1.75rem !important;
  border-radius: 99px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease !important;
  text-decoration: none;
}

.article-cta__btn:hover {
  background: #faf8ff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.article-cta__note {
  margin: 1rem 0 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}

/* ── Separador visual entre artículo y CTA ── */
.article-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.1), transparent);
  margin: 3rem 0;
}

/* ═══════════════════════════════════
   FOOTER en páginas de blog
   (en la landing el footer vive dentro de .footer-zone que pone el fondo;
   en el blog necesitamos el fondo propio)
═══════════════════════════════════ */
.blog-page .site-footer {
  background: linear-gradient(180deg, #6254d4 0%, #4f46e5 100%);
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* ═══════════════════════════════════
   NAV overrides para páginas de blog
   (rutas con ../ — no cambiar el nav base)
═══════════════════════════════════ */
.nav-wrapper--blog .nav-link--blog-active {
  color: #7c6af7;
  font-weight: 600;
}
