/* ==========================================================================
   consultoriadental.com — estilos propios de la versión estática
   Se cargan después de las hojas del tema (Salient) para:
   - sustituir las fuentes de iconos por SVG inline
   - componentes nuevos: consentimiento de cookies, contenidos externos, modales, formularios
   - mejoras de Nivel 2 (foco visible, movimiento reducido, etc.)
   ========================================================================== */
:root {
  --cd-acento: #00a0b0;
  --cd-acento-2: #66d6b2;
  --cd-degradado: linear-gradient(125deg, #00a0b0, #66d6b2);
  --cd-naranja: #ff910c;
  --cd-texto: #3a3a3a;
  --cd-oscuro: #444444;
  --cd-gris: #f4f4f4;
  --cd-blanco: #ffffff;
  --cd-radio: 200px;
  --cd-fuente-titulos: 'Poppins', sans-serif;
  --cd-fuente-texto: 'Lora', serif;
  --cd-fuente-botones: 'Montserrat', sans-serif;
}

/* ---------- iconos: SVG inline en lugar de FontAwesome / icomoon / steadysets ---------- */
.cd-icon:before, .cd-icon:after { content: none !important; }
.cd-icon { font-family: inherit !important; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.cd-icon > svg.cd-ico { display: inline-block; vertical-align: -0.125em; overflow: visible; }
#top nav .sf-sub-indicator .cd-icon svg { width: 0.65em; }

/* ---------- separador de cabecera (en el original lo calculaba el JS del tema) ---------- */
@media (min-width: 1000px) { #header-space { height: 81px !important; } }

/* ---------- foco visible (accesibilidad) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible,
[role="button"]:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--cd-acento) !important;
  outline-offset: 2px;
}
.nectar-skip-to-content:focus { position: fixed; top: 10px; left: 10px; z-index: 100000; background: #fff; color: #000; padding: 10px 16px; clip: auto; width: auto; height: auto; }

/* ---------- menú de escritorio: desplegable también con teclado ---------- */
#top nav .sf-menu li.sfHover > .sub-menu,
#top nav .sf-menu li:focus-within > .sub-menu { visibility: visible; opacity: 1; display: block; }

/* ---------- carruseles de logos (sustituye a carouFredSel) ---------- */
.carousel-wrap .carousel.cd-marquee { display: block; overflow: hidden; width: 100%; position: relative; height: auto !important; }
.cd-marquee__track { display: flex; align-items: center; width: max-content; animation: cd-marquee var(--cd-marquee-dur, 30s) linear infinite; }
.cd-marquee__track > div { flex: 0 0 auto; width: 180px; padding: 0 20px; float: none !important; }
.cd-marquee__track img { width: 100%; height: auto; opacity: 1 !important; }
.carousel-wrap:hover .cd-marquee__track { animation-play-state: paused; }
@keyframes cd-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- contenidos de terceros con consentimiento ---------- */
.cd-embed { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; min-height: 160px;
  background: #2b2b2b; color: #fff; text-align: center; border-radius: 6px; overflow: hidden; box-sizing: border-box; padding: 18px; }
.cd-embed--maps { background: #e9eef0; color: var(--cd-texto); }
.cd-embed__inner { max-width: 420px; }
.cd-embed__txt { font-family: var(--cd-fuente-titulos); font-weight: 600; font-size: 16px; line-height: 1.3; margin: 0 0 10px; color: inherit; }
.cd-embed__btn { font-family: var(--cd-fuente-botones); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .3px;
  background: #007a85; color: #fff; border: 0; border-radius: var(--cd-radio); padding: 11px 22px; cursor: pointer; transition: background .2s, transform .2s; }
.cd-embed__btn:hover { background: #00616a; transform: translateY(-1px); }
.cd-embed__note { font-size: 12px; line-height: 1.4; margin: 10px 0 0; opacity: .85; color: inherit; }
.cd-embed__note a { color: inherit; text-decoration: underline; }
.cd-embed-frame { display: block; max-width: 100%; border: 0; }
.wpb_video_widget .cd-embed, .fluid-width-video-wrapper .cd-embed, .wpb_video_wrapper .cd-embed { position: absolute; inset: 0; height: 100% !important; border-radius: 0; }
.cd-audio { width: 100%; }

/* ---------- modales propios (vídeo y biografías) ---------- */
.cd-modal { position: fixed; inset: 0; z-index: 100002; display: flex; align-items: center; justify-content: center; padding: 20px; }
.cd-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .85); }
.cd-modal__box { position: relative; width: 100%; max-width: 1000px; max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 6px; }
.cd-modal--video .cd-modal__box { background: #000; }
.cd-modal__close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff;
  color: #000; font-size: 26px; line-height: 40px; cursor: pointer; padding: 0; }
.cd-video { position: relative; aspect-ratio: 16 / 9; width: 100%; }
.cd-video iframe, .cd-video .cd-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; }
.cd-bio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 0; }
.cd-bio__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cd-bio__txt { padding: 50px 40px 40px; }
.cd-bio__txt h3 { margin-bottom: 4px; }
.cd-bio__pos { font-family: var(--cd-fuente-titulos); font-weight: 500; color: var(--cd-acento); margin-bottom: 20px; line-height: 1.4; }
@media (max-width: 760px) { .cd-bio { grid-template-columns: 1fr; } .cd-bio__img { max-height: 320px; overflow: hidden; } .cd-bio__txt { padding: 30px 22px; } }
.team-member { cursor: pointer; }

/* ---------- formularios ---------- */
.cd-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.cd-form-msg { margin-top: 14px; font-family: var(--cd-fuente-titulos); font-size: 15px; line-height: 1.4; }
.cd-form-msg:empty { display: none; }
.cd-form-msg.is-ok { color: #0b7a55; }
.cd-form-msg.is-error { color: #b42318; }
.cd-field-error { display: block; color: #b42318; font-size: 13px; line-height: 1.3; margin-top: 4px; font-family: var(--cd-fuente-titulos); }
.cd-error input, .cd-error textarea { border-color: #b42318 !important; }
form[data-cd-form] [disabled] { opacity: .6; cursor: wait; }

/* ---------- rejilla del blog: botón "Cargar más" ---------- */
.nectar-post-grid-wrap .load-more-wrap { text-align: center; margin-top: 40px; }
.nectar-post-grid-wrap .load-more { display: inline-block; font-family: var(--cd-fuente-botones); font-weight: 700; font-size: 13px; text-transform: uppercase;
  color: #000; border: 2px solid #000; border-radius: var(--cd-radio); padding: 12px 28px; transition: background .2s, color .2s; }
.nectar-post-grid-wrap .load-more:hover { background: #000; color: #fff; }

/* ---------- buscador ---------- */
.cd-search-form { display: flex; gap: 10px; max-width: 640px; margin: 0 0 40px; }
.cd-search-form input { flex: 1; }
.cd-search-item { padding: 22px 0; border-bottom: 1px solid #e6e6e6; }
.cd-search-item h2 { font-size: 22px; line-height: 1.35; margin-bottom: 6px; }
.cd-search-item p { margin: 0; }

/* ---------- banner de cookies ---------- */
.cd-cookies { position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 100001; display: flex; justify-content: center; pointer-events: none; }
.cd-cookies__box { pointer-events: auto; width: 100%; max-width: 760px; background: #fff; color: var(--cd-texto); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22); padding: 22px 24px; font-family: var(--cd-fuente-texto); border: 2px solid rgba(0, 160, 176, .35); }
.cd-cookies__title { font-family: var(--cd-fuente-titulos); font-weight: 700; font-size: 18px; margin: 0 0 6px; color: #000; line-height: 1.3; }
.cd-cookies__desc { font-size: 14px; line-height: 1.55; margin: 0 0 14px; }
.cd-cookies__desc a { color: #007f8c; text-decoration: underline; }
.cd-cookies__prefs { margin: 0 0 14px; display: grid; gap: 8px; }
.cd-cookies__prefs[hidden] { display: none; }
.cd-cookies__opt { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; cursor: pointer; }
.cd-cookies__opt input { margin-top: 3px; accent-color: var(--cd-acento); width: 16px; height: 16px; flex: 0 0 auto; }
.cd-cookies__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cd-cookies__btn { font-family: var(--cd-fuente-botones); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .2px;
  padding: 12px 14px; border-radius: var(--cd-radio); cursor: pointer; border: 2px solid #007a85; background: #007a85; color: #fff; line-height: 1.2; }
.cd-cookies__btn:hover { background: #00616a; border-color: #00616a; }
@media (max-width: 600px) {
  .cd-cookies { left: 10px; right: 10px; bottom: 10px; }
  .cd-cookies__box { padding: 18px 16px; max-height: calc(100vh - 20px); overflow: auto; }
  .cd-cookies__actions { grid-template-columns: 1fr; }
}
.cd-cookie-link { cursor: pointer; }

/* ---------- movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .col.has-animation, .wpb_column.has-animation, .img-with-aniamtion-wrap .hover-wrap, img.img-with-animation { opacity: 1 !important; transform: none !important; }
  .cd-marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .cd-marquee__track > [aria-hidden="true"] { display: none; }
}

/* ---------- reproductor de audio de los episodios (sustituye a MediaElement.js) ---------- */
.cd-audio { display: block; width: 100%; height: 40px; color-scheme: dark; background: #222; border-radius: 0; }

/* ---------- columnas solo con imagen de fondo: alto mínimo en móvil (lo fijaba el JS del tema) ---------- */
@media (max-width: 999px) { .cd-bg-col, .cd-bg-col > .vc_column-inner { min-height: 350px; } }

/* ---------- cambio solicitado (19/10): padding superior del 5 % en la fila de cajas con parallax ---------- */
.wpb_row.inner_row.cd-cards-row { padding-top: 5% !important; }

/* ---------- reseñas de Google en /testimonios/ (sustituye a Trustindex) ---------- */
.cd-reviews { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 4.4fr); gap: 20px; align-items: stretch; text-align: left; margin: 10px 0; font-family: var(--cd-fuente-titulos); }
.cd-reviews__summary { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px; }
.cd-reviews__label { font-weight: 700; font-size: 22px; letter-spacing: .5px; color: #000; margin: 0 0 6px; line-height: 1.2; }
.cd-reviews__rating { font-size: 14px; color: #555; margin: 4px 0 0; }
.cd-reviews__count { font-size: 14px; color: #555; margin: 6px 0 10px; line-height: 1.4; }
.cd-reviews__count strong { color: #000; }
.cd-reviews__source { margin: 0; font-size: 14px; }
.cd-reviews__source a { color: #555; text-decoration: underline; }
.cd-stars { display: inline-flex; gap: 2px; line-height: 0; }
.cd-star { color: #d6d6d6; }
.cd-star.is-on { color: #f6bb06; }
.cd-reviews__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cd-review { background: #fff; border: 1px solid #e5e5e5; border-radius: 6px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cd-review__head { display: flex; align-items: center; gap: 10px; position: relative; }
.cd-review__avatar { width: 40px; height: 40px; border-radius: 50%; flex: 0 0 40px; display: inline-flex; align-items: center; justify-content: center;
  background: #00a0b0; color: #fff; font-weight: 600; font-size: 17px; object-fit: cover; }
.cd-review__head > div { min-width: 0; flex: 1; }
.cd-review__name { font-weight: 600; font-size: 15px; color: #000; margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.cd-review__name a { color: inherit; }
.cd-review__date { font-size: 13px; color: #777; margin: 0; line-height: 1.3; font-family: var(--cd-fuente-texto); }
.cd-review__g { font-size: 11px; color: #777; align-self: flex-start; }
.cd-review__text { font-family: var(--cd-fuente-texto); font-size: 15px; line-height: 1.55; color: #3a3a3a; max-height: calc(1.55em * 5); overflow: hidden; }
.cd-review__text p { margin: 0; padding: 0; }
.cd-review.is-open .cd-review__text { max-height: none; }
.cd-review__more { align-self: flex-start; background: none; border: 0; padding: 0; color: #007a85; font-size: 14px; cursor: pointer; text-decoration: underline; font-family: var(--cd-fuente-titulos); }
@media (max-width: 999px) {
  .cd-reviews { grid-template-columns: 1fr; }
  .cd-reviews__list { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(260px, 80%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .cd-review { scroll-snap-align: start; }
}

.cd-reviews p { padding-bottom: 0 !important; }
.cd-reviews__summary > * + * { margin-top: 8px !important; }
.cd-review__head p { margin: 0 !important; }
.cd-review__name a { display: inline; line-height: inherit; }
