/* ══════════════════════════════════════════════════
   Industries — Circular 3D gallery (carousel)
   Port of the React `CircularGallery` component:
   cards sit on a ring, ring spins on scroll + drag,
   idles with a slow auto-rotate.
   ══════════════════════════════════════════════════ */

.bh-ind-ring {
  background: #000;
  padding: clamp(16px, 2vw, 28px) 0 clamp(40px, 5vw, 64px);
  overflow: hidden;
  font-family: var(--font-family-primary, "Plus Jakarta Sans", sans-serif);
}

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

/* ── Title (matches the marquee section it replaces) ── */
.bh-ind-ring-title {
  font-size: var(--fs-h2, clamp(1.5rem, 1rem + 1.6667vw, 3rem));
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  margin: 0 0 clamp(24px, 3vw, 40px);
  background: linear-gradient(90deg, #ffffff 0%, #a8c0ff 40%, #ffffff 60%, #a8c0ff 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: bh-ind-ring-shimmer 4s ease-in-out infinite;
  position: relative;
  display: inline-block;
  width: 100%;
  padding-bottom: 20px;
}

.bh-ind-ring-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #4a90d9, transparent);
  border-radius: 2px;
}

/* Optional deck under the title (used by /industries — "AI Across the GCC").
   The title carries its own bottom padding for the underline rule, so the
   subtitle only needs to close the gap to the ring stage. */
.bh-ind-ring-subtitle {
  max-width: 640px;
  margin: -18px auto clamp(20px, 2.5vw, 32px);
  text-align: center;
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .72);
}

@keyframes bh-ind-ring-shimmer {
  0%   { background-position: 100% 0; }
  50%  { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}

/* ── Stage (the perspective viewport) ──
   Full-bleed on purpose: the cards either side of the front one have to reach
   the viewport edges, otherwise a 6-card ring reads as three islands. */
.bh-ind-ring-stage {
  --bh-ring-radius: 388px;
  width: 100%;
  --bh-ring-card-w: 340px;
  --bh-ring-card-h: 400px;
  position: relative;
  /* Perspective scales the front card up (~1.25x), so the stage needs
     headroom or the card bleeds over the controls below. */
  height: calc(var(--bh-ring-card-h) * 1.45);
  perspective: 1800px;
  perspective-origin: 50% 50%;
  touch-action: pan-y;
  cursor: grab;
  /* Ring internals stay LTR so RTL pages spin identically. */
  direction: ltr;
}

.bh-ind-ring-stage.is-dragging { cursor: grabbing; }

.bh-ind-ring-track {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  will-change: transform;
}

/* ── Card on the ring ── */
.bh-ind-ring-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--bh-ring-card-w);
  height: var(--bh-ring-card-h);
  margin-left: calc(var(--bh-ring-card-w) / -2);
  margin-top: calc(var(--bh-ring-card-h) / -2);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 28px;
  box-sizing: border-box;
  border-radius: 24px;
  border: 1px solid #3e3e3d;
  background: #191918;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .3s ease, opacity .3s linear;
}

.bh-ind-ring-card:hover { border-color: #6f7fa8; }

/* Cards facing away are dimmed by JS and must not swallow clicks. */
.bh-ind-ring-card[aria-hidden="true"] { pointer-events: none; }

/* Optional photo (data item `image`) — falls back to the plain dark card. */
.bh-ind-ring-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .92;
}

/* Scrim: keeps the label/desc readable over any photo, and keeps the card
   reading as part of the black section rather than a bright rectangle. */
.bh-ind-ring-card-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(0, 0, 0, .93) 0%, rgba(0, 0, 0, .72) 30%, rgba(0, 0, 0, .22) 62%, rgba(0, 0, 0, 0) 100%);
}

.bh-ind-ring-card.has-photo { background: #0d0d0c; }
.bh-ind-ring-card.has-photo:hover .bh-ind-ring-card-photo { opacity: 1; }
.bh-ind-ring-card-photo { transition: opacity .35s ease; }

/* Over a photo the bare white glyph loses contrast, so it gets a dark chip. */
.bh-ind-ring-card.has-photo .bh-ind-ring-card-icon {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(0, 0, 0, .62);
  backdrop-filter: blur(6px);
  box-sizing: content-box;
}

/* Full-strength glyph + a shadow so it reads against a bright photo. */
.bh-ind-ring-card.has-photo .bh-ind-ring-card-icon svg,
.bh-ind-ring-card.has-photo .bh-ind-ring-card-icon img {
  opacity: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .8));
}

.bh-ind-ring-card.has-photo .bh-ind-ring-card-icon img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, .8));
}

.bh-ind-ring-card-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ── Icon ── */
.bh-ind-ring-card-icon {
  position: relative;
  margin: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  align-self: flex-start;
  order: -1;
}

.bh-ind-ring-card-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: .85;
}

/* Inline `icon_svg` items are already white-stroked — sizing only. */
.bh-ind-ring-card-icon svg {
  width: 100%;
  height: 100%;
  opacity: .85;
}

/* ── Text ── */
.bh-ind-ring-card-label {
  position: relative;
  font-size: var(--fs-h5, clamp(1rem, .95rem + .35vw, 1.25rem));
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.bh-ind-ring-card-desc {
  position: relative;
  margin: 0;
  font-size: var(--fs-para-sm, .875rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, .68);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bh-ind-ring-card-more {
  position: relative;
  font-size: .8125rem;
  font-weight: 600;
  color: #a8c0ff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bh-ind-ring-card-more svg { width: 14px; height: 14px; }

/* ── Controls ── */
.bh-ind-ring-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: clamp(16px, 2vw, 28px);
}

.bh-ind-ring-nav {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #3e3e3d;
  background: #191918;
  color: #fff;
  cursor: pointer;
  transition: border-color .3s ease, background-color .3s ease;
}

.bh-ind-ring-nav:hover { border-color: #6f7fa8; background: #222221; }
.bh-ind-ring-nav svg { width: 18px; height: 18px; }

.bh-ind-ring-hint {
  font-size: .8125rem;
  color: rgba(255, 255, 255, .5);
}

/* ── CTA ── */
.bh-ind-ring-cta {
  display: flex;
  justify-content: center;
  margin-top: clamp(20px, 2.5vw, 32px);
}

.bh-ind-ring-cta a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid #3e3e3d;
  background: #191918;
  color: #fff;
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color .3s ease, background-color .3s ease;
}

.bh-ind-ring-cta a:hover { border-color: #6f7fa8; background: #222221; }

/* ══════════════════════════════════════════════════
   RESPONSIVE — radius is also recomputed in JS
   ══════════════════════════════════════════════════ */

@media (max-width: 1366px) {
  .bh-ind-ring-stage {
    --bh-ring-radius: 342px;
    --bh-ring-card-w: 300px;
    --bh-ring-card-h: 350px;
  }
  .bh-ind-ring-card { padding: 22px; border-radius: 20px; }
  .bh-ind-ring-card-icon { width: 44px; height: 44px; }
}

@media (max-width: 767px) {
  .bh-ind-ring-stage {
    --bh-ring-radius: 251px;
    --bh-ring-card-w: 220px;
    --bh-ring-card-h: 290px;
    perspective: 1100px;
    height: calc(var(--bh-ring-card-h) * 1.4);
  }
  .bh-ind-ring-card { padding: 18px; border-radius: 16px; gap: 8px; }
  .bh-ind-ring-card-icon { width: 36px; height: 36px; }
  .bh-ind-ring-card-desc { -webkit-line-clamp: 2; }
  .bh-ind-ring-hint { display: none; }
}

/* ── Reduced motion / no-JS: flat scrollable row, no 3D ── */
@media (prefers-reduced-motion: reduce) {
  .bh-ind-ring-stage {
    height: auto;
    perspective: none;
    cursor: auto;
  }
  .bh-ind-ring-track {
    position: static;
    transform: none !important;
    transform-style: flat;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .bh-ind-ring-card {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    margin: 0;
    flex: 0 0 auto;
  }
  .bh-ind-ring-card[aria-hidden="true"] { pointer-events: auto; }
  .bh-ind-ring-controls { display: none; }
}
