/* =============================================================
 * Zurix – Editorial Drift
 * ============================================================= */

/* ── Color tokens ── */
.ed-drift {
  --ed-ink:    #1C1A18;
  --ed-ink-2:  #6A625A;
  --ed-ink-3:  #9A928A;
  --ed-rule:   #E2DDD6;
  --ed-accent: var(--e-global-color-accent, #DE5922);
  --ed-bg:     #FAF8F5;
  position: relative;
}

/* ── Swiper carousel ── */
.ed-drift__carousel {
  overflow-x: clip;
  overflow-y: visible;
  padding-top: 8px;
  padding-bottom: 40px;
}

/* Allow tiles to lift above the swiper boundary on hover */
.ed-drift__carousel .swiper-container {
  overflow-x: clip;
  overflow-y: visible;
}

/* ── Single Tile ── */
.ed-drift__tile {
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ed-drift__tile:hover {
  transform: translateY(-4px);
}

/* Image wrapper */
.ed-drift__img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  width: 100%;
}

.ed-drift__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ed-drift__tile:hover .ed-drift__img {
  transform: scale(1.04);
}

.ed-drift__img-placeholder {
  width: 100%;
  height: 100%;
  background-color: #C8BEB4;
}

/* Badge — top-left on image */
.ed-drift__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.4;
}
/* Counter — bottom-right on image */
.ed-drift__counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

/* ── Tile text body ── */
.ed-drift__tile-body {
  padding: 20px 16px 0 0;
}

.ed-drift__tile-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.ed-drift__tile-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ed-ink);
  transition: color 0.2s;
}

.ed-drift__tile:hover .ed-drift__tile-title {
  color: var(--ed-accent);
}

.ed-drift__tile-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ed-ink-2);
  margin: 0;
}

/* ── Footer ── */
.ed-drift__footer {
  max-width: var(--site-width);
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 20px 48px 48px;
}

/* Progress */
.ed-drift__progress-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  max-width: 420px;
}

.ed-drift__progress-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ed-ink-2);
  font-family: ui-monospace, 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.ed-drift__progress-total {
  color: var(--ed-ink-3);
}

.ed-drift__progress-track {
  flex: 1;
  height: 3px;
  background-color: rgba(154, 146, 138, 0.3);
  position: relative;
  border-radius: 2px;
}

.ed-drift__progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: var(--ed-ink);
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Navigation arrows */
.ed-drift__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ed-drift__nav-btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(28, 26, 24, 0.15);
  background: transparent;
  color: var(--ed-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
  padding: 0;
}

.ed-drift__nav-btn--next {
  background-color: var(--ed-ink);
  border-color: var(--ed-ink);
  color: #fff;
}

.ed-drift__nav-btn:hover {
  background-color: var(--ed-accent);
  border-color: var(--ed-accent);
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 767px) {
  /* Force tiles to a compact mobile width so ~1.2 tiles peek on screen */
  .ed-drift__tile {
    width: min(72vw, 260px) !important;
  }

  /* Let image height scale from aspect-ratio instead of the inline px value */
  .ed-drift__img-wrap {
    height: auto !important;
  }

  .ed-drift__tile-body {
    padding: 12px 8px 0 0;
  }

  .ed-drift__tile-title {
    font-size: 17px;
  }

  .ed-drift__tile-desc {
    font-size: 12px;
    line-height: 1.45;
  }

  .ed-drift__badge {
    font-size: 11px;
    padding: 4px 10px;
  }

  .ed-drift__carousel {
    padding-bottom: 24px;
  }

  .ed-drift__footer {
    padding: 14px 20px 32px;
    gap: 16px;
  }

  .ed-drift__progress-wrap {
    max-width: none;
  }

  .ed-drift__nav-btn {
    width: 36px;
    height: 36px;
  }
}
