/* ApexEra block-specific additions (theme apexera.css holds main styles). */

/* Hero text slider */
.hero-slider {
  position: relative;
  min-height: 11rem;
  margin-bottom: 0.25rem;
}
.hero-slide {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
}
.hero-slide.is-leaving {
  opacity: 0;
  visibility: hidden;
}
.hero-slide.is-entering {
  opacity: 1;
  visibility: visible;
}
.hero-slider .hero-headline { margin-bottom: 1.5rem; }
.hero-slider .hero-sub { margin-bottom: 0; }
.hero-slider-dots {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
}
.hero-slider-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.hero-slider-dot.is-active {
  background: var(--gold, #C9923A);
  transform: scale(1.15);
}
.hero-slider-dot:hover { background: rgba(255, 255, 255, 0.5); }

/* Scorecard scenario fade */
.scorecard-body {
  transition: opacity 0.5s ease;
}
.scorecard-body.is-fading-out { opacity: 0; }
.scorecard-body.is-fading-in { opacity: 1; }

.apex-view-more,
.cs-view-all { text-align: center; margin-top: 2rem; }
.apex-view-more a:not(.btn-primary),
.cs-view-all a { color: var(--teal); font-weight: 600; text-decoration: none; }
.apex-view-more a:not(.btn-primary):hover,
.cs-view-all a:hover { text-decoration: underline; }
.home-contact-prompt {
  padding-top: 4rem;
  padding-bottom: 4rem;
  padding-left: var(--site-inline, max(1.25rem, calc((100% - 1200px) / 2)));
  padding-right: var(--site-inline, max(1.25rem, calc((100% - 1200px) / 2)));
  text-align: center;
  background: var(--off-white, #F8FAFC);
}
.home-contact-prompt .section-title { margin-bottom: 0.75rem; }
.home-contact-prompt .section-sub { max-width: 520px; margin: 0 auto 1.5rem; }
.home-contact-prompt .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--navy, #0D2244);
  text-decoration: none;
}
.home-contact-prompt .btn-primary:hover {
  color: var(--navy, #0D2244);
  text-decoration: none;
}

/* ── Stats cards with counters ── */
section.stats-band.apex-stats-cards {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  padding-left: var(--site-inline, max(1.25rem, calc((100% - 1200px) / 2)));
  padding-right: var(--site-inline, max(1.25rem, calc((100% - 1200px) / 2)));
}
.apex-stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  padding-left: var(--site-inline, max(1.25rem, calc((100% - 1200px) / 2)));
  padding-right: var(--site-inline, max(1.25rem, calc((100% - 1200px) / 2)));
  background: var(--off-white, #F8FAFC);
  border-bottom: 1px solid var(--border, #D1D9E6);
}
.apex-stats-cards .stat-item { display: none; }
.stat-card {
  background: var(--white, #fff);
  border: 1px solid var(--border, #D1D9E6);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(13, 34, 68, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(13, 34, 68, 0.1);
}
.stat-card-media {
  position: relative;
  height: 160px;
  overflow: hidden;
}
.stat-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stat-card-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 34, 68, 0.05) 0%, rgba(13, 34, 68, 0.35) 100%);
}
.stat-card-body {
  padding: 1.5rem 1.35rem 1.75rem;
  text-align: left;
}
.apex-stats-cards .stat-number,
.apex-counter {
  font-family: var(--font-body, Inter), -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--navy, #0D2244);
  line-height: 1.1;
  margin-bottom: 0.65rem;
  letter-spacing: -0.02em;
}
.apex-stats-cards .stat-label {
  font-size: 0.875rem;
  color: var(--muted, #64748B);
  line-height: 1.55;
  max-width: none;
  margin: 0;
  text-align: left;
}

/* ── Segments with images ── */
.segments-section--teaser .segments-intro {
  grid-template-columns: 1fr;
  margin-bottom: 2rem;
}
.segments-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}
.segments-intro-media,
.segments-hero-img {
  width: 100%;
  border-radius: 16px;
  display: block;
  object-fit: cover;
  min-height: 280px;
  max-height: 360px;
  box-shadow: 0 12px 40px rgba(13, 34, 68, 0.12);
}
.segments-section .segments-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-top: 0;
}
.segments-section--teaser .segments-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1080px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
}
.segments-section--teaser .segments-intro-copy {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.segments-section--teaser .segments-intro-copy .section-eyebrow {
  justify-content: center;
}
.segments-section--teaser .segments-intro-copy .section-sub {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.segment-card {
  padding: 0;
  overflow: hidden;
  text-align: left;
  border: 1px solid var(--border, #D1D9E6);
  border-radius: 14px;
  background: var(--white, #fff);
}
.segment-card-media { height: 120px; overflow: hidden; }
.segment-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.segment-card:hover .segment-card-img { transform: scale(1.05); }
.segment-card-body { padding: 1.1rem 1rem 1.25rem; }
.segments-section .seg-icon { display: none; }

/* ── Services with images ── */
.services-section--pair .services-grid--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.service-card {
  padding: 0;
  overflow: hidden;
}
.service-card-media { height: 180px; overflow: hidden; }
.service-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.service-card:hover .service-card-img { transform: scale(1.04); }
.service-card-body { padding: 1.5rem 1.75rem 1.75rem; }

/* ── Fractional teaser split ── */
.fractional-section.fractional-section--teaser {
  display: block;
  grid-template-columns: unset;
}
.fractional-section--teaser {
  background: linear-gradient(180deg, var(--off-white, #F8FAFC) 0%, var(--white, #fff) 100%);
}
.fractional-teaser-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.fractional-teaser-media { border-radius: 16px; overflow: hidden; box-shadow: 0 12px 40px rgba(13, 34, 68, 0.1); }
.fractional-teaser-img {
  width: 100%;
  display: block;
  object-fit: cover;
  min-height: 300px;
}

/* ── Section banners ── */
.casestudies-section--teaser {
  padding-top: 5.5rem;
}
.casestudies-section--teaser .casestudies-header {
  margin-bottom: 2.5rem;
}
.apex-section-with-banner { position: relative; }
.section-banner,
.casestudies-banner {
  position: relative;
  height: 220px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2.5rem;
}
.section-banner--short { height: 180px; }
.section-banner-img,
.casestudies-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.section-banner-overlay,
.casestudies-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(13, 34, 68, 0.55) 0%, rgba(13, 34, 68, 0.15) 100%);
}
.acaf-feature-media {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  max-width: 420px;
}
.acaf-feature-img {
  width: 100%;
  display: block;
  object-fit: cover;
  min-height: 200px;
}

/* ── CTA with background image ── */
.apex-cta-with-image {
  position: relative;
  overflow: hidden;
}
.apex-cta-with-image .cta-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.apex-cta-with-image .cta-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.apex-cta-with-image .cta-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13, 34, 68, 0.92) 0%, rgba(13, 34, 68, 0.78) 100%);
}
.apex-cta-with-image .cta-inner {
  position: relative;
  z-index: 1;
}

/* Contact page form section */
.apex-contact-section {
  padding-top: 4rem;
  padding-bottom: 5rem;
  padding-left: var(--site-inline, max(1.25rem, calc((100% - 1200px) / 2)));
  padding-right: var(--site-inline, max(1.25rem, calc((100% - 1200px) / 2)));
}
.apex-contact-section .cta-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.apex-contact-secondary-cta {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.apex-contact-white-paper-btn {
  font-size: 0.95rem;
  padding: 15px 28px;
}

@media (max-width: 899px) {
  .apex-contact-section {
    padding-top: 3rem;
    padding-bottom: 4rem;
  }
}

@media (max-width: 1024px) {
  .apex-stats-cards {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  .segments-intro,
  .fractional-teaser-layout { grid-template-columns: 1fr; }
  .segments-section .segments-grid,
  .segments-section--teaser .segments-grid { grid-template-columns: repeat(2, 1fr); }
  .page-header--banner .page-header__banner { min-height: 240px; }
  .page-header__inner { padding-top: 2.5rem; padding-bottom: 1.5rem; }
  .section-banner,
  .casestudies-banner { height: 180px; margin-bottom: 2rem; }
}

@media (max-width: 768px) {
  .page-header--banner .page-header__banner { min-height: 200px; }
  .page-header__inner { padding-top: 2rem; padding-bottom: 1.25rem; }
  .page-header__description { font-size: 0.95rem; }
  .section-banner,
  .casestudies-banner { height: 150px; border-radius: 12px; }
  .fractional-teaser-img { min-height: 220px; }
  .stat-card-media { height: 140px; }
  .home-contact-prompt { padding-top: 3rem; padding-bottom: 3rem; }
  .services-section--pair .services-grid--pair,
  .services-grid { grid-template-columns: 1fr; }
  .service-card-body { padding: 1.25rem 1.35rem 1.5rem; }
  .service-title { font-size: 1.05rem; line-height: 1.35; }
}

@media (max-width: 640px) {
  .segments-section .segments-grid,
  .segments-section--teaser .segments-grid { grid-template-columns: 1fr; }
  .apex-contact-section .cta-inner { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .scorecard-body,
  .stat-card,
  .segment-card-img,
  .service-card-img {
    transition: none;
  }
}

/* ── Page header ── */
.page-header {
  margin: 0;
}
.page-header--banner .page-header__banner {
  position: relative;
  min-height: 280px;
  background-color: var(--apex-navy, #0d2244);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.page-header__banner--parallax {
  background-attachment: fixed;
}
@media (max-width: 782px) {
  .page-header__banner--parallax {
    background-attachment: scroll;
  }
}
.page-header__overlay {
  display: flex;
  align-items: flex-end;
  min-height: inherit;
  background: linear-gradient(180deg, rgba(13, 34, 68, 0.15) 0%, rgba(13, 34, 68, 0.75) 100%);
}
.page-header--banner .page-header__overlay {
  background: rgba(0, 0, 0, 0.55);
}
.page-header__inner {
  width: min(var(--apex-container, 1200px), calc(100% - 2 * var(--site-gutter, 1.25rem)));
  max-width: var(--apex-container, 1200px);
  margin: 0 auto;
  padding: 3rem 0 2rem;
  text-align: center;
}
.page-header--banner .page-header__title,
.page-header--banner .page-header__description,
.page-header--banner .page-header__eyebrow,
.page-header--banner .page-header__breadcrumbs {
  color: #fff;
}
.page-header__title {
  margin: 0 0 0.75rem;
  font-family: var(--apex-font-display, Georgia, serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15;
  font-weight: 700;
}
.page-header__description {
  margin: 0 auto 1rem;
  max-width: 42rem;
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.95;
}
.page-header__eyebrow {
  margin-bottom: 0.75rem;
}
.page-header--banner .page-header__eyebrow.section-eyebrow,
.page-header--simple .page-header__eyebrow.section-eyebrow {
  justify-content: center;
}
.page-header__breadcrumbs {
  font-size: 0.85rem;
  opacity: 0.9;
  text-align: center;
}
.page-header__breadcrumbs a {
  color: inherit;
  text-decoration: none;
}
.page-header__breadcrumbs a:hover {
  text-decoration: underline;
}
.page-header--simple {
  padding: 2.5rem 1.5rem 1.5rem;
  text-align: center;
  background: var(--apex-off-white, #f8fafc);
  border-bottom: 1px solid var(--apex-border, #d1d9e6);
}
.page-header--split {
  padding: 0;
}
.page-header--split .page-header__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}
.page-header__figure {
  margin: 0;
}
.page-header__img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
