/* ============================================================
   LITSON OVERRIDES
   Fixes for static Next.js rendering of Webflow CSS.

   Webflow's runtime engine dynamically applies responsive
   classes and toggles visibility. This file replicates those
   behaviors statically across all breakpoints.
   ============================================================ */

/* ---- GLOBAL: prevent horizontal scroll ---- */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.page-wrapper {
  overflow-x: hidden;
}

/* ---- FIX 1: News breadcrumb z-index ---- */
/* The "News>" breadcrumb sits inside the hero which is below
   the navbar. When the menu opens, the navbar z-index covers
   the hero, but the breadcrumb bleeds through because the hero
   section also has high z-index. Fix: lower the hero z-index. */
.section_result-single-hero-2 {
  position: relative;
  z-index: 1;
}

/* Ensure navbar stays above everything when menu is open */
.section_navbar {
  z-index: 9999999;
}

/* When nav menu is open, ensure it covers full viewport */
[data-nav-menu-open] {
  z-index: 9999998;
}

/* ---- FIX 2: News hero padding balance ---- */
.about-hero_padding-2.news {
  padding-top: 5rem;
  padding-bottom: 3rem;
}

/* ---- FIX 3: Solid background on mobile nav menu ---- */
/* The nav menu needs a solid background when open on mobile.
   The menu itself (not the whole navbar) gets the background. */
@media screen and (max-width: 991px) {
  [data-nav-menu-open] {
    background-color: #293040 !important;
    position: fixed !important;
    top: 60px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999998 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }

  /* Light variant: white background */
  .navbar-menu.white[data-nav-menu-open] {
    background-color: #f1f1f1 !important;
  }

  /* Keep the navbar bar itself visible above the menu with solid background */
  .section_navbar:has([data-nav-menu-open]) {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999999 !important;
    background-color: #293040 !important;
  }

  /* Light navbar variant gets light background when menu open */
  .section_navbar:has(.navbar-menu.white[data-nav-menu-open]) {
    background-color: #f1f1f1 !important;
  }

  /* Light menu overlay also gets light background */
  .navbar-menu.white[data-nav-menu-open] .navbar-link.is-black {
    color: #293040 !important;
  }

  /* Ensure nav links are visible and properly spaced */
  [data-nav-menu-open] .navbar-menu_flex {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }

  [data-nav-menu-open] .navbar-link {
    font-size: 1.5rem;
    color: #fff;
  }

  [data-nav-menu-open] .navbar-link.is-black {
    color: #293040;
  }
}

/* ---- FIX 4: Result detail page text visibility ---- */
/* The result-case section has dark bg (#293040). The w-richtext
   body content inherits default dark text. Fix: make it white. */
.section_result-case .w-richtext,
.section_result-case .w-richtext p,
.section_result-case .w-richtext li,
.section_result-case .w-richtext blockquote,
.section_result-case .w-richtext h2,
.section_result-case .w-richtext h3,
.section_result-case .w-richtext h4 {
  color: #fff;
}

.section_result-case .w-richtext strong {
  color: #fff;
  font-weight: 700;
}

.section_result-case .w-richtext blockquote {
  border-left-color: rgba(255, 255, 255, 0.3);
}

/* Also fix the result hero text colors */
.section_result-single-hero .heading-style-h2,
.section_result-single-hero .heading-style-h5,
.section_result-single-hero .link-light {
  color: #fff;
}

/* ---- Attorney card hover effects (about/team pages) ---- */
/* Default: light arrow visible, dark arrow hidden, photo full opacity */
a.about-meet_item .about-meet_item-content-image.is-normal {
  display: block !important;
}
a.about-meet_item .about-meet_item-content-image.is-hover {
  display: none !important;
}
a.about-meet_item .about-meet_item-image {
  transition: opacity 0.3s ease;
}

/* Hover: dark arrow visible, light arrow hidden, photo lightened */
a.about-meet_item:hover .about-meet_item-content-image.is-normal {
  display: none !important;
}
a.about-meet_item:hover .about-meet_item-content-image.is-hover {
  display: block !important;
}
a.about-meet_item:hover .about-meet_item-image {
  opacity: 0.7;
}

/* ---- Active nav link: dark text on light navbar ---- */
.navbar-link.is-black.w--current {
  color: var(--text-primary);
  border-bottom: 1px solid #ff3c36;
}

/* ---- Homepage featured results hover: show description on hover ---- */
.home-relative_grid-item .overflow-hidden.is-content {
  height: 0;
  transition: height 0.3s ease;
}
.home-relative_grid-item:hover .overflow-hidden.is-content {
  height: auto;
}
.home-relative_grid-item .overflow-hidden.is-bottom {
  opacity: 0;
  transition: opacity 0.3s ease;
}
.home-relative_grid-item:hover .overflow-hidden.is-bottom {
  opacity: 1;
}

/* ---- Media logo marquee animation ---- */
/* Row 1 and 3: scroll left. Row 2 (is-middle): scroll right. */
@keyframes marquee-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.home-attention_item-wrapper {
  animation: marquee-left 60s linear infinite;
  flex-wrap: nowrap !important;
  width: max-content;
}

.home-attention_item-wrapper.is-middle {
  animation: marquee-right 70s linear infinite;
}

.home-attention_wrapper {
  overflow: hidden;
}

/* ---- Paragraph spacing in rich text body sections ---- */
.section-paragraph-news .date-text.w-richtext p {
  margin-bottom: 1.5rem;
}

/* Key facts box: spacing between items */
.key-facts-box .w-richtext p {
  margin-bottom: 1.25rem;
}
.key-facts-box .w-richtext p:last-child {
  margin-bottom: 0;
}

/* ---- DESKTOP: contact hero uses original padding (navbar is absolute) ---- */

/* ============================================================
   TABLET — max-width: 991px
   ============================================================ */
@media screen and (max-width: 991px) {

  /* Hero padding */
  .about-hero_padding-2.news {
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  .contact-hero_padding {
    padding-top: 10rem;
    padding-bottom: 4rem;
  }

  .about-hero_padding,
  .team-hero_padding {
    min-height: 60vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Grids: single column */
  .about-meet_wrapper,
  .result-feature_wrapper,
  .home-relative_flex,
  .about-advantage_flex,
  .footer_flex-wrapper {
    flex-direction: column;
  }

  .about-meet_wrapper {
    grid-template-columns: 1fr 1fr;
  }

  .result-feature_wrapper {
    grid-template-columns: 1fr;
  }

  /* Compare table: hide desktop, show mobile */
  .about-compare_flex {
    display: none;
  }
  .about-communication-flex_mobile {
    display: flex;
  }
}

/* ============================================================
   MOBILE LANDSCAPE — max-width: 767px
   ============================================================ */
@media screen and (max-width: 767px) {

  /* Global padding reduction */
  .padding-global {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .padding-global-2 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Section padding reduction */
  .padding-section-large {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  /* Hero padding */
  .about-hero_padding-2.news {
    padding-top: 3rem;
    padding-bottom: 2rem;
    min-height: auto;
  }

  .about-hero_padding,
  .team-hero_padding {
    min-height: 50vh;
    padding-top: 5rem;
    padding-bottom: 2rem;
  }

  .contact-hero_padding {
    padding-top: 8rem;
    padding-bottom: 3rem;
  }

  /* Stack content-wrap vertically */
  .content-wrap {
    flex-direction: column !important;
    flex-flow: column !important;
  }

  /* Image container full width */
  .img-wrap {
    width: 100% !important;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Image responsive */
  .img-100 {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
    object-fit: cover;
  }

  /* Typography scaling — defer to Webflow CSS values for headings.
     Only override if Webflow doesn't have mobile rules for a class. */

  /* Gallery image */
  .section_home-gallary img {
    width: 100%;
    height: auto;
  }

  /* Footer stacking */
  .footer_flex-wrapper {
    flex-direction: column;
    gap: 2rem;
  }

  .footer_flex-left,
  .footer_flex-right {
    width: 100%;
  }

  .footer_bottom {
    flex-direction: column;
    gap: 1rem;
  }

  /* Home hero — use Webflow's own padding values */

  /* Featured results grid */
  .home-relative_flex {
    flex-direction: column;
    gap: 1rem;
  }

  .home-relative_grid-item {
    width: 100%;
  }

  /* Result feature cards */
  .result-feature_wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  .result-feature_item {
    width: 100%;
  }

  /* Stats grid */
  .result-track_wrapper {
    flex-wrap: wrap;
    gap: 2rem;
  }

  .result-track_item {
    width: 45%;
  }

  /* About team grid */
  .about-meet_wrapper {
    grid-template-columns: 1fr;
  }

  /* Contact addresses */
  .contact-address_wrapper {
    flex-direction: column;
  }

  .contact-address_item,
  .contact-address_item.is-middle {
    flex-direction: column;
  }

  .contact-address_item-image {
    width: 100%;
    height: auto;
  }

  .contact-wrapper {
    flex-direction: column;
  }

  /* News items */
  .news-bottom_item-flex {
    flex-direction: column;
  }

  /* About excess section */
  .about-excess_wrapper {
    flex-direction: column;
  }

  /* Attorney bio layout */
  .about-team_wrapper {
    flex-direction: column;
  }

  .about-team_top {
    flex-direction: column;
  }

  .about-team_top-right-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    margin-top: 2rem;
  }

  .about-team_bottom {
    flex-direction: column;
  }

  .about-team_bottom-right {
    width: 100%;
  }

  /* Key qualifications */
  .about-key_wrapper {
    flex-direction: column;
  }

  .about-key_item {
    width: 100%;
  }

  /* Education section */
  .team-education_header {
    flex-direction: column;
    gap: 2rem;
  }

  /* CTA section */
  .home-cta_flex {
    flex-direction: column;
    gap: 2rem;
  }

  /* Service items */
  .service-item_dropdown-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  /* Attention/media logos */
  .home-attention_wrapper {
    overflow: hidden;
  }

  /* Hide the desktop "Why" section, show mobile one */
  .home-gallery_-desktop {
    display: none;
  }

  .home-gallery-mobile {
    display: block;
  }
}

/* ============================================================
   MOBILE PORTRAIT — max-width: 479px
   ============================================================ */
@media screen and (max-width: 479px) {

  .padding-global {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .padding-global-2 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .about-hero_padding-2.news {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }

  .about-hero_padding,
  .team-hero_padding {
    min-height: 40vh;
    padding-top: 4rem;
    padding-bottom: 1.5rem;
  }

  /* Typography — defer to Webflow CSS values */

  .result-track_item {
    width: 100%;
  }

  .about-meet_wrapper {
    grid-template-columns: 1fr;
  }

  .home-hero_summary {
    max-width: 100%;
  }

  .home-why_item-number {
    font-size: 2rem;
  }
}
