/* 메인 CONSULTING SOLUTION — 탭 + 입체 카드 캐러셀 */

.sol {
  --sol-brand: #065482;
  --sol-w: clamp(200px, 21vw, 340px);
  --sol-ease: cubic-bezier(0.22, 1, 0.36, 1);
  margin-top: 150px;
  padding-bottom: 90px;
  text-align: center;
  overflow: hidden;
}

/* 기존 #solution 의 위 여백은 .sol 이 대신 가진다 */
.sol #solution {
  margin-top: 0;
  max-width: 100%;
}

/* ── 탭 ── */
.sol-tabs {
  display: flex;
  width: 1200px;
  max-width: calc(100% - 40px);
  margin: 46px auto 0;
  border-bottom: 2px solid #d5d5d5;
}

.sol-tab {
  flex: 1 1 0;
  margin: 0 0 -2px;
  padding: 16px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  font: inherit;
  font-size: 17px;
  font-weight: 400;
  color: #333;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.sol-tab[aria-selected="true"] {
  color: var(--sol-brand);
  font-weight: 600;
  border-bottom-color: var(--sol-brand);
}

.sol-tab:focus-visible {
  outline: 2px solid var(--sol-brand);
  outline-offset: -2px;
}

/* ── 카드 무대 ── */
.sol-stage {
  position: relative;
  height: calc(var(--sol-w) * 1.25);
  margin-top: 64px;
  perspective: 1600px;
  touch-action: pan-y;
}

.sol-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--sol-w);
  height: 100%;
  margin-left: calc(var(--sol-w) / -2);
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transform: translateX(var(--x, 0)) rotateY(var(--ry, 0deg)) scale(var(--s, 1));
  transition: transform 0.7s var(--sol-ease), opacity 0.4s ease;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
}

.sol-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.55);
  transition: filter 0.6s ease;
  pointer-events: none;
}

.sol-card[data-pos="0"] { z-index: 3; }
.sol-card[data-pos="0"] img { filter: none; }

.sol-card[data-pos="-1"] { --x: -106%; --ry: -7deg; --s: 0.88; z-index: 2; }
.sol-card[data-pos="1"]  { --x: 106%;  --ry: 7deg;  --s: 0.88; z-index: 2; }
.sol-card[data-pos="-2"] { --x: -198%; --ry: -14deg; --s: 0.78; z-index: 1; }
.sol-card[data-pos="2"]  { --x: 198%;  --ry: 14deg;  --s: 0.78; z-index: 1; }

/* 끝에서 반대쪽 끝으로 넘어가는 카드는 가로질러 날아가지 않고 사라졌다 나타난다 */
.sol-card.is-wrapping {
  opacity: 0;
  transition: none;
}

/* 가운데 카드의 제목·설명 */
.sol-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 90px 22px 30px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.sol-card[data-pos="0"] .sol-cap {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease 0.25s, transform 0.5s var(--sol-ease) 0.25s;
}

.sol-cap strong {
  display: block;
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
}

.sol-cap span {
  display: block;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  word-break: keep-all;
}

.sol-card:focus-visible {
  outline: 3px solid var(--sol-brand);
  outline-offset: 3px;
}

@media (hover: hover) {
  .sol-card:not([data-pos="0"]):hover img {
    filter: grayscale(1) brightness(0.75);
  }
}

/* ── 모바일 ── */
@media all and (max-width: 800px) {
  .sol {
    --sol-w: min(62vw, 300px);
    margin-top: 70px;
    padding-bottom: 60px;
  }

  .sol-tabs {
    max-width: 100%;
    margin-top: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .sol-tabs::-webkit-scrollbar { display: none; }

  .sol-tab {
    flex: 0 0 auto;
    padding: 13px 16px;
    font-size: 15px;
  }

  .sol-stage {
    margin-top: 36px;
  }

  .sol-card {
    border-radius: 22px;
  }

  .sol-card[data-pos="-2"],
  .sol-card[data-pos="2"] {
    opacity: 0;
    pointer-events: none;
  }

  .sol-cap {
    padding: 70px 16px 22px;
  }
  .sol-cap span {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sol-card,
  .sol-card img,
  .sol-cap,
  .sol-card[data-pos="0"] .sol-cap {
    transition-duration: 0.01s;
    transition-delay: 0s;
  }
}
