/* ===================================================================
 * MyHumanBlueprint Child Theme — blog.css
 * Estilos específicos para blog.myhumanblueprint.app
 * =================================================================== */

/* ─── HERO DEL POST ────────────────────────────────────────────── */

.mhb-post-hero {
  position: relative;
  width: 100%;
  min-height: 480px;
  max-height: 600px;
  overflow: hidden;
  margin-bottom: 48px;
  border-radius: 0 0 16px 16px;
}

.mhb-post-hero-image {
  position: absolute;
  inset: 0;
}

.mhb-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.05); /* margen para parallax */
  transition: transform 0.1s linear;
}

/* Fallback: sin imagen destacada */
.mhb-post-hero-fallback {
  background: linear-gradient(135deg, #0C0A1E 0%, #3D1A6E 50%, #0C0A1E 100%);
}

/* Overlay gradiente violeta */
.mhb-post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 5, 20, 0.2) 0%,
    rgba(6, 5, 20, 0.5) 40%,
    rgba(6, 5, 20, 0.85) 100%
  );
}

/* Contenido encima del hero */
.mhb-post-hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 48px 48px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.mhb-post-title {
  font-family: var(--mhb-font-heading);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

/* ─── META DEL POST ────────────────────────────────────────────── */

.mhb-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.mhb-post-meta span {
  font-size: 0.82rem;
  color: rgba(240, 208, 144, 0.85);
  letter-spacing: 0.04em;
}

.mhb-post-meta a {
  color: var(--mhb-gold-bright);
  text-decoration: none;
  font-weight: 600;
}
.mhb-post-meta a:hover {
  color: #fff;
}

.mhb-post-date::before { content: '☉ '; opacity: 0.6; }
.mhb-post-author::before { content: '✦ '; opacity: 0.6; }
.mhb-post-time::before { content: '⏱ '; opacity: 0.6; }

/* ─── LAYOUT CONTENIDO + SIDEBAR ──────────────────────────────── */

.mhb-post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 900px) {
  .mhb-post-layout {
    grid-template-columns: 1fr;
  }
  .mhb-post-sidebar {
    order: -1; /* Sidebar arriba en mobile */
  }
}

/* ─── CONTENIDO DEL POST ───────────────────────────────────────── */

.mhb-post-content {
  color: var(--mhb-text-primary);
  line-height: 1.85;
  font-size: 1.02rem;
}

.mhb-post-content h2 {
  font-family: var(--mhb-font-heading);
  color: var(--mhb-gold);
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--mhb-glass-border);
}

.mhb-post-content h3 {
  font-family: var(--mhb-font-heading);
  color: var(--mhb-violet-light);
  font-size: 1.25rem;
  margin: 1.6rem 0 0.8rem;
}

.mhb-post-content p {
  margin-bottom: 1.4rem;
  color: var(--mhb-text-primary);
}

.mhb-post-content a {
  color: var(--mhb-gold-bright);
  text-decoration: underline;
  text-decoration-color: rgba(240, 208, 144, 0.35);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}
.mhb-post-content a:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.mhb-post-content ul,
.mhb-post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.4rem;
}

.mhb-post-content li {
  margin-bottom: 6px;
  color: var(--mhb-text-secondary);
}

.mhb-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--mhb-glass-border);
  margin: 1rem 0;
}

.mhb-post-content blockquote {
  font-family: var(--mhb-font-heading);
  font-style: italic;
  color: var(--mhb-gold);
  border-left: 3px solid var(--mhb-gold);
  padding: 12px 20px;
  margin: 1.5rem 0;
  background: rgba(201, 169, 110, 0.06);
  border-radius: 0 8px 8px 0;
  font-size: 1.05rem;
}

/* ─── TAGS DEL POST ────────────────────────────────────────────── */

.mhb-post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
  padding-top: 16px;
  border-top: 1px solid var(--mhb-glass-border);
}

.mhb-tags-label {
  font-size: 0.78rem;
  color: var(--mhb-text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ─── SIDEBAR ─────────────────────────────────────────────────── */

.mhb-post-sidebar {
  position: sticky;
  top: 100px; /* ajustar según altura del header Divi */
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mhb-sidebar-cta {
  text-align: center;
  padding: 24px;
}

/* ─── POSTS GRID (archive/blog) ───────────────────────────────── */

.mhb-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin: 32px 0;
}

.mhb-post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mhb-post-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.mhb-post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.mhb-post-card:hover .mhb-post-card-thumb img {
  transform: scale(1.05);
}

.mhb-post-card-body {
  padding: 20px;
  flex: 1;
}

.mhb-post-card-title {
  font-family: var(--mhb-font-heading);
  color: var(--mhb-text-primary);
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.3;
}
.mhb-post-card:hover .mhb-post-card-title {
  color: var(--mhb-gold);
}

.mhb-post-card-excerpt {
  color: var(--mhb-text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 14px;
}

/* ─── LIGHT MODE OVERRIDES ────────────────────────────────────── */

body.mhb-light .mhb-post-hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(245, 240, 232, 0.1) 0%,
    rgba(245, 240, 232, 0.5) 50%,
    rgba(245, 240, 232, 0.9) 100%
  );
}

body.mhb-light .mhb-post-title {
  color: #1A1A1A;
  text-shadow: none;
}

body.mhb-light .mhb-post-meta span {
  color: #7A6E58;
}

body.mhb-light .mhb-post-meta a {
  color: var(--mhb-gold);
}

/* ─── RESPONSIVE ──────────────────────────────────────────────── */

@media (max-width: 768px) {
  .mhb-post-hero {
    min-height: 320px;
  }
  .mhb-post-hero-content {
    padding: 32px 20px 28px;
  }
  .mhb-post-layout {
    padding: 0 16px;
  }
}
