/* ============================================================
   business.css
   사업영역 sub-pages (사업영역 카드 → 자세히 보기)
   - ai.html, digital_twin.html, gis_engineering.html
   - 슬라이더 + 카드 + sub-block + tag-row 패턴
   ============================================================ */

/* ===== Page heading override (smaller than page-common default) ===== */
.page-head {
  text-align: center;
  margin: 24px auto 8px;
  padding: 0 20px;
  max-width: none;
}

.page-head h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0;
  letter-spacing: -0.5px;
}

.page-head .lead {
  margin: 12px auto 0;
  color: var(--text-soft);
  font-size: clamp(14px, 1.6vw, 17px);
  max-width: none;
}

/* ===== Slider ===== */
.slider {
  position: relative;
  max-width: 1480px;
  margin: 32px auto 16px;
  padding: 0 24px;
}

.slider-viewport {
  overflow: hidden;
  border-radius: 16px;
}

.slider-track {
  display: flex;
  transition: transform 480ms cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}

/* ===== Card ===== */
.card {
  flex: 0 0 100%;
  min-width: 0;
  background: #f8faf6;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 44px 48px;
  box-sizing: border-box;
  box-shadow: 0 4px 18px rgba(16, 62, 48, .04);
  display: flex;
  flex-direction: column;
}

.card > .card-head { flex-shrink: 0; }
.card > .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.card > .sub-grid { flex: 1 1 auto; align-content: stretch; }
.card > .feature-grid { flex-shrink: 0; }

.card-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--brand-dark);
  padding-bottom: 16px;
}

.card-head .row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.card-index {
  font-family: "SBAggroM", "Noto Sans KR", sans-serif;
  font-size: 20px;
  color: var(--brand-accent);
  font-weight: 700;
}

.card-title {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0;
  letter-spacing: -0.5px;
}

.card-subtitle {
  color: var(--text-soft);
  font-size: 16px;
  letter-spacing: 0.4px;
}

.card-quote {
  color: var(--text-soft);
  font-size: clamp(14px, 1.4vw, 17px);
  font-style: italic;
  letter-spacing: -0.2px;
  margin: 0;
}

.card-quote::before {
  content: "“ ";
  color: var(--brand-accent);
  font-weight: 700;
}

.card-quote::after {
  content: " ”";
  color: var(--brand-accent);
  font-weight: 700;
}

/* ===== Layouts (dt-grid-2 / dt-hero / dt-hero-side) ===== */
.dt-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
  flex: 1;
}

.dt-hero {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.dt-hero-img {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(16, 62, 48, .06);
  border: 1px solid var(--line);
  max-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dt-hero-img img {
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: contain;
  display: block;
}

.dt-hero-blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  flex: 1;
}

.dt-hero.dt-hero-side {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 26px;
}

.dt-hero.dt-hero-side .dt-hero-img {
  max-height: none;
  min-height: 320px;
}

.dt-hero.dt-hero-side .dt-hero-img img {
  max-height: none;
  height: 100%;
  object-fit: cover;
}

.dt-hero.dt-hero-side .dt-hero-blocks {
  grid-template-columns: 1fr;
  gap: 16px;
}

/* ===== Sub-grid (gis_engineering) ===== */
.sub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.sub-grid.cols-1 { grid-template-columns: 1fr; }
.sub-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.stack-col { display: flex; flex-direction: column; gap: 14px; height: 100%; }
.stack-col > .sub-block { flex: 1 1 0; }

/* ===== Sub-block ===== */
.sub-block {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}

.sub-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(16, 62, 48, .12);
}

.sub-block .img-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef3eb;
}

/* gis_engineering uses 1:1 by default (override) */
.sub-grid .sub-block .img-wrap { aspect-ratio: 1 / 1; }
.sub-block .img-wrap.wide { aspect-ratio: 16 / 10; }

.sub-block .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sub-block .body {
  padding: 22px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sub-block.text-only .body { justify-content: center; }

.sub-block h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.sub-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.6;
}

.sub-block ul li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 6px;
}

.sub-block ul li:last-child { margin-bottom: 0; }

.sub-block ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-accent);
}

/* ===== Tag chips ===== */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tag {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.2px;
  border: 1px solid rgba(16, 62, 48, .12);
}

/* ===== Feature grid (gis_engineering 4-box bottom row) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 28px;
}

.feature-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature-box h4 {
  background: var(--brand-dark);
  color: #fff;
  margin: 0;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.3px;
}

.feature-box ul {
  list-style: none;
  padding: 14px 16px 16px;
  margin: 0;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.55;
}

.feature-box li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 7px;
}

.feature-box li:last-child { margin-bottom: 0; }

.feature-box li::before {
  content: "❖";
  position: absolute;
  left: 0; top: 0;
  color: var(--brand-accent);
  font-size: 12px;
}

/* ===== Slider controls ===== */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  border: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(16, 62, 48, .12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
  z-index: 10;
}

.slider-nav:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.slider-nav:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.slider-nav.prev { left: -8px; }
.slider-nav.next { right: -8px; }
.slider-nav svg { width: 22px; height: 22px; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5d1;
  border: none;
  cursor: pointer;
  transition: background .25s ease, transform .2s ease;
}

.slider-dot.active {
  background: var(--brand-dark);
  transform: scale(1.2);
}

.slider-counter {
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 0.5px;
}

.slider-counter strong {
  color: var(--brand-dark);
  font-weight: 700;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .dt-grid-2 { grid-template-columns: 1fr; gap: 20px; }
  .dt-hero-blocks { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .dt-hero-img { max-height: 280px; }
  .dt-hero-img img { max-height: 280px; }
  .card { padding: 28px 24px 32px; }
  .sub-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .dt-hero-blocks { grid-template-columns: 1fr; }
  .card { padding: 22px 18px 26px; border-radius: 12px; }
  .card-head { margin-bottom: 18px; padding-bottom: 10px; }
  .card-title { font-size: 22px; }
  .slider { padding: 0 8px; }
  .slider-nav { width: 40px; height: 40px; }
  .slider-nav.prev { left: -2px; }
  .slider-nav.next { right: -2px; }
  .slider-nav svg { width: 18px; height: 18px; }
  .scroll-top-btn { right: 16px; bottom: 16px; width: 44px; height: 44px; }
  .sub-grid,
  .sub-grid.cols-1,
  .sub-grid.cols-2 { grid-template-columns: 1fr; gap: 16px; }
  .feature-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .slider-track, .sub-block { transition: none !important; }
}
