/* ==========================================================================
   Single Expertise subpage (Industrial, Places & Communities, …)
   Hero → Intro + image grid → Text + video → Approach → Selected work
   Reuses tokens, .container, .glass-card, .btn, .case-card / .large-link,
   and the shared .section-contact / footer components.
   ========================================================================== */

/* ── Hero ────────────────────────────────────────────────────────────────── */
.expertise-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  max-height: 1024px;
  overflow: hidden;
  background-color: var(--bg-dark);
}

/* Dark gradient at the bottom so the white text stays readable over the image */
.expertise-hero__gradient {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.55) 100%);
  pointer-events: none;
}

.expertise-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: var(--margin-primary);
}

.expertise-hero__meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Glass pill — e.g. "Industrial" (liquid-glass via .glass-card + --fx-filter) */
.expertise-hero__pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius-btn);   /* match the button next to it */
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  font-size: var(--body-lg);
  line-height: 34px;
  font-weight: 500;
  white-space: nowrap;
}

.expertise-hero__title {
  margin: 0;
  max-width: 1000px;
  font-size: var(--title-xl);
  line-height: var(--title-xl-lh);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-light);
}

/* ── Content sections wrapper ────────────────────────────────────────────── */
.expertise-sections {
  display: flex;
  flex-direction: column;
}

/* ── Text-grid: heading top-left, body bottom-right ──────────────────────── */
.expertise-text {
  padding-block: 100px;
}
/* The shell hosts the shared text widget (.text-grid, components/text-widget.css)
   and owns the vertical padding, so the widget's trailing space is zeroed.
   Everything here is a variable flip — the widget keeps its internals. */
.expertise-text .text-grid {
  --tw-row-gap: 100px;     /* wider heading -> body gap in these sections */
  --tw-pad-bottom: 0;
  --tw-para-gap: 1em;      /* follows the body size: 24/24/20 (lg), 20/20/18 (md) */
}

/* ── Image grid (asymmetric: tall left, two small right) ─────────────────── */
.expertise-grid__inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 390px;
  gap: 20px;
}
.expertise-grid__item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-image);
  background-color: #c4c4c4;
}
.expertise-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.expertise-grid__item--tall { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.expertise-grid__item--tr   { grid-column: 4;          grid-row: 1; }
.expertise-grid__item--br   { grid-column: 3;          grid-row: 2; }

/* ── Full-width video / media ────────────────────────────────────────────── */
.expertise-video__frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-image);
  aspect-ratio: 1340 / 754;
  background-color: #c4c4c4;
}
.expertise-video__media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Selected work ───────────────────────────────────────────────────────── */
.expertise-work {
  background-color: var(--bg-white);
  padding-block: 100px 60px;
  margin-top: 100px;
}
.expertise-work__head {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 60px;
}
.expertise-work__heading {
  grid-column: 1 / span 2;
  margin: 0;
  font-size: var(--title-md);
  line-height: var(--title-md-lh);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-title);
}
.expertise-work__intro {
  grid-column: 3 / span 2;
  margin: 0;
  align-self: center;
  font-size: var(--body-lg);
  line-height: var(--body-lg-lh);
  letter-spacing: -0.01em;
  color: var(--text-title);
}
.expertise-work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* ── Tablet ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .expertise-text { padding-block: 72px; }
  /* Body widening for this band: see the (min-width: 768px) block below. */
  .expertise-grid__inner { grid-auto-rows: 300px; }
  .expertise-grid__item--tall { grid-row: 1 / span 2; }
  .expertise-work__heading,
  .expertise-work__intro { grid-column: 1 / span 4; }
}

/* Tablet only — the body widens to columns 2–4 (the desktop right-half gets
   too narrow below 1024px). min-width keeps it out of the widget's mobile
   full-width rule. */
@media (min-width: 768px) and (max-width: 1024px) {
  .expertise-text .text-grid { --tw-body-col: 2 / -1; }
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .expertise-hero { min-height: 100svh; }

  .expertise-hero__inner {
  gap: 16px;
}

  /* .expertise-hero__title { font-size: var(--title-xl); line-height: var(--title-xl-lh); } */
  /* .expertise-hero__pill { font-size: var(--body-md); } */
      .case-hero-x__tag{
        font-weight: 400;
      }

  .expertise-text { padding-block: 40px; }
  /* Full width comes from the widget itself; this context only tightens the
     heading -> body gap to the Figma mobile spec (40px). */
  .expertise-text .text-grid { --tw-row-gap: 40px; }

  .expertise-grid__inner {
    display: flex;
    flex-direction: column;
    grid-auto-rows: auto;
  }
  .expertise-grid__item { height: auto; aspect-ratio: 4 / 3; }
  .expertise-grid__item--tall { aspect-ratio: 3 / 4; }

  .expertise-work { padding-block: 56px 40px; margin-top: 56px; }
  .expertise-work__head { display: flex; flex-direction: column; gap: 16px; margin-bottom: 40px; }
  .expertise-work__grid { grid-template-columns: 1fr; }
}
