﻿/* Páginas públicas del blog: encabezado, hero, filtros, tarjetas y pie. */
* { box-sizing: border-box; }

body.blog {
  margin: 0;
  background: #f5f6fa;
  color: #1d1f24;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Encabezado ===== */
.bh {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, calc((100vw - 1200px) / 2));
  background: rgba(12, 13, 20, 0.92);
  backdrop-filter: blur(10px);
  color: #ffffff;
}

.bh-marca { display: flex; align-items: center; gap: 12px; color: #ffffff; text-decoration: none; min-width: 0; }
.bh-marca img { height: 40px; width: auto; display: block; }
.bh-marca span {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.bh-nav { display: flex; align-items: center; gap: 10px; }
.bh-volver {
  padding: 9px 18px;
  border-radius: 8px;
  background: #ffffff;
  color: #111318;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.bh-volver:hover { background: #e9eaf3; }

/* ===== Hero ===== */
.bhero {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(135deg, #1b1d3a 0%, #3b2a63 55%, #5b5fe0 100%);
  position: relative;
  overflow: hidden;
}

/* La foto del panel va encima del degradado, semitransparente, para que se vea teñida. */
.bhero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hero-foto, none);
  background-size: cover;
  background-position: center;
  opacity: 0.3;
}

.bhero-texto { max-width: 760px; position: relative; z-index: 1; }
.bhero h1 { margin: 0 0 10px; font-size: 42px; line-height: 1.15; font-weight: 800; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35); }
.bhero p { margin: 0; font-size: 18px; line-height: 1.5; opacity: 0.92; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35); }

/* ===== Contenido ===== */
.bmain { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 20px 56px; }

.bfiltros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.bfiltro {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid #d8dae4;
  background: #ffffff;
  color: #3a3d48;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.bfiltro:hover { border-color: #5b5fe0; color: #5b5fe0; }
.bfiltro.activo { background: #5b5fe0; border-color: #5b5fe0; color: #ffffff; }

.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }

.bcard {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(20, 22, 40, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bcard:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(20, 22, 40, 0.12); }

.bcard-img { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #e3e4f3, #ece4f5); overflow: hidden; }
.bcard-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.bcard:hover .bcard-img img { transform: scale(1.04); }
.bcard-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffffff;
  color: #5b5fe0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.bcard-cuerpo { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.bcard-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #5b5fe0; }
.bcard-titulo { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 750; color: #111318; }
.bcard-resumen {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #5f6472;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bcard-fecha { margin-top: auto; padding-top: 6px; font-size: 13px; color: #8a8f9c; }
.bcard-leer { font-weight: 700; color: #5b5fe0; font-size: 15px; }

.bcard-destacada { flex-direction: row; margin-bottom: 30px; }
.bcard-destacada .bcard-img { flex: 0 0 56%; aspect-ratio: auto; min-height: 340px; }
.bcard-destacada .bcard-cuerpo { padding: 32px; justify-content: center; gap: 12px; }
.bcard-destacada .bcard-titulo { font-size: 30px; }
.bcard-destacada .bcard-resumen { font-size: 17px; -webkit-line-clamp: 4; }
.bcard-destacada .bcard-fecha { margin-top: 0; }

.bvacio { text-align: center; color: #6b6f7c; font-size: 17px; padding: 50px 10px; margin: 0; }

.bmas { text-align: center; margin-top: 34px; }
.bmas-btn {
  padding: 12px 34px;
  border-radius: 10px;
  border: 2px solid #5b5fe0;
  background: transparent;
  color: #5b5fe0;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.bmas-btn:hover { background: #5b5fe0; color: #ffffff; }

/* ===== Página de artículo ===== */
.bart-barra { max-width: 1000px; margin: 0 auto; padding: 18px 24px 0; display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; }
.bart-volver { color: #5b5fe0; font-weight: 600; text-decoration: none; font-size: 15px; }
.bart-volver:hover { text-decoration: underline; }
.bart-idiomas { display: flex; gap: 6px; align-items: center; font-size: 14px; color: #6b6f7c; }
.bart-idiomas a { padding: 4px 10px; border-radius: 999px; border: 1px solid #d8dae4; color: #3a3d48; text-decoration: none; font-weight: 600; font-size: 13px; }
.bart-idiomas a.activo { background: #5b5fe0; border-color: #5b5fe0; color: #ffffff; }
.bart-aviso { max-width: 720px; margin: 16px auto 0; padding: 10px 14px; border-radius: 10px; background: #fff7e6; color: #7a5300; font-size: 14px; line-height: 1.5; }
.bart-main { flex: 1; width: 100%; background: #ffffff; }
.bart-estado { text-align: center; padding: 80px 20px; color: #6b6f7c; font-size: 17px; }
.bart-estado a { color: #5b5fe0; font-weight: 600; }

.bart-relacionados { max-width: 1200px; margin: 0 auto; padding: 40px 20px 56px; }
.bart-relacionados h2 { margin: 0 0 22px; font-size: 26px; color: #111318; }

/* ===== Pie ===== */
.bpie { text-align: center; padding: 26px 16px; background: #0c0d14; color: rgba(255, 255, 255, 0.7); font-size: 14px; }

@media (max-width: 768px) {
  .bhero { height: 200px; }
  .bhero h1 { font-size: 28px; }
  .bhero p { font-size: 15px; }
  .bh-marca img { height: 32px; }
  .bh-marca span { font-size: 13px; padding-left: 10px; }
  .bh-volver { padding: 7px 12px; font-size: 13px; }
  .bfiltros { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 22px; padding: 0 20px 4px; scrollbar-width: none; }
  .bcard-destacada { flex-direction: column; }
  .bcard-destacada .bcard-img { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .bcard-destacada .bcard-cuerpo { padding: 20px; }
  .bcard-destacada .bcard-titulo { font-size: 23px; }
  .bgrid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 420px) {
  .bh-marca span { display: none; }
}
