/* Global layout — never set overflow on #root/wrapper/main; it breaks position:sticky */
html,
body {
  max-width: 100%;
}

#root,
.wrapper,
.site-wrapper,
main {
  max-width: 100%;
  overflow: visible !important;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header */
.site-navbar {
  height: 110px;
}

@media (max-width: 991.98px) {
  .site-navbar {
    height: auto !important;
    min-height: 72px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header-overlay .navbar {
    background: #fff !important;
  }

  .header-overlay .navbar-brand img {
    max-height: 52px;
    width: auto;
  }

  .navbar-collapse.menu-opened {
    z-index: 1040;
  }

  .navbar .nav-item-link {
    padding: 12px 20px;
  }

  .navbar .dropdown-menu {
    position: static !important;
    float: none;
    box-shadow: none;
    border: 0;
    padding-left: 12px;
  }
}

/* Page heroes */
.page-title-layout1 {
  padding-top: 90px !important;
  padding-bottom: 24px !important;
  min-height: auto !important;
}

.pagetitle-heading {
  font-size: clamp(28px, 6vw, 58px) !important;
  line-height: 1.2 !important;
  word-break: break-word;
}

.page-title-layout1 .breadcrumb {
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}

/* Homepage hero */
.slider .slide-item {
  min-height: 360px;
}

.slider .hero-title {
  font-size: clamp(26px, 5.5vw, 55px) !important;
  line-height: 1.2 !important;
}

.slider .slider-control-bio {
  font-size: clamp(14px, 2.5vw, 16px);
  line-height: 1.6;
}

/* Sticky sections — desktop only (match sfrsolicitors.com homepage) */
@media (min-width: 992px) {
  .banner-layout6,
  .banner-layout8,
  .banner-layout6 .container,
  .banner-layout8 .container,
  .banner-layout6 .row,
  .banner-layout8 .row,
  .banner-layout6 [class*='col-'],
  .banner-layout8 [class*='col-'] {
    overflow: visible !important;
  }

  /* Columns must stretch to the taller sibling so sticky has room to pin */
  .banner-layout6.bg-gray > .container > .row {
    align-items: stretch !important;
  }

  .banner-layout6.bg-gray .sticky-top .banner-img img {
    width: 100%;
    height: auto;
    display: block;
  }
}

@media (max-width: 991.98px) {
  .banner-layout6 .sticky-top,
  .banner-layout8 > .container > .row.sticky-top {
    position: relative !important;
    top: auto !important;
  }
}

/* Section spacing */
@media (max-width: 767.98px) {
  .page-title-layout1 {
    padding-top: 82px !important;
    padding-bottom: 20px !important;
  }

  .page-title-layout1 .pagetitle-heading {
    margin-top: 20px !important;
    margin-bottom: 12px !important;
  }

  .pt-80 {
    padding-top: 40px !important;
  }

  .pb-80 {
    padding-bottom: 40px !important;
  }

  .pt-60 {
    padding-top: 32px !important;
  }

  .pb-60 {
    padding-bottom: 32px !important;
  }

  .pt-50 {
    padding-top: 28px !important;
  }

  .pb-50 {
    padding-bottom: 28px !important;
  }

  .mb-60 {
    margin-bottom: 32px !important;
  }

  /* .slider.pt-70 {
    padding-top: 88px !important;
  } */

  .slider .container.pt-60 {
    padding-top: 28px !important;
    padding-bottom: 36px !important;
  }

  .slider .slide-item {
    min-height: 300px;
  }

  .heading-title {
    font-size: clamp(22px, 5vw, 32px) !important;
    line-height: 1.25 !important;
  }

  .heading-subtitle {
    font-size: clamp(16px, 3.5vw, 20px) !important;
    line-height: 1.35 !important;
  }

  .heading-desc {
    text-align: left !important;
  }
}

/* Buttons */
@media (max-width: 575.98px) {
  /* .slide-content .d-flex.gap-30 {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
  } */

  .slide-content .btn {
    width: 100%;
    justify-content: center;
  }

  .btn.same-hover {
    white-space: normal;
    text-align: center;
  }
}

/* Injury carousel */
@media (max-width: 991.98px) {
  /* .fancyboxs-layout5 .container.ml-10, */
  .fancyboxs-layout5 .injuries-carousel-container {
    margin-left: 0 !important;
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }

  .fancyboxs-layout5 .heading-layout2 .heading-subtitle span {
    display: inline-block;
    font-size: 14px;
    padding: 8px 12px !important;
  }

  .fancyboxs-layout5 .heading-layout2 .heading-title {
    font-size: clamp(22px, 4.5vw, 30px) !important;
    padding: 0 8px;
  }
}

@media (max-width: 767.98px) {
  .fancyboxs-layout5 .injury-carousel-card {
    padding: 20px 16px !important;
    min-height: 240px !important;
  }

  .fancyboxs-layout5 .injury-carousel-card .fancybox-icon i {
    font-size: 36px !important;
  }

  .fancyboxs-layout5 .swiper-slide > .fancybox-item,
  .fancyboxs-layout5 .swiper-slide > .injury-carousel-card {
    min-height: 240px !important;
  }

  #portfolio-prev,
  #portfolio-next,
  #injuries-page-prev,
  #injuries-page-next {
    width: 42px !important;
    height: 42px !important;
    margin: 8px !important;
  }
}

/* Blog section header */
@media (max-width: 767.98px) {
  .blog-layout1 .heading-layout2 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px;
  }

  .blog-layout1 .heading-layout2 .btn {
    margin-right: 0 !important;
    width: 100%;
    justify-content: flex-start;
  }
}

/* Team cards */
@media (max-width: 575.98px) {
  /* .team-layout2 .team-member-card .team-name {
    font-size: 16px;
  }

  .team-layout2 .team-member-card .team-position {
    font-size: 13px;
    line-height: 1.4;
  } */
}

/* Contact page */
.contact-sidebar {
  padding-left: 30px;
  padding-right: 30px;
}

.contact-layout1 .contact-block-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-layout1 .contact-list li {
  line-height: 1.6;
  margin-bottom: 8px;
}

.contact-layout1 .contact-list li span {
  font-weight: 600;
  color: #0b2147;
}

.contact-layout1 .contact-panel {
  border-radius: 8px;
}

@media (max-width: 991.98px) {
  .contact-sidebar {
    padding-left: 24px;
    padding-right: 24px;
  }

  .contact-form-column {
    padding-left: 24px;
    padding-right: 24px;
  }

  .contact-layout1 .contact-block {
    margin-bottom: 24px;
  }

  .contact-layout1 .contact-panel {
    margin-top: 8px;
  }
}

@media (max-width: 767.98px) {
  .contact-sidebar,
  .contact-form-column {
    padding-left: 20px;
    padding-right: 20px;
  }

  .contact-layout1 .contact-panel {
    padding: 24px 20px;
  }

  .contact-layout1 .contact-panel-title {
    font-size: 1.25rem;
    line-height: 1.35;
  }

  .contact-layout1 .contact-panel-desc {
    margin-bottom: 20px;
  }

  .contact-layout1 .contact-block {
    margin-bottom: 20px;
  }

  .contact-layout1 .social-media-card {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
}

@media (max-width: 767.98px) {
  .google-map iframe,
  .location-iframe-dynamic-true {
    height: 320px !important;
  }

  .contact-panel-form .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Footer */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .footer-primary .footer-widget-nav {
    overflow: hidden;
  }

  .footer .contact-list li a {
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .footer .social-media-card {
    flex-wrap: wrap;
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .footer-primary .row > [class*='col-'] {
    margin-bottom: 20px;
  }

  .footer .navbar-brand img {
    max-height: 64px;
  }

  .footer-secondary h5 {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* Tables */
@media (max-width: 767.98px) {
  /* .table-responsive-mobile {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  } */

  .cta-table,
  .injury-table,
  .table-bordered {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Blog / member detail */
@media (max-width: 991.98px) {
  .blog-single .post-title {
    font-size: clamp(24px, 5vw, 36px) !important;
    line-height: 1.25 !important;
  }

  .blog-single .post-item .post-img img {
    max-height: 320px;
    width: 100%;
    object-fit: cover;
  }
}

/* FAQ video background - prevent horizontal scroll */
.faq-video-bg,
.faq-video-bg iframe {
  max-width: 100%;
}

@media (max-width: 767.98px) {
  .faq-video-bg iframe {
    width: 100% !important;
    min-width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
  }
}

/* Injuries content */
@media (max-width: 767.98px) {
  .text-block .mw-500,
  .text-block .mw-450 {
    max-width: 100% !important;
  }

  #injury-content-container img {
    max-height: 260px !important;
  }
}

/* Offset columns breathe on tablet */
@media (max-width: 991.98px) {
  .offset-lg-2,
  .offset-lg-3,
  .offset-lg-6 {
    margin-left: 0;
  }
}

/* Why choose us banner */
@media (max-width: 991.98px) {
  .banner-layout13 > .row {
    margin-left: 0;
    margin-right: 0;
  }

  .banner-layout13 .banner-text {
    margin-top: 0 !important;
  }

  .banner-layout13 .cta-wrapper.gap-50 {
    gap: 24px !important;
  }
}

@media (max-width: 767.98px) {
  .banner-layout13 .banner-alert .heading-title {
    font-size: clamp(24px, 6vw, 36px) !important;
    margin-top: 16px !important;
  }

  .banner-layout13 .banner-text-inner {
    padding-top: 24px !important;
    padding-bottom: 16px !important;
  }

  .banner-layout13 .cta-wrapper {
    flex-direction: column;
  }

  .banner-layout13 .video-column {
    margin-top: 16px;
  }
}

/* Claim form */
.form-container h2.slider.hero-title {
  font-size: clamp(1.1rem, 4vw, 2rem);
  line-height: 1.3;
  word-wrap: break-word;
}

@media (max-width: 768px) {
  #signaturePad {
    width: 100% !important;
    max-width: 100%;
    height: 150px !important;
  }

  .navigation-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .navigation-buttons .btn-white-style3 {
    width: 100%;
    justify-content: center;
    padding: 14px 18px;
  }

  #documentsTable {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .confirmation_checkbox input[type='checkbox'],
  .agreement_checkbox input[type='checkbox'] {
    zoom: 1.4;
  }
}

/* Portfolio / support orgs */
@media (max-width: 767.98px) {
  /* .portfolio-layout1 .portfolio-item {
    margin-bottom: 20px;
  } */
}

/* Accordion / FAQ */
@media (max-width: 767.98px) {
  .accordion-item .accordion-button {
    font-size: 15px;
    line-height: 1.4;
    padding: 14px 16px;
  }
}

/* Policy content pages */
@media (max-width: 767.98px) {
  .text-block,
  .post-content {
    padding-left: 0;
    padding-right: 0;
  }

  .text-block h5 {
    font-size: 1.05rem;
  }
}
