/* =========================================================
   CAPILLA VIRTUAL 8.3 — CORRECCIÓN FINAL DE CONTRASTE
   Esta hoja se carga después de main, redesign, v6, v7 y v8.
   ========================================================= */

:root {
  --cv-fix-navy: #071a38;
  --cv-fix-navy-deep: #04152d;
  --cv-fix-blue: #0a4f93;
  --cv-fix-blue-2: #1169b7;
  --cv-fix-white: #ffffff;
  --cv-fix-gold: #ffda77;
  --cv-fix-gold-strong: #e7bd5c;
  --cv-fix-light-blue: #dceeff;
  --cv-fix-text: #17263a;
  --cv-fix-muted: #5e6e82;
  --cv-fix-border: #dce5ee;
}

html,
body.cv6-site,
body.cv8-site {
  color-scheme: light;
}

/* El encabezado siempre permanece claro y legible. */
html body.cv8-site .cv6-header,
html body.cv8-site .cv5-header,
html body.cv8-site .cv-site-header {
  background: rgba(255,255,255,.98) !important;
  color: var(--cv-fix-navy) !important;
}

html body.cv8-site .cv6-header :is(a,button,strong,span),
html body.cv8-site .cv5-header :is(a,button,strong,span) {
  opacity: 1;
}

/* Botón Mi Capilla / Iniciar sesión. */
html body.cv8-site .cv6-header .cv6-account-link,
html body.cv8-site .cv6-header .cv6-account-link:link,
html body.cv8-site .cv6-header .cv6-account-link:visited,
html body.cv8-site .cv6-header a[href*="mi-capilla"],
html body.cv8-site header a[href*="mi-capilla"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 43px !important;
  padding: 10px 18px !important;
  border: 2px solid var(--cv-fix-blue) !important;
  border-radius: 999px !important;
  background: var(--cv-fix-blue) !important;
  color: var(--cv-fix-white) !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  text-shadow: none !important;
  opacity: 1 !important;
  box-shadow: 0 8px 22px rgba(7,26,56,.16) !important;
}

html body.cv8-site .cv6-header .cv6-account-link *,
html body.cv8-site .cv6-header a[href*="mi-capilla"] *,
html body.cv8-site header a[href*="mi-capilla"] * {
  color: var(--cv-fix-white) !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  opacity: 1 !important;
}

html body.cv8-site .cv6-header .cv6-account-link:hover,
html body.cv8-site .cv6-header .cv6-account-link:focus-visible,
html body.cv8-site .cv6-header a[href*="mi-capilla"]:hover,
html body.cv8-site .cv6-header a[href*="mi-capilla"]:focus-visible {
  background: var(--cv-fix-gold) !important;
  border-color: var(--cv-fix-gold) !important;
  color: var(--cv-fix-navy) !important;
}

html body.cv8-site .cv6-header .cv6-account-link:hover *,
html body.cv8-site .cv6-header .cv6-account-link:focus-visible *,
html body.cv8-site .cv6-header a[href*="mi-capilla"]:hover *,
html body.cv8-site .cv6-header a[href*="mi-capilla"]:focus-visible * {
  color: var(--cv-fix-navy) !important;
}

/* Superficies que realmente son oscuras. */
html body.cv8-site :is(
  .cv-youtube-preview,
  .cv5-announcement,
  .cv5-home-hero,
  .cv5-feature-band,
  .cv5-bible-home-card,
  .cv5-showcase-youth,
  .cv5-showcase-family,
  .cv5-showcase-pr,
  .cv5-showcase-service,
  .cv5-prayer-home,
  .cv5-prayer-home-quote,
  .cv5-pr-visual,
  .cv5-form-copy,
  .cv5-final-cta,
  .cv5-footer,
  .cv5-mobile-dock,
  .cv6-hero,
  .cv6-hero-card,
  .cv6-member-preview,
  .cv6-bible-home,
  .cv6-bible-panel,
  .cv6-prayer-home,
  .cv6-final-call,
  .cv6-portal-header,
  .cv6-footer,
  .cv6-mobile-dock,
  .cv7-live-module,
  .cv7-live-copy,
  .cv7-seasonal-focus,
  .cv8-today-word,
  .cv8-help-result,
  .cv8-audio-feature,
  .cv8-family-feature
) {
  color: var(--cv-fix-white) !important;
}

/* Todo texto ordinario que vive sobre una superficie oscura. */
html body.cv8-site :is(
  .cv-youtube-preview,
  .cv5-announcement,
  .cv5-home-hero,
  .cv5-feature-band,
  .cv5-bible-home-card,
  .cv5-showcase-youth,
  .cv5-showcase-family,
  .cv5-showcase-pr,
  .cv5-showcase-service,
  .cv5-prayer-home,
  .cv5-prayer-home-quote,
  .cv5-pr-visual,
  .cv5-form-copy,
  .cv5-final-cta,
  .cv5-footer,
  .cv5-mobile-dock,
  .cv6-hero,
  .cv6-hero-card,
  .cv6-member-preview,
  .cv6-bible-home,
  .cv6-bible-panel,
  .cv6-prayer-home,
  .cv6-final-call,
  .cv6-portal-header,
  .cv6-footer,
  .cv6-mobile-dock,
  .cv7-live-module,
  .cv7-live-copy,
  .cv7-seasonal-focus,
  .cv8-today-word,
  .cv8-help-result,
  .cv8-audio-feature,
  .cv8-family-feature
) :is(h1,h2,h3,h4,h5,h6,p,span,small,li,label,blockquote,figcaption,em) {
  color: var(--cv-fix-white) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

/* Referencias bíblicas y acentos sobre azul. */
html body.cv8-site :is(
  .cv5-home-hero,
  .cv5-feature-band,
  .cv5-bible-home-card,
  .cv5-prayer-home,
  .cv5-pr-visual,
  .cv5-form-copy,
  .cv6-hero,
  .cv6-hero-card,
  .cv6-member-preview,
  .cv6-bible-panel,
  .cv6-prayer-home,
  .cv6-final-call,
  .cv6-portal-header,
  .cv7-live-module,
  .cv7-seasonal-focus,
  .cv8-today-word,
  .cv8-help-result,
  .cv8-family-feature,
  .cv8-audio-feature
) :is(.cv5-scripture,.cv6-reference,.cv7-scripture,.cv8-reference,.reference,.scripture,.bible-reference) {
  color: var(--cv-fix-gold) !important;
  font-weight: 900 !important;
  opacity: 1 !important;
}

/* Enlaces de texto sobre fondos oscuros. */
html body.cv8-site :is(
  .cv5-home-hero,
  .cv5-feature-band,
  .cv5-bible-home-card,
  .cv5-prayer-home,
  .cv5-pr-visual,
  .cv5-form-copy,
  .cv5-final-cta,
  .cv6-hero,
  .cv6-hero-card,
  .cv6-member-preview,
  .cv6-bible-panel,
  .cv6-prayer-home,
  .cv6-final-call,
  .cv6-portal-header,
  .cv7-live-module,
  .cv7-seasonal-focus,
  .cv8-today-word,
  .cv8-help-result,
  .cv8-family-feature,
  .cv8-audio-feature
) a:not(.cv5-btn):not(.cv6-btn):not(.button):not(button) {
  color: var(--cv-fix-gold) !important;
}

/* Botones primarios sobre superficies oscuras. */
html body.cv8-site :is(
  .cv5-home-hero,
  .cv5-feature-band,
  .cv5-bible-home-card,
  .cv5-prayer-home,
  .cv5-pr-visual,
  .cv5-form-copy,
  .cv5-final-cta,
  .cv6-hero,
  .cv6-hero-card,
  .cv6-member-preview,
  .cv6-bible-panel,
  .cv6-prayer-home,
  .cv6-final-call,
  .cv6-portal-header,
  .cv7-live-module,
  .cv7-seasonal-focus,
  .cv8-today-word,
  .cv8-help-result,
  .cv8-family-feature,
  .cv8-audio-feature
) :is(.cv5-btn-gold,.cv6-btn-gold,.cv6-btn-primary,.button,button) {
  background: var(--cv-fix-gold) !important;
  border-color: var(--cv-fix-gold) !important;
  color: var(--cv-fix-navy) !important;
  text-shadow: none !important;
}

html body.cv8-site :is(
  .cv5-home-hero,
  .cv5-feature-band,
  .cv5-bible-home-card,
  .cv5-prayer-home,
  .cv5-pr-visual,
  .cv5-form-copy,
  .cv5-final-cta,
  .cv6-hero,
  .cv6-hero-card,
  .cv6-member-preview,
  .cv6-bible-panel,
  .cv6-prayer-home,
  .cv6-final-call,
  .cv6-portal-header,
  .cv7-live-module,
  .cv7-seasonal-focus,
  .cv8-today-word,
  .cv8-help-result,
  .cv8-family-feature,
  .cv8-audio-feature
) :is(.cv5-btn-gold,.cv6-btn-gold,.cv6-btn-primary,.button,button) * {
  color: var(--cv-fix-navy) !important;
}

/* Botones transparentes sobre azul. */
html body.cv8-site :is(
  .cv5-home-hero,
  .cv5-feature-band,
  .cv5-bible-home-card,
  .cv5-prayer-home,
  .cv5-final-cta,
  .cv6-hero,
  .cv6-bible-panel,
  .cv6-prayer-home,
  .cv6-final-call,
  .cv7-live-module
) :is(.cv5-btn-outline-light,.cv6-btn-outline) {
  background: rgba(255,255,255,.08) !important;
  border-color: rgba(255,255,255,.58) !important;
  color: var(--cv-fix-white) !important;
}

/* Tarjetas claras: nunca heredan texto blanco ni fondo oscuro. */
html body.cv8-site :is(
  .cv5-info-card,
  .cv5-link-card,
  .cv5-today-card,
  .cv5-story-step,
  .cv5-form-panel,
  .cv6-smart-guide,
  .cv6-guide-result,
  .cv6-guide-detail,
  .cv6-event-card,
  .cv6-auth-card,
  .cv6-portal-section,
  .cv6-daily-detail,
  .cv6-progress-card,
  .cv6-message-list article,
  .cv6-request-list article,
  .cv7-announcement,
  .cv7-prayer-card,
  .cv7-support-grid article,
  .cv8-today-next > div,
  .cv8-home-tools a,
  .cv8-plan-grid article,
  .cv8-plan-day,
  .cv8-plan-day > div:not(.cv8-actions),
  .cv8-help-options button,
  .cv8-assistant-result,
  .cv8-related-grid article,
  .cv8-calendar-list article,
  .cv8-resource-grid > article,
  .cv8-audio-grid article,
  .cv8-wall-list article,
  .cv8-wall-layout > aside,
  .cv8-story-grid article,
  .cv8-family-grid article,
  .cv8-dashboard-shortcuts a,
  .cv8-prayer-list article,
  .cv8-admin-card
) {
  color: var(--cv-fix-text) !important;
}

html body.cv8-site :is(
  .cv5-info-card,
  .cv5-link-card,
  .cv5-today-card,
  .cv5-story-step,
  .cv5-form-panel,
  .cv6-smart-guide,
  .cv6-guide-result,
  .cv6-guide-detail,
  .cv6-event-card,
  .cv6-auth-card,
  .cv6-portal-section,
  .cv6-daily-detail,
  .cv6-progress-card,
  .cv6-message-list article,
  .cv6-request-list article,
  .cv7-announcement,
  .cv7-prayer-card,
  .cv7-support-grid article,
  .cv8-today-next > div,
  .cv8-home-tools a,
  .cv8-plan-grid article,
  .cv8-plan-day,
  .cv8-plan-day > div:not(.cv8-actions),
  .cv8-assistant-result,
  .cv8-related-grid article,
  .cv8-calendar-list article,
  .cv8-resource-grid > article,
  .cv8-audio-grid article,
  .cv8-wall-list article,
  .cv8-wall-layout > aside,
  .cv8-story-grid article,
  .cv8-family-grid article,
  .cv8-dashboard-shortcuts a,
  .cv8-prayer-list article,
  .cv8-admin-card
) :is(h1,h2,h3,h4,h5,h6,strong) {
  color: var(--cv-fix-navy) !important;
  opacity: 1 !important;
}

html body.cv8-site :is(
  .cv5-info-card,
  .cv5-link-card,
  .cv5-today-card,
  .cv5-story-step,
  .cv5-form-panel,
  .cv6-smart-guide,
  .cv6-guide-result,
  .cv6-guide-detail,
  .cv6-event-card,
  .cv6-auth-card,
  .cv6-portal-section,
  .cv6-daily-detail,
  .cv6-progress-card,
  .cv6-message-list article,
  .cv6-request-list article,
  .cv7-announcement,
  .cv7-prayer-card,
  .cv7-support-grid article,
  .cv8-today-next > div,
  .cv8-home-tools a,
  .cv8-plan-grid article,
  .cv8-plan-day,
  .cv8-plan-day > div:not(.cv8-actions),
  .cv8-assistant-result,
  .cv8-related-grid article,
  .cv8-calendar-list article,
  .cv8-resource-grid > article,
  .cv8-audio-grid article,
  .cv8-wall-list article,
  .cv8-wall-layout > aside,
  .cv8-story-grid article,
  .cv8-family-grid article,
  .cv8-dashboard-shortcuts a,
  .cv8-prayer-list article,
  .cv8-admin-card
) :is(p,span,small,li,label,blockquote,figcaption) {
  color: var(--cv-fix-muted) !important;
  opacity: 1 !important;
}

/* Excepciones dentro de tarjetas claras: referencias y etiquetas. */
html body.cv8-site :is(
  .cv5-today-card,
  .cv6-guide-result,
  .cv6-event-card,
  .cv8-assistant-result,
  .cv8-calendar-list article,
  .cv8-resource-grid > article,
  .cv8-prayer-list article
) :is(.cv5-scripture,.cv6-reference,.cv7-scripture,.cv8-reference,a) {
  color: var(--cv-fix-blue) !important;
}

/* Menús desplegables. */
html body.cv8-site .cv6-dropdown,
html body.cv8-site .cv5-dropdown {
  background: var(--cv-fix-white) !important;
  color: var(--cv-fix-text) !important;
}

html body.cv8-site :is(.cv6-dropdown,.cv5-dropdown) strong {
  color: var(--cv-fix-navy) !important;
}

html body.cv8-site :is(.cv6-dropdown,.cv5-dropdown) small {
  color: var(--cv-fix-muted) !important;
}

/* Formularios y campos siempre claros. */
html body.cv8-site :is(input,select,textarea) {
  background: var(--cv-fix-white) !important;
  color: var(--cv-fix-text) !important;
}

html body.cv8-site :is(input,textarea)::placeholder {
  color: #7a899a !important;
  opacity: 1 !important;
}

html body.cv8-site :is(.cv5-form,.cv6-form,.cv6-auth-card,.cv8-journal-form,.cv8-prayer-form) label {
  color: var(--cv-fix-navy) !important;
  opacity: 1 !important;
}

/* Fechas oscuras sobre tarjetas de actividades. */
html body.cv8-site .cv6-event-date,
html body.cv8-site .cv7-prayer-date {
  color: var(--cv-fix-white) !important;
}

html body.cv8-site :is(.cv6-event-date,.cv7-prayer-date) :is(strong,span,small) {
  color: var(--cv-fix-white) !important;
  opacity: 1 !important;
}

/* Accesibilidad. */
html body.cv8-site :is(a,button,input,select,textarea):focus-visible {
  outline: 3px solid var(--cv-fix-gold) !important;
  outline-offset: 3px !important;
}

@media (max-width: 860px) {
  html body.cv8-site .cv6-mobile-top > a,
  html body.cv8-site .cv6-mobile-top > a:visited {
    background: var(--cv-fix-blue) !important;
    color: var(--cv-fix-white) !important;
  }

  html body.cv8-site .cv6-mobile-top > a * {
    color: var(--cv-fix-white) !important;
  }
}
