/* ─── global.css ──────────────────────────────────────────────────────────────
   Site-wide CSS overrides extracted from per-page inline styles.
   Loaded once via BaseLayout instead of being duplicated in every page.
   ─────────────────────────────────────────────────────────────────────────── */

/* Hero section responsive padding adjustments */
@media screen and (max-width: 991px) {
  .section_home-hero-v2 {
    margin-top: -4rem;
    padding-top: 4rem;
  }
  .section_home-hero-v2 .hero-image {
    object-fit: cover;
  }
}
@media screen and (max-width: 767px) {
  .section_home-hero-v2 {
    margin-top: -3.5rem;
    padding-top: 3.5rem;
  }
}
@media screen and (max-width: 479px) {
  .section_home-hero-v2 {
    margin-top: -3rem;
    padding-top: 3rem;
  }
}

/* Override Webflow IX2 inline opacity:0 that prevents AOS fade animations.
   IX2 set these as initial animation states, but without Webflow JS the
   animations never run. AOS handles the fade-in instead, but inline styles
   beat class selectors — this !important lets AOS win. */
[data-aos].aos-animate {
  opacity: 1 !important;
}

/* Override Webflow IX2 inline opacity:0 on elements that don't use AOS.
   Without Webflow JS, elements like Client Spotlight images stay invisible. */
[data-w-id][style*="opacity:0"],
[data-w-id][style*="opacity: 0"] {
  opacity: 1 !important;
}

/* Center H1 headings in hero sections (overrides .h2-v2 text-align: left) */
.about-hero-v2_main .h2-v2,
.resources-hero_main .h2-v2 {
  text-align: center;
}

/* Card grid alignment — parent must be CSS Grid for subgrid children.
   webflow.css sets display:flex on both the wrap and cards; !important
   ensures our grid override wins regardless of load-order edge cases. */
.services-cards-v2_cards-wrap {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* 2-card wraps: use 2 columns so cards fill full width instead of
   leaving an empty third column. :has() detects exactly 2 children. */
.services-cards-v2_cards-wrap:has(> :nth-child(2)):not(:has(> :nth-child(3))) {
  grid-template-columns: repeat(2, 1fr);
}

/* Flex fallback for browsers without subgrid (pre-2023) */
.services-cards-v3,
.services-cards-v2_card,
.services-cards-v2_card-white {
  display: flex;
  flex-direction: column;
}

/* Subgrid: forces icon / heading / paragraph rows to align across cards.
   Also resets webflow flex properties that can confuse grid layout. */
@supports (grid-template-rows: subgrid) {
  .services-cards-v3,
  .services-cards-v2_card,
  .services-cards-v2_card-white {
    display: grid !important;
    grid-row: span 3;
    grid-template-rows: subgrid;
    flex: none;           /* reset webflow flex:1 shorthand */
    align-content: start; /* hug content to top of each row cell */
  }
}

/* Testimonials grid */
.testimonials-v2_cards-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

@media screen and (max-width: 991px) {
  .services-cards-v2_cards-wrap {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 479px) {
  .services-cards-v2_cards-wrap {
    grid-template-columns: 1fr;
  }
}
