/* =========================================================
   Blog IVA Franquiciado — blog.css
   Blog-specific components. Builds on styles.css tokens.
   ========================================================= */

/* ─── BLOG HERO ──────────────────────────────────────────── */

.blog-hero {
  padding: 72px 0 48px;
  text-align: center;
}
@media (max-width: 640px) { .blog-hero { padding: 48px 0 32px; } }

.blog-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--yellow-soft);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.blog-hero__eyebrow::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow-deep);
  flex-shrink: 0;
}
.blog-hero__title {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 62px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 18px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.blog-hero__title em {
  font-style: italic;
  background: linear-gradient(180deg, transparent 55%, var(--yellow-soft) 55%);
  padding: 0 4px;
}
.blog-hero__sub {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto;
}

/* ─── FEATURED ARTICLE ───────────────────────────────────── */

.blog-featured {
  background: var(--yellow-soft);
  border: 2px solid var(--ink);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 64px;
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .blog-featured { grid-template-columns: 3fr 2fr; }
}

.blog-featured__body {
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
@media (max-width: 640px) { .blog-featured__body { padding: 24px 20px; } }

.blog-featured__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.blog-featured__label::before {
  content: '+';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--ink);
  color: var(--yellow);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}
.blog-featured__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.blog-featured__meta .badge {
  margin-bottom: 0;
  font-size: 11px;
  padding: 3px 10px;
}
.blog-featured__title {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.blog-featured__title em { font-style: italic; }
.blog-featured__excerpt {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.blog-featured__img {
  background: var(--yellow);
  border-left: 2px solid var(--ink);
  min-height: 300px;
  position: relative;
  overflow: hidden;
}
.blog-featured__img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 719px) {
  .blog-featured__img {
    border-left: none;
    border-top: 2px solid var(--ink);
    min-height: 180px;
    order: -1;
  }
}
.blog-featured__img-inner {
  width: 70%;
  max-width: 260px;
  aspect-ratio: 3/4;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 var(--ink);
}
.blog-featured__img-label {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  padding: 16px;
  line-height: 1.3;
}

/* ─── SECTION HEADING ────────────────────────────────────── */

.blog-section-title {
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

/* ─── CATEGORY FILTERS ───────────────────────────────────── */

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.blog-filters::-webkit-scrollbar { display: none; }

.blog-filter {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: var(--r-pill);
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  white-space: nowrap;
  transition: background .15s, color .15s;
  text-decoration: none;
  font-family: inherit;
}
.blog-filter:hover { background: var(--ink); color: #fafafa; }
.blog-filter.is-active { background: var(--yellow); border-color: var(--ink); color: var(--ink); font-weight: 700; }
.blog-filter.is-active span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--yellow);
  border-radius: var(--r-pill);
  padding: 1px 7px;
  font-size: 11px;
  margin-left: 6px;
}

/* ─── ARTICLE GRID ───────────────────────────────────────── */

.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 64px;
}
@media (min-width: 600px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

/* ─── ARTICLE CARD ───────────────────────────────────────── */

.blog-card {
  display: flex;
  flex-direction: column;
  border: 2px solid #FDDE00;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s, transform .15s;
  padding: 28px 24px 20px;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

.blog-card__img { display: none; }

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0;
}
.blog-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 14px;
}
.blog-card__badge::before {
  content: '✦';
  font-size: 9px;
  color: var(--ink);
}
.blog-card__title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 14px;
  color: var(--ink);
}
.blog-card__title em { font-style: italic; }
.blog-card__excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}
.blog-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
}
.blog-card__meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0;
}
.blog-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FDDE00;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── ARTICLE PAGE ───────────────────────────────────────── */

.article-breadcrumb {
  padding: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 1060px;
  margin-left: auto;
  margin-right: auto;
}
.article-breadcrumb a { text-decoration: none; }
.article-breadcrumb a:hover { text-decoration: underline; }

.article-header {
  padding: 32px 0 40px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.article-header__meta {
  justify-content: center;
}
.article-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: var(--yellow-soft);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.article-header__badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow-deep);
  flex-shrink: 0;
}
.article-header__title {
  font-family: var(--serif);
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 14px;
}
.article-header__title em { font-style: italic; }
.article-header__subtitle {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}
.article-header__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.article-header__meta span { opacity: 0.6; }
.article-header__meta span:first-child,
.article-header__meta span:nth-child(3),
.article-header__meta span:nth-child(5) { opacity: 1; }

/* ─── ARTICLE 2-COLUMN LAYOUT ────────────────────────────── */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
  padding-bottom: 48px;
  max-width: 1060px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
}

/* ─── TOC BOX ────────────────────────────────────────────── */

.article-toc {
  background: rgba(0,0,0,0.03);
  border-left: 3px solid #FDDE00;
  border-radius: 12px;
  padding: 16px 24px 20px;
  margin-bottom: 32px;
}
.article-toc__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 10px;
  display: block;
}
.article-toc a {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.7;
  text-decoration: none;
  padding: 4px 0;
}
.article-toc a:hover { opacity: 1; text-decoration: underline; }
.article-toc a.toc-cta {
  font-weight: 700;
  font-size: 13.5px;
  opacity: 1;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

/* ─── ARTICLE BODY ───────────────────────────────────────── */

.article-body {
  min-width: 0;
  padding-bottom: 40px;
}
.article-lead {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.65;
  color: var(--ink);
  margin-bottom: 12px;
}
.article-updated {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 32px;
  display: block;
}
.article-body h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
  margin: 40px 0 14px;
  scroll-margin-top: 80px;
}
.article-body h3 {
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 700;
  color: #222;
  margin: 28px 0 10px;
  scroll-margin-top: 80px;
}
.article-body p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 16px;
}
.article-body p strong { color: var(--ink); }
.article-body ul, .article-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}
.article-body li {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: 6px;
}
.article-body small {
  font-size: 13px;
  color: var(--muted);
}

/* Tables — match Figma (#F5F5F0 headers, #E0E0E0 borders) */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.article-body th {
  background: #F5F5F0;
  color: var(--ink);
  padding: 12px 17px;
  text-align: left;
  font-weight: 700;
  border: 1px solid #E0E0E0;
  font-size: 14px;
}
.article-body td {
  padding: 12px 17px;
  border: 1px solid #E0E0E0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.article-body tr:nth-child(even) td { background: transparent; }

.article-callout {
  background: rgba(253,222,0,0.12);
  border-left: 3px solid #FDDE00;
  border-radius: 12px;
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
}
.article-callout strong { color: var(--ink); }

.article-separator {
  border: none;
  border-top: 1px solid #E0E0E0;
  margin: 40px 0;
}

.article-cta {
  margin: 40px 0;
  padding: 28px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.article-cta p {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
}

/* ─── STICKY SIDEBAR ─────────────────────────────────────── */

.article-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 88px;
}
@media (max-width: 960px) {
  .article-sidebar { display: none; }
}

.sidebar-box {
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  padding: 20px 24px;
}
.sidebar-box__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.5;
  margin-bottom: 12px;
  display: block;
}
.sidebar-box a {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0.7;
  text-decoration: none;
  padding: 4px 0;
}
.sidebar-box a:hover { opacity: 1; text-decoration: underline; }
.sidebar-box__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}
.sidebar-box p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
}
.sidebar-box .btn-pill {
  display: block;
  width: 100%;
  background: #FDDE00;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  box-sizing: border-box;
}
.sidebar-box .btn-pill:hover { opacity: 0.85; }

/* ─── ARTICLE BOTTOM BANNER ──────────────────────────────── */

.article-banner {
  background: var(--ink);
  border-radius: 16px;
  padding: 56px 32px;
  text-align: center;
  margin-bottom: 64px;
  max-width: 1060px;
  margin-left: auto;
  margin-right: auto;
}
.article-banner__title {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  color: #fafafa;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.article-banner__sub {
  font-size: 16px;
  color: rgba(250,250,250,0.7);
  margin-bottom: 28px;
  line-height: 1.6;
}
.article-banner .btn-pill {
  display: inline-block;
  background: #FDDE00;
  border-radius: 999px;
  padding: 14px 32px;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
}
.article-banner .btn-pill:hover { opacity: 0.85; }

/* ─── CARDS SIN IMAGEN ───────────────────────────────────── */

.blog-card__img { display: none; }
.blog-card {
  background: var(--surface);
}

/* ─── BLOG NAV ACTIVE STATE ──────────────────────────────── */

.nav-links a.is-active {
  font-weight: 700;
  color: var(--ink);
}
