/* =========================================================
   Dioasis Partner Section — Condition-based Financial UI
   - 지도/dot/region-stats 제거
   - 필터 + 카드 리스트 + 모달 중심 구성
   ========================================================= */

.pf-section,
.pf-section *,
.pf-modal-overlay,
.pf-modal-overlay *{
  font-family:"Wanted Sans",-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR","Malgun Gothic",sans-serif;
  box-sizing:border-box;
}

/* ---------- Section shell ---------- */
.pf-section{
  width:100%;
  max-width:1200px;
  margin:96px auto 0;
  padding:0 20px 110px;
}

.pf-top{
  text-align:center;
  margin-bottom:36px;
}

.pf-eyebrow{
  margin:0 0 12px;
  color:#003893;
  font-size:13px;
  font-weight:800;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.pf-title{
  margin:0 0 14px;
  color:#101828;
  font-size:clamp(28px, 4vw, 44px);
  line-height:1.2;
  font-weight:800;
  letter-spacing:-.04em;
  word-break:keep-all;
}

.pf-desc{
  max-width:760px;
  margin:0 auto;
  color:#667085;
  font-size:16px;
  line-height:1.85;
  word-break:keep-all;
}

/* ---------- Filter card (sticky on desktop) ---------- */
.pf-filters{
  position:sticky;
  top:80px;
  z-index:10;
  display:flex;
  flex-direction:column;
  gap:18px;
  padding:22px 22px 18px;
  margin-bottom:28px;
  border:1px solid #dbe5f4;
  border-radius:24px;
  background:rgba(255, 255, 255, .92);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 14px 36px rgba(15, 23, 42, .06);
}

.pf-filter-group{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.pf-filter-group__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.pf-filter-group__label{
  color:#101828;
  font-size:14px;
  font-weight:800;
  letter-spacing:-.02em;
}

.pf-filter-group__hint{
  color:#98a2b3;
  font-size:12px;
  font-weight:700;
}

.pf-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.pf-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 16px;
  border:1px solid #e4eaf5;
  border-radius:999px;
  background:#f7f9fc;
  color:#475467;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.pf-chip:hover,
.pf-chip:focus-visible{
  transform:translateY(-1px);
  border-color:#c6d6ef;
  background:#ffffff;
  outline:none;
}

.pf-chip.is-active{
  background:#003893;
  border-color:#003893;
  color:#ffffff;
  box-shadow:0 10px 22px rgba(0, 56, 147, .22);
}

.pf-chip--tag.is-active{
  background:#0a4bd6;
  border-color:#0a4bd6;
}

.pf-chip--tag.is-active::before{
  content:"";
  display:inline-block;
  width:6px;
  height:6px;
  margin-right:8px;
  border-radius:50%;
  background:#ffffff;
}

.pf-filter-foot{
  display:flex;
  justify-content:flex-end;
  border-top:1px dashed #e4eaf5;
  padding-top:12px;
}

.pf-filter-reset{
  border:none;
  padding:8px 14px;
  background:transparent;
  color:#003893;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  border-radius:999px;
  transition:background .16s ease;
}

.pf-filter-reset:hover,
.pf-filter-reset:focus-visible{
  background:#eef4ff;
  outline:none;
}

.pf-filter-reset[hidden]{
  display:none;
}

/* ---------- Result region ---------- */
.pf-result-region{
  border:1px solid #dbe5f4;
  border-radius:30px;
  background:linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow:0 18px 50px rgba(15, 23, 42, .06);
  padding:32px 26px;
  min-height:320px;
}

/* ----- Intro empty state ----- */
.pf-intro{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:32px 16px;
}

.pf-intro__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:6px 12px;
  border-radius:999px;
  background:#eef4ff;
  color:#003893;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.pf-intro__title{
  margin:18px 0 10px;
  color:#101828;
  font-size:clamp(22px, 3vw, 30px);
  font-weight:800;
  letter-spacing:-.03em;
  word-break:keep-all;
}

.pf-intro__desc{
  max-width:560px;
  margin:0 0 20px;
  color:#667085;
  font-size:15px;
  line-height:1.85;
  word-break:keep-all;
}

.pf-intro__bullets{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  justify-content:center;
}

.pf-intro__bullets li{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#475467;
  font-size:13px;
  font-weight:700;
}

.pf-intro__dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:#003893;
}

/* ----- Result list ----- */
.pf-result__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:0 4px 22px;
  border-bottom:1px solid #eef2f7;
  margin-bottom:22px;
}

.pf-result__title{
  margin:0;
  color:#111827;
  font-size:22px;
  font-weight:800;
  letter-spacing:-.03em;
}

.pf-result__sub{
  margin:6px 0 0;
  color:#667085;
  font-size:13px;
  line-height:1.6;
}

.pf-result__count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:74px;
  height:38px;
  padding:0 14px;
  border-radius:999px;
  background:#eef4ff;
  color:#003893;
  font-size:14px;
  font-weight:800;
}

.pf-card-list{
  display:grid;
  grid-template-columns:1fr;
  gap:16px;
}

.pf-card-list.is-entering{
  animation:pfFadeUp .28s ease;
}

@keyframes pfFadeUp{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}

/* ----- Partner card ----- */
.pf-card{
  display:grid;
  grid-template-columns:96px minmax(0, 1fr);
  gap:16px;
  align-items:center;
  padding:18px;
  border:1px solid #e3eaf5;
  border-radius:22px;
  background:#ffffff;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.pf-card:hover,
.pf-card:focus-within{
  transform:translateY(-2px);
  border-color:#c6d6ef;
  box-shadow:0 18px 36px rgba(15, 23, 42, .06);
}

.pf-card__media{
  width:96px;
  height:96px;
  border-radius:18px;
  overflow:hidden;
  background:#eef2f7;
  flex:0 0 auto;
}

.pf-card__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center top;
  display:block;
}

/* "디오아시스 인증 · 합법 등록 파트너" 신뢰 문구 — PC/태블릿/모바일 모두 숨김 */
.pf-card__trust{
  display:none;
}

.pf-card__body{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
}

.pf-card__region{
  display:inline-block;
  align-self:flex-start;
  padding:3px 9px;
  border-radius:999px;
  background:#eef4ff;
  color:#003893;
  font-size:11px;
  font-weight:800;
  letter-spacing:.04em;
  margin:0;
}

.pf-card__name{
  margin:0;
  color:#101828;
  font-size:20px;
  font-weight:850;
  letter-spacing:-.03em;
  line-height:1.2;
  word-break:keep-all;
}

.pf-card__location{
  margin:0;
  color:#475467;
  font-size:13px;
  line-height:1.55;
  word-break:keep-all;
}

.pf-card__trust{
  margin:0;
  color:#667085;
  font-size:12px;
  line-height:1.55;
  word-break:keep-all;
}

.pf-card__tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:2px;
}

.pf-card__tag{
  display:inline-flex;
  align-items:center;
  height:24px;
  padding:0 9px;
  border-radius:999px;
  background:#f5f8fd;
  color:#475467;
  font-size:11px;
  font-weight:700;
}

.pf-card__tag.is-matched{
  background:#003893;
  color:#ffffff;
}

.pf-card__actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
}

.pf-card__btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:0 16px;
  border-radius:14px;
  border:1px solid transparent;
  font-size:14px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

.pf-card__btn:hover,
.pf-card__btn:focus-visible{
  transform:translateY(-1px);
  outline:none;
}

.pf-card__btn--primary{
  background:#003893;
  color:#ffffff;
  box-shadow:0 12px 24px rgba(0, 56, 147, .18);
}

.pf-card__btn--primary:hover{
  background:#002a6f;
}

.pf-card__btn--secondary{
  border-color:#c6d6ef;
  background:#ffffff;
  color:#003893;
}

.pf-card__btn--secondary:hover{
  background:#eef4ff;
}

/* 버튼 라벨 — 기본(데스크톱)은 풀 텍스트, 축약형은 숨김 */
.pf-card__btn-text--short{
  display:none;
}

/* ---------- No match ----------
   .pf-card-list 그리드 안에 직접 주입되므로 전체 컬럼 차지. */
.pf-no-match{
  grid-column:1 / -1;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:36px 20px;
  border:1px dashed #d7e2f1;
  border-radius:22px;
  background:#fbfdff;
}

.pf-no-match__icon{
  width:64px;
  height:64px;
  margin-bottom:14px;
  border-radius:20px;
  background:linear-gradient(180deg, #eef4ff 0%, #f9fbff 100%);
  box-shadow:inset 0 0 0 1px rgba(182, 205, 244, .7);
  position:relative;
}

.pf-no-match__icon::before{
  content:"!";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#003893;
  font-size:28px;
  font-weight:800;
}

.pf-no-match h4{
  margin:0 0 6px;
  color:#101828;
  font-size:18px;
  font-weight:800;
}

.pf-no-match p{
  margin:0;
  color:#667085;
  font-size:14px;
  line-height:1.7;
}

/* =========================================================
   Modal
   ========================================================= */
.pf-modal-overlay{
  position:fixed;
  inset:0;
  width:100vw;
  height:100vh;
  background:rgba(15, 23, 42, .55);
  align-items:center;
  justify-content:center;
  z-index:2000;
  padding:24px;
  animation:pfFadeIn .18s ease;
}

@keyframes pfFadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

.pf-modal-card{
  position:relative;
  width:100%;
  max-width:720px;
  max-height:90vh;
  overflow-y:auto;
  padding:30px 28px 28px;
  border-radius:24px;
  background:#ffffff;
  box-shadow:0 24px 64px rgba(15, 23, 42, .22);
  animation:pfModalUp .22s ease;
}

@keyframes pfModalUp{
  from{ opacity:0; transform:translateY(14px); }
  to{ opacity:1; transform:translateY(0); }
}

.pf-modal-close{
  position:absolute;
  top:14px;
  right:16px;
  width:38px;
  height:38px;
  border:none;
  border-radius:50%;
  background:#f5f8fd;
  color:#101828;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  transition:background .16s ease;
}

.pf-modal-close:hover,
.pf-modal-close:focus-visible{
  background:#e7eef9;
  outline:none;
}

.pf-modal-header{
  display:flex;
  align-items:center;
  gap:18px;
  padding-bottom:22px;
  margin-bottom:22px;
  border-bottom:1px solid #eef2f7;
}

.pf-modal-image{
  width:96px;
  height:96px;
  object-fit:cover;
  border-radius:18px;
  background:#eef2f7;
  flex:0 0 auto;
}

.pf-modal-heading{
  min-width:0;
  flex:1;
}

.pf-modal-eyebrow{
  margin:0 0 6px;
  color:#003893;
  font-size:11px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.pf-modal-name{
  margin:0 0 6px;
  color:#101828;
  font-size:clamp(22px, 3vw, 28px);
  font-weight:800;
  letter-spacing:-.03em;
  line-height:1.2;
  word-break:keep-all;
}

.pf-modal-store{
  margin:0;
  color:#475467;
  font-size:14px;
  line-height:1.55;
}

.pf-modal-section{
  margin-bottom:22px;
}

.pf-modal-section:last-child{
  margin-bottom:0;
}

.pf-modal-section__title{
  margin:0 0 12px;
  color:#101828;
  font-size:14px;
  font-weight:800;
  letter-spacing:-.02em;
}

.pf-modal-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  border:1px solid #eef2f7;
  border-radius:16px;
  overflow:hidden;
}

.pf-modal-row{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:12px;
  padding:12px 16px;
  background:#ffffff;
}

.pf-modal-row + .pf-modal-row{
  border-top:1px solid #f1f4f9;
}

.pf-modal-row__label{
  color:#667085;
  font-size:12px;
  font-weight:700;
  letter-spacing:-.01em;
}

.pf-modal-row__value{
  color:#101828;
  font-size:14px;
  line-height:1.6;
  word-break:break-word;
}

.pf-modal-row__value a{
  color:#003893;
  font-weight:700;
  text-decoration:none;
}

.pf-modal-row__value a:hover{
  text-decoration:underline;
}

.pf-modal-map{
  width:100%;
  height:clamp(220px, 50vw, 320px);
  border-radius:16px;
  overflow:hidden;
  background:#f1f4f9;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (min-width:768px){
  .pf-filters{
    flex-direction:row;
    align-items:flex-end;
    gap:24px;
    padding:22px 24px;
  }

  .pf-filter-group{
    flex:1;
    min-width:0;
  }

  .pf-filter-foot{
    align-self:stretch;
    border-top:none;
    border-left:1px dashed #e4eaf5;
    padding-top:0;
    padding-left:18px;
    align-items:center;
  }

  .pf-card-list{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:18px;
  }

  /* 태블릿: 사진을 카드 폭의 ~40%로 키우고 카드 비율을 사진 중심으로 재배치 */
  .pf-card{
    grid-template-columns:150px minmax(0, 1fr);
    gap:18px;
    padding:18px;
    align-items:center;
  }

  /* 사진 높이 ~10% 축소 (190→170) — 어깨선 유지, 증명사진 확대 톤 완화 */
  .pf-card__media{
    width:150px;
    height:170px;
  }

  /* 본문: 카드 상단부터 자연스럽게 시작 + 신뢰 문구 제거 후 비율 맞춰 호흡 정리 */
  .pf-card__body{
    justify-content:flex-start;
    gap:8px;
    padding-top:6px;
  }

  .pf-modal-row{
    grid-template-columns:140px 1fr;
  }
}

@media (min-width:1024px){
  .pf-filters{
    top:90px;
  }
  .pf-result-region{
    padding:34px 30px;
  }
  /* 데스크톱: 사진 200×234 — 어깨까지 유지하면서 ~10% 세로 축소(증명사진 느낌 완화) */
  .pf-card{
    grid-template-columns:200px minmax(0, 1fr);
    gap:22px;
    padding:22px;
    align-items:center;
  }
  .pf-card__media{
    width:200px;
    height:234px;
  }
}

@media (max-width:767px){
  .pf-section{
    margin-top:64px;
    padding:0 16px 80px;
  }

  /* 모바일: 결과 서브 카피만 숨김. 핵심 안내(.pf-desc / .pf-intro__desc / 인트로 불릿)는 노출 유지 */
  .pf-result__sub{
    display:none;
  }

  .pf-filters{
    position:relative;
    top:0;
    padding:16px;
    border-radius:20px;
    gap:14px;
  }

  /* 칩 그리드 고정 배치 — 가로 스크롤/자연 wrap 금지 */
  .pf-chip-row{
    display:grid;
    gap:8px;
    overflow:visible;
  }

  .pf-chip-row[data-filter-group="region"]{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }

  .pf-chip-row[data-filter-group="tag"]{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .pf-chip{
    width:100%;
    padding:0 10px;
    justify-content:center;
    text-align:center;
    white-space:nowrap;
  }

  .pf-result-region{
    padding:22px 18px;
    border-radius:22px;
  }

  .pf-result__head{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }

  /* 모바일: 조건(태그) 필터 그룹 숨김 — 지역만 노출 */
  [data-filter-group="tag"],
  .pf-filter-group:has([data-filter-group="tag"]){
    display:none !important;
  }

  /* 모바일: 카드 리스트를 2열 그리드로 — 1열 증명사진 톤 폐기 */
  #pfCardList{
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
  }

  /* compact premium 카드 — radius 계층(카드 20 < 이미지 18 < 버튼 12) */
  .pf-card{
    grid-template-columns:1fr;
    gap:10px;
    padding:14px 14px 12px;
    border-radius:20px;
    align-items:stretch;

    border-color:rgba(15,23,42,0.06);

    box-shadow:
      0 2px 6px rgba(15,23,42,0.03),
      0 12px 28px rgba(15,23,42,0.04);
  }

  /* 3:4 인물형 박스 — 얼굴 + 어깨까지 자연스럽게 노출, 좌우 여백 없음 */
  .pf-card__media{
    width:100%;
    aspect-ratio:3 / 4;
    height:auto;
    margin:0;
    border-radius:18px;
    overflow:hidden;
    background:#f1f5f9;
  }

  .pf-card__media img{
    width:100%;
    height:100%;
    object-fit:cover;
    object-position:center top;
    display:block;
  }

  /* 카드 내부 세로 간격 압축 (region↔name↔buttons) */
  .pf-card__body{
    gap:2px;
  }

  .pf-card__region{
    font-size:11px;
  }

  .pf-card__name{
    font-size:17px;
    line-height:1.2;
    margin-top:3px;
    margin-bottom:2px;
  }

  /* 2열 카드는 정보 밀도가 높아 지점명/태그/신뢰 문구 숨김 — 모달에서 확인 가능 */
  .pf-card__location,
  .pf-card__tags,
  .pf-card__trust{
    display:none !important;
  }

  /* 버튼 가로 한 줄 배치 — [상담] [상세] 나란히, 카드 높이 절약 */
  .pf-card__actions{
    flex-direction:row;
    gap:6px;
    margin-top:4px;
  }

  /* 버튼 — pill 폐기, 금융앱 느낌의 단정한 radius(12px), 균등 분할 */
  /* 카드 하단 control bar — 그림자 제거로 '떠 있는 스티커' 느낌 제거,
     두 버튼이 하단 폭을 균등하게 채워 안정적으로 마감 */
  .pf-card__btn{
    flex:1;
    width:auto;
    min-width:0;
    min-height:40px;
    padding:0 8px;
    border-radius:11px;
    font-size:13.5px;
    box-shadow:none;
  }

  /* 버튼은 카드 하단에 붙어 있는 느낌 — hover로 떠오르지 않게 고정 */
  .pf-card__btn:hover,
  .pf-card__btn:focus-visible{
    transform:none;
  }

  .pf-card__btn--primary{
    font-weight:700;
    box-shadow:none;
  }

  /* 모바일: 풀 텍스트 숨기고 축약 라벨(상담/상세) 노출 */
  .pf-card__btn-text--full{
    display:none;
  }

  .pf-card__btn-text--short{
    display:inline;
  }

  .pf-modal-card{
    padding:24px 18px 20px;
    border-radius:20px;
    max-height:92vh;
  }

  .pf-modal-header{
    flex-direction:column;
    align-items:flex-start;
    gap:12px;
  }

  .pf-modal-image{
    width:80px;
    height:80px;
  }

  .pf-modal-row{
    grid-template-columns:1fr;
    gap:4px;
  }
}

/* =========================================================
   초소형 모바일 (<=390px) — 카드 더 컴팩트
   ========================================================= */
@media (max-width:390px){
  #pfCardList{
    gap:10px;
  }

  .pf-card{
    padding:12px 12px 14px;
  }

  .pf-card__name{
    font-size:15px;
  }

  /* 초소형: 가로 2버튼 폭이 좁으므로 양쪽 폰트만 소폭 축소 (높이/radius 유지) */
  .pf-card__btn{
    font-size:13px;
  }
}
