/* Estilos del blog en MDX (Mal de Ojo). Convencion del grupo: posts = MDX, no
   HTML congelado. Identidad de la marca (negro #000 / crema #E8E0D9, titulares
   Approach Mono, cuerpo Montserrat) sin depender del markup de Elementor. */

@font-face {
  font-family: 'Approach Mono';
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('/fonts/2025/06/approach_mono_semibold-webfont.woff2') format('woff2'),
       url('/fonts/2025/06/approach_mono_semibold-webfont.woff') format('woff'),
       url('/fonts/2025/06/approach_mono_semibold-webfont.ttf') format('truetype');
}

:root {
  --bp-primary: #000000;
  --bp-cream: #E8E0D9;
  --bp-text: #1a1a1a;
}

.bp { background: #fff; color: var(--bp-text); font-family: 'Montserrat', system-ui, sans-serif; }

/* ---- Hero 2-columnas (replica del template de post del WP de Mal de Ojo) ----
   Texto a la izquierda sobre fondo negro (categoria + titulo + autor/fecha +
   share), imagen a la derecha. El header es overlay fijo -> padding-top en la
   columna de texto deja el titulo bajo el menu. */
.bp-hero--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 70vh;
}
.bp-hero__text {
  background: var(--bp-primary);
  color: var(--bp-cream);
  padding: 150px 56px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bp-hero__cat {
  text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem;
  opacity: 0.7; margin-bottom: 18px;
}
.bp-hero__text h1 {
  font-family: 'Approach Mono', Georgia, serif; font-weight: 400;
  font-size: clamp(1.8rem, 2.8vw, 3rem); line-height: 1.12; margin: 0 0 18px;
  color: var(--bp-cream);
}
.bp-hero__meta { font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.85; margin: 0 0 26px; }
.bp-hero__share { display: flex; gap: 10px; }
.bp-hero__share a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(232, 224, 217, 0.4);
  display: grid; place-items: center; color: var(--bp-cream);
  text-decoration: none; font-size: 0.9rem; transition: background 0.2s, color 0.2s;
}
.bp-hero__share a:hover { background: var(--bp-cream); color: var(--bp-primary); }
.bp-hero__share a svg { width: 17px; height: 17px; }
.bp-hero__media { background-size: cover; background-position: center; min-height: 320px; }
@media (max-width: 900px) {
  .bp-hero--split { grid-template-columns: 1fr; }
  .bp-hero__text { padding: 130px 24px 36px; }
  .bp-hero__media { min-height: 260px; }
}

/* ---- Layout articulo + TOC ---- */
.bp-wrap {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 52px;
  padding: 56px 24px 80px;
}
@media (max-width: 1024px) { .bp-wrap { grid-template-columns: 1fr; gap: 24px; } }

/* ---- Prose ---- */
.bp-article { min-width: 0; }
.bp-article h2, .bp-article h3, .bp-article h4 {
  font-family: 'Approach Mono', Georgia, serif;
  font-weight: 400;
  color: var(--bp-primary);
  line-height: 1.2;
  scroll-margin-top: 110px;
}
.bp-article h2 { font-size: 1.95rem; margin: 2.2em 0 0.6em; }
.bp-article h3 { font-size: 1.45rem; margin: 1.8em 0 0.5em; }
.bp-article h4 { font-size: 1.2rem; margin: 1.5em 0 0.5em; }
.bp-article p { font-size: 1.07rem; line-height: 1.78; margin: 0 0 1.25em; }
.bp-article a { color: var(--bp-primary); text-decoration: underline; text-underline-offset: 2px; }
.bp-article a:hover { color: var(--bp-primary); }
.bp-article ul, .bp-article ol { margin: 0 0 1.4em; padding-left: 1.3em; line-height: 1.7; }
.bp-article li { margin: 0.4em 0; }
.bp-article img { width: 100%; height: auto; border-radius: 10px; margin: 1.6em 0; display: block; }
.bp-article blockquote {
  margin: 1.8em 0;
  padding: 0.6em 1.2em;
  border-left: 4px solid var(--bp-primary);
  background: var(--bp-cream);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}
.bp-article strong { color: var(--bp-primary); }

/* ---- TOC sticky + colapsable ---- */
.bp-toc { align-self: start; }
@media (min-width: 1025px) { .bp-toc { position: sticky; top: 140px; } }
/* Caja teal con texto crema (igual que el widget TOC del WP en vivo: fondo
   #0C323D, header/links #EEE2D7, hover blanco). */
.bp-toc__box { background: var(--bp-primary); border-radius: 12px; padding: 18px 20px; }
.bp-toc__head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Approach Mono', Georgia, serif;
  color: var(--bp-cream); font-size: 1.1rem; margin: 0 0 6px;
}
/* El reset/kit del tema da a TODO <button> un fondo/borde rojo + padding y
   border-radius:100px -> el chevron quedaba descentrado y rojo. Se fuerza con
   !important: circulo BEIGE con chevron NEGRO (contraste sobre la caja negra). */
.bp-toc__toggle {
  background: var(--bp-cream) !important; cursor: pointer; color: var(--bp-primary) !important;
  width: 30px; height: 30px; padding: 0 !important; border: 0 !important;
  display: grid; place-items: center; border-radius: 50% !important;
  transition: transform 0.3s ease, background 0.2s ease;
}
.bp-toc__toggle:hover { background: #d6cabb !important; }
.bp-toc__toggle svg { display: block; }
.bp-toc.is-collapsed .bp-toc__toggle { transform: rotate(-90deg); }
.bp-toc__body {
  overflow: hidden;
  transition: height 0.32s ease, opacity 0.25s ease, margin 0.3s ease, padding 0.3s ease;
}
.bp-toc.is-collapsed .bp-toc__body { height: 0 !important; opacity: 0; }
.bp-toc__list {
  list-style: none; margin: 6px 0 0; padding: 0;
  max-height: 52vh; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--bp-cream) transparent;
}
.bp-toc__list::-webkit-scrollbar { width: 6px; }
.bp-toc__list::-webkit-scrollbar-thumb { background: var(--bp-cream); border-radius: 3px; }
.bp-toc__list::-webkit-scrollbar-track { background: transparent; }
.bp-toc__list li { margin: 0; }
.bp-toc__list a {
  display: block; padding: 5px 0; color: var(--bp-cream);
  text-decoration: none; font-size: 0.92rem; line-height: 1.35;
  border-left: 2px solid transparent; padding-left: 10px; transition: border-color 0.2s, color 0.2s;
}
.bp-toc__list a:hover, .bp-toc__list a.is-active { border-left-color: var(--bp-cream); color: #fff; }
.bp-toc__list .lvl-3 a { padding-left: 24px; font-size: 0.88rem; }
.bp-toc__list .lvl-4 a { padding-left: 38px; font-size: 0.85rem; opacity: 0.85; }

/* ---- Share ---- */
.bp-share { display: flex; gap: 12px; align-items: center; margin: 36px 0 0; padding-top: 22px; border-top: 1px solid #e6ddd3; }
.bp-share span { font-size: 0.9rem; color: #6b7680; }
.bp-share a {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bp-primary); color: var(--bp-cream); text-decoration: none; font-size: 1rem;
  transition: opacity 0.2s;
}
.bp-share a:hover { background: var(--bp-cream); color: var(--bp-primary); }
.bp-share a svg { width: 17px; height: 17px; }

/* ===== Indice del blog (grid de cards, imagenes uniformes 3:2) ===== */
.bp-index { max-width: 1180px; margin: 0 auto; padding: 150px 24px 80px; }
/* con el hero "Blog" arriba (que ya despeja el header fijo) el grid usa padding normal */
.bp-index--withhero { padding-top: 56px; }

/* Hero "Blog" del indice: el color oscuro del overlay y el color claro del titulo
   vivian en el inline CSS del index original (que el rebuild no incluye), y ademas
   .bp { color } heredaba texto oscuro al titulo. Se restaura el contraste: overlay
   teal semitransparente sobre la imagen + texto crema centrado. */
.bp .elementor-element-8aa6d7b::before {
  background-color: rgba(12, 50, 61, 0.5) !important;
  opacity: 1 !important;
}
.bp .elementor-element-8aa6d7b .elementor-heading-title,
.bp .elementor-element-8aa6d7b .elementor-widget-text-editor,
.bp .elementor-element-8aa6d7b p {
  color: var(--bp-cream) !important;
}
.bp-index__title {
  font-family: 'Approach Mono', Georgia, serif; color: var(--bp-primary);
  font-size: clamp(2rem, 4vw, 3rem); text-align: center; margin: 0 0 8px;
}
.bp-index__sub { text-align: center; color: #6b7680; margin: 0 0 48px; }
.bp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 32px; }
.bp-card {
  display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 4px 22px rgba(0,0,0,0.08); transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none; color: inherit;
}
.bp-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.16); }
.bp-card__media { aspect-ratio: 3 / 2; overflow: hidden; }
.bp-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-card__body { padding: 22px 22px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bp-card__date { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: #9aa4ac; }
.bp-card__title { font-family: 'Approach Mono', Georgia, serif; color: var(--bp-primary); font-size: 1.3rem; line-height: 1.2; margin: 0; }
.bp-card__excerpt { font-size: 0.96rem; line-height: 1.6; color: #5a656e; margin: 0; }
.bp-card__more { margin-top: auto; color: var(--bp-primary); font-weight: 600; font-size: 0.92rem; }

/* ===================== MAL DE OJO-ESPECIFICO =====================
   El hero "Blog" del indice trae margin-top:-120px (disenado para el header
   en-flujo del WP). Con el header fijo (overlay) eso subia "BLOG" bajo el menu.
   Se neutraliza -> el hero arranca en 0 y el header flota sobre su borde, igual
   que el WP en vivo. */
.bp-page .elementor-element-075bb70 { margin-top: 0 !important; }

/* ---- FAQ de los posts -> acordeon animado (lo arma interactions.js) ----
   CONSTANTE del grupo: las FAQ siempre con despliegue/cierre animado. */
.bp-faq { margin: 0.4em 0 1.6em; border-top: 1px solid #e0e0e0; }
.bp-faq__item { border-bottom: 1px solid #e0e0e0; }
.bp-faq__q {
  width: 100%; text-align: left; background: none !important; border: 0 !important;
  cursor: pointer; padding: 18px 0 !important; margin: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-family: 'Approach Mono', Georgia, serif; font-size: 1.1rem; font-weight: 400;
  color: var(--bp-primary) !important; line-height: 1.3;
}
.bp-faq__q span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bp-faq__q svg { width: 22px; height: 22px; flex: 0 0 auto; color: var(--bp-primary); transition: transform 0.3s ease; }
.bp-faq__item.is-open .bp-faq__q svg { transform: rotate(180deg); }
.bp-faq__a { height: 0; overflow: hidden; transition: height 0.32s ease; }
.bp-faq__a-inner { padding: 0 0 18px; }
.bp-faq__a-inner > :first-child { margin-top: 0; }
.bp-faq__a-inner p { margin: 0 0 0.8em; }

/* ---- Articulos relacionados (CONSTANTE del grupo: SIEMPRE al final de cada post
   para incentivar lectura). Cards reusan .bp-card. ---- */
.bp-related { border-top: 1px solid #e6ddd3; background: #fff; }
.bp-related__wrap { max-width: 1180px; margin: 0 auto; padding: 48px 24px 72px; }
.bp-related__head {
  font-family: 'Montserrat', system-ui, sans-serif; font-weight: 600;
  font-size: 1.25rem; color: var(--bp-primary); margin: 0 0 28px;
}
.bp-related__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px; }
.bp-related .bp-card__media { display: block; }
.bp-related .bp-card__body { display: flex; flex-direction: column; gap: 10px; }
.bp-related .bp-card__title, .bp-related .bp-card__more, .bp-related .bp-card__date { display: block; }
.bp-related .bp-card__title { font-size: 1.5rem; }
.bp-related .bp-card__date { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eee; }
