/* ════════════════════════════════════════════════════════════════════════
 * Bartidata — Post content rich styles
 * ──────────────────────────────────────
 * Estilos para posts editoriales: tablas, callouts, venue grid, FAQs,
 * autor card, dato boxes. Diseño SSSD (cobalt + yellow + ink).
 * ════════════════════════════════════════════════════════════════════════ */

/* ── Single layout ancho ──────────────────────────────────────────────── */
.bd-single { max-width: 900px; }

/* ── Hero del post ────────────────────────────────────────────────────── */
.bd-single h1 {
  font-family: var(--display);
  font-size: 1.5rem !important;
  line-height: 1.45 !important;
  letter-spacing: 0;
  margin: 0.5rem 0 1.4rem !important;
  color: var(--ink);
}
@media (min-width: 768px) {
  .bd-single h1 { font-size: 1.8rem !important; }
}

/* ── Featured image GRANDE ────────────────────────────────────────────── */
.bd-single .bd-featured {
  position: relative;
  margin: 0 0 2rem !important;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--sss-cobalt);
}
.bd-single .bd-featured img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  border: 0 !important; box-shadow: none !important; margin: 0 !important;
}

/* ── TL;DR — fondo CREMA destacado ───────────────────────────────────── */
.bd-tldr {
  background: #FFFEF6 !important;
  border: 3px solid var(--ink) !important;
  border-left: 10px solid var(--sss-yellow) !important;
  border-radius: 0 !important;
  box-shadow: 5px 5px 0 var(--ink) !important;
  padding: 1.3rem 1.5rem !important;
  margin: 1.5rem 0 2.5rem !important;
  position: relative;
}
.bd-tldr::before {
  content: '⚡ TL;DR';
  display: block;
  font-family: var(--display);
  font-size: 0.65rem;
  color: var(--sss-cobalt);
  margin-bottom: 0.6rem;
  letter-spacing: 0.06em;
}
.bd-tldr p, .bd-tldr {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}
.bd-tldr strong { color: var(--sss-cobalt); }

/* Si el HTML usa <aside class="bd-tldr"><strong>TL;DR:</strong> ...</aside>
   ocultamos el <strong>TL;DR:</strong> porque el ::before ya lo pone */
.bd-tldr > strong:first-child { display: none; }


/* ── Body content ─────────────────────────────────────────────────────── */
.bd-single .bd-content {
  font-family: var(--mono);
  font-size: 1.02rem;
  line-height: 1.78;
  color: var(--ink);
}
.bd-single .bd-content p {
  margin: 0 0 1.2rem;
}
.bd-single .bd-content > p:first-of-type::first-letter {
  font-family: var(--display);
  font-size: 2.4rem;
  float: left;
  line-height: 1;
  margin: 0.1em 0.4rem 0 0;
  color: var(--sss-cobalt);
}

/* ── Headings ─────────────────────────────────────────────────────────── */
.bd-single .bd-content h2 {
  font-family: var(--display) !important;
  font-size: 1rem !important;
  line-height: 1.4;
  color: var(--sss-cobalt) !important;
  margin: 3rem 0 1.2rem !important;
  padding-top: 1.5rem;
  border-top: 4px solid var(--sss-yellow);
  position: relative;
}
.bd-single .bd-content h2::after {
  content: '';
  position: absolute;
  top: -4px; left: 0;
  width: 60px; height: 4px;
  background: var(--sss-cobalt);
}
.bd-single .bd-content h3 {
  font-family: var(--display) !important;
  font-size: 0.78rem !important;
  color: var(--ink) !important;
  margin: 2rem 0 0.8rem !important;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--sss-yellow);
  display: inline-block;
}

/* ── Links ────────────────────────────────────────────────────────────── */
.bd-single .bd-content a {
  color: var(--sss-cobalt);
  border-bottom: 2px solid var(--sss-yellow);
  font-weight: 600;
  transition: background 0.12s;
}
.bd-single .bd-content a:hover {
  background: var(--sss-yellow);
  border-bottom-color: var(--ink);
  color: var(--ink);
}

/* ── Strong ───────────────────────────────────────────────────────────── */
.bd-single .bd-content strong {
  color: var(--sss-cobalt);
  font-weight: 700;
}

/* ── Listas ──────────────────────────────────────────────────────────── */
.bd-single .bd-content ul,
.bd-single .bd-content ol {
  margin: 0.8rem 0 1.5rem;
  padding-left: 0;
  list-style: none;
}
.bd-single .bd-content ul li,
.bd-single .bd-content ol li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.8rem;
  line-height: 1.65;
}
.bd-single .bd-content ul li::before {
  content: '▸';
  position: absolute;
  left: 0.3rem; top: 0.35rem;
  color: var(--sss-cobalt);
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.5;
}
.bd-single .bd-content ol {
  counter-reset: bdli;
}
.bd-single .bd-content ol li {
  counter-increment: bdli;
}
.bd-single .bd-content ol li::before {
  content: counter(bdli);
  position: absolute;
  left: 0; top: 0.3rem;
  font-family: var(--display);
  font-size: 0.7rem;
  color: var(--sss-cobalt);
  background: var(--sss-yellow);
  border: 2px solid var(--ink);
  width: 1.4rem; height: 1.4rem;
  display: grid; place-items: center;
  border-radius: 2px;
}

/* ── Tablas ──────────────────────────────────────────────────────────── */
.bd-single .bd-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  margin: 1.5rem 0 2rem;
  font-family: var(--mono);
  font-size: 0.92rem;
  background: #fff;
  overflow: hidden;
}
.bd-single .bd-content table thead {
  background: var(--sss-cobalt);
}
.bd-single .bd-content table thead th {
  font-family: var(--display);
  font-size: 0.62rem;
  color: var(--sss-yellow);
  padding: 0.85rem 0.8rem;
  text-align: left;
  letter-spacing: 0.04em;
  border-bottom: 3px solid var(--ink);
  text-transform: uppercase;
}
.bd-single .bd-content table tbody tr {
  border-top: 1px solid var(--line-soft);
}
.bd-single .bd-content table tbody tr:nth-child(even) {
  background: #F4F6FB;
}
.bd-single .bd-content table tbody tr:hover {
  background: #FFF9D6;
}
.bd-single .bd-content table tbody td {
  padding: 0.7rem 0.8rem;
  color: var(--ink);
  vertical-align: middle;
}
.bd-single .bd-content table tbody td strong {
  color: var(--sss-cobalt);
}

/* Tabla wrapper para scroll en mobile */
.bd-single .bd-content .bd-table-wrap {
  overflow-x: auto;
  margin: 1.5rem -0.5rem 2rem;
  padding: 0 0.5rem 0.5rem;
}

/* ── Blockquote ──────────────────────────────────────────────────────── */
.bd-single .bd-content blockquote {
  background: var(--bg-inset);
  border-left: 6px solid var(--sss-pink);
  padding: 1rem 1.4rem;
  margin: 1.8rem 0;
  font-style: italic;
  color: var(--ink);
  position: relative;
}
.bd-single .bd-content blockquote::before {
  content: '"';
  position: absolute;
  top: -0.5rem; left: 0.6rem;
  font-family: var(--display);
  font-size: 2.5rem;
  color: var(--sss-pink);
  line-height: 1;
  opacity: 0.5;
}

/* ── Info card "El dato" ─────────────────────────────────────────────── */
.bd-post-data {
  background: #FFFEF6;
  border: 3px solid var(--ink);
  border-top: 8px solid var(--sss-pink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 1.2rem 1.4rem;
  margin: 2rem 0;
  font-family: var(--mono);
}
.bd-post-data-label {
  font-family: var(--display);
  font-size: 0.6rem;
  color: var(--sss-pink-d);
  letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
  display: block;
}
.bd-post-data-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0;
}
.bd-post-data-body strong { color: var(--sss-cobalt); }


/* ── Pull quote (destaque) ───────────────────────────────────────────── */
.bd-post-pullquote {
  font-family: var(--display);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--sss-cobalt);
  text-align: center;
  border-top: 4px solid var(--sss-yellow);
  border-bottom: 4px solid var(--sss-yellow);
  padding: 1.5rem 0.5rem;
  margin: 2.5rem 0;
}


/* ── Grid de Venues (estadios) ───────────────────────────────────────── */
.bd-post-venues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}
.bd-post-venue-card {
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  text-decoration: none !important;
  color: var(--ink) !important;
  transition: transform 0.12s, box-shadow 0.12s;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-bottom: 3px solid var(--ink) !important;
}
.bd-post-venue-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
  background: #fff !important;
}
.bd-post-venue-card-img {
  width: 100%; height: 130px;
  object-fit: cover;
  background: var(--sss-cobalt);
  display: block;
  border-bottom: 3px solid var(--ink);
}
.bd-post-venue-card-body {
  padding: 0.7rem 0.9rem 0.9rem;
}
.bd-post-venue-card-name {
  font-family: var(--display);
  font-size: 0.62rem;
  color: var(--sss-cobalt);
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin: 0 0 0.4rem;
}
.bd-post-venue-card-meta {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.bd-post-venue-card-flag {
  font-size: 1rem; line-height: 1;
}


/* ── Grid de Selecciones (equipo cards) ──────────────────────────────── */
.bd-post-teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
  margin: 1.5rem 0 2.5rem;
}
.bd-post-team-card {
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none !important;
  color: var(--ink) !important;
  padding: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: transform 0.12s, box-shadow 0.12s;
  border-bottom: 3px solid var(--ink) !important;
}
.bd-post-team-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}
.bd-post-team-card-flag { font-size: 1.6rem; line-height: 1; }
.bd-post-team-card-name {
  font-family: var(--display);
  font-size: 0.6rem;
  color: var(--ink);
}


/* ── FAQs section ─────────────────────────────────────────────────────── */
.bd-post-faqs {
  background: var(--sss-cobalt);
  color: #fff;
  margin: 3rem 0 0;
  padding: 1.8rem 1.5rem 2.2rem;
  border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.bd-post-faqs-title {
  font-family: var(--display);
  font-size: 0.85rem;
  color: var(--sss-yellow);
  margin: 0 0 1.4rem !important;
  padding: 0 !important;
  border: none !important;
  text-align: center;
  letter-spacing: 0.04em;
}
.bd-post-faqs-title::after { display: none !important; }
.bd-post-faq {
  background: rgba(255,255,255,0.06);
  border-left: 4px solid var(--sss-yellow);
  margin-bottom: 0.9rem;
  padding: 1rem 1.2rem;
}
.bd-post-faq-q {
  font-family: var(--display);
  font-size: 0.7rem;
  color: var(--sss-yellow);
  margin: 0 0 0.6rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}
.bd-post-faq-a {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: #fff;
  margin: 0;
  line-height: 1.65;
}
.bd-post-faq-a a { color: var(--sss-yellow) !important; border-bottom-color: var(--sss-yellow) !important; }


/* ── Author card al final ─────────────────────────────────────────────── */
.bd-post-author {
  background: #FFFEF6;
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  margin: 3rem 0 0;
  padding: 1.3rem 1.4rem;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.1rem;
  align-items: center;
}
.bd-post-author-avatar {
  width: 64px; height: 64px;
  background: var(--sss-cobalt);
  border: 3px solid var(--ink);
  display: grid; place-items: center;
  font-family: var(--display);
  color: var(--sss-yellow);
  font-size: 0.7rem;
}
.bd-post-author-name {
  font-family: var(--display);
  font-size: 0.75rem;
  color: var(--sss-cobalt);
  margin: 0 0 0.3rem;
}
.bd-post-author-bio {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.55;
}
.bd-post-author-bio a {
  color: var(--sss-cobalt);
  font-weight: 600;
}


/* ── Related posts ────────────────────────────────────────────────────── */
.bd-post-related {
  margin: 3rem 0 0;
}
.bd-post-related-title {
  font-family: var(--display);
  font-size: 0.78rem;
  color: var(--sss-cobalt);
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 4px solid var(--sss-yellow);
  letter-spacing: 0.04em;
}
.bd-post-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.bd-post-related-card {
  background: #fff;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  padding: 0.9rem;
  text-decoration: none !important;
  color: var(--ink) !important;
  display: block;
  transition: transform 0.12s, box-shadow 0.12s;
  border-bottom: 3px solid var(--ink) !important;
}
.bd-post-related-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}
.bd-post-related-card-cat {
  font-family: var(--display);
  font-size: 0.55rem;
  color: var(--sss-pink-d);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}
.bd-post-related-card-title {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}


/* ── Dark mode adjustments ───────────────────────────────────────────── */
body.bd-dark .bd-tldr { background: #07154A !important; color: var(--sss-ice) !important; }
body.bd-dark .bd-tldr::before { color: var(--sss-yellow); }
body.bd-dark .bd-tldr p, body.bd-dark .bd-tldr strong { color: var(--sss-ice); }
body.bd-dark .bd-single .bd-content table { background: #0D1F6B; border-color: var(--sss-yellow); }
body.bd-dark .bd-single .bd-content table thead { background: var(--sss-yellow); }
body.bd-dark .bd-single .bd-content table thead th { color: var(--sss-cobalt-d); }
body.bd-dark .bd-single .bd-content table tbody td { color: var(--sss-ice); }
body.bd-dark .bd-single .bd-content table tbody tr:nth-child(even) { background: rgba(255,220,31,0.06); }
body.bd-dark .bd-single .bd-content table tbody tr:hover { background: rgba(255,220,31,0.12); }
body.bd-dark .bd-post-data { background: #07154A; color: var(--sss-ice); }
body.bd-dark .bd-post-data-body { color: var(--sss-ice); }
body.bd-dark .bd-post-venue-card,
body.bd-dark .bd-post-team-card,
body.bd-dark .bd-post-related-card { background: var(--sss-cobalt-d); color: var(--sss-ice) !important; }
body.bd-dark .bd-post-venue-card-name { color: var(--sss-yellow); }
body.bd-dark .bd-post-author { background: var(--sss-cobalt-d); color: var(--sss-ice); }
body.bd-dark .bd-post-author-name { color: var(--sss-yellow); }
body.bd-dark .bd-post-author-bio { color: var(--sss-ice); }


/* ── Mobile tweaks ───────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .bd-single { padding: 0 1rem; }
  .bd-single h1 { font-size: 1.3rem !important; }
  .bd-single .bd-content { font-size: 0.95rem; }
  .bd-single .bd-content h2 { font-size: 0.85rem !important; }
  .bd-single .bd-content table { font-size: 0.78rem; }
  .bd-single .bd-content table thead th,
  .bd-single .bd-content table tbody td { padding: 0.55rem 0.5rem; }
  .bd-post-venues-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .bd-post-venue-card-img { height: 100px; }
  .bd-single .bd-content > p:first-of-type::first-letter { font-size: 1.8rem; }
}
