/* BB Clinic Blueprint 1.11.63 — mobile layout stability.
 * Replace competing wrapper scanners with one limited, measured intervention.
 * Never reset every .e-con / every Elementor widget / saved page layout.
 * Per-widget opt out: Responsive > Compactar espacios internos = No. */
@media (max-width:1024px) {
  /* Only compact enabled BB Clinic widgets, never Elementor containers wholesale. */
  .elementor-widget:not(.elementor-widget-bbcb_site_header):has(> .elementor-widget-container > .bbcb-elementor-render.bbcb-mobile-compact) {
    min-height:0;
    max-height:none;
    align-self:auto;
  }
  .elementor-widget:not(.elementor-widget-bbcb_site_header) .bbcb-elementor-render.bbcb-mobile-compact {
    min-width:0;
    min-height:0;
    max-height:none;
    height:auto;
  }
  /* All Blueprint widgets share the same Elementor wrapper chain. Its first
   * direct content root may be a section, article, main, footer or div; never
   * impose a desktop minimum scene height on smaller viewports. Skip the site
   * header and pinned scenes, which need their own geometry. */
  .elementor-widget[class*="elementor-widget-bbcb_"]:not(.elementor-widget-bbcb_site_header)
  .bbcb-elementor-render.bbcb-mobile-compact > :is(section,article,main,footer,div):not(.gsap-pin-spacer) {
    box-sizing:border-box;
    min-width:0;
    max-width:100%;
  }
  .elementor-widget[class*="elementor-widget-bbcb_"]:not(.elementor-widget-bbcb_site_header)
  .bbcb-elementor-render.bbcb-mobile-compact > :is(section,article,main,footer):not(.hero-slider):not(.is-pinned):not([data-pin]):not([data-sticky]):not([class*="pin-spacer"]) {
    min-height:0;
    height:auto;
  }
  /* Generic default spacing for ALL Blueprint content sections, including
   * CPT/archives/form widgets. Editors' section-padding settings win. */
  .elementor-widget[class*="elementor-widget-bbcb_"]:not(.elementor-widget-bbcb_site_header)
  .bbcb-elementor-render.bbcb-mobile-compact:not(.bbcb-user-section-padding)
  > :is(.section-pad,.content-block,.bbcb-page-hero,.bbcb-contact-form-section,.bbcb-true-derma):not([data-pin]):not([data-sticky]):not(.is-pinned) {
    padding-block:var(--bbcb-mobile-outer-pad-top,clamp(24px,5.5vw,45px))
                  var(--bbcb-mobile-outer-pad-bottom,clamp(24px,5.5vw,45px));
  }
  /* Teledermatology modules now use the same wrapper measurement as other
   * BB Clinic widgets, but keep explicitly selected vertical spacing. */
  .elementor-widget[class*="elementor-widget-bbcb_td_"]
  .bbcb-elementor-render.bbcb-mobile-compact:not(.bbcb-td-user-spacing) > .bbcb-td-section {
    --td-pad-y:clamp(24px,5.5vw,45px);
  }
  .elementor-widget[class*="elementor-widget-bbcb_td_"]
  .bbcb-elementor-render.bbcb-mobile-compact > .bbcb-td-section {
    padding-top:var(--bbcb-mobile-outer-pad-top,var(--td-pad-y,32px));
    padding-bottom:var(--bbcb-mobile-outer-pad-bottom,var(--td-pad-y,32px));
  }
  /* The gap between two Blueprint widgets can come from stacked theme and
   * Elementor styles; keep default margins small, but do not override saved
   * custom margin controls. JS only marks actual pathological spare space. */
  .elementor-widget[class*="elementor-widget-bbcb_"]:not(.elementor-widget-bbcb_site_header)
  .bbcb-elementor-render.bbcb-mobile-compact:not(.bbcb-user-section-margin) > :is(section,footer) {
    margin-block:0;
  }
  /* Elementor may set a fixed height directly on the widget or widget-container.
   * Only BB Clinic widgets with the compact option enabled are affected. */
  .elementor-widget:not(.elementor-widget-bbcb_site_header):has(> .elementor-widget-container > .bbcb-elementor-render.bbcb-mobile-compact).bbcb-mobile-tight-widget-11163,
  .elementor-widget:not(.elementor-widget-bbcb_site_header):has(> .elementor-widget-container > .bbcb-elementor-render.bbcb-mobile-compact) > .elementor-widget-container.bbcb-mobile-tight-widget-11163 {
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    flex-grow:0!important;
    align-self:auto!important;
  }
  .bbcb-elementor-render.bbcb-mobile-compact > :is(.section-pad,.bbcf-section,.hero-slider) {
    min-height:0;
    box-sizing:border-box;
  }
  /* Hidden Grid slides cannot dictate the size of the active Hero on tablet. */
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-slide:not(.is-active) {
    height:0!important;min-height:0!important;max-height:0!important;
    padding-block:0!important;margin-block:0!important;
    overflow:hidden!important;visibility:hidden;
  }
  /* Applied by JS only to structurally isolated ancestors with proven surplus. */
  .elementor .bbcb-mobile-tight-shell-11163 {
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    align-content:start!important;
    justify-content:flex-start!important;
  }
  .elementor .bbcb-mobile-tight-shell-11163.bbcb-mobile-tight-padding-11163 {
    padding-top:clamp(12px,2.8vw,26px)!important;
    padding-bottom:clamp(12px,2.8vw,26px)!important;
  }
  .elementor .bbcb-mobile-tight-widget-11163 { margin-block:0!important; }
  .elementor-widget[class*="elementor-widget-bbcb_"]:not(.elementor-widget-bbcb_site_header)
  .bbcb-mobile-compact > .bbcb-mobile-tight-root-11163 {
    min-height:0!important;height:auto!important;max-height:none!important;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-tight-footer-inner-11163 {
    height:auto!important;min-height:0!important;max-height:none!important;
    justify-content:flex-start!important;
  }
  .elementor .bbcb-mobile-tight-stack-11163 { row-gap:clamp(12px,3.2vw,30px)!important; }
}

/* Genuine mobile: size sections to content rather than a desktop scene or the
 * longest (possibly hidden) Swiper card. Keep header clearance in the Hero. */
@media (max-width:767px) {
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact:not(.bbcb-user-section-padding) > .hero-slider,
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact:not(.bbcb-user-section-padding) > .team,
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact:not(.bbcb-user-section-padding) > .philosophy,
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact:not(.bbcb-user-section-padding) > .reviews,
  .elementor-widget-bbcb_home_specialties .bbcb-mobile-compact:not(.bbcb-user-section-padding) > .specialties,
  .elementor-widget-bbcb_home_appointment .bbcb-mobile-compact:not(.bbcb-user-section-padding) > .appointment {
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    padding-top:var(--bbcb-mobile-outer-pad-top,clamp(24px,6vw,34px))!important;
    padding-bottom:var(--bbcb-mobile-outer-pad-bottom,clamp(24px,6vw,34px))!important;
  }
  /* Also remove desktop min-height on sections with custom Elementor padding;
     custom padding itself is untouched. */
  .elementor-widget[class*="elementor-widget-bbcb_"]:not(.elementor-widget-bbcb_site_header)
  .bbcb-elementor-render.bbcb-mobile-compact.bbcb-user-section-padding > :is(.section-pad,.hero-slider,.philosophy,.reviews,.team,.specialties,.appointment) {
    min-height:0!important;
    height:auto!important;
  }
  /* Home Hero: padding includes an intentional clearance for the header. */
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact:not(.bbcb-user-section-padding) > .hero-slider {
    padding-block:0!important;
    overflow:clip;
  }
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-slides {
    display:grid;
    grid-template-columns:minmax(0,1fr);
    position:relative;
    min-height:0!important;
  }
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-slide {
    min-height:0!important;
    max-height:none!important;
    height:auto;
    padding-top:var(--bbcb-mobile-outer-pad-top,clamp(88px,19vw,112px))!important;
    padding-bottom:var(--bbcb-mobile-outer-pad-bottom,clamp(68px,14vw,88px))!important;
    box-sizing:border-box;
    align-items:flex-start;
  }
  /* Hidden slides still participate in CSS grid intrinsic sizing unless their
   * box is collapsed. .is-active is added BEFORE GSAP starts the transition. */
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-slide:not(.is-active) {
    height:0!important;
    min-height:0!important;
    max-height:0!important;
    padding-block:0!important;
    margin-block:0!important;
    overflow:hidden!important;
    visibility:hidden;
  }
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr)!important;
    gap:clamp(16px,4.6vw,25px);
    align-items:start;
    min-width:0;
  }
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-copy,
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-visual {
    width:100%;max-width:100%;min-width:0;
  }
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-copy > :is(.hero-intro,.actions,.hero-signals) {
    min-height:0;
  }
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-intro {margin-top:clamp(12px,3vw,18px)}
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .actions {margin-top:clamp(14px,3.5vw,20px)}
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-signals {margin-top:clamp(16px,4vw,24px)}
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-signals:not(:has(>span)) {display:none}
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .actions:not(:has(>a)) {display:none}
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-media:not([class*="bbcb-frame--"]) {
    height:clamp(215px,71vw,350px)!important;
    min-height:0!important;
  }
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-media[class*="bbcb-frame--"] {
    height:auto!important;
    min-height:0!important;
  }
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-float-card {
    max-width:calc(100% - 20px); padding:10px 12px; gap:10px;
  }

  /* Philosophy: desktop 500–600px figure plus large badge is not a mobile row. */
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-grid {
    display:grid;grid-template-columns:minmax(0,1fr)!important;
    gap:clamp(16px,4vw,24px)!important;
    align-items:start;
  }
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact :is(.philosophy-visual,.philosophy-copy) {
    width:100%;height:auto;min-height:0!important;max-height:none!important;
  }
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-media {
    height:clamp(220px,78vw,350px)!important;
    min-height:0!important;
    max-height:350px!important;
    overflow:hidden;
  }
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-media > img {
    max-height:100%;object-position:center 38%;
  }
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-badge {
    position:relative!important;
    inset:auto!important;
    display:flex;align-items:center;justify-content:flex-start;text-align:left;
    width:100%;max-width:100%;aspect-ratio:auto;
    min-height:0!important;height:auto!important;
    margin-top:10px;padding:11px 15px;gap:12px;
    border-radius:16px;box-shadow:none;
  }
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-badge span {font-size:1.25rem;flex:none}
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-badge p {margin:0;font-size:.79rem}
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-copy h2 {margin-bottom:15px}
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-copy blockquote {
    margin-top:clamp(16px,4vw,24px)!important;padding-top:15px;
    font-size:clamp(1.38rem,6vw,1.9rem);line-height:1.18;
  }
  /* GSAP image translations can reveal the empty image underlay during scroll. */
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact [data-parallax-media] {
    transform:none!important;
  }

  /* Testimonials: don't inherit slide height from a different, longer review. */
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .reviews-head {
    grid-template-columns:minmax(0,1fr);gap:15px!important;margin-bottom:20px!important;
  }
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .reviews-shell,
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .reviews-swiper {
    min-height:0!important;height:auto;
  }
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .reviews-swiper > .swiper-wrapper {
    align-items:flex-start!important;min-height:0!important;
  }
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .review-card {
    height:auto!important;min-height:0!important;max-height:none!important;
    align-self:flex-start;justify-content:flex-start;
    padding:clamp(17px,4.5vw,22px)!important;
  }
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .review-top {
    align-items:flex-start;flex-wrap:wrap;gap:10px;margin-bottom:clamp(12px,3vw,18px)!important;
  }
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .review-card > p {
    flex:none!important;margin:0 0 16px!important;font-size:clamp(1.12rem,4.8vw,1.38rem);
    line-height:1.38;overflow-wrap:anywhere;
  }
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .reviews-controls {margin-top:16px}
  /* CTA is output AFTER the dark review section; keep one continuous surface. */
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact > .bbcb-reviews-archive-cta {
    margin:0!important;
    padding:0 16px 25px!important;
    min-height:0!important;
    background:var(--brand-navy,#264d8c);
    color:#fff;
  }

  /* Equipo: mobile slides must not stretch to the longest professional text. */
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-swiper > .swiper-wrapper {
    align-items:flex-start!important;
  }
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-slide {
    height:auto!important;min-height:0!important;max-height:none!important;
    align-self:flex-start!important;
  }
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-slide .card-media {
    height:clamp(208px,68vw,290px)!important;max-height:290px;
    min-height:0!important;margin:0;
    background:var(--paper-2,#eff3f9);
  }
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-slide .card-media > img {
    object-fit:contain!important;object-position:center top;
    transform:none!important;
  }
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-slide .card-body {
    display:flex;flex-direction:column;gap:0;
    height:auto!important;min-height:0!important;max-height:none!important;
    flex:0 0 auto!important;padding:clamp(16px,4vw,22px);
  }
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-slide .card-body h3 {
    margin:10px 0 12px;overflow-wrap:anywhere;
  }
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-slide .bbcb-team-card__subtitle {margin:0 0 10px}
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-slide .bbcb-team-card__description {
    flex:none!important;margin:0 0 13px;overflow-wrap:anywhere;
  }
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-slide .bbcb-team-slide__footer {margin-top:0}
  .elementor-widget-bbcb_home_team .bbcb-mobile-compact .bbcb-team-final-cta {margin-top:17px}

  /* Other homepage widgets share the same section rhythm. */
  .elementor-widget-bbcb_home_specialties .bbcb-mobile-compact .specialty-card .card-body {
    min-height:0!important;height:auto!important;flex:none;
  }
  .elementor-widget-bbcb_home_specialties .bbcb-mobile-compact .specialty-card .card-body > p {flex:none}
  .elementor-widget-bbcb_home_appointment .bbcb-mobile-compact .appointment-title {
    position:static!important;top:auto!important;
  }
  .bbcb-elementor-render.bbcb-mobile-compact .section-head {margin-bottom:clamp(16px,5vw,24px)}
  .bbcb-elementor-render.bbcb-mobile-compact .container {max-width:100%;min-width:0}
}

/* Small tablet: only remove forced geometry, do not shrink all editorial type. */
@media (min-width:768px) and (max-width:1024px) {
  .elementor-widget-bbcb_home_hero .bbcb-mobile-compact .hero-slide {min-height:0!important}
  .elementor-widget-bbcb_home_philosophy .bbcb-mobile-compact .philosophy-media {
    min-height:0!important;max-height:min(56vw,550px)
  }
  .elementor-widget-bbcb_home_reviews .bbcb-mobile-compact .review-card {min-height:0}
}


/* BB Clinic - Footer: previous versions omitted the actual footer root from
 * the module-specific mobile rules. Prevent stacked theme + Elementor spacing.
 * Each rule applies ONLY to the enabled Elementor footer; the site's native
 * PHP footer and all desktop layouts retain their styles. */
@media (max-width:1024px) {
  .elementor-widget-bbcb_site_footer .bbcb-elementor-render.bbcb-mobile-compact > .bbcb-elementor-footer {
    min-height:0;
    height:auto;
    max-height:none;
    box-sizing:border-box;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .footer-grid {
    min-height:0;
    height:auto;
    grid-auto-rows:max-content;
    align-items:start;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact :is(.footer-intro,.bbcb-footer-contact,.bbcb-footer-navigation) {
    min-height:0;
    height:auto;
    align-self:start;
    min-width:0;
  }
}
@media (max-width:767px) {
  /* These default sizes are skipped if the editor already defines padding. */
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact:not(.bbcb-footer-user-padding) > .bbcb-elementor-footer {
    padding-top:var(--bbcb-mobile-outer-pad-top,clamp(22px,6vw,30px));
    padding-bottom:var(--bbcb-mobile-outer-pad-bottom,clamp(16px,4vw,22px));
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .footer-grid {
    grid-template-columns:minmax(0,1fr);
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact:not(.bbcb-footer-user-grid-gap) .footer-grid {
    gap:clamp(14px,4.2vw,23px);
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .footer-intro .footer-brand {
    display:inline-flex;
    margin-bottom:6px;
    max-width:100%;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .footer-intro p {
    margin-block:6px 0;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .footer-grid h4 {
    margin:0 0 8px;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .bbcb-footer-contact,
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .bbcb-footer-navigation {
    gap:6px;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .bbcb-footer-contact > p {
    margin:2px 0 0;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .bbcb-footer-menu {
    min-height:0;
    flex-wrap:nowrap;
    row-gap:7px;
    max-width:100%;
    overflow-wrap:anywhere;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .bbcb-footer-menu a {
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact:not(.bbcb-footer-user-bottom-gap) .footer-bottom {
    margin-top:clamp(14px,4vw,23px);
  }
  .elementor-widget-bbcb_site_footer .bbcb-mobile-compact .footer-bottom {
    min-height:0;
    height:auto;
    padding-top:14px;
    gap:8px 14px;
    flex-wrap:wrap;
  }
}
