/* BADBEAR.MED · Identidad transversal */
.bb-brand-logo{width:42px;height:42px;object-fit:contain;display:block;flex:0 0 auto}
.bb-brand-lockup{display:inline-flex!important;align-items:center;gap:10px}
.bb-brand-lockup img{width:42px;height:42px;object-fit:contain;display:block}

/*
   MARCA DE AGUA PRINCIPAL
   Cada curso puede definir --bb-watermark-image desde su propia página.
   Si no lo hace, se conserva el logo maestro BADBEAR.MED.
*/
body::after{
  content:"";
  position:fixed;
  left:50%;
  top:54%;
  width:min(48vw,560px);
  aspect-ratio:1/1;
  background-image:var(--bb-watermark-image,url("../../dermatologia/badbear_logo.png"));
  background-position:center;
  background-size:contain;
  background-repeat:no-repeat;
  opacity:.055;
  pointer-events:none;
  z-index:2147483000;
  transform:translate(-50%,-50%);
  filter:grayscale(.12) saturate(.8);
}

@media(max-width:900px){
  body::after{width:min(62vw,430px);top:53%;opacity:.05}
}

@media(max-width:650px){
  body::after{width:min(78vw,320px);top:52%;opacity:.045}
  .bb-brand-logo,.bb-brand-lockup img{width:36px;height:36px}
}

@media print{
  body::after{width:115mm;top:52%;opacity:.045}
}

/* BADBEAR.MED - logos especificos por curso */
.bb-auto-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.bb-auto-course-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
}

.bb-auto-hero-logo {
  width: min(78%, 270px);
  max-height: 260px;
  object-fit: contain;
  display: block;
  margin: auto;
  filter: drop-shadow(0 16px 26px rgba(15, 23, 42, .16));
}

@media (max-width: 650px) {
  .bb-auto-course-logo {
    width: 40px;
    height: 40px;
  }
}
/* =========================================================
   BADBEAR.MED - BRANDING GLOBAL V4
   Logo especifico + hero + sello de agua
========================================================= */

/* Desactiva el sello viejo para evitar duplicados. */
body::after {
  content: none !important;
  display: none !important;
}

.bb-auto-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.bb-auto-course-logo,
[data-bb-course-logo].bb-auto-course-logo {
  width: 52px !important;
  height: 52px !important;
  object-fit: contain !important;
  display: block !important;
  flex: 0 0 auto !important;
}

.bb-auto-hero-logo {
  width: 92% !important;
  height: 92% !important;
  max-width: 380px !important;
  max-height: 310px !important;
  object-fit: contain !important;
  display: block !important;
  margin: auto !important;
  transform: scale(1.16);
  transform-origin: center;
  filter: drop-shadow(0 16px 28px rgba(15, 23, 42, .17));
}

#bb-course-watermark {
  position: fixed;
  left: 50%;
  top: 57%;
  transform: translate(-50%, -50%);
  width: clamp(360px, 38vw, 640px);
  max-height: 68vh;
  object-fit: contain;
  opacity: .045;
  pointer-events: none;
  user-select: none;
  z-index: 8;
  filter: saturate(.82);
}

header {
  z-index: 1000;
}

main,
section,
footer {
  position: relative;
}

@media (max-width: 800px) {
  .bb-auto-course-logo,
  [data-bb-course-logo].bb-auto-course-logo {
    width: 44px !important;
    height: 44px !important;
  }

  .bb-auto-hero-logo {
    width: 88% !important;
    height: 88% !important;
    transform: scale(1.08);
  }

  #bb-course-watermark {
    width: clamp(260px, 68vw, 420px);
    top: 54%;
    opacity: .035;
  }
}
/* =========================================================
   BADBEAR.MED - LIMPIEZA LEGACY PEDIATRICA V5
========================================================= */
.bb-hide-legacy-bg {
  background-image: none !important;
}

.bb-hide-legacy-before::before {
  background-image: none !important;
  content: none !important;
}

.bb-hide-legacy-after::after {
  background-image: none !important;
  content: none !important;
}
/* =========================================================
   BADBEAR.MED - AJUSTE OPACIDAD SELLO GLOBAL V6
========================================================= */
#bb-course-watermark {
  z-index: 0 !important;
  opacity: .022 !important;
  width: clamp(320px, 34vw, 560px) !important;
  max-height: 62vh !important;
  top: 58% !important;
  filter: saturate(.78) !important;
}

header,
main,
section,
footer {
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 800px) {
  #bb-course-watermark {
    width: clamp(220px, 58vw, 360px) !important;
    top: 56% !important;
    opacity: .016 !important;
  }
}
/* Solo un logo en la cabecera del curso */
.bb-auto-brand img:not(.bb-auto-course-logo) {
  display: none !important;
}

/* =========================================================
   BADBEAR.MED - ELIMINAR ICONO RESIDUAL CABECERA V9
   Mantener UN SOLO logo: el logo propio del curso.
========================================================= */

/* Elimina pandas/iconos insertados con pseudoelementos */
.bb-auto-brand::before,
.bb-auto-brand::after,
.cardio-brand::before,
.cardio-brand::after,
.infecto-brand::before,
.infecto-brand::after,
.nefro-brand::before,
.nefro-brand::after,
.neuro-brand::before,
.neuro-brand::after,
.psiq-brand::before,
.psiq-brand::after,
.neumo-brand::before,
.neumo-brand::after,
.trauma-brand::before,
.trauma-brand::after,
.cxg-brand::before,
.cxg-brand::after,
.batimix-brand::before,
.batimix-brand::after,
.pato-brand::before,
.pato-brand::after,
.para-brand::before,
.para-brand::after,
.fisio-brand::before,
.fisio-brand::after,
.interna-brand::before,
.interna-brand::after,
.gastro-brand::before,
.gastro-brand::after {
  content: none !important;
  display: none !important;
  background-image: none !important;
}

/* Elimina contenedores de iconos legacy comunes */
.bb-auto-brand > .brand-icon,
.bb-auto-brand > .logo-icon,
.bb-auto-brand > .panda-icon,
.bb-auto-brand > .brand-mark,
.bb-auto-brand > .marca-icono,
.bb-auto-brand > [aria-hidden="true"]:not(img) {
  display: none !important;
}

/* Dentro de la marca solo la imagen del curso puede verse */
.bb-auto-brand > img:not(.bb-auto-course-logo),
.bb-auto-brand img:not(.bb-auto-course-logo) {
  display: none !important;
}

.bb-auto-brand .bb-auto-course-logo {
  display: block !important;
}

/* =========================================================
   BADBEAR.MED - OCULTAR PSEUDOELEMENTO PANDA V12
========================================================= */
.bb-no-panda-before::before {
  content: none !important;
  display: none !important;
}

.bb-no-panda-after::after {
  content: none !important;
  display: none !important;
}