/* =========================
   References (Detail pages) - Shared CSS
   사용 대상: references-*.html (레퍼런스 페이지 전용)
   전제: <nav>는 fixed(높이 40px), 페이지 전체는 body 기준 자연 스크롤
========================= */


/* ========== Base / Layout reset (레퍼런스 전용)========== */
html, body{
  min-height: 100%;
}

body{
  margin: 0;
  padding: 0;
  padding-top: 40px; /* fixed nav offset (nav height 40px) */
  overflow-x: hidden;
  overflow-y: auto;
  font-family: 'Karla', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

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

/* ========== Main Layout ========== */
main.snap{
  height: auto;
  overflow: visible;
}

/* ========== Hero ========== */
main.snap .hero{
  min-height: 420px;
  height: auto;
}

/* ========== Sections ========== */
.ref-detail{
  /* background는 theme에서만 관리 */
  padding: 72px 0;
}

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

/* ========== Title + Lead ========== */
.ref-title{
  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;
  margin: 0 0 24px 0;
}

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

/* ========== Grid Layout ========== */
.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);
}

.ref-visual img{
  display: block;
  width: 100%;
  height: auto;
}

/* ========== Right Panel ========== */
.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{
  padding: 18px 18px 14px;
  background: linear-gradient(180deg, #184a7a 0%, #0f3560 100%);
  color: #fff;
  position: relative;
}

.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;
}

.panel-head-sub{
  margin-top: 6px;
  font-size: 15px;
  opacity: 0.9;
}

.accent{
  color: #8fff6a;
}

.panel-body{
  padding: 18px;
}

/* Table */
.panel-table{
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e7ebf0;
  background: #f8fafc;
}

.panel-table .row{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid #e7ebf0;
  align-items: center;
}

.panel-table .row:first-child{
  border-top: none;
}

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

.panel-table dd{
  margin: 0;
  color: #25364a;
}

/* Metrics */
.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;
}

/* ========== Themes (Background only) ========== */
.theme-agri-1{
  background-color: #ffffff;
}
.theme-agri-2{
  background: linear-gradient(180deg, #F4F9F1 0%, #B7DAA2 100%);
}

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

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

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


/* =========================
   Shared Reference Hero
========================= */

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

.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: #ffffff;
}

.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;
}

/* =========================
   Page-specific Hero Backgrounds
========================= */

/* Agriculture hero */
#page-agri .ref-hero{
  background-image: url("../assets/references/svg-ref-agri.svg");
}

/* Wash hero */
#page-wash .ref-hero{
  background-image: url("../assets/references/svg-ref-wash.svg");
}

/* Water Treatment hero */
#page-water .ref-hero{
  background-image: url("../assets/references/svg-ref-water.svg");
}

/* AOP hero */
#page-aop .ref-hero{
  background-image: url("../assets/references/svg-ref-aop.svg");
}

/* Other hero */
#page-other .ref-hero{
  background-image: url("../assets/references/svg-ref-other.svg");
}


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

  .panel-table .row{
    grid-template-columns: 110px 1fr;
  }
}

@media (max-width: 768px){
  main.snap .hero{
    min-height: 340px;
  }

  main.snap .hero.ref-hero{
    padding: 64px 20px;
  }

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

@media (max-width: 520px){
  .panel-head-title{
    font-size: 22px;
  }

  .panel-table .row{
    grid-template-columns: 96px 1fr;
  }

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

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

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

/* =========================
   References Sub Navigation
========================= */

.references-subnav{
  position: sticky;
  top: 40px;
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid #e9edf2;
}

.references-subnav .inner-container{
  display: flex;
  justify-content: flex-end;
}

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

.references-subnav-links li{
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}

.references-subnav-links a{
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d9e2ec;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #1f5f9a;
  background: #fff;
  white-space: nowrap;
  line-height: 1.2;
}

.references-subnav-links a:hover,
.references-subnav-links a.active{
  background: #1f5f9a;
  color: #fff;
}

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

  .references-subnav-links{
    justify-content: center;
  }
}
/* 모바일 줄바꿈만 허용, 크기는 유지 */
@media (max-width: 768px){

  .lineup-subnav-links{
    flex-wrap: wrap;
    justify-content: center;
  }

  .lineup-subnav-links a{
    font-size: 13px;
    padding: 7px 12px;
  }
}

/* ========== Reference Footer Links (추천 사례 섹션) ========== */
.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 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #184a7a; /* 아너테크 메인 블루 톤 */
    margin-bottom: 12px;
}

.ref-links-header p {
    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: #ffffff;
    border: 1px solid #e7ebf0;
    border-radius: 16px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.3s 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;
    font-size: 14px;
    font-weight: 700;
    color: #0071e3; /* 강조 파란색 */
    margin-bottom: 10px;
    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;
}

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

/* 기존 btn-primary 활용 및 보조 버튼 스타일 */
.btn-outline {
    display: inline-block;
    padding: 14px 28px;
    background: #ffffff;
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 700;
    border-radius: 999px;
    border: 1px solid #d2d2d7;
    transition: all 0.2s;
}

.btn-outline:hover {
    background: #f5f5f7;
    border-color: #86868b;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    .ref-footer-links {
        padding: 56px 0;
    }
    .ref-links-header h3 {
        font-size: 24px;
    }
    .ref-links-grid {
        grid-template-columns: 1fr;
    }
}