/* ====================================
   SEGURO CANGURO — RECURSOS THEME
   v1.0.0
   ==================================== */

/* ---- Reset & Base ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors — exact match con segurocanguro.com */
  --color-primary:       #090089;
  --color-primary-hover: #143cff;
  --color-primary-dark:  #060060;
  --color-accent:        #00cdff;
  --color-text:          #1A180A;
  --color-text-secondary:#322B01;
  --color-text-light:    #808080;
  --color-bg:            #ffffff;
  --color-bg-light:      #f2f2f2;
  --color-bg-footer:     #040037;
  --color-border:        #d3d3d3;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;

  /* Layout */
  --container-max:     1200px;
  --container-padding: 40px;
  --header-height:     70px;

  /* Borders — same as main site */
  --radius-sm:     10px;
  --radius-card:   20px;
  --radius-button: 40px;

  /* Shadows */
  --shadow-card:       1px 1px 10px rgba(0, 0, 0, 0.12);
  --shadow-card-hover: 2px 4px 20px rgba(0, 0, 0, 0.18);

  /* Transitions */
  --transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

@media (max-width: 744px) {
  :root { --container-padding: 20px; }
}

/* ---- Layout container ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ============================================================
   HEADER — fila 1: nav principal
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.70);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo */
.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo-link { display: flex; align-items: center; }

.site-logo { height: 34px; width: auto; }

.site-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

/* Main nav wrapper */
.header-nav {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Main site links (hardcoded) */
.nav-main-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-main-links li a {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  padding: 6px 12px;
  border-radius: 100px;
  transition: color var(--transition), background-color var(--transition);
  white-space: nowrap;
}

.nav-main-links li a:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
}

/* "Centro de Recursos" — siempre activo (estamos dentro de él) */
.nav-current-site a {
  color: var(--color-text);
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
}

/* Header right actions */
.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.section-bar-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 100px;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  margin-left: 4px;
}

.section-bar-search-btn:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
}

.header-contact-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #1A180A;
  background: #ffffff;
  padding: 7px 14px;
  border-radius: var(--radius-button);
  border: 1px solid #1A180A;
  transition: all var(--transition);
  white-space: nowrap;
}

.header-contact-link:hover {
  color: #ffffff;
  background: #1A180A;
  border-color: #1A180A;
}

/* ============================================================
   SECTION BAR — fila 2: pills estilo Dribbble
   ============================================================ */
.section-bar {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  gap: 6px;
}

/* Ghost renderiza {{navigation}} como <ul class="nav"> */
.section-bar .nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.section-bar .nav li a {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  padding: 6px 16px;
  border-radius: 100px;
  transition: all var(--transition);
  white-space: nowrap;
}

.section-bar .nav li a:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
}

/* ── Active state ──────────────────────────────────────────
   Ghost añade .nav-current cuando la URL coincide (tag pages).
   Para artículos, Ghost añade "tag-[slug]" al body + "nav-[slug]"
   al li — los combinamos para highlighting automático sin JS.
   ─────────────────────────────────────────────────────── */
.section-bar .nav .nav-current a,
body.home-template .section-bar .nav li:first-child a,
body.tag-guias     .section-bar .nav-guias a,
body.tag-estudios  .section-bar .nav-estudios a,
body.tag-rankings  .section-bar .nav-rankings a,
body.tag-prensa    .section-bar .nav-prensa a {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
  font-weight: 600;
}

.section-bar .nav .nav-current a:hover,
body.home-template .section-bar .nav li:first-child a:hover,
body.tag-guias     .section-bar .nav-guias a:hover,
body.tag-estudios  .section-bar .nav-estudios a:hover,
body.tag-rankings  .section-bar .nav-rankings a:hover,
body.tag-prensa    .section-bar .nav-prensa a:hover {
  background: rgba(0, 0, 0, 0.10);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  transition: background-color var(--transition);
  flex-shrink: 0;
}

.menu-toggle:hover { background: var(--color-bg-light); }

.menu-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

.menu-toggle.is-open .menu-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open .menu-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .menu-toggle { display: flex; }
  .header-actions { display: none; }

  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 20px 16px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.10);
    flex-direction: column;
    align-items: flex-start;
    z-index: 99;
  }

  .header-nav.is-open { display: flex; }

  .nav-main-links {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .nav-main-links li { width: 100%; }

  .nav-main-links li a {
    display: block;
    padding: 12px 4px;
    font-size: 15px;
    border-radius: 0;
    border-bottom: 1px solid var(--color-bg-light);
  }

  /* Section bar scrolls horizontally on mobile */
  .section-bar-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .section-bar-inner::-webkit-scrollbar { display: none; }

  .section-bar .nav li a { padding: 0 14px; font-size: 13px; }
}

/* ============================================================
   HERO ESTÁTICO — Centro de Recursos
   ============================================================ */
.hero-section {
  background: #e6faff;
  padding: 48px 0 40px;
  border-bottom: 1px solid #c8f0fb;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

/* --- Eyebrow pill --- */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #0a3bff;
  background: rgba(10, 59, 255, 0.10);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}

/* --- Title --- */
.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.10;
  color: #09008a;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

.hero-title-accent {
  color: #0a3bff;
}

/* --- Subtitle --- */
.hero-excerpt {
  font-size: 17px;
  line-height: 1.70;
  color: rgba(9, 0, 138, 0.62);
  margin-bottom: 36px;
  max-width: 520px;
}

/* --- Section nav pills --- */
.hero-sections-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-section-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #09008a;
  background: #fff;
  border: 1.5px solid rgba(9, 0, 138, 0.20);
  padding: 9px 18px;
  border-radius: var(--radius-button);
  transition: all var(--transition);
}

.hero-section-pill:hover {
  background: #09008a;
  color: #fff;
  border-color: #09008a;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(9, 0, 138, 0.20);
}

.hero-section-pill svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.hero-section-pill:hover svg {
  opacity: 1;
}

/* --- Mascota --- */
.hero-mascot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}

.hero-mascot-img {
  width: 280px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(9, 0, 138, 0.14));
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: bottom center;
}

.hero-mascot-img:hover {
  transform: translateY(-8px) scale(1.02);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 0;
    text-align: center;
  }
  .hero-mascot {
    order: -1;
    margin-bottom: 16px;
  }
  .hero-mascot-img {
    width: 200px;
  }
  .hero-sections-nav {
    justify-content: center;
  }
  .hero-excerpt {
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .hero-section { padding: 48px 0 40px; }
  .hero-title { font-size: 34px; }
  .hero-excerpt { font-size: 15px; }
  .hero-mascot-img { width: 160px; }
}

/* ============================================================
   TRUST BAR
   ============================================================ */
.trust-bar {
  background: #F5F7FB;
  border-top: none;
  border-bottom: none;
  padding: 20px 0;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 40px;
  flex: 1;
  max-width: 240px;
}

.trust-stat-icon {
  color: #090089;
  opacity: 0.5;
  margin-bottom: 6px;
}

.trust-stat-number {
  font-size: 26px;
  font-weight: 700;
  color: #090089;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.trust-stat-label {
  font-size: 12px;
  color: #090089;
  margin-top: 3px;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 400;
}

.trust-stat-label strong {
  font-weight: 700;
}

.trust-stat-divider {
  width: 1px;
  height: 44px;
  background: rgba(9, 0, 137, 0.12);
  flex-shrink: 0;
}

@media (max-width: 580px) {
  .trust-stat { padding: 10px 20px; max-width: 50%; }
  .trust-stat-divider { display: none; }
  .trust-bar-inner { flex-wrap: wrap; }
}

/* ============================================================
   HOME SECTIONS
   ============================================================ */
.home-sections { padding-bottom: 48px; }

/* Secciones principales (Estudios, Guías) — más generosas */
.content-section { padding: 40px 0; }

/* Secciones secundarias (Rankings, Prensa) — más compactas */
.content-section.section-compact { padding: 28px 0; }

/* Separador entre secciones */
.content-section + .content-section {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

/* Fondo sutil para la primera sección principal (Estudios) */
.content-section.section-highlight {
  background: #F5F7FB;
  margin-top: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.content-section.section-highlight + .content-section {
  border-top: none;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.section-description {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 4px;
  line-height: 1.5;
}

.section-footer {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.see-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
  border-radius: 100px;
  padding: 10px 24px;
  transition: background var(--transition), color var(--transition), gap var(--transition);
  white-space: nowrap;
}

.see-more-btn:hover {
  background: var(--color-primary);
  color: #fff;
  gap: 10px;
}

/* ---- Post Cards Grid ---- */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px)  { .posts-grid { grid-template-columns: 1fr; gap: 16px; } }

/* ============================================================
   FEATURED CARD — card horizontal wide
   Usado en "Lo más reciente" y como primer artículo de sección
   ============================================================ */
.post-card-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  min-height: 320px;
}

.post-card-featured:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.post-card-featured-image-link {
  display: block;
  overflow: hidden;
}

.post-card-featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card-featured:hover .post-card-featured-image {
  transform: scale(1.03);
}

.post-card-featured-no-image {
  background: linear-gradient(135deg, var(--color-primary) 0%, #3a33a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-featured-no-image svg {
  width: 48px;
  height: 48px;
  color: rgba(255, 255, 255, 0.4);
}

.post-card-featured-content {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.post-card-featured-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
}

.post-card-featured-title a { color: inherit; }
.post-card-featured-title a:hover { color: var(--color-primary); }

.post-card-featured-excerpt {
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

.post-card-featured-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.post-card-featured-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-light);
  flex-wrap: wrap;
}

.post-card-featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  transition: gap var(--transition), opacity var(--transition);
  flex-shrink: 0;
}

.post-card-featured-cta:hover {
  gap: 10px;
  opacity: 0.80;
}

.post-card-featured-author-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.post-card-featured-author {
  color: var(--color-text-secondary);
  font-weight: 500;
}

.post-card-meta-sep { color: var(--color-border); }

/* Layout: featured first post + grid para el resto */
.posts-grid-with-featured {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.posts-grid-with-featured .posts-grid {
  /* hereda el grid normal */
}

/* Sección "Lo más reciente" */
.latest-section {
  padding: 28px 0 0;
}

/* ---- Sección Destacados (featured picks) ---- */
.featured-picks-section {
  padding: 36px 0 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.featured-picks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.featured-pick-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 8px;
  transition: background var(--transition);
}

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

.featured-pick-img {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.featured-pick-no-img {
  background: var(--color-bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-pick-no-img svg {
  width: 28px;
  height: 28px;
  stroke: var(--color-text-light);
}

.featured-pick-content {
  flex: 1;
  min-width: 0;
}

.featured-pick-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-pick-meta {
  font-size: 12px;
  color: var(--color-text-light);
  margin-top: 4px;
}

@media (max-width: 768px) {
  .featured-picks-grid { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
  .post-card-featured {
    grid-template-columns: 1fr;
    min-height: unset;
  }

  .post-card-featured-image-link {
    aspect-ratio: 16 / 9;
  }

  .post-card-featured-content {
    padding: 28px 24px;
    gap: 12px;
  }

  .post-card-featured-title { font-size: 20px; }
  .post-card-featured-excerpt { font-size: 14px; }
}

/* ============================================================
   POST CARD
   ============================================================ */
.post-card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}

.post-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.post-card-image-link {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.post-card:hover .post-card-image { transform: scale(1.04); }

.post-card-no-image {
  background: linear-gradient(135deg, var(--color-primary) 0%, #3a33a1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-no-image-icon {
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.25);
}

.post-card-content {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.post-card-tag-item {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #555;
  background: rgba(0, 0, 0, 0.06);
  padding: 3px 10px;
  border-radius: 100px;
  transition: background var(--transition);
}

.post-card-tag-item:hover { background: rgba(0, 0, 0, 0.12); }

/* Tags de categoría principal */
.post-card-tag-item.tag-guias     { color: #1030CC; background: rgba(16, 48, 204, 0.10); }
.post-card-tag-item.tag-guias:hover { background: rgba(16, 48, 204, 0.18); }

.post-card-tag-item.tag-estudios  { color: #0A8517; background: rgba(10, 133, 23, 0.10); }
.post-card-tag-item.tag-estudios:hover { background: rgba(10, 133, 23, 0.18); }

.post-card-tag-item.tag-rankings  { color: #8B6914; background: rgba(242, 201, 76, 0.25); }
.post-card-tag-item.tag-rankings:hover { background: rgba(242, 201, 76, 0.40); }

.post-card-tag-item.tag-prensa    { color: #0090B3; background: rgba(0, 205, 255, 0.12); }
.post-card-tag-item.tag-prensa:hover { background: rgba(0, 205, 255, 0.22); }

.post-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-text);
  margin-bottom: 10px;
  flex: 1;
  letter-spacing: -0.01em;
}

.post-card-title a { color: inherit; transition: color var(--transition); }
.post-card-title a:hover { color: var(--color-primary); }

.post-card-excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--color-text-light);
  padding-top: 14px;
  border-top: 1px solid var(--color-bg-light);
}

.post-card-date { font-weight: 500; }

.post-card-reading-time {
  background: var(--color-bg-light);
  padding: 2px 8px;
  border-radius: 100px;
}

/* ============================================================
   TAG PAGE (Secciones)
   ============================================================ */

/* --- Hero sin imagen --- */
/* --- Tag hero base (default: azul marca) --- */
.tag-hero {
  --tag-accent: #09008a;
  --tag-accent-bg: rgba(9, 0, 138, 0.06);
  --tag-accent-pill: rgba(9, 0, 138, 0.12);
  --tag-accent-text: rgba(9, 0, 138, 0.65);
  background: var(--tag-accent-bg);
  padding: 40px 0 36px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.tag-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.tag-hero-content {
  flex: 1;
  max-width: 560px;
}

.tag-hero-mascot {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.tag-hero-mascot-img {
  width: 200px;
  height: auto;
  object-fit: contain;
}

/* --- Colores por categoría --- */
body.tag-estudios .tag-hero {
  --tag-accent: #0A8517;
  --tag-accent-bg: rgba(10, 133, 23, 0.06);
  --tag-accent-pill: rgba(10, 133, 23, 0.12);
  --tag-accent-text: rgba(10, 133, 23, 0.70);
}

body.tag-guias .tag-hero {
  --tag-accent: #1030CC;
  --tag-accent-bg: rgba(16, 48, 204, 0.06);
  --tag-accent-pill: rgba(16, 48, 204, 0.12);
  --tag-accent-text: rgba(16, 48, 204, 0.65);
}

body.tag-rankings .tag-hero {
  --tag-accent: #8B6914;
  --tag-accent-bg: rgba(242, 201, 76, 0.12);
  --tag-accent-pill: rgba(139, 105, 20, 0.12);
  --tag-accent-text: rgba(139, 105, 20, 0.70);
}

body.tag-prensa .tag-hero {
  --tag-accent: #0090B3;
  --tag-accent-bg: rgba(0, 205, 255, 0.06);
  --tag-accent-pill: rgba(0, 144, 179, 0.12);
  --tag-accent-text: rgba(0, 144, 179, 0.70);
}

/* --- Label pill (article count) --- */
.tag-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--tag-accent);
  background: var(--tag-accent-pill);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

/* --- Title --- */
.tag-title {
  font-size: 36px;
  font-weight: 800;
  color: #1A180A;
  line-height: 1.10;
  margin-bottom: 10px;
  letter-spacing: -0.025em;
}

/* --- Description --- */
.tag-description {
  font-size: 16px;
  color: #322B01;
  max-width: 560px;
  line-height: 1.6;
}

/* --- Posts section --- */
.tag-posts-section { padding: 40px 0 56px; }

.tag-posts-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* --- Paginación custom --- */
.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 0 0;
}

.pagination-info {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-light);
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  padding: 8px 16px;
  border: 1.5px solid var(--color-primary);
  border-radius: 100px;
  transition: background var(--transition), color var(--transition);
}

.pagination-link:hover {
  background: var(--color-primary);
  color: #fff;
}

/* --- Tag page responsive --- */
@media (max-width: 768px) {
  .tag-hero-inner { flex-direction: column; text-align: center; gap: 24px; }
  .tag-hero-content { max-width: 100%; }
  .tag-hero-mascot-img { width: 160px; }
  .tag-title { font-size: 28px; }
}

/* ============================================================
   POST / ARTICLE PAGE
   ============================================================ */
.post-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 56px var(--container-padding) 80px;
}

.post-page-header { margin-bottom: 40px; }

.post-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.post-breadcrumb a {
  color: var(--color-primary);
  transition: opacity var(--transition);
}

.post-breadcrumb a:hover { opacity: 0.7; }

.post-breadcrumb-sep { color: var(--color-border); }

.post-tag-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(9, 0, 137, 0.1);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
  transition: background var(--transition);
}

.post-tag-label:hover { background: rgba(9, 0, 137, 0.16); }

.post-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.12;
  color: var(--color-text);
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.post-subtitle {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid var(--color-bg-light);
  border-bottom: 1px solid var(--color-bg-light);
  font-size: 13px;
  color: var(--color-text-secondary);
}

.post-meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--color-text);
}

.post-meta-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.post-meta-separator {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--color-border);
}

.post-feature-image {
  margin: 36px calc(-6vw);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.post-feature-image img {
  width: 100%;
  object-fit: cover;
}

.post-feature-image figcaption {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 10px;
  padding: 0 8px;
  border-radius: 0;
}

/* ---- Post content typography ---- */
.gh-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text);
}

.gh-content h2 {
  font-size: 30px;
  font-weight: 700;
  margin-top: 52px;
  margin-bottom: 18px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.gh-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 14px;
  line-height: 1.3;
}

.gh-content h4 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 10px;
}

.gh-content p { margin-bottom: 22px; }

.gh-content ul,
.gh-content ol {
  margin-bottom: 22px;
  padding-left: 26px;
}

.gh-content li { margin-bottom: 8px; }

.gh-content blockquote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--color-primary);
  background: rgba(9, 0, 137, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 17px;
  font-style: italic;
  color: var(--color-text);
}

.gh-content blockquote p:last-child { margin-bottom: 0; }

.gh-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.gh-content a:hover { opacity: 0.75; }

.gh-content strong { font-weight: 700; }

.gh-content code {
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 14px;
  background: var(--color-bg-light);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--color-primary-dark);
}

.gh-content pre {
  background: var(--color-text);
  color: #e8e8e8;
  padding: 24px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
}

.gh-content pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: 14px;
}

.gh-content figure { margin: 32px 0; }

.gh-content figure img {
  width: 100%;
  border-radius: var(--radius-sm);
}

.gh-content figcaption {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 10px;
}

.gh-content hr {
  border: none;
  border-top: 1px solid var(--color-bg-light);
  margin: 48px 0;
}

.gh-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 14px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.gh-content th {
  background: var(--color-primary);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.gh-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-bg-light);
}

.gh-content tr:last-child td { border-bottom: none; }
.gh-content tr:hover td { background: rgba(9, 0, 137, 0.02); }

/* ---- Ghost Card types ---- */
.kg-image-card { margin: 36px calc(-4vw); }
.kg-image-card img { border-radius: var(--radius-sm); width: 100%; }

.kg-gallery-card { margin: 32px 0; }
.kg-gallery-container { display: flex; flex-wrap: wrap; gap: 8px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

.kg-callout-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  background: rgba(9, 0, 137, 0.05);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}

.kg-callout-emoji { font-size: 22px; line-height: 1.4; flex-shrink: 0; }
.kg-callout-text { font-size: 16px; line-height: 1.65; }

.kg-video-card { margin: 32px 0; border-radius: var(--radius-sm); overflow: hidden; }

.kg-bookmark-card {
  margin: 24px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.kg-bookmark-card:hover { box-shadow: var(--shadow-card); }
.kg-bookmark-container { display: flex; color: inherit; }
.kg-bookmark-content { padding: 18px; flex: 1; min-width: 0; }
.kg-bookmark-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }

.kg-bookmark-description {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kg-bookmark-metadata {
  font-size: 12px;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kg-bookmark-icon { width: 16px; height: 16px; border-radius: 2px; }

.kg-bookmark-thumbnail {
  width: 160px;
  flex-shrink: 0;
}

.kg-bookmark-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kg-toggle-card {
  margin: 16px 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.kg-toggle-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-family);
  transition: background var(--transition);
}

.kg-toggle-heading:hover { background: var(--color-bg-light); }
.kg-toggle-heading-text { font-size: 16px; font-weight: 600; }
.kg-toggle-content { padding: 4px 20px 18px; font-size: 15px; line-height: 1.7; }

/* ---- Post footer ---- */
.post-footer {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid var(--color-bg-light);
}

.post-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.post-tag-item {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: var(--color-bg-light);
  padding: 5px 14px;
  border-radius: 100px;
  transition: all var(--transition);
}

.post-tag-item:hover {
  color: var(--color-primary);
  background: rgba(9, 0, 137, 0.1);
}

.post-author-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 28px;
  background: var(--color-bg-light);
  border-radius: var(--radius-card);
  margin-bottom: 48px;
}

.post-author-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.post-author-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.post-author-bio {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
}

/* ---- Related posts ---- */
.related-posts { margin-top: 16px; }

.related-posts-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--color-text);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 56px 0 0;
}

.pagination a,
.pagination .pagination-next,
.pagination .pagination-prev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  padding: 10px 20px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-button);
  transition: all var(--transition);
}

.pagination a:hover,
.pagination .pagination-next:hover,
.pagination .pagination-prev:hover {
  background: var(--color-primary);
  color: #fff;
}

.pagination .page_number {
  font-size: 13px;
  color: var(--color-text-secondary);
  font-weight: 400;
}

/* ============================================================
   FOOTER — matching segurocanguro.com
   ============================================================ */
.site-footer {
  background: var(--color-bg-footer);
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding: 56px var(--container-padding) 40px;
}

.footer-logo-link { display: inline-block; margin-bottom: 14px; }
.footer-logo {
  height: 32px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-tagline {
  font-size: 13px;
  color: #8DCBE6;
  line-height: 1.6;
  margin-bottom: 22px;
}

.footer-social {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-social-link {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  color: #ffffff;
  transition: all var(--transition);
}

.footer-social-link:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.footer-col-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: #8DCBE6;
  margin-bottom: 18px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  font-size: 13px;
  color: #ffffff;
  transition: opacity var(--transition);
}

.footer-col a:hover { opacity: 0.70; text-decoration: underline; }

.footer-contact {
  font-size: 13px;
  color: #8DCBE6;
  line-height: 1.7;
}

.footer-contact a {
  color: #ffffff;
  font-weight: 600;
  transition: opacity var(--transition);
}

.footer-contact a:hover { opacity: 0.70; text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 22px var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-copyright {
  font-size: 12px;
  color: #8DCBE6;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #8DCBE6;
}

.footer-bottom-links a {
  color: #ffffff;
  transition: opacity var(--transition);
}

.footer-bottom-links a:hover { opacity: 0.70; text-decoration: underline; }

@media (max-width: 1024px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
  .footer-col:first-child { grid-column: 1; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-size: 88px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: -0.04em;
}

.error-title {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 12px;
}

.error-message {
  font-size: 16px;
  color: var(--color-text-secondary);
  margin-bottom: 32px;
  max-width: 400px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: var(--radius-button);
  transition: all var(--transition);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(9, 0, 137, 0.3);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 100px 20px;
  color: var(--color-text-secondary);
}

.empty-state-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: var(--color-bg-light);
  border-radius: 20px;
  margin: 0 auto 24px;
  color: var(--color-text-light);
}

.empty-state-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--color-text);
}

.empty-state-subtitle {
  font-size: 15px;
  color: var(--color-text-secondary);
  max-width: 360px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.empty-state-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

.empty-state-link:hover {
  color: var(--color-primary-hover);
}

/* Force hide ALL Ghost membership/newsletter UI */
.gh-subscribe,
.subscribe-form,
.members-form,
.gh-portal-trigger,
[class*="subscribe"],
[class*="membership"] {
  display: none !important;
}

/* Responsive post page */
@media (max-width: 768px) {
  .post-page { padding-top: 36px; }
  .post-title { font-size: 30px; }
  .post-subtitle { font-size: 17px; }
  .post-feature-image { margin: 28px calc(-2vw); }
  .gh-content { font-size: 17px; }
  .gh-content h2 { font-size: 24px; }
  .gh-content h3 { font-size: 20px; }
  .kg-image-card { margin: 28px calc(-2vw); }
  .tag-title { font-size: 28px; }
}

/* ============================================================
   KOENIG EDITOR — required image width classes
   Ghost valida que .kg-width-wide y .kg-width-full existan.
   Permiten imágenes que rompen el contenedor del artículo.
   ============================================================ */

.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin-left: calc(50% - 42.5vw);
  margin-right: calc(50% - 42.5vw);
}

.kg-width-full {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.kg-width-wide img,
.kg-width-full img {
  width: 100%;
  border-radius: 0;
}

/* En post-page (max-width: 720px) las imágenes wide/full
   necesitan compensar el padding del contenedor */
.post-page .kg-width-wide,
.post-page .kg-width-full {
  margin-left: calc(50% - 42.5vw + var(--container-padding));
  margin-right: calc(50% - 42.5vw + var(--container-padding));
}

.post-page .kg-width-full {
  margin-left: calc(50% - 50vw + var(--container-padding));
  margin-right: calc(50% - 50vw + var(--container-padding));
}

/* ---- WhatsApp link en footer ---- */
.footer-whatsapp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  transition: opacity var(--transition);
}

.footer-whatsapp-link:hover { opacity: 0.70; }

.footer-whatsapp-icon {
  color: #ffffff;
  flex-shrink: 0;
}

/* Footer bottom sin links de términos (están en col 3) */
.footer-bottom {
  justify-content: center;
}
