/* =====================================================================
   Home · davidbuenov.com — Rediseño 2026
   CSS de la portada con soporte completo de Modo Claro y Oscuro.
   ===================================================================== */

/* ---------- VARIABLES DE TEMA ---------- */
:root,
html,
html.dark,
html[data-bs-theme="dark"],
body.dark {
  --dbv-bg: #060913;
  --dbv-surface: rgba(12, 20, 38, 0.65);
  --dbv-surface-hi: rgba(22, 34, 62, 0.85);
  --dbv-amber: #f7a22b;
  --dbv-cyan: #00d2ff;
  --dbv-green: #10b981;
  --dbv-text: #f3f4f6;
  --dbv-heading: #ffffff;
  --dbv-muted: #9ca3af;
  --dbv-dim: #6b7280;
  --dbv-line: rgba(255, 255, 255, 0.08);
  --dbv-cta-bg: linear-gradient(160deg, #0c1426, #060913);
  --dbv-victoria-bg: linear-gradient(120deg, rgba(12,20,38,.9), rgba(24,16,6,.9));
  --dbv-radius: 14px;
  --dbv-title: 'Outfit', system-ui, sans-serif;
}

html.light,
html[data-bs-theme="light"],
body.light {
  --dbv-bg: #f8fafc;
  --dbv-surface: #ffffff;
  --dbv-surface-hi: #f1f5f9;
  --dbv-amber: #d97706;
  --dbv-cyan: #0284c7;
  --dbv-green: #059669;
  --dbv-text: #0f172a;
  --dbv-heading: #0f172a;
  --dbv-muted: #475569;
  --dbv-dim: #64748b;
  --dbv-line: rgba(0, 0, 0, 0.08);
  --dbv-cta-bg: linear-gradient(160deg, #ffffff, #f1f5f9);
  --dbv-victoria-bg: linear-gradient(120deg, #ffffff, #fff7ed);
}

.dbv-home {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 24px) 96px;
  background: var(--dbv-bg);
  color: var(--dbv-text);
  font-family: 'Inter', system-ui, sans-serif;
  transition: background-color .3s ease, color .3s ease;
}

.dbv-home h1, .dbv-home h2, .dbv-home h3, .dbv-home h4 { font-family: var(--dbv-title); margin: 0; }
.dbv-home p { margin: 0; text-wrap: pretty; }
.dbv-home a { text-decoration: none; }

/* ---------- Tipografía compartida ---------- */
.dbv-eyebrow {
  font-family: var(--dbv-title);
  font-size: 12.5px; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--dbv-amber);
}
.dbv-eyebrow--pill {
  background: rgba(247, 162, 43, 0.15);
  border: 1px solid rgba(247, 162, 43, 0.4);
  padding: 6px 16px; border-radius: 20px;
  backdrop-filter: blur(6px);
  color: #ffc46b;
}
.dbv-h2 { font-size: clamp(23px, 3.4vw, 32px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; color: var(--dbv-heading); }
.dbv-lead { font-size: 16.5px; line-height: 1.7; color: var(--dbv-muted); }
.dbv-tone--amber { color: var(--dbv-amber); }
.dbv-tone--cyan  { color: var(--dbv-cyan); }
.dbv-tone--green { color: var(--dbv-green); }

.dbv-section { padding: clamp(36px, 6vw, 56px) 0; border-top: 1px solid var(--dbv-line); }
.dbv-section--flush { border-top: 0; }

.dbv-section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: 14px 24px; margin-bottom: 28px;
}
.dbv-section__head > div { display: flex; flex-direction: column; gap: 10px; }
.dbv-section__link { font-family: var(--dbv-title); font-weight: 600; font-size: 15px; color: var(--dbv-amber); white-space: nowrap; }
.dbv-section__link:hover { color: #ffb545; }

/* ---------- Botones con Alto Contraste Garantizado ---------- */
.dbv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--dbv-title); font-weight: 700;
  font-size: clamp(14px, 1.7vw, 15.5px);
  padding: 13px clamp(22px, 3vw, 30px);
  border-radius: 30px; border: 1px solid transparent;
  transition: all .25s ease;
  cursor: pointer;
  text-decoration: none !important;
}

.dbv-btn--primary,
.dbv-hero .dbv-btn--primary {
  background: #f7a22b !important;
  color: #060913 !important;
  font-weight: 700 !important;
  box-shadow: 0 6px 20px rgba(247,162,43,.35);
}
.dbv-btn--primary:hover,
.dbv-hero .dbv-btn--primary:hover {
  background: #ffb545 !important;
  color: #060913 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(247,162,43,.5);
}

.dbv-btn--glass,
.dbv-hero .dbv-btn--glass {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  backdrop-filter: blur(8px);
  font-weight: 600 !important;
}
.dbv-btn--glass:hover,
.dbv-hero .dbv-btn--glass:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  transform: translateY(-2px);
}

/* En Modo Claro (Sol), los botones de cristal fuera del Hero se adaptan a texto oscuro */
html.light .dbv-home :not(.dbv-hero) .dbv-btn--glass,
html[data-bs-theme="light"] .dbv-home :not(.dbv-hero) .dbv-btn--glass,
body.light .dbv-home :not(.dbv-hero) .dbv-btn--glass,
html.light .dbv-cta .dbv-btn--glass,
html[data-bs-theme="light"] .dbv-cta .dbv-btn--glass {
  background: rgba(0, 0, 0, 0.06) !important;
  color: #0f172a !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
}
html.light .dbv-home :not(.dbv-hero) .dbv-btn--glass:hover,
html[data-bs-theme="light"] .dbv-home :not(.dbv-hero) .dbv-btn--glass:hover,
body.light .dbv-home :not(.dbv-hero) .dbv-btn--glass:hover,
html.light .dbv-cta .dbv-btn--glass:hover,
html[data-bs-theme="light"] .dbv-cta .dbv-btn--glass:hover {
  background: rgba(0, 0, 0, 0.12) !important;
  color: #0f172a !important;
  border-color: rgba(0, 0, 0, 0.35) !important;
}

/* ---------- HERO (Ancho completo 100% Edge-to-Edge & Integración de Cabecera) ---------- */
.dbv-hero {
  position: relative;
  display: grid;
  width: 100%;
  min-height: min(88vh, 720px);
  margin: 0 0 24px 0;
  border-radius: 0;
  border: none;
  background: #060913;
  color: #f3f4f6;
  font-family: 'Inter', system-ui, sans-serif;
}

#header + #main-content .dbv-hero.include-header,
#header + .dbv-hero.include-header,
#main-content .dbv-hero.include-header,
.dbv-hero.include-header {
  margin-top: -142px !important;
}

@media (max-width: 991px) {
  #header + #main-content .dbv-hero.include-header,
  #header + .dbv-hero.include-header,
  #main-content .dbv-hero.include-header,
  .dbv-hero.include-header {
    margin-top: -101px !important;
  }
}

.dbv-hero__slide {
  grid-area: 1 / 1;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity .9s ease;
  z-index: 1;
}
.dbv-hero__slide.is-active { opacity: 1; pointer-events: auto; z-index: 2; }
.dbv-hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.dbv-hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6,9,19,.75) 0%, rgba(6,9,19,.45) 45%, rgba(6,9,19,.95) 100%);
}

.dbv-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding-top: clamp(190px, 22vw, 250px);
  padding-bottom: clamp(60px, 8vw, 85px);
  padding-left: clamp(16px, 4vw, 36px);
  padding-right: clamp(16px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dbv-hero__caption {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  text-align: center;
  gap: clamp(14px, 2.2vw, 22px);
  max-width: 900px;
}
.dbv-hero__title {
  font-size: clamp(28px, 5.5vw, 54px);
  font-weight: 800; line-height: 1.08; letter-spacing: -0.04em;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,.8);
}
.dbv-hero__text { font-size: clamp(15px, 2vw, 18px); line-height: 1.6; color: #e5e7eb; max-width: 740px; font-weight: 300; text-shadow: 0 2px 12px rgba(0,0,0,0.9); }
.dbv-hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

.dbv-hero__arrow {
  position: absolute; top: 55%; transform: translateY(-50%); z-index: 5;
  width: clamp(40px, 5vw, 52px); height: clamp(40px, 5vw, 52px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  background: rgba(6,9,19,.55); backdrop-filter: blur(8px);
  color: #fff; font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.dbv-hero__arrow:hover { background: var(--dbv-amber); color: #060913; border-color: var(--dbv-amber); transform: translateY(-50%) scale(1.05); }
.dbv-hero__arrow--prev { left: clamp(12px, 3vw, 36px); }
.dbv-hero__arrow--next { right: clamp(12px, 3vw, 36px); }

.dbv-hero__dots { position: absolute; left: 0; right: 0; bottom: 28px; z-index: 5; display: flex; justify-content: center; gap: 10px; }
.dbv-hero__dot { width: 9px; height: 9px; padding: 0; border: none; border-radius: 5px; cursor: pointer; background: rgba(255,255,255,.35); transition: all .3s ease; }
.dbv-hero__dot.is-active { width: 28px; background: var(--dbv-amber); }
.dbv-hero__count { position: absolute; right: clamp(16px, 4vw, 36px); bottom: 24px; z-index: 5; font-family: var(--dbv-title); font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--dbv-muted); }
.dbv-hero__count [data-hero-current] { color: var(--dbv-amber); font-size: 17px; }

/* ---------- Métricas ---------- */
.dbv-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; padding: 8px 0 clamp(36px, 6vw, 56px); }
.dbv-stat { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: var(--dbv-radius); background: var(--dbv-surface); border: 1px solid var(--dbv-line); color: inherit; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.dbv-stat:hover { background: var(--dbv-surface-hi); border-color: rgba(247,162,43,.4); color: inherit; transform: translateY(-2px); }
.dbv-stat__num { font-family: var(--dbv-title); font-size: 34px; font-weight: 800; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.dbv-stat__label { font-size: 14px; color: var(--dbv-muted); font-weight: 500; }

/* ---------- Splits (bio, Victoria) ---------- */
.dbv-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(26px, 4vw, 48px); align-items: center; }
.dbv-split--top { align-items: start; }
.dbv-split__text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }

/* ---------- Timeline ---------- */
.dbv-timeline { display: flex; flex-direction: column; gap: 14px; }
.dbv-tl-item { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 22px 24px; border-radius: var(--dbv-radius); background: var(--dbv-surface); border: 1px solid var(--dbv-line); }
.dbv-tl-item__date { font-family: var(--dbv-title); font-size: 13px; font-weight: 700; letter-spacing: .8px; min-width: 95px; padding-top: 3px; }
.dbv-tl-item__body { display: flex; flex-direction: column; gap: 5px; flex: 1 1 240px; min-width: 0; }
.dbv-tl-item__body h3 { font-size: 18px; font-weight: 600; color: var(--dbv-heading); }
.dbv-tl-item__body p { font-size: 14.5px; color: var(--dbv-muted); line-height: 1.55; }

/* ---------- Tarjetas (blog, proyectos) ---------- */
.dbv-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 20px; }
.dbv-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.dbv-card { display: flex; flex-direction: column; border-radius: var(--dbv-radius); overflow: hidden; background: var(--dbv-surface); border: 1px solid var(--dbv-line); color: inherit; transition: border-color .2s ease, transform .2s ease; }
.dbv-card:hover { border-color: rgba(247,162,43,.4); color: inherit; transform: translateY(-3px); }
.dbv-card__img { width: 100%; height: 190px; object-fit: cover; display: block; }
.dbv-card__img--tall { height: 230px; }
.dbv-card__body { padding: 20px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.dbv-card__cat { font-family: var(--dbv-title); font-size: 11.5px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--dbv-cyan); }
.dbv-card__title { font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--dbv-heading); }
.dbv-card__title--lg { font-size: 21px; font-weight: 700; }
.dbv-card__excerpt { font-size: 14px; color: var(--dbv-muted); line-height: 1.55; }
.dbv-card__foot { margin-top: auto; padding-top: 14px; font-size: 12.5px; color: var(--dbv-dim); display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--dbv-line); }
.dbv-card__cta { font-family: var(--dbv-title); font-weight: 600; font-size: 14.5px; color: var(--dbv-amber); }

/* ---------- Tarjetas de vídeo del canal ---------- */
/* La miniatura de YouTube (hqdefault) viene en 4:3 con bandas negras arriba y
   abajo; el recorte al 16:9 de la tarjeta las elimina. */
.dbv-card__media { position: relative; display: block; overflow: hidden; }
.dbv-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 9, 19, .68); border: 1px solid rgba(255, 255, 255, .35);
  backdrop-filter: blur(3px); color: #fff;
  transition: background .2s ease, transform .2s ease;
}
.dbv-play svg { width: 24px; height: 24px; margin-left: 2px; }
.dbv-card--video:hover .dbv-play { background: #ff0000; border-color: #ff0000; transform: translate(-50%, -50%) scale(1.08); }

/* ---------- Conferencias ---------- */
.dbv-conf-list { display: flex; flex-direction: column; gap: 14px; }
.dbv-conf { display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: center; padding: 18px; border-radius: var(--dbv-radius); background: var(--dbv-surface); border: 1px solid var(--dbv-line); color: inherit; transition: border-color .2s ease, transform .2s ease; }
.dbv-conf:hover { border-color: rgba(247,162,43,.4); color: inherit; transform: translateY(-2px); }
.dbv-conf__img { flex: 0 0 auto; width: clamp(120px, 22vw, 150px); height: 96px; object-fit: cover; border-radius: 9px; }
.dbv-conf__body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; min-width: 0; }
.dbv-conf__date { font-family: var(--dbv-title); font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--dbv-cyan); }
.dbv-conf__body h3 { font-size: 19px; font-weight: 600; color: var(--dbv-heading); }
.dbv-conf__body p { font-size: 14px; color: var(--dbv-muted); }

/* ---------- Victoria ---------- */
.dbv-victoria {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(26px, 4vw, 48px); align-items: center;
  padding: clamp(28px, 5vw, 48px) clamp(20px, 4vw, 40px);
  margin: clamp(36px, 6vw, 56px) 0 0;
  border-radius: 20px;
  background: var(--dbv-victoria-bg);
  border: 1px solid var(--dbv-line);
}
.dbv-victoria img { width: 100%; max-width: 280px; border-radius: 16px; justify-self: center; box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.dbv-victoria__text { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }

/* ---------- FAQ ---------- */
.dbv-faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.dbv-faq-card { padding: 22px 24px; border-radius: var(--dbv-radius); background: var(--dbv-surface); border: 1px solid var(--dbv-line); display: flex; flex-direction: column; gap: 9px; }
.dbv-faq-card h3 { font-size: 16.5px; font-weight: 600; line-height: 1.4; color: var(--dbv-heading); }
.dbv-faq-card p { font-size: 14.5px; color: var(--dbv-muted); line-height: 1.6; }

/* ---------- CTA final ---------- */
.dbv-cta {
  text-align: center;
  padding: clamp(48px, 7vw, 76px) clamp(20px, 4vw, 40px);
  margin-top: clamp(36px, 6vw, 56px);
  border-radius: 20px;
  background: var(--dbv-cta-bg);
  border: 1px solid var(--dbv-line);
  display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.dbv-cta h2 { font-size: clamp(26px, 4.2vw, 38px); font-weight: 700; letter-spacing: -0.03em; max-width: 720px; line-height: 1.15; color: var(--dbv-heading); }
.dbv-cta p { font-size: 17.5px; color: var(--dbv-muted); max-width: 640px; line-height: 1.65; }
.dbv-cta__btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

/* ---------- Accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  .dbv-home *, .dbv-home *::before, .dbv-home *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
