/* ─────────────────────────────────────────────────────────────────────
   SURGE — circular-tiles
   8 round category tiles in a horizontal row below the hero.
   Desktop (≥769): 8-column grid, ~120px diameter.
   Mobile (≤768):  horizontal-scroll carousel (no wrap), ~88px diameter
                   on tablet, ~80px on phone. Scrollbar hidden.
   ───────────────────────────────────────────────────────────────────── */

.sg-circular-tiles {
  background: var(--color-bg);
}

/* ── Section head — title + subtitle on the left, view-all on the right ─ */
.sg-circular-tiles__head {
  align-items: flex-end;
}
.sg-circular-tiles__head-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sg-circular-tiles__title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text);
  margin: 0;
  line-height: 1.1;
}
.sg-circular-tiles__subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: var(--leading-base);
}
.sg-circular-tiles__view-all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  text-decoration: none;
  transition: color var(--transition-fast);
}
.sg-circular-tiles__view-all:hover { color: var(--color-text); }
.sg-circular-tiles__view-all:hover .sg-circular-tiles__arrow {
  transform: translateX(3px);
}
.sg-circular-tiles__arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
  font-family: var(--font-body);
}

/* ── Row — 8-column grid on desktop ──────────────────────────────────── */
.sg-circular-tiles__row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--space-5);
  align-items: start;
}

/* ── Tile ────────────────────────────────────────────────────────────── */
.sg-circular-tiles__tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  text-align: center;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-body);
}

.sg-circular-tiles__circle {
  position: relative;
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px rgba(15, 15, 15, 0.06);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}
.sg-circular-tiles__tile:hover .sg-circular-tiles__circle {
  box-shadow: inset 0 0 0 1px rgba(15, 15, 15, 0.22);
  transform: translateY(-2px);
}
.sg-circular-tiles__circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.sg-circular-tiles__circle-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-2) 100%);
}

.sg-circular-tiles__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.2;
  letter-spacing: 0;
}

/* ── Tablet (≤1024) ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sg-circular-tiles__row { gap: var(--space-4); }
  .sg-circular-tiles__circle { width: 96px; height: 96px; }
}

/* ── Mobile (≤768): horizontal-scroll carousel ──────────────────────── */
@media (max-width: 768px) {
  .sg-circular-tiles__head {
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-3);
  }
  .sg-circular-tiles__title { font-size: var(--text-2xl); }
  .sg-circular-tiles__subtitle { font-size: var(--text-xs); }
  .sg-circular-tiles__view-all { font-size: var(--text-xs); }

  .sg-circular-tiles__row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--space-4);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Bleed the carousel to the screen edges so tiles align with the
       container padding but scroll past it. */
    margin-inline: calc(-1 * var(--container-pad-mobile));
    padding-inline: var(--container-pad-mobile);
    padding-bottom: 4px;
    /* Hide scrollbar */
    scrollbar-width: none;
  }
  .sg-circular-tiles__row::-webkit-scrollbar { display: none; }

  .sg-circular-tiles__tile {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 80px;
    gap: var(--space-2);
  }
  .sg-circular-tiles__circle { width: 80px; height: 80px; }
  .sg-circular-tiles__label { font-size: var(--text-xs); }
}

/* ── Very narrow (≤375) — keep tiles legible ─────────────────────────── */
@media (max-width: 375px) {
  .sg-circular-tiles__tile { width: 76px; }
  .sg-circular-tiles__circle { width: 76px; height: 76px; }
}
