/* ══════════════════════════════════════════════════
   Technical Expertise — 3-column dark grid
   ══════════════════════════════════════════════════ */

.bh-expertise {
  background: #000;
  padding: clamp(60px, 8vw, 100px) 0;
  overflow: hidden;
  font-family: var(--font-family-primary, "Plus Jakarta Sans", sans-serif);
}

.bh-expertise-container {
  max-width: clamp(320px, 83.33vw, 1600px);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}

/* ── Heading ── */
.bh-expertise-heading-wrap {
  max-width: 900px;
  margin: 0 auto clamp(48px, 6vw, 80px);
  text-align: center;
}

.bh-expertise-heading {
  font-size: var(--fs-h2, clamp(1.5rem, 1rem + 1.6667vw, 3rem));
  font-weight: 500;
  color: #fff;
  line-height: 1.25;
  margin: 0;
}

/* Line-by-line reveal */
.bh-expertise-heading span {
  display: inline-block;
  overflow: hidden;
}

.bh-expertise-heading span span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bh-expertise-heading-wrap.bh-visible .bh-expertise-heading span span {
  transform: translateY(0);
}

/* ── Grid — 3 columns ── */
.bh-expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

/* ── Card ── */
.bh-expertise-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border: 1px solid transparent;
  border-radius: 24px;
  transition: border-color 0.3s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.bh-expertise-card:hover {
  border-color: #3e3e3d;
}

/* ── Card header ── */
.bh-expertise-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.bh-expertise-card-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  width: 100%;
}

/* ── Icon ── */
.bh-expertise-card-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.bh-expertise-card-icon img {
  max-width: 100%;
  height: auto;
}

/* ── Title with underline animation ── */
.bh-expertise-card-title {
  font-size: var(--fs-subtitle, clamp(1.125rem, 1rem + 0.625vw, 1.5rem));
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.bh-expertise-card-title span {
  position: relative;
  display: inline-block;
}

.bh-expertise-card-title span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #fff;
  transition: width 0.4s ease;
}

.bh-expertise-card:hover .bh-expertise-card-title span::after {
  width: 100%;
}

/* ── Description ── */
.bh-expertise-card-desc {
  font-size: var(--fs-base, clamp(1rem, 1rem + 0.104vw, 1.125rem));
  font-weight: 500;
  color: #888886;
  line-height: 1.6;
  margin: 0;
}

/* ── Mobile toggle (hidden on desktop) ── */
.bh-expertise-card-toggle {
  display: none;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #fff;
  transition: transform 0.3s ease;
}

.bh-expertise-card.bh-active .bh-expertise-card-toggle {
  transform: rotate(180deg);
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */

@media (max-width: 1680px) {
  .bh-expertise-grid {
    gap: 36px;
  }

  .bh-expertise-card {
    padding: 18px;
  }
}

@media (max-width: 1279px) {
  .bh-expertise-grid {
    gap: 24px;
  }

  .bh-expertise-card {
    padding: 14px;
  }
}

@media (max-width: 1024px) {
  .bh-expertise-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 767px) {
  .bh-expertise-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .bh-expertise-card {
    padding: 1rem 0;
    gap: 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #3e3e3d;
  }

  .bh-expertise-card:hover {
    border-color: #3e3e3d;
  }

  .bh-expertise-card:first-child {
    border-top: 1px solid #3e3e3d;
  }

  /* Collapse description by default */
  .bh-expertise-card-desc {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin: 0;
  }

  .bh-expertise-card.bh-active .bh-expertise-card-desc {
    max-height: 300px;
    opacity: 1;
    margin-top: 16px;
  }

  /* Show toggle chevron */
  .bh-expertise-card-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Rearrange header for mobile */
  .bh-expertise-card-content {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .bh-expertise-card-header {
    flex-direction: row;
    align-items: center;
  }

  /* Disable underline on mobile */
  .bh-expertise-card-title span::after {
    display: none;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .bh-expertise-heading span span {
    transform: none;
    transition: none;
  }

  .bh-expertise-card-title span::after {
    transition: none;
  }
}
