/* ===== BLOG ===== */

.blog-hero {
  background:
    radial-gradient(at 78% 12%, rgba(42, 82, 152, 0.55), transparent 55%),
    radial-gradient(at 18% 88%, rgba(232, 160, 32, 0.16), transparent 55%),
    linear-gradient(160deg, var(--primary-darker) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  color: var(--white);
  padding: 150px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 75%);
  z-index: -1;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  margin-bottom: 16px;
}
.blog-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  line-height: 1.15;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.78) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.blog-hero p {
  color: rgba(255,255,255,0.78);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

.blog-list {
  padding: 60px 0 80px;
  background: #f7f9fc;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}
.blog-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(30,45,61,0.08);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(30,45,61,0.14);
  border-color: var(--primary-light);
}
.blog-card-img {
  aspect-ratio: 16/9;
  background:
    linear-gradient(135deg, #eef3fb 0%, #dde6f3 100%);
  overflow: hidden;
  position: relative;
}
.blog-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(8, 25, 51, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
  pointer-events: none;
}
.blog-card:hover .blog-card-img::after { opacity: 1; }
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.blog-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 10px;
}
.blog-card-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--primary-dark);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.blog-card-body h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.blog-card-body h2 a:hover {
  color: var(--primary);
}
.blog-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.blog-meta i { color: var(--accent); font-size: 0.78rem; }
.blog-meta span + span { position: relative; padding-left: 14px; }
.blog-meta span + span::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--border);
}
.blog-summary {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
}
.blog-card-link {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  align-self: flex-start;
  transition: color 0.25s var(--ease-out), border-color 0.25s var(--ease-out), letter-spacing 0.25s var(--ease-out);
}
.blog-card-link:hover {
  color: var(--primary-dark);
  border-bottom-color: var(--accent);
  letter-spacing: 0.5px;
}

/* ===== POST ===== */
.post-hero {
  background:
    radial-gradient(at 78% 12%, rgba(42, 82, 152, 0.5), transparent 55%),
    radial-gradient(at 18% 88%, rgba(232, 160, 32, 0.14), transparent 55%),
    linear-gradient(160deg, var(--primary-darker) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  color: var(--white);
  padding: 150px 0 64px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.post-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 30% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, #000 30%, transparent 75%);
  z-index: -1;
}
.post-hero .container {
  max-width: 820px;
  position: relative;
  z-index: 1;
}
.post-hero .blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: rgba(232, 160, 32, 0.16);
  border: 1px solid rgba(232, 160, 32, 0.3);
  border-radius: 999px;
  color: var(--accent);
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.post-hero h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 8px 0 20px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.post-meta {
  color: rgba(255,255,255,0.78);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
}
.post-meta span + span::before {
  content: "·";
  margin: 0 10px;
}

.post-body {
  background: #fff;
  padding: 50px 0 80px;
}
.post-body .container {
  max-width: 760px;
}
.post-figure {
  margin: 0 0 32px;
}
.post-figure img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.post-figure figcaption {
  font-size: 0.85rem;
  color: #7a8898;
  text-align: center;
  margin-top: 10px;
  font-style: italic;
}

.post-toc {
  background: linear-gradient(135deg, #f7f9fc 0%, #eef3fb 100%);
  border-left: 4px solid var(--accent);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-left-color: var(--accent);
  padding: 22px 26px;
  border-radius: 10px;
  margin: 0 0 36px;
}
.post-toc h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-dark);
  margin: 0 0 14px;
  font-weight: 700;
}
.post-toc h3::before {
  content: '\f0ca';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--accent);
  font-size: 0.9rem;
}
.post-toc ol {
  margin: 0;
  padding-left: 22px;
  counter-reset: toc;
}
.post-toc li {
  margin: 8px 0;
  font-size: 0.95rem;
}
.post-toc a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.2s var(--ease-out), padding-left 0.2s var(--ease-out);
  display: inline-block;
}
.post-toc a:hover {
  color: var(--accent-dark);
  padding-left: 4px;
}

.post-body p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2c3e50;
  margin: 0 0 20px;
}
.post-body > .container > p:first-of-type {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--primary-dark);
  font-weight: 500;
}
.post-body h2 {
  position: relative;
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--primary-dark);
  margin: 56px 0 20px;
  padding-top: 8px;
  scroll-margin-top: 90px;
}
.post-body h2::before {
  content: '';
  display: block;
  width: 42px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 2px;
  margin-bottom: 14px;
}
.post-body h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 32px 0 14px;
  scroll-margin-top: 90px;
}
.post-body a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(26, 60, 110, 0.3);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 0.2s var(--ease-out), text-decoration-color 0.2s var(--ease-out);
}
.post-body a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent);
}
.post-body ul {
  padding-left: 0;
  margin: 0 0 24px;
  list-style: none;
}
.post-body ul li {
  position: relative;
  padding-left: 28px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2c3e50;
  margin: 10px 0;
}
.post-body ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.post-body ol {
  padding-left: 28px;
  margin: 0 0 24px;
}
.post-body ol li {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2c3e50;
  margin: 10px 0;
  padding-left: 6px;
}
.post-body ol li::marker { color: var(--accent); font-weight: 700; }
.post-body strong { color: var(--primary-dark); }
.post-body code:not(pre code) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(26, 60, 110, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--primary-dark);
}
.post-body blockquote {
  margin: 28px 0;
  padding: 18px 26px;
  background: linear-gradient(135deg, #f7f9fc 0%, #eef3fb 100%);
  border-left: 4px solid var(--primary);
  border-radius: 0 12px 12px 0;
  color: var(--primary-dark);
  font-style: italic;
  line-height: 1.7;
}

.post-table-wrapper {
  overflow-x: auto;
  margin: 24px 0 32px;
  border-radius: 12px;
  border: 1px solid #e2e8ed;
  box-shadow: 0 4px 16px rgba(30, 45, 61, 0.05);
}
.post-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.95rem;
}
.post-table thead th {
  background: linear-gradient(135deg, var(--primary-darker), var(--primary-dark));
  color: var(--white);
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.post-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: top;
  color: #2c3e50;
  line-height: 1.6;
}
.post-table tbody tr:last-child td {
  border-bottom: none;
}
.post-table tbody tr:nth-child(even) {
  background: #fafbfc;
}
.post-table tbody tr {
  transition: background 0.2s var(--ease-out);
}
.post-table tbody tr:hover {
  background: rgba(232, 160, 32, 0.06);
}
.post-table .col-item {
  width: 70px;
  font-weight: 700;
  color: var(--accent-dark);
  white-space: nowrap;
}
.post-table .col-causa {
  width: 32%;
  font-weight: 600;
  color: var(--primary-dark);
}

.post-inline-cta {
  position: relative;
  background: linear-gradient(135deg, #fffbeb 0%, #fef8e0 100%);
  border: 1px solid #fde68a;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 20px 24px 20px 22px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--primary-dark);
}
.post-inline-cta i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(232, 160, 32, 0.18);
  color: var(--accent-dark);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.post-inline-cta a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(232, 160, 32, 0.4);
  text-underline-offset: 3px;
  transition: color 0.2s var(--ease-out), text-decoration-color 0.2s var(--ease-out);
}
.post-inline-cta a:hover {
  color: var(--primary-dark);
  text-decoration-color: var(--accent);
}

.post-callout {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border-left: 4px solid var(--accent);
  padding: 22px 26px;
  border-radius: 10px;
  margin: 30px 0;
}
.post-callout strong {
  display: block;
  color: #854d0e;
  margin-bottom: 6px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.post-callout p {
  margin: 0;
  color: #713f12;
}

.post-cta {
  position: relative;
  background:
    radial-gradient(at 100% 0%, rgba(232, 160, 32, 0.18), transparent 50%),
    linear-gradient(135deg, var(--primary-darker) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 40px 32px;
  border-radius: 16px;
  text-align: center;
  margin: 48px 0 24px;
  overflow: hidden;
}
.post-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 80%);
  pointer-events: none;
}
.post-cta > * { position: relative; z-index: 1; }
.post-cta h3 {
  color: var(--white);
  margin: 0 0 10px;
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}
.post-cta p {
  color: rgba(255,255,255,0.85);
  margin: 0 0 24px;
}
.post-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--primary-dark);
  padding: 13px 28px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(232, 160, 32, 0.32);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.post-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 160, 32, 0.42);
}

.post-author {
  position: relative;
  border-top: 1px solid #e2e8ed;
  padding: 28px 24px;
  margin-top: 48px;
  color: #5a6a7a;
  font-size: 0.95rem;
  line-height: 1.7;
  background: linear-gradient(135deg, #f9fafc 0%, #f1f4f9 100%);
  border-radius: 12px;
  border-top-width: 1px;
  border: 1px solid var(--border);
}
.post-author::before {
  content: '\f007';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 24px; left: 24px;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(232, 160, 32, 0.2), rgba(232, 160, 32, 0.06));
  color: var(--accent-dark);
  font-size: 1rem;
  border: 1px solid rgba(232, 160, 32, 0.3);
}
.post-author { padding-left: 76px; }
.post-author strong { color: var(--primary-dark); font-weight: 700; }

@media (max-width: 640px) {
  .blog-hero h1 { font-size: 1.8rem; }
  .post-hero h1 { font-size: 1.7rem; }
  .post-body h2 { font-size: 1.3rem; }
  .post-cta { padding: 24px 20px; }
}

/* ===== POST FIGURES (placeholder + real) ===== */
.post-figure {
  margin: 32px 0;
  text-align: center;
}
.post-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(15,37,72,0.10);
}
.post-figure figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  color: #5a6a7a;
  font-style: italic;
  line-height: 1.5;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.post-figure-placeholder .figure-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 260px;
  background:
    radial-gradient(circle at 30% 30%, rgba(26, 60, 110, 0.04), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(232, 160, 32, 0.05), transparent 50%),
    linear-gradient(135deg, #f7f9fc 0%, #eef3fb 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  padding: 32px 24px;
}
.post-figure-placeholder .figure-placeholder i.fas {
  font-size: 2.2rem;
  width: 64px; height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(232, 160, 32, 0.18), rgba(232, 160, 32, 0.06));
  border: 1px solid rgba(232, 160, 32, 0.25);
  color: var(--accent-dark);
}
.post-figure-placeholder .figure-placeholder-label {
  font-size: 0.92rem;
  color: var(--text-muted);
  font-weight: 500;
}
.post-figure-placeholder .figure-placeholder-label code {
  background: rgba(15,37,72,0.06);
  padding: 3px 10px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--primary-dark);
}
