/**
 * Collection Index - Services / Technologies / Industry listing pages.
 *
 * Built on the theme's own language rather than a new one: the dark hero band,
 * the .a3-service-card treatment (white, 1px #E4E4E7, 22px radius, lift and an
 * arrow that turns orange on hover) and the 48px/-1.2px section heading.
 *
 * Scoped entirely under .a3-idx so nothing here can reach another template.
 * Loaded only on page-collection-index.php.
 */

.a3-idx {
  --idx-ink: #18181B;
  --idx-body: #52525B;
  --idx-line: #E4E4E7;
  --idx-soft: #FAFAFA;
  --idx-brand: #FF6900;
}

/* ==========================================================================
   HERO
   ========================================================================== */

.a3-idx-hero {
  position: relative;
  padding: 104px 0 88px;
  overflow: hidden;
  background:
    linear-gradient(rgba(6, 6, 8, .78), rgba(6, 6, 8, .86)),
    linear-gradient(120deg, #1b1b20 0%, #0d0d10 60%);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

/* With a banner set, the photograph sits behind a scrim that is dense on the
   left where the copy is and thin on the right, so the picture reads as a
   picture instead of a black rectangle. */
.a3-idx-hero--photo {
  background:
    linear-gradient(
      90deg,
      rgba(8, 8, 10, .95) 0%,
      rgba(8, 8, 10, .90) 38%,
      rgba(8, 8, 10, .62) 72%,
      rgba(8, 8, 10, .45) 100%
    ),
    var(--idx-banner) center / cover no-repeat,
    #0d0d10;
}

/* A hairline of brand colour along the bottom of the banner. */
.a3-idx-hero::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--idx-brand), rgba(255, 105, 0, 0));
}

/* A single warm glow off the right shoulder, so the band has some depth behind
   the copy without competing with it. Decorative only. */
.a3-idx-hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -8%;
  width: 46%;
  padding-bottom: 46%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 105, 0, .16) 0%, rgba(255, 105, 0, 0) 68%);
  pointer-events: none;
}

.a3-idx-hero--photo::after { display: none; }

.a3-idx-hero > .container {
  position: relative;
  z-index: 1;
}

.a3-idx-hero__inner {
  max-width: 780px;
}

.a3-idx-hero__eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 105, 0, .45);
  background: rgba(255, 105, 0, .10);
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #FFAE72;
}

.a3-idx-hero__heading {
  margin: 0 0 20px;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -1.4px;
  text-wrap: balance;
  color: #fff;
}

.a3-idx-hero__intro {
  margin: 0;
  max-width: 620px;
  font-size: 18px;
  line-height: 1.68;
  color: rgba(255, 255, 255, .76);
}

/* ==========================================================================
   FILTER BAR  - sticks under the site header while the grid scrolls
   ========================================================================== */

.a3-idx-bar {
  position: sticky;
  /* The site header is sticky at z-index 111 and is NOT a fixed height - it
     measures 81px wide-desktop, 99px on tablet and 92px below that. A wrong
     offset hides the top of this bar behind it, so collection-index.js writes
     the measured height into --a3-idx-hdr; these values are only the fallback
     for the no-JS case. */
  top: var(--a3-idx-hdr, 81px);
  z-index: 20;
  padding: 18px 0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--idx-line);
}

.a3-idx-bar__inner {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* The theme's own .screen-reader-text is not defined on these templates, so the
   search label carries its own visually-hidden rule rather than rendering as
   stray text above the field. */
.a3-idx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.a3-idx-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 320px;
  max-width: 100%;
}

.a3-idx-search__icon {
  position: absolute;
  left: 14px;
  color: #A1A1AA;
  pointer-events: none;
}

/* global.css styles every input at 16px/20px with a 4px radius - restated here
   rather than fought with !important */
.a3-idx-search input[type="search"] {
  width: 100%;
  height: 46px;
  padding: 0 38px 0 42px;
  border: 1px solid var(--idx-line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  color: var(--idx-ink);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.a3-idx-search input[type="search"]:focus {
  outline: none;
  border-color: var(--idx-brand);
  box-shadow: 0 0 0 3px rgba(255, 105, 0, .14);
}

.a3-idx-search input[type="search"]::-webkit-search-cancel-button { display: none; }

/* global.css gives every <button> 56px min-height, a border and a background */
.a3-idx-search__clear {
  position: absolute;
  right: 10px;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px !important;
  background: #F4F4F5;
  color: #52525B;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.a3-idx-search__clear:hover { background: #E4E4E7; }

/* One line, always. Wrapping made the bar two rows deep on a phone and pushed
   the grid down; scrolling keeps it a single row at any width. */
.a3-idx-letters {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* the last letter fades out rather than being cut, so there is a visible cue
     that the row continues */
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
          mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent 100%);
}

/* no mask once everything fits - a fade over a full row looks like a bug */
.a3-idx-letters.is-complete {
  -webkit-mask-image: none;
          mask-image: none;
}

.a3-idx-letters::-webkit-scrollbar { display: none; }

.a3-idx-letter { flex: 0 0 auto; }

.a3-idx-letter {
  min-height: 0;
  min-width: 30px;
  padding: 5px 7px;
  border: 0;
  border-radius: 6px !important;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .2px;
  color: #71717A;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.a3-idx-letter:hover { background: #F4F4F5; color: var(--idx-ink); }

.a3-idx-letter.is-active {
  background: var(--idx-ink);
  color: #fff;
}

.a3-idx-bar__result {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--idx-body);
}

/* ==========================================================================
   GRID
   ========================================================================== */

.a3-idx-grid-wrap {
  padding: 76px 0 110px;
  background: var(--idx-soft);
}

.a3-idx-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 40px;
  align-items: start;
}

.a3-idx-body--nosidebar {
  grid-template-columns: minmax(0, 1fr);
}

.a3-idx-main {
  min-width: 0;
}

/* Cards per row is an editor choice (idx_columns); 2 is the default. */
.a3-idx-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.a3-idx-grid[data-cols="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ---- sidebar ----
   The card is styled by blog-article.css; everything here is placement. The
   wrapper carries .a3-blog-article only to bring that file's colour tokens
   into scope, so its white page background has to be undone. */
.a3-idx-side.a3-blog-article {
  background: transparent;
  min-width: 0;
  /* .a3-idx-body aligns its items to the start so the card does not stretch;
     the column itself still has to run the full height of the row, or the
     sticky inner has nothing to travel inside and scrolls straight off. */
  align-self: stretch;
}

.a3-idx-side__inner {
  position: sticky;
  /* clears the site header AND the sticky filter bar above it; both are
     measured by collection-index.js */
  top: calc(var(--a3-idx-stick, 180px) + 24px);
}

.a3-idx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--idx-line);
  border-radius: 22px;
  text-decoration: none;
  color: var(--idx-ink);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

/* ---- media band ---- */

.a3-idx-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #F4F4F5;
  border-bottom: 1px solid var(--idx-line);
}

.a3-idx-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

.a3-idx-card:hover .a3-idx-card__img { transform: scale(1.045); }

/* The panel a card falls back to when its page has no picture of its own.
   Four tones, picked from the slug, so the grid has some variety without
   pretending each one is a photograph. */
/* Kept light: on the Technologies list most pages have no picture, and a
   hundred dark blocks turn the grid into a wall. Four tints, so the placeholders
   vary without pretending to be photographs. The glyph is the same on every one
   on purpose - it is a convention for "no image", not a per-page mark. */
.a3-idx-card__media--panel {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F6F6F7 0%, #E9E9EC 100%);
}

.a3-idx-card__media--panel[data-tone="1"] { background: linear-gradient(135deg, #FFF6EF 0%, #FFE7D6 100%); }
.a3-idx-card__media--panel[data-tone="2"] { background: linear-gradient(135deg, #F1F5F9 0%, #E2E9F1 100%); }
.a3-idx-card__media--panel[data-tone="3"] { background: linear-gradient(135deg, #F6F4EF 0%, #EBE6DC 100%); }

/* A faint grid, so the panel reads as a designed surface rather than a flat
   block of colour. */
.a3-idx-card__media--panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(24, 24, 27, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 24, 27, .045) 1px, transparent 1px);
  background-size: 26px 26px;
}

.a3-idx-card__glyph {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  color: rgba(24, 24, 27, .20);
  transition: color .35s ease, transform .35s ease;
}

.a3-idx-card:hover .a3-idx-card__glyph {
  color: rgba(255, 105, 0, .58);
  transform: translateY(-2px);
}

.a3-idx-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 20px;
}

.a3-idx-grid[data-cols="3"] .a3-idx-card__body { padding: 20px 20px 18px; }
.a3-idx-grid[data-cols="3"] .a3-idx-card__title { font-size: 17px; }
.a3-idx-grid[data-cols="3"] .a3-idx-card__text { font-size: 13.5px; }

/* A brand rule that draws itself across the top of the card on hover. */
.a3-idx-card::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--idx-brand), #FFA766);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s ease;
}

.a3-idx-card:hover::before,
.a3-idx-card:focus-visible::before { transform: scaleX(1); }

.a3-idx-card:hover,
.a3-idx-card:focus-visible {
  transform: translateY(-6px);
  border-color: #D4D4D8;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .08);
  color: var(--idx-ink);
  outline: none;
}

.a3-idx-card:focus-visible { box-shadow: 0 0 0 3px rgba(255, 105, 0, .35); }

.a3-idx-card__arrow {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #3F3F46;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
  transition: color .3s ease, background .3s ease, transform .3s ease;
}

.a3-idx-card:hover .a3-idx-card__arrow {
  background: var(--idx-brand);
  color: #fff;
  transform: translate(2px, -2px);
}

.a3-idx-card__title {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -.3px;
  color: var(--idx-ink);
}

.a3-idx-card__text {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.62;
  color: var(--idx-body);
}

/* The page's own Technology Capabilities tab names. Real content, so a card
   says what is actually behind it rather than repeating its title. */
.a3-idx-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.a3-idx-chip {
  padding: 4px 10px;
  border: 1px solid #EFEFF1;
  border-radius: 999px;
  background: #FAFAFA;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: .1px;
  color: #52525B;
  transition: border-color .3s ease, background .3s ease;
}

.a3-idx-card:hover .a3-idx-chip {
  border-color: #FFE0C7;
  background: #FFF7F1;
}

.a3-idx-chip--more {
  background: transparent;
  border-style: dashed;
  color: #A1A1AA;
}

.a3-idx-card__cta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #F4F4F5;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #A1A1AA;
  transition: color .3s ease, transform .3s ease;
}

.a3-idx-card:hover .a3-idx-card__cta {
  color: var(--idx-brand);
  transform: translateX(3px);
}

.a3-idx-card[hidden] { display: none; }

.a3-idx-empty {
  margin: 40px 0 0;
  text-align: center;
  font-size: 16px;
  color: var(--idx-body);
}

/* ==========================================================================
   CLOSING CTA
   ========================================================================== */

/* A contained panel on the grid's own ground, not a full-bleed strip: same
   22px radius as the cards, so the foot of the page belongs to the rest of it. */
.a3-idx-cta {
  padding: 0 0 96px;
  background: var(--idx-soft);
}

.a3-idx-cta__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 48px;
  padding: 52px 56px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(120deg, #1b1b20 0%, #0d0d10 62%);
}

/* the same faint grid the placeholder cards carry, and the same warm glow as
   the hero - three surfaces, one vocabulary */
.a3-idx-cta__panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 34px 34px;
}

.a3-idx-cta__panel::after {
  content: "";
  position: absolute;
  top: -70%;
  right: -6%;
  width: 42%;
  padding-bottom: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 105, 0, .22) 0%, rgba(255, 105, 0, 0) 66%);
  pointer-events: none;
}

.a3-idx-cta__text,
.a3-idx-cta__actions {
  position: relative;
  z-index: 1;
}

.a3-idx-cta__heading {
  margin: 0 0 12px;
  max-width: 22ch;
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -.9px;
  text-wrap: balance;
  color: #fff;
}

.a3-idx-cta__copy {
  margin: 0;
  max-width: 52ch;
  font-size: 15.5px;
  line-height: 1.68;
  color: rgba(255, 255, 255, .68);
}

.a3-idx-cta__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.a3-idx-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  background: var(--idx-brand);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  text-decoration: none;
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}

.a3-idx-cta__btn svg { transition: transform .25s ease; }

.a3-idx-cta__btn:hover {
  background: #E45F00;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(255, 105, 0, .28);
}

.a3-idx-cta__btn:hover svg { transform: translateX(3px); }

/* The other collections. Found, not hand-written - see the template. */
.a3-idx-cta__also {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .45);
}

.a3-idx-cta__also a {
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .22);
  transition: color .2s ease, border-color .2s ease;
}

.a3-idx-cta__also a:hover {
  color: var(--idx-brand);
  border-color: var(--idx-brand);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1199px) {
  .a3-idx-bar { top: var(--a3-idx-hdr, 99px); }

  /* Below this the sidebar cannot hold its 348px and leave the cards a usable
     two columns, so it drops under the grid and the grid takes the full width. */
  .a3-idx-body,
  .a3-idx-body--nosidebar { grid-template-columns: minmax(0, 1fr); }
  /* two across whatever the desktop setting is - three in this width makes
     the summary unreadable */
  .a3-idx-grid,
  .a3-idx-grid[data-cols="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .a3-idx-grid[data-cols="3"] .a3-idx-card__body { padding: 22px 24px 20px; }
  .a3-idx-side__inner { position: static; max-width: 420px; margin-inline: auto; }

  /* the button no longer has room beside the copy */
  .a3-idx-cta__panel {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding: 44px 40px;
  }
  .a3-idx-cta__heading { max-width: 26ch; }
}

@media (max-width: 991px) {
  .a3-idx-hero { padding: 80px 0 68px; }
  .a3-idx-bar { top: var(--a3-idx-hdr, 92px); }
  .a3-idx-grid-wrap { padding: 56px 0 84px; }
}

@media (max-width: 767px) {
  .a3-idx-hero { padding: 60px 0 52px; }

  /* The copy runs the full width here, so the left-to-right scrim would leave
     the last words of every line sitting on a bright part of the photo. Go
     top-to-bottom and denser instead. */
  .a3-idx-hero--photo {
    background:
      linear-gradient(
        180deg,
        rgba(8, 8, 10, .93) 0%,
        rgba(8, 8, 10, .90) 55%,
        rgba(8, 8, 10, .93) 100%
      ),
      var(--idx-banner) center / cover no-repeat,
      #0d0d10;
  }

  .a3-idx-hero__intro { font-size: 16px; }
  .a3-idx-bar {
    position: static;            /* a sticky bar eats too much of a phone screen */
    padding: 16px 0;
  }
  .a3-idx-bar__inner { gap: 14px; }
  .a3-idx-search { flex: 1 1 100%; }
  .a3-idx-letters { gap: 1px; }
  .a3-idx-letter { min-width: 26px; padding: 5px 5px; font-size: 12px; }
  /* Two per row on a phone as well. At ~166px a card cannot carry the summary
     AND the chips AND a footer, so it keeps the picture, the name and two lines
     of copy - which is what a tile at this size is for. */
  .a3-idx-grid,
  .a3-idx-grid[data-cols="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .a3-idx-body { gap: 32px; }
  .a3-idx-side__inner { max-width: none; }

  .a3-idx-card { border-radius: 16px; }
  .a3-idx-card__body,
  .a3-idx-grid[data-cols="3"] .a3-idx-card__body { padding: 12px 13px 14px; }
  .a3-idx-card__arrow { top: 8px; right: 8px; width: 26px; height: 26px; }
  .a3-idx-card__arrow svg { width: 13px; height: 13px; }
  .a3-idx-card__glyph { width: 30px; height: 30px; }

  .a3-idx-card__title,
  .a3-idx-grid[data-cols="3"] .a3-idx-card__title {
    font-size: 14px;
    line-height: 1.32;
    margin-bottom: 6px;
    /* three lines, then an ellipsis - a long service name must not push every
       card in the row taller than the tile it sits in */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .a3-idx-card__text,
  .a3-idx-grid[data-cols="3"] .a3-idx-card__text {
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .a3-idx-card__chips,
  .a3-idx-card__cta { display: none; }
  .a3-idx-cta { padding: 0 0 64px; }
  .a3-idx-cta__panel { padding: 32px 24px; border-radius: 18px; gap: 24px; }
  .a3-idx-cta__heading { max-width: none; letter-spacing: -.5px; }
  .a3-idx-cta__copy { font-size: 14.5px; }
  .a3-idx-cta__actions { align-items: stretch; }
  .a3-idx-cta__btn { width: 100%; min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  .a3-idx-card,
  .a3-idx-card::before,
  .a3-idx-card__img,
  .a3-idx-card__glyph,
  .a3-idx-card__arrow,
  .a3-idx-card__cta,
  .a3-idx-chip,
  .a3-idx-cta__btn,
  .a3-idx-cta__btn svg { transition: none; }
  .a3-idx-card:hover { transform: none; }
  .a3-idx-card:hover .a3-idx-card__img { transform: none; }
}
