@charset "utf-8";

#flowCarousel {position:relative; width:100%; min-width:0; overflow:hidden;}
#flowCarousel .carousel-track {display:flex; gap:20px; width:100%; overflow-x:auto; scroll-behavior:smooth; scrollbar-width:none;}
#flowCarousel .carousel-track::-webkit-scrollbar {display:none;}


.car-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(20,20,20,0.9); cursor: pointer; font-size: 18px; color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5); z-index: 5;
  display: flex; align-items: center; justify-content: center;
}
.car-btn:hover { background: var(--point); border-color: var(--point); }
.car-prev { left: 0px; }
.car-next { right: 0px; }
.car-photo { width: 320px; height: 220px; }


.flow-card {
  width: 300px; border: 1px solid #333; border-radius:15px 0 15px 0;
  overflow: hidden; background:#222; flex-shrink: 0;
}
.flow-card .ph { height: 190px; border-radius: 0; border: none; cursor: pointer; font-size: 13px; }
.flow-card .ph img {display:block; width:100%; height:100%; object-fit:cover;}
.flow-card .inner { padding: 18px 20px 22px; }
.flow-card h3 { font-size: 16.5px; color: #fff; margin-bottom: 7px; letter-spacing: -0.3px; }
.flow-card p {
  font-size: 13px; color:#999; word-break: keep-all; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.flow-hint { text-align: center; font-size: 13px; color:#999; margin-top: 14px; }


/* ── 게시물 팝업 ── */
/* 모달 배경 */
.modal-overlay {position:fixed; inset:0; z-index:9999; display:flex; align-items:center; justify-content:center; padding:30px; background:rgba(0,0,0,.7); opacity:0; visibility:hidden; transition:opacity .3s, visibility .3s;}
.modal-overlay.active {opacity:1; visibility:visible;}

/* 모달 본문 */
.modal-overlay .modal {position:relative; width:100%; max-width:800px; max-height:90vh; overflow-y:auto; background:#222; border-radius:12px; transform:translateY(30px); transition:transform .3s;}
.modal-overlay.active .modal {transform:translateY(0);}

/* 닫기 버튼 */
.modal-overlay .modal-close {position:absolute; top:15px; right:15px; z-index:2; display:flex; align-items:center; justify-content:center; width:40px; height:40px; border:0; border-radius:50%; background:rgba(0,0,0,.65); color:#fff; font-size:20px; cursor:pointer;}

/* 모달 이미지 */
.modal-overlay #modalPhoto {width:100%; max-height:450px; overflow:hidden;}
.modal-overlay #modalPhoto img {display:block; width:100%; max-height:450px; object-fit:cover;}

/* 모달 텍스트 */
.modal-overlay .modal .inner {padding:35px;}
.modal-overlay #modalTitle {margin:0 0 20px; font-size:28px; font-weight:700; color:#fff;}
.modal-overlay #modalBody {margin:0; font-size:16px; line-height:1.9; color:#ddd; white-space:pre-line;}

/* 카드 */
.flow-card {cursor:pointer;}
.flow-card:focus-visible {outline:3px solid #5078a0; outline-offset:4px;}



/* =====================================
   RESPONSIVE (태블릿 & 모바일)
===================================== */

/* 태블릿 (1024px 이하) */
@media (max-width: 1024px) {
  #flowCarousel .carousel-track { gap: 16px; }
  .flow-card { width: 270px; }
  .flow-card .ph { height: 175px; }
  .car-photo { width: 280px; height: 195px; }

  .modal-overlay { padding: 20px; }
  .modal-overlay .modal .inner { padding: 28px; }
  .modal-overlay #modalTitle { font-size: 24px; margin-bottom: 16px; }
}

/* 모바일 (768px 이하) */
@media (max-width: 768px) {
  #flowCarousel .carousel-track { gap: 14px; padding: 0 4px; }
  .car-btn { width: 36px; height: 36px; font-size: 15px; }
  .car-prev { left: 4px; }
  .car-next { right: 4px; }

  /* 화면 폭에 맞춰 1.2~1.3장 정도 노출되어 옆 슬라이드가 자연스럽게 보이도록 설정 */
  .flow-card { width: calc(78vw - 20px); max-width: 280px; }
  .flow-card .ph { height: 165px; }
  .flow-card .inner { padding: 15px 16px 18px; }
  .flow-card h3 { font-size: 15.5px; }
  .flow-card p { font-size: 12.5px; line-height: 1.55; }
  .car-photo { width: calc(78vw - 20px); height: 180px; }
  .flow-hint { font-size: 12px; margin-top: 12px; }

  /* 모달 팝업 모바일 최적화 */
  .modal-overlay { padding: 14px; }
  .modal-overlay .modal { max-height: 88vh; border-radius: 10px; }
  .modal-overlay .modal-close { top: 10px; right: 10px; width: 34px; height: 34px; font-size: 17px; }
  .modal-overlay #modalPhoto,
  .modal-overlay #modalPhoto img { max-height: 260px; }
  .modal-overlay .modal .inner { padding: 22px 18px 26px; }
  .modal-overlay #modalTitle { font-size: 20px; margin-bottom: 12px; line-height: 1.4; }
  .modal-overlay #modalBody { font-size: 14.5px; line-height: 1.75; }
}

/* 초소형 모바일 (480px 이하) */
@media (max-width: 480px) {
  .flow-card { width: 82vw; }
  .flow-card .ph { height: 155px; }
  .modal-overlay #modalPhoto,
  .modal-overlay #modalPhoto img { max-height: 210px; }
}