/* Override de marca — Dra. Karen Braña Román · Traumatología y Ortopedia.
   Paleta OFICIAL del manual de identidad "Dra KBR_Nuevo Enfoque_rev2":
     Malva Profundo   #9B5C78  (principal)
     Rose Gold Suave  #D8A19A  (acento premium)
     Rosa Taupe       #D6B9BF
     Rosa Niebla      #F5E8E9  (fondos claros)
     Blanco Marfil    #FAF6F4  (fondo base)
     Ciruela Profundo #5C3547  (malva oscurecido, para textos/botones oscuros)
   Cargado DESPUÉS de main.css para ganar en las reglas basadas en variables. */
:root {
  --rr-theme-primary: #9B5C78;
  --rr-theme-secondary: #F5E8E9;
  --rr-theme-glow: #9B5C78;
  --rr-theme-green: #D8A19A;               /* acento rose gold (antes lila) */
  --rr-common-selection: #9B5C78;
  --rr-border-primary: 1px solid #9B5C78;
  --rr-color-100: #FAF6F4;                 /* Blanco Marfil para fondos suaves */
}
::selection { background: #9B5C78; color: #fff; }

/* Logo KBR (sello circular): encajarlo en los espacios del template Medilix. */
.header__logo img,
.header__logo .logo img { height: 62px; width: auto; }
.offcanvas__logo img    { height: 54px; width: auto; }
.footer-4__logo img     { height: 88px; width: auto; }

/* Bajar la tarjeta "Trato humano" en Sobre mí: anclarla a la parte baja de la
   foto (en vez de un top fijo) para que NUNCA tape la cara, en cualquier pantalla. */
.about-us-6__small-box { top: auto; bottom: 40px; }

/* --- Widget flotante de WhatsApp estilo chat (referencia: sitio de la Dra. Angélica).
   Reemplaza el contador de scroll de abajo-derecha. --- */
.wa-widget { position: fixed; right: 24px; bottom: 24px; z-index: 9999; }
.wa-fab {
  position: relative;
  width: 60px; height: 60px;
  border: none; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
  transition: transform .2s ease, box-shadow .2s ease;
  margin-left: auto;
}
.wa-fab:hover { transform: scale(1.06); box-shadow: 0 10px 26px rgba(37, 211, 102, .55); }
.wa-fab::before {           /* anillo de pulso */
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #25D366; z-index: -1; animation: wa-pulse 2s infinite;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .5; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}
.wa-fab__close { display: none; }
.wa-fab--open .wa-fab__icon { display: none; }
.wa-fab--open .wa-fab__close { display: inline-block; }
.wa-fab--open::before { display: none; }

.wa-box {
  position: absolute; right: 0; bottom: 74px;
  width: 320px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .22);
  transform: translateY(12px) scale(.96); transform-origin: bottom right;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.wa-box[data-open="true"] { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.wa-box__header { background: #075E54; color: #fff; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.wa-box__avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 44px;
  background: #9B5C78; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.wa-box__avatar img { width: 30px; height: 30px; object-fit: contain; }
.wa-box__id { display: flex; flex-direction: column; line-height: 1.25; }
.wa-box__id strong { font-size: 15px; }
.wa-box__id em { font-style: normal; font-size: 12px; opacity: .85; }
.wa-box__close { margin-left: auto; background: none; border: none; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; opacity: .85; }
.wa-box__close:hover { opacity: 1; }
.wa-box__body { background: #E5DDD5; padding: 20px 16px; }
.wa-box__bubble {
  background: #fff; color: #333; font-size: 14px; line-height: 1.5;
  padding: 12px 14px; border-radius: 0 12px 12px 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
}
.wa-box__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #25D366; color: #fff; font-weight: 600; font-size: 15px; padding: 14px; text-decoration: none;
}
.wa-box__cta:hover { background: #1ebe5b; color: #fff; }
.wa-box__cta i { font-size: 18px; }

@media (max-width: 575px) {
  .wa-widget { right: 16px; bottom: 16px; }
  .wa-fab { width: 54px; height: 54px; font-size: 29px; }
  .wa-box { bottom: 68px; }
}

/* Foto real de la Dra. Karen en el CTA "Por una vida sin límites": marco redondeado */
.cta-3__media img {
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(92, 53, 71, .18);
}

/* --- Servicios: fijar el tamaño de la miniatura para que el texto no se desacomode
   (las fotos nuevas son más grandes que las del template original). --- */
.latest-services-2__media { -webkit-box-flex: 0; -ms-flex: 0 0 auto; flex: 0 0 auto; }
.latest-services-2__media img { width: 230px; height: 253px; -o-object-fit: cover; object-fit: cover; }
@media (max-width: 767px) {
  .latest-services-2__media img { width: 100%; height: 250px; }
}

/* --- Áreas de atención: overlay con descripción + CTA al pasar el cursor.
   Fondo blanco y texto oscuro para que se lea bien; botón CTA a WhatsApp. --- */
.our-portfolio-2__item { position: relative; }
.kbr-area-hover {
  position: absolute; inset: 0; z-index: 2; border-radius: 20px;
  background: rgba(255, 255, 255, .97);
  color: #40353a; display: -webkit-box; display: -ms-flexbox; display: flex;
  -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center;
  -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center;
  text-align: center; padding: 28px 24px;
  opacity: 0; visibility: hidden; -webkit-transition: opacity .35s ease, visibility .35s ease; transition: opacity .35s ease, visibility .35s ease;
}
.our-portfolio-2__item:hover .kbr-area-hover { opacity: 1; visibility: visible; }
.kbr-area-hover h4 { color: #9B5C78; margin: 0 0 10px; font-size: 21px; }
.kbr-area-hover p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; color: #40353a; }
.kbr-area-hover__cta {
  display: -webkit-inline-box; display: -ms-inline-flexbox; display: inline-flex;
  -webkit-box-align: center; -ms-flex-align: center; align-items: center; gap: 8px;
  background: #9B5C78; color: #fff; font-weight: 600; font-size: 14px;
  padding: 10px 22px; border-radius: 40px; text-decoration: none;
  -webkit-transition: background .2s ease, -webkit-transform .2s ease; transition: background .2s ease, transform .2s ease;
}
.kbr-area-hover__cta:hover { background: #5C3547; color: #fff; -webkit-transform: translateY(-2px); transform: translateY(-2px); }
.kbr-area-hover__cta i { font-size: 16px; }

/* --- Crédito "Creado por" al pie --- */
.footer-4__made { text-align: center; margin-top: 14px; }
.footer-4__made p { margin: 0; font-size: 13px; opacity: .8; }
.footer-4__made a { color: var(--rr-theme-primary); font-weight: 600; }
.footer-4__made a:hover { text-decoration: underline; }
