/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── CSS Variables ── */
:root {
  --dgx-dark:   #8B0000;
  --dgx-mid:    #B22222;
  --dgx-light:  #E25822;
  --dgx-accent: #FF7F50;
  --dgx-grad:   linear-gradient(135deg, #8B0000, #E25822, #FF7F50);
  --dgx-cream:  #FDF8F3;
  --dgx-ink:    #1A0A0A;
  --dgx-muted:  #7A5050;
}

/* ── Keyframes ── */
@keyframes gradShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}
@keyframes floatY {
  0%, 100% { transform: translate(-50%, -50%); }
  50%       { transform: translate(-50%, calc(-50% - 6px)); }
}
@keyframes lineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* ── Section wrapper ── */
.dgx-section {
  width: 100%;
  background: var(--dgx-cream);
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(139,0,0,.08);
  margin: 0;
  padding: 60px 0;
}

/* ── Header ── */
.dgx-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 3.5rem 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.dgx-eyebrow {
  font-size: .6rem;
  font-weight: 300;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--dgx-mid);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.dgx-eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--dgx-mid);
  flex-shrink: 0;
}

.dgx-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 4.5vw, 62px);
  font-weight: 700;
  line-height: .93;
  letter-spacing: -2px;
  color: var(--dgx-ink);
}
.dgx-headline em {
  font-style: italic;
  font-weight: 300;
  background: linear-gradient(90deg, #8B0000 0%, #E25822 40%, #FF7F50 70%, #B22222 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradShift 5s ease-in-out infinite;
}

.dgx-header-right {
  flex-shrink: 0;
}
.dgx-sub {
  font-size: .78rem;
  font-weight: 300;
  line-height: 1.9;
  color: var(--dgx-muted);
  max-width: 300px;
  text-align: right;
}
.dgx-rule {
  width: 40px;
  height: 1.5px;
  background: var(--dgx-grad);
  margin: 10px 0 0 auto;
  transform-origin: right;
  animation: lineGrow .8s ease forwards;
}

/* ── Scroll area ── */
.dgx-scroll-area {
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  padding: 0.5rem 3.5rem 2.5rem;
}
.dgx-scroll-area::-webkit-scrollbar { display: none; }
.dgx-scroll-area.grabbing { cursor: grabbing; }

.dgx-track {
  display: flex;
  gap: 16px;
  width: max-content;
}

/* ── Card ── */
.dgx-card {
  flex-shrink: 0;
  width: 220px;
  background: #fff;
  border-radius: 4px;
  border: 1px solid rgba(139,0,0,.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 16px rgba(139,0,0,.05);
  transition: box-shadow .3s, border-color .3s, transform .25s;
  cursor: pointer;
  position: relative;
}
.dgx-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,.5) 0%, transparent 55%);
  z-index: 1;
  pointer-events: none;
}
.dgx-card:hover {
  border-color: rgba(139,0,0,.22);
  box-shadow: 0 6px 30px rgba(139,0,0,.12);
  transform: translateY(-4px);
}

.dgx-card-bar {
  width: 100%;
  height: 3px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.dgx-card-visual {
  width: 100%;
  height: 110px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fdf5f5;
  position: relative;
  overflow: hidden;
}
.dgx-card-visual::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 28px;
  background: linear-gradient(to bottom, transparent, #fff);
}

.dgx-circle-bg {
  position: absolute;
  width: 88px; height: 88px;
  border-radius: 50%;
  top: 50%; left: 50%;
  animation: floatY 4s ease-in-out infinite;
}
.dgx-circle-ring {
  position: absolute;
  width: 114px; height: 114px;
  border-radius: 50%;
  border: 1px solid;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  opacity: .13;
}
.dgx-icon-wrap {
  position: relative;
  z-index: 2;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dgx-icon-wrap svg {
  width: 32px; height: 32px;
}

.dgx-card-body {
  padding: 14px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 2;
}
.dgx-card-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 1px;
  color: rgba(139,0,0,.2);
  margin-bottom: 4px;
}
.dgx-card-cat {
  font-size: .52rem;
  font-weight: 400;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  margin-bottom: 7px;
}
.dgx-card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.3px;
  margin-bottom: 10px;
}
.dgx-card-desc {
  font-size: .67rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--dgx-muted);
  flex: 1;
}
.dgx-card-foot {
  display: flex;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(139,0,0,.07);
}
.dgx-card-link {
  font-size: .56rem;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dgx-arrow {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid;
  flex-shrink: 0;
  transition: transform .2s ease;
}
.dgx-card:hover .dgx-arrow { transform: translateX(3px); }

/* ── Per-card colour themes ── */
.dgx-card:nth-child(1) .dgx-card-bar   { background: linear-gradient(90deg, #8B0000, #B22222); }
.dgx-card:nth-child(1) .dgx-circle-bg  { background: radial-gradient(circle, rgba(139,0,0,.12), rgba(139,0,0,.01)); }
.dgx-card:nth-child(1) .dgx-circle-ring{ border-color: #8B0000; }
.dgx-card:nth-child(1) .dgx-icon-wrap svg { stroke: #8B0000; }
.dgx-card:nth-child(1) .dgx-card-cat   { color: rgba(139,0,0,.5); }
.dgx-card:nth-child(1) .dgx-card-title { color: #5a0000; }
.dgx-card:nth-child(1) .dgx-card-link  { color: #8B0000; }
.dgx-card:nth-child(1) .dgx-arrow      { border-color: rgba(139,0,0,.22); background: rgba(139,0,0,.04); color: #8B0000; }

.dgx-card:nth-child(2) .dgx-card-bar   { background: linear-gradient(90deg, #9e1c1c, #B22222); }
.dgx-card:nth-child(2) .dgx-circle-bg  { background: radial-gradient(circle, rgba(178,34,34,.12), rgba(178,34,34,.01)); }
.dgx-card:nth-child(2) .dgx-circle-ring{ border-color: #B22222; }
.dgx-card:nth-child(2) .dgx-icon-wrap svg { stroke: #B22222; }
.dgx-card:nth-child(2) .dgx-card-cat   { color: rgba(178,34,34,.5); }
.dgx-card:nth-child(2) .dgx-card-title { color: #6e1010; }
.dgx-card:nth-child(2) .dgx-card-link  { color: #B22222; }
.dgx-card:nth-child(2) .dgx-arrow      { border-color: rgba(178,34,34,.22); background: rgba(178,34,34,.04); color: #B22222; }

.dgx-card:nth-child(3) .dgx-card-bar   { background: linear-gradient(90deg, #B22222, #E25822); }
.dgx-card:nth-child(3) .dgx-circle-bg  { background: radial-gradient(circle, rgba(226,88,34,.12), rgba(226,88,34,.01)); }
.dgx-card:nth-child(3) .dgx-circle-ring{ border-color: #E25822; }
.dgx-card:nth-child(3) .dgx-icon-wrap svg { stroke: #C84B18; }
.dgx-card:nth-child(3) .dgx-card-cat   { color: rgba(226,88,34,.55); }
.dgx-card:nth-child(3) .dgx-card-title { color: #7a2a08; }
.dgx-card:nth-child(3) .dgx-card-link  { color: #C84B18; }
.dgx-card:nth-child(3) .dgx-arrow      { border-color: rgba(226,88,34,.22); background: rgba(226,88,34,.05); color: #C84B18; }

.dgx-card:nth-child(4) .dgx-card-bar   { background: linear-gradient(90deg, #E25822, #FF7F50); }
.dgx-card:nth-child(4) .dgx-circle-bg  { background: radial-gradient(circle, rgba(255,127,80,.14), rgba(255,127,80,.01)); }
.dgx-card:nth-child(4) .dgx-circle-ring{ border-color: #FF7F50; }
.dgx-card:nth-child(4) .dgx-icon-wrap svg { stroke: #c9551e; }
.dgx-card:nth-child(4) .dgx-card-cat   { color: rgba(226,88,34,.55); }
.dgx-card:nth-child(4) .dgx-card-title { color: #7a3010; }
.dgx-card:nth-child(4) .dgx-card-link  { color: #c9551e; }
.dgx-card:nth-child(4) .dgx-arrow      { border-color: rgba(255,127,80,.28); background: rgba(255,127,80,.06); color: #c9551e; }

.dgx-card:nth-child(5) .dgx-card-bar   { background: linear-gradient(90deg, #8B0000, #E25822, #FF7F50); }
.dgx-card:nth-child(5) .dgx-circle-bg  { background: radial-gradient(circle, rgba(255,127,80,.12), rgba(139,0,0,.04)); }
.dgx-card:nth-child(5) .dgx-circle-ring{ border-color: #E25822; }
.dgx-card:nth-child(5) .dgx-icon-wrap svg { stroke: #8B0000; }
.dgx-card:nth-child(5) .dgx-card-cat   { color: rgba(139,0,0,.5); }
.dgx-card:nth-child(5) .dgx-card-title { color: #5a0000; }
.dgx-card:nth-child(5) .dgx-card-link  { color: #8B0000; }
.dgx-card:nth-child(5) .dgx-arrow      { border-color: rgba(139,0,0,.2); background: rgba(139,0,0,.04); color: #8B0000; }

/* ── Footer bar ── */
.dgx-footer {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3.5rem 2rem;
}
.dgx-drag-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .55rem;
  font-weight: 300;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(139,0,0,.35);
}
.dgx-drag-hint-line {
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(139,0,0,.35), transparent);
}

.dgx-dots {
  display: flex;
  gap: 6px;
}
.dgx-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(139,0,0,.18);
  transition: all .3s ease;
}
.dgx-dot.active {
  width: 20px;
  border-radius: 3px;
  background: var(--dgx-mid);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .dgx-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 3rem 1.5rem 1.5rem;
  }
  .dgx-sub { text-align: left; }
  .dgx-rule { margin: 10px 0 0; }
  .dgx-scroll-area { padding: 0.5rem 1.5rem 2rem; }
  .dgx-footer { padding: 0 1.5rem 1.5rem; }
  .dgx-card { width: 190px; }
}
