/* =========================================================
   Bait Al Qanoon — device-wide responsive layer
   ========================================================= */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img, video, svg {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
}

.container, .container-fluid {
  max-width: 100%;
}

/* Offcanvas sits outside navbar so backdrop-filter cannot trap it */
.bq-offcanvas {
  --bs-offcanvas-width: min(100vw, 22rem);
  --bs-offcanvas-bg: #3A0C20;
  --bs-offcanvas-color: #F7EFE4;
  z-index: 1080;
  background: linear-gradient(180deg, #340014 0%, #2A0816 55%, #1A0A10 100%) !important;
  color: #F7EFE4;
}
html[data-theme="light"] .bq-offcanvas {
  background: linear-gradient(180deg, #340014 0%, #2A0816 55%, #1A0A10 100%) !important;
  color: #F7EFE4;
}
.bq-offcanvas .offcanvas-header {
  border-bottom: 1px solid rgba(214, 176, 84, .28) !important;
  padding: 1.1rem 1.2rem;
}
.bq-offcanvas .offcanvas-title {
  color: #E8C97A;
  font-weight: 800;
  letter-spacing: .02em;
}
.bq-offcanvas .btn-close {
  filter: invert(1) grayscale(1) brightness(1.8);
  opacity: .85;
}
.bq-offcanvas .nav-link {
  font-size: 1.18rem;
  font-weight: 800;
  padding: .85rem 0 !important;
  color: #F4E8D4 !important;
  opacity: 1 !important;
  border-bottom: 1px solid rgba(232, 201, 122, .18);
}
.bq-offcanvas .nav-link:hover,
.bq-offcanvas .nav-link.active {
  color: #E8C97A !important;
}
.bq-offcanvas .nav-link::after { display: none; }
.bq-offcanvas .bq-mobile-tools {
  margin-top: auto;
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  align-items: center;
  border-top: 1px solid rgba(232, 201, 122, .22);
}
.bq-offcanvas .btn-tool,
.bq-offcanvas .btn-admin {
  border-color: rgba(232, 201, 122, .45);
  color: #E8C97A;
  background: rgba(232, 201, 122, .08);
}
.bq-offcanvas .btn-hero {
  margin-top: .35rem;
  background: #E8C97A;
  color: #2A0816;
  font-weight: 800;
}
.bq-offcanvas .btn-hero:hover {
  color: #1A0A10;
}
.bq-offcanvas .btn-outline-gold,
.bq-offcanvas .btn-gold {
  border-color: #E8C97A;
  color: #E8C97A;
}

/* Page heroes: never clip bilingual titles */
.bq-page-hero {
  overflow: visible;
  min-height: 0;
  display: block;
  text-align: center;
}
.bq-page-hero .container {
  position: relative;
  z-index: 1;
}
.bq-page-hero h1,
.bq-page-hero p {
  position: static;
  max-width: 40rem;
  margin-inline: auto;
}

.whatsapp-float {
  inset-inline-end: max(14px, env(safe-area-inset-right, 0px));
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
}
/* Arabic: place float on the right (inline-start) */
html[dir="rtl"] .whatsapp-float {
  inset-inline-end: auto;
  inset-inline-start: max(14px, env(safe-area-inset-left, 0px));
}

@media (max-width: 991.98px) {
  .site-navbar {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .bq-page-hero {
    min-height: unset;
  }
  .bq-page-hero .container {
    padding-top: 1.15rem !important;
    padding-bottom: 1.35rem !important;
  }
  .bq-page-hero h1 {
    font-size: clamp(1.35rem, 6.4vw, 1.85rem);
    line-height: 1.35;
    margin-bottom: .6rem;
  }
  .bq-page-hero p {
    font-size: .95rem;
    line-height: 1.75;
    padding-inline: .15rem;
  }

  .bq-roster__toolbar {
    top: 58px;
    grid-template-columns: 1fr;
  }

  .pro-hero__inner {
    padding: 5.25rem 1rem 2.75rem;
  }
  .pro-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }
  .pro-hero__actions .btn {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .bq-roster-grid {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }
  .bq-roster-card strong {
    font-size: .9rem;
  }
  .bq-roster-card span {
    font-size: .75rem;
  }
  .bq-roster__tabs {
    margin-inline: -.25rem;
    padding-bottom: .15rem;
  }
}

@media (max-width: 575.98px) {
  .pro-team { grid-template-columns: 1fr !important; max-width: 22rem; margin-inline: auto; }
  .bq-roster-grid {
    grid-template-columns: 1fr;
    max-width: 22rem;
    margin-inline: auto;
  }
  .bq-roster-card img {
    aspect-ratio: 4 / 5;
  }
  .navbar-brand-text {
    max-width: 38vw;
  }
  .whatsapp-float {
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
  }
  .bq-roster-row {
    grid-template-columns: auto 1fr;
  }
  .bq-roster-row em {
    display: none;
  }
}

@media (max-width: 399.98px) {
  .navbar-brand-text small {
    display: none !important;
  }
}

/* Tables / CMS html */
.about-content img,
.bq-lawyer-profile img,
article img {
  max-width: 100%;
  height: auto;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
