/* Small compatibility layer for frozen Elementor/Astra markup on custom theme */
.footer-width-fixer,
.main-header-bar,
.site-content,
.ast-container {
  width: 100%;
}

/* Ensure default WP blocks don't add extra spacing over legacy layout */
.entry-content > *:first-child {
  margin-top: 0;
}

/* Canvas pages: full width without header/footer wrappers */
.system32-canvas-page #content,
.system32-canvas-page .site-content,
.system32-canvas-page .ast-container,
.system32-canvas-page #primary {
  max-width: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
}

/* FAQ refresh: more breathing room and cleaner professional card layout */
.s32-faq-fallback {
  max-width: 980px;
  margin: 26px auto 0;
  --s32-faq-content-width: min(760px, calc(100% - 48px));
}

.elementor-widget-heading .elementor-widget-container > h2.elementor-heading-title + .s32-faq-fallback {
  margin-top: 26px;
}

.s32-faq-fallback .elementor-toggle {
  display: grid;
  gap: 14px;
}

.s32-faq-fallback .elementor-toggle .elementor-toggle-item {
  background: #ffffff;
  border: 1px solid #d5e3ea;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(4, 32, 50, 0.06);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.s32-faq-fallback .elementor-toggle .elementor-toggle-item:hover {
  border-color: #b9d7e3;
  box-shadow: 0 12px 24px rgba(4, 32, 50, 0.1);
  transform: translateY(-1px);
}

.s32-faq-fallback .elementor-toggle .elementor-tab-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  margin: 0;
  border: 0;
  background: #ffffff;
  padding-top: 22px;
  padding-bottom: 22px;
  padding-left: max(24px, calc((100% - var(--s32-faq-content-width)) / 2));
  padding-right: max(24px, calc((100% - var(--s32-faq-content-width)) / 2));
}

.s32-faq-fallback .elementor-toggle .elementor-tab-title.elementor-active {
  background: #f5fbfd;
}

.s32-faq-fallback .elementor-toggle .elementor-toggle-title {
  display: block;
  flex: 0 1 calc(var(--s32-faq-content-width) - 52px);
  color: #103247;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.1px;
  text-decoration: none;
  text-align: left;
  max-width: none;
}

.s32-faq-fallback .elementor-toggle .elementor-toggle-icon {
  margin-left: 0;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f4f8;
  color: #0f6782;
}

.s32-faq-fallback .elementor-toggle .elementor-tab-title.elementor-active .elementor-toggle-icon {
  background: #009cb4;
  color: #ffffff;
}

.s32-faq-fallback .elementor-toggle .elementor-tab-content {
  margin: 0;
  border: 0;
  background: #ffffff;
  color: #395566;
  font-size: 16px;
  line-height: 1.75;
  padding-bottom: 24px;
  padding-left: max(24px, calc((100% - var(--s32-faq-content-width)) / 2));
  padding-right: max(24px, calc((100% - var(--s32-faq-content-width)) / 2));
}

.s32-faq-fallback .elementor-toggle .elementor-tab-content p {
  margin: 0;
}

@media (max-width: 768px) {
  .s32-faq-fallback {
    margin-top: 20px;
  }

  .s32-faq-fallback .elementor-toggle .elementor-tab-title {
    padding: 18px 16px;
  }

  .s32-faq-fallback .elementor-toggle .elementor-toggle-title {
    flex: 1 1 auto;
    font-size: 18px;
    text-align: left;
  }

  .s32-faq-fallback .elementor-toggle .elementor-tab-content {
    padding: 0 16px 18px;
    font-size: 15px;
  }
}

/* Lightweight fallback behavior for video gallery when old JS is removed */
.bdt-video-gallery.rvs-container .rvs-item-stage {
  position: relative;
  overflow: hidden;
}

.bdt-video-gallery.rvs-container .rvs-item {
  inset: 0;
  width: 100%;
  display: none;
}

.bdt-video-gallery.rvs-container .rvs-item.rvs-active,
.bdt-video-gallery.rvs-container .rvs-item:first-child {
  display: block;
}

.bdt-video-gallery.rvs-container.s32-rvs-ready .rvs-item:first-child:not(.rvs-active) {
  display: none;
}

.bdt-video-gallery.rvs-container .rvs-nav-item,
.bdt-video-gallery.rvs-container .rvs-nav-prev,
.bdt-video-gallery.rvs-container .rvs-nav-next {
  cursor: pointer;
}

/* Modern testimonial videos: no slider, clean responsive cards */
.elementor-widget-bdt-video-gallery.s32-testimonials-modernized .elementor-widget-container {
  max-width: 1160px;
  margin: 0 auto;
}

.s32-testimonials-modern {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 20px;
}

.s32-testimonial-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #ffffff;
  border: 1px solid #d8e5ec;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(3, 28, 44, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.s32-testimonial-card:hover,
.s32-testimonial-card:focus-visible {
  transform: translateY(-4px);
  border-color: #74b9d0;
  box-shadow: 0 16px 36px rgba(3, 28, 44, 0.16);
}

.s32-testimonial-media {
  position: relative;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

.s32-testimonial-thumb {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  margin: 0;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #0f3042;
  border-radius: 0 !important;
  appearance: none;
  -webkit-appearance: none;
}

.s32-testimonial-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 15, 25, 0.05), rgba(2, 15, 25, 0.44));
  border-radius: 0 !important;
}

.s32-testimonial-play {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(0, 121, 145, 0.9);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  padding-left: 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.s32-testimonial-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 0 !important;
}

.s32-testimonial-player[hidden] {
  display: none !important;
}

.s32-testimonial-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0 !important;
}

.s32-testimonial-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 16px 18px;
}

.s32-testimonial-name {
  color: #0f2a3b;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.s32-testimonial-credit {
  color: #507084;
  font-size: 14px;
  line-height: 1.3;
}

@media (max-width: 1024px) {
  .s32-testimonials-modern {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 680px) {
  .s32-testimonials-modern {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .s32-testimonial-name {
    font-size: 18px;
  }
}

/* Premium tabs fallback when plugin JS is removed */
.premium-tabs .s32-premium-hidden {
  display: none !important;
}

.premium-tabs .premium-tabs-nav-list-item {
  cursor: pointer;
}

/* Legacy unfold widget: keep full content visible and remove orphan gradient/button */
.elementor-widget-premium-unfold-addon .premium-unfold-content {
  max-height: none !important;
  overflow: visible !important;
}

.elementor-widget-premium-unfold-addon .premium-unfold-gradient,
.elementor-widget-premium-unfold-addon .premium-unfold-container > .premium-button {
  display: none !important;
}

/* Contact page WhatsApp-first callout */
.s32-contact-whatsapp-cta {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #c6dce5;
  border-radius: 14px;
  background: #f4fbfe;
}

.s32-contact-whatsapp-cta .elementor-button {
  background: #02b5b5;
  border-radius: 10px;
  padding: 12px 18px;
}

.s32-contact-whatsapp-note {
  margin: 10px 0 0;
  color: #2f5667;
  font-size: 14px;
  line-height: 1.4;
}

/* Footer refresh: soft main area + strong bottom bar */
#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 {
  background: linear-gradient(180deg, #eef5f8 0%, #e3edf2 100%) !important;
}

#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 h5,
#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 h6,
#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 p,
#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 .elementor-icon-list-text,
#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 .elementor-icon-list-icon {
  color: #244454 !important;
}

#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 a {
  color: #0f6782 !important;
}

#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 a:hover,
#colophon .elementor-293 > .elementor-section.elementor-element-132aa59 a:focus-visible {
  color: #0a4f63 !important;
}

#colophon .elementor-293 > .elementor-section.elementor-element-c2bd59d {
  background: #0b6780 !important;
}

#colophon .elementor-293 > .elementor-section.elementor-element-c2bd59d .hfe-copyright-wrapper,
#colophon .elementor-293 > .elementor-section.elementor-element-c2bd59d .hfe-copyright-wrapper span,
#colophon .elementor-293 > .elementor-section.elementor-element-c2bd59d a {
  color: #eaf7fc !important;
}
