/*
 * Blog Showcase — Hoja de estilos principal
 * Fuente: Stolzl (Google Fonts)
 * Encoding: UTF-8
 */

/* ── Variables ──────────────────────────────────────────────── */
:root {
  --bsp-font:        'Stolzl', Georgia, serif;
  --bsp-color-cat:  #e05a6a;          /* color labels de categoría */
  --bsp-color-star: #f4a536;          /* estrellas activas          */
  --bsp-color-text: #1a1a1a;
  --bsp-color-muted:#888;
  --bsp-color-line: #e8e8e8;
  --bsp-color-btn:  #1a1a1a;
  --bsp-color-btn-hover: #e05a6a;
  --bsp-radius:     6px;
  --bsp-gap:        32px;
  --bsp-transition: 0.22s ease;
}

/* ── Contenedor principal ───────────────────────────────────── */
.bsp-wrapper {
  font-family: var(--bsp-font);
  color: var(--bsp-color-text);
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 24px 16px;
  box-sizing: border-box;
}

/* ── Grid 2 columnas ────────────────────────────────────────── */
.bsp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--bsp-gap);
  align-items: start;
}

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

/* ── Título de sección ──────────────────────────────────────── */
.bsp-section-title {
  font-family: var(--bsp-font);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--bsp-color-text);
  margin: 0 0 18px;
  letter-spacing: -.01em;
}

/* ── Etiqueta de categoría ──────────────────────────────────── */
.bsp-cat-label {
  display: inline-block;
  font-family: var(--bsp-font);
  font-size: .72rem;
  font-weight: 700;
  color: var(--bsp-color-cat);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* ── Fecha ──────────────────────────────────────────────────── */
.bsp-date {
  display: block;
  font-size: .8rem;
  color: var(--bsp-color-muted);
  margin-top: 6px;
}

/* ════════════════════════════════════════════════════════════
   POST PRINCIPAL
   ════════════════════════════════════════════════════════════ */
.bsp-featured {
  position: relative;
}

.bsp-featured__header {
  margin-bottom: 4px;
}

/* Imagen principal */
.bsp-featured__image-wrap {
  display: block;
  overflow: hidden;
  border-radius: var(--bsp-radius);
  margin-bottom: 14px;
  aspect-ratio: 4/3;
}

.bsp-featured__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.bsp-featured__image-wrap:hover .bsp-featured__image {
  transform: scale(1.03);
}

/* Cuerpo */
.bsp-featured__body {}

.bsp-featured__title {
  font-family: var(--bsp-font);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 4px 0 10px;
  line-height: 1.35;
}

.bsp-featured__title a {
  color: inherit;
  text-decoration: none;
}

.bsp-featured__title a:hover {
  color: var(--bsp-color-cat);
}

.bsp-featured__excerpt {
  font-size: .9rem;
  line-height: 1.65;
  color: #444;
  margin: 0 0 12px;
}

/* ── Footer del featured: fecha + acciones ───────────────── */
.bsp-featured__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--bsp-color-line);
  margin-top: 4px;
}

.bsp-featured__footer .bsp-date {
  margin: 0;
  flex: 0 0 auto;
}

/* ── Acciones (share / comment / estrellas) ─────────────── */
.bsp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Botones compartir / comentar */
.bsp-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--bsp-font);
  font-size: .82rem;
  font-weight: 500;
  color: var(--bsp-color-btn);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 2px;
  text-decoration: none;
  transition: color var(--bsp-transition);
  white-space: nowrap;
}

.bsp-btn:hover,
.bsp-btn:focus {
  color: var(--bsp-color-cat);
  outline: none;
}

.bsp-btn svg {
  flex-shrink: 0;
}

/* ── Popup de compartir ─────────────────────────────────────── */
.bsp-share-wrapper {
  position: relative;
}

.bsp-share-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--bsp-color-line);
  border-radius: var(--bsp-radius);
  box-shadow: 0 6px 24px rgba(0,0,0,.12);
  padding: 14px 16px;
  min-width: 210px;
  z-index: 99;
  animation: bspFadeUp .18s ease forwards;
}

@keyframes bspFadeUp {
  from { opacity:0; transform: translateX(-50%) translateY(6px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0);   }
}

.bsp-share-popup.is-open {
  display: block;
}

/* flecha */
.bsp-share-popup::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 13px;
  height: 13px;
  background: #fff;
  border-right: 1px solid var(--bsp-color-line);
  border-bottom: 1px solid var(--bsp-color-line);
}

.bsp-share-title {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  color: var(--bsp-color-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 10px;
}

.bsp-share-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bsp-share-link {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--bsp-font);
  font-size: .85rem;
  font-weight: 500;
  color: var(--bsp-color-text);
  text-decoration: none;
  padding: 5px 6px;
  border-radius: 4px;
  transition: background var(--bsp-transition), color var(--bsp-transition);
}

.bsp-share-link:hover {
  background: #f5f5f5;
  color: var(--bsp-color-cat);
}

/* Colores por red */
.bsp-share-facebook:hover  { color: #1877f2; }
.bsp-share-twitter:hover   { color: #000; }
.bsp-share-whatsapp:hover  { color: #25d366; }
.bsp-share-telegram:hover  { color: #0088cc; }
.bsp-share-email:hover     { color: var(--bsp-color-cat); }

/* ── Estrellas ──────────────────────────────────────────────── */
.bsp-stars {
  display: flex;
  align-items: center;
  gap: 2px;
}

.bsp-star {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #d0d0d0;
  transition: color var(--bsp-transition), transform var(--bsp-transition);
  line-height: 1;
  display: flex;
  align-items: center;
}

.bsp-star:hover,
.bsp-star.is-hover {
  color: var(--bsp-color-star);
  transform: scale(1.15);
}

.bsp-star.is-active {
  color: var(--bsp-color-star);
}

.bsp-stars__count {
  font-size: .78rem;
  color: var(--bsp-color-muted);
  margin-left: 3px;
}

/* Toast de confirmación */
.bsp-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1a1a1a;
  color: #fff;
  font-family: var(--bsp-font);
  font-size: .85rem;
  padding: 10px 18px;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}

.bsp-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════════
   BARRA LATERAL — Cards secundarios
   ════════════════════════════════════════════════════════════ */
.bsp-sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bsp-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 0;
  border-bottom: 1px solid var(--bsp-color-line);
}

.bsp-card:first-child {
  padding-top: 0;
}

.bsp-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bsp-card__image-wrap {
  display: block;
  overflow: hidden;
  border-radius: var(--bsp-radius);
  aspect-ratio: 4/3;
}

.bsp-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.bsp-card__image-wrap:hover .bsp-card__image {
  transform: scale(1.05);
}

.bsp-card__body {}

.bsp-card__title {
  font-family: var(--bsp-font);
  font-size: .95rem;
  font-weight: 700;
  margin: 4px 0 6px;
  line-height: 1.3;
}

.bsp-card__title a {
  color: inherit;
  text-decoration: none;
}

.bsp-card__title a:hover {
  color: var(--bsp-color-cat);
}

.bsp-card__excerpt {
  font-size: .82rem;
  line-height: 1.6;
  color: #555;
  margin: 0 0 4px;
}

/* ── Responsive fino ────────────────────────────────────────── */
@media (max-width: 480px) {
  .bsp-card {
    grid-template-columns: 90px 1fr;
    gap: 10px;
  }

  .bsp-actions {
    margin-left: 0;
    flex-wrap: wrap;
  }

  .bsp-share-popup {
    left: 0;
    transform: none;
  }

  .bsp-share-popup::after {
    left: 28px;
    transform: rotate(45deg);
  }
}
