/* Novaderma Blueprint 1.11.49 - compact, readable spacing on phone and tablet.
 * Only BB Clinic modules are targeted. No changes to form submission, fields,
 * Elementor parent containers, content or user-defined desktop spacing. */
@media (min-width: 768px) and (max-width: 1024px) {
  .bbcb-elementor-single-body { padding-block: 64px; }
  .bbcb-elementor-single-content > .elementor-element + .elementor-element .content-block {
    padding-top: 54px;
  }
  .bbcb-elementor-single-content .bbcb-elementor-render > .content-block { padding-bottom: 54px; }
  .bbcb-elementor-render .bbcb-page-hero-grid,
  .bbcb-elementor-render .bbcb-form-grid { gap: 36px; }
  .bbcb-elementor-render .bbcb-course-grid { margin-top: 40px; gap: 30px; }
  .bbcb-elementor-render .bbcb-contact-grid { margin-top: 42px; }
  .bbcb-elementor-render .bbcb-team-final-cta { margin-top: 26px; }
}

@media (max-width: 767px) {
  /* Dynamic widgets can be full width or inside a nested Elementor column. */
  .bbcb-elementor-render .container {
    width: min(var(--bbcb-elementor-container, 1380px), calc(100% - 28px));
  }
  .bbcb-elementor-single-body { padding-block: 40px; }
  .bbcb-elementor-single-grid { gap: 22px; }
  .bbcb-elementor-single-content > .elementor-element + .elementor-element .content-block {
    padding-top: 34px;
  }
  .bbcb-elementor-single-content .bbcb-elementor-render > .content-block { padding-bottom: 34px; }
  .bbcb-elementor-render .bbcb-page-hero { padding-block: 108px 40px; }
  .bbcb-elementor-render .bbcb-page-hero-grid { gap: 24px; }
  .bbcb-elementor-render .bbcb-page-hero-copy h1 { margin-block: 0 16px; }
  .bbcb-elementor-render .bbcb-page-hero-media { min-height: 0; }
  .bbcb-elementor-render .bbcb-course-grid { gap: 24px; margin-top: 28px; }
  .bbcb-elementor-render .bbcb-course-card { gap: 18px; }
  .bbcb-elementor-render .bbcb-course-body h3 { margin-block: 10px 12px; }
  .bbcb-elementor-render .bbcb-course-excerpt { margin-bottom: 16px; }
  .bbcb-elementor-render .bbcb-contact-grid { margin-top: 26px; }
  .bbcb-elementor-render .bbcb-contact-card { min-height: 0; padding: 20px; gap: 11px; }
  .bbcb-elementor-render .bbcb-contact-extra { margin-top: 24px; }
  .bbcb-elementor-render .bbcb-form-grid { gap: 24px; }
  .bbcb-elementor-render .bbcb-form-intro h2 { margin-block: 8px 18px; }
  .bbcb-elementor-render .bbcb-form-shell { padding: 20px; }
  .bbcb-elementor-render .bbcb-fields { gap: 15px; margin-bottom: 18px; }

  /* Editorial/true-section cards. Keep every paragraph visible. */
  .bbcb-true-derma { padding-block: 44px; padding-inline: 16px; }
  .bbcb-ts-intro { margin-bottom: 28px; }
  .bbcb-ts-intro h2 { margin-bottom: 14px; }
  .bbcb-ts-card { min-height: 0; }
  .bbcb-ts-content { padding: 20px; }
  .bbcb-ts-content h3 { margin-bottom: 12px; }
  .bbcb-ts-description { margin-bottom: 17px; }
  .bbcb-dynamic-support-title { margin-block: 28px 16px; }

  /* BB Clinic - Equipo shares its card system with Especialidades. */
  .bbcb-team-slide .card-media { height: clamp(220px, 62vw, 275px); }
  .bbcb-team-slide .card-body { padding: 20px; min-height: 0; }
  .bbcb-team-slide .card-body .bbcb-team-card__subtitle { margin-bottom: 10px; }
  .bbcb-team-slide .card-body .bbcb-team-card__description { margin-bottom: 14px; }
  .bbcb-team-slide .bbcb-team-card__cta { padding-top: 13px; }
  .bbcb-team-carousel-section .bbcb-team-final-cta,
  .bbcb-elementor-render .bbcb-team-final-cta { margin-top: 22px; }
  .bbcb-elementor-render .bbcb-reviews-archive-cta { padding: 12px 16px 26px; }

  /* Published testimonials: remove forced blank card height and footer gap. */
  .bbcb-testimonials-hero { padding-bottom: 36px; }
  .bbcb-testimonials-breadcrumb { margin-bottom: 20px; }
  .bbcb-testimonials-hero h1 { margin-block: 12px 16px; }
  .bbcb-testimonials-section { padding-block: 40px 48px; }
  .bbcb-testimonials-grid { gap: 16px; }
  .bbcb-testimonial-tile { min-height: 0; padding: 22px; }
  .bbcb-testimonial-meta { margin-bottom: 16px; }
  .bbcb-testimonial-tile blockquote { margin-bottom: 18px; }
  .bbcb-testimonials-pagination { margin-top: 26px; }
  .bbcb-testimonials-last-cta { padding-block: 42px; }
  .bbcb-testimonials-last-cta .bbcb-testimonials-container { gap: 20px; }
  .bbcb-elementor-footer .footer-grid { gap: 26px; }
  .bbcb-elementor-footer .footer-bottom { margin-top: 28px; }
}

/* Appointment form is itself a container, so its content spacing follows its
 * usable width even when embedded in a narrow desktop Elementor column. */
@container bbcb-ap-layout (max-width: 720px) {
  .bbcb-ap__container { gap: 25px; }
  .bbcb-ap__eyebrow { margin-bottom: 14px !important; }
  .bbcb-ap__lead { margin-top: 16px !important; }
  .bbcb-ap__phone-card { margin-top: 20px; padding: 20px; }
  .bbcb-ap__phone-number { margin-block: 12px !important; }
  .bbcb-ap__panel { padding: 23px 20px; border-radius: 22px; }
  .bbcb-ap__rule { margin-block: 20px; }
  .bbcb-ap__fields { gap: 16px 13px; }
  .bbcb-ap__field { gap: 7px; }
  .bbcb-ap__field textarea { min-height: 125px; }
  .bbcb-ap__submit-row { gap: 14px; margin-top: 20px; }
}
@media (max-width: 767px) {
  .bbcb-appointment-form-section { padding: 36px 16px; }
  .bbcb-ap__container { gap: 25px; }
  .bbcb-ap__eyebrow { margin-bottom: 14px !important; }
  .bbcb-ap__lead { margin-top: 16px !important; }
  .bbcb-ap__phone-card { margin-top: 20px; }
  .bbcb-ap__panel { padding: 23px 20px; }
  .bbcb-ap__rule { margin-block: 20px; }
  .bbcb-ap__fields { gap: 16px; }
  .bbcb-ap__field { gap: 7px; }
  .bbcb-ap__field textarea { min-height: 125px; }
  .bbcb-ap__submit-row { gap: 14px; margin-top: 20px; }
}
@media (max-width: 359px) {
  .bbcb-appointment-form-section { padding-inline: 12px; }
  .bbcb-ap__panel { padding: 19px 15px; }
  .bbcb-ap__phone-card { padding: 18px; }
  .bbcb-testimonial-tile { padding: 19px; }
  .bbcb-team-slide .card-body { padding: 18px; }
}
