/* =========================================================
   case-studies.css
   상세 레퍼런스 페이지 전용 스타일
   적용 대상: case-studies-*.html
========================================================= */


/* =========================================================
   01. 공통 기본값
========================================================= */
html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.inner-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

main.snap {
  height: auto;
  overflow: visible;
}


/* =========================================================
   02. 상세 페이지 상단 서브 메뉴
   - nav가 fixed(40px)라는 전제
========================================================= */
.case-studies-subnav {
  position: sticky;
  top: 40px;
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid #e9edf2;
}

.case-studies-subnav .inner-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.case-studies-subnav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin: 0;
  padding: 8px 0;
}

.case-studies-subnav-links li {
  margin: 0;
  padding: 0;
}

.case-studies-subnav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 13px;
  border: 1px solid #d9e2ec;
  border-radius: 999px;
  background: #fff;
  color: #1f5f9a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.case-studies-subnav-links a:hover,
.case-studies-subnav-links a.active,
.case-studies-subnav-links a[aria-current="page"] {
  background: #1f5f9a;
  color: #fff;
  border-color: #1f5f9a;
}


/* =========================================================
   03. 히어로 영역
========================================================= */
main.snap .hero {
  min-height: 420px;
  height: auto;
}

main.snap .hero.ref-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 420px;
  padding: 80px 20px;
  text-align: left;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.ref-hero-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.ref-hero-title {
  margin: 0 0 36px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(36px, 3.8vw, 48px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.ref-hero-description {
  max-width: 980px;
  margin: 0;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.6;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
  word-break: keep-all;
}


/* =========================================================
   04. 페이지별 히어로 배경
========================================================= */
#page-agriculture .ref-hero {
  background-image: url("/assets/case-studies/agriculture.svg");
}

#page-washing-cleaning .ref-hero {
  background-image: url("/assets/case-studies/washing-cleaning.svg");
}

#page-waste-water-treatment .ref-hero {
  background-image: url("/assets/case-studies/waste-water-treatment.svg");
}

#page-aop-treatment .ref-hero {
  background-image: url("/assets/case-studies/aop-treatment.svg");
}


/* =========================================================
   05. 본문 섹션 공통
========================================================= */
.ref-detail {
  padding: 72px 0;
}

main.snap .ref-detail {
  min-height: auto;
  display: block;
}

.ref-title {
  margin: 0 0 24px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: left;
}

.ref-lead {
  max-width: 100%;
  margin: 0 0 64px;
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.55;
  color: #515154;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: break-word;
}


/* =========================================================
   06. 콘텐츠 2열 레이아웃
========================================================= */
.ref-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: start;
}

.ref-visual {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #f3f5f7;
  border: 1px solid #e7ebf0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   07. 우측 정보 패널
========================================================= */
.ref-panel {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #e7ebf0;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.panel-head {
  position: relative;
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, #184a7a 0%, #0f3560 100%);
  color: #fff;
}

.panel-head::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 10px;
  width: 18px;
  height: 18px;
  border-right: 6px solid rgba(115, 255, 140, 0.95);
  border-top: 6px solid rgba(115, 255, 140, 0.95);
  transform: rotate(45deg);
  border-radius: 2px;
  opacity: 0.9;
}

.panel-head-title {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.panel-head-sub {
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.45;
  opacity: 0.92;
}

.accent {
  color: #8fff6a;
}

.panel-body {
  padding: 18px;
}

.panel-table {
  display: grid;
  grid-template-columns: 160px 1fr;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e7ebf0;
  background: #f8fafc;
}

.panel-table dt,
.panel-table dd {
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid #e7ebf0;
  align-items: center;
}

.panel-table dt {
  grid-column: 1;
  font-weight: 700;
  color: #0b1b2b;
}

.panel-table dd {
  grid-column: 2;
  color: #25364a;
}

.panel-table dt:first-of-type,
.panel-table dt:first-of-type + dd {
  border-top: none;
}

.panel-metrics {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e7ebf0;
  background: #fff;
}

.metric {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px dashed #e7ebf0;
}

.metric:first-child {
  border-top: none;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1c4f86;
}

.metric .label {
  font-weight: 600;
  color: #0b1b2b;
}

.metric .value {
  font-weight: 600;
  color: #0b1b2b;
}

.metric .value.plus {
  color: #197a37;
}

.panel-note {
  margin: 12px 2px 0;
  font-size: 13px;
  color: #6b7785;
  line-height: 1.5;
}


/* =========================================================
   08. 배경 테마
========================================================= */
.theme-agriculture-1 { background-color: #fff; }
.theme-agriculture-2 { background: linear-gradient(180deg, #F4F9F1 0%, #B7DAA2 100%); }

.theme-washing-cleaning-1 { background-color: #fff; }
.theme-washing-cleaning-2 { background: linear-gradient(180deg, #f4f8fc 0%, #ACC9E6 100%); }

.theme-waste-water-treatment-1 { background-color: #fff; }
.theme-waste-water-treatment-2 { background: linear-gradient(180deg, #F4F9F1 0%, #B7DAA2 100%); }

.theme-aop-treatment-1 { background-color: #fff; }
.theme-aop-treatment-2 { background: linear-gradient(180deg, #F3EBF9 0%, #D8BEEC 100%); }


/* =========================================================
   09. 하단 추천 사례 / 관련 링크
========================================================= */
.ref-footer-links {
  padding: 80px 0;
  background-color: #f8fafc;
  border-top: 1px solid #e7ebf0;
}

.ref-links-header {
  text-align: center;
  margin-bottom: 48px;
}

.ref-links-header h3 {
  margin: 0 0 12px;
  font-family: 'Montserrat', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #184a7a;
}

.ref-links-header p {
  margin: 0;
  font-size: 16px;
  color: #6b7785;
}

.ref-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

.ref-link-card {
  display: block;
  padding: 32px;
  background: #fff;
  border: 1px solid #e7ebf0;
  border-radius: 16px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ref-link-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: #184a7a;
}

.ref-link-card .category {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #0071e3;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ref-link-card .title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.4;
}


/* =========================================================
   10. 하단 CTA 버튼
========================================================= */
.ref-bottom-cta {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary,
.ref-bottom-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  max-width: 100%;
  padding: 14px 28px;
  border: 1px solid #0071e3;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover,
.ref-bottom-cta .btn-primary:hover {
  background: #005bb5;
  border-color: #005bb5;
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  max-width: 100%;
  padding: 14px 28px;
  border: 1px solid #d2d2d7;
  border-radius: 999px;
  background: #fff;
  color: #1d1d1f;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  box-sizing: border-box;
  white-space: nowrap;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn-outline:hover {
  background: #f5f5f7;
  border-color: #86868b;
  transform: translateY(-1px);
}


/* =========================================================
   11. 반응형
========================================================= */
@media (max-width: 900px) {
  .ref-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .case-studies-subnav .inner-container {
    justify-content: center;
  }

  .case-studies-subnav-links {
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
  }

  .case-studies-subnav-links a {
    min-height: 32px;
    padding: 6px 12px;
    font-size: 12px;
  }

  main.snap .hero {
    min-height: 340px;
  }

  main.snap .hero.ref-hero {
    min-height: 340px;
    padding: 48px 20px 40px;
  }

  .ref-detail {
    padding: 56px 0;
  }

  .ref-footer-links {
    padding: 56px 0;
  }

  .ref-links-header h3 {
    font-size: 24px;
  }

  .ref-links-grid {
    grid-template-columns: 1fr;
  }

  .btn-primary,
  .ref-bottom-cta .btn-primary,
  .btn-outline {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

@media (max-width: 520px) {
  .inner-container {
    padding: 0 16px;
  }

  .panel-head-title {
    font-size: 22px;
  }

  .ref-detail {
    padding: 44px 0;
  }

  main.snap .hero {
    min-height: 300px;
  }

  main.snap .hero.ref-hero {
    min-height: 300px;
    padding: 52px 20px;
  }

  .case-studies-subnav-links {
    gap: 6px;
    padding: 6px 0;
  }

  .case-studies-subnav-links a {
    min-height: 30px;
    padding: 5px 10px;
    font-size: 12px;
  }

  .ref-link-card {
    padding: 24px;
  }
}