/*
  font-display 가 없으면 브라우저 기본값(block)이라 글꼴을 받는 동안 글자가 보이지 않는다.
  woff2 두 벌이 180KB 씩이라 그 사이 최대 3초까지 빈 화면이 된다.
  swap 을 주면 기본 글꼴로 먼저 읽히고 다 받은 뒤 바뀐다. 글꼴·굵기는 그대로다.
*/
@font-face {
    font-family: 'Spoqa Han Sans Neo';
    src: url('/fonts/SpoqaHanSansNeo-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Spoqa Han Sans Neo';
    src: url('/fonts/SpoqaHanSansNeo-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}

/*!* ─── 래퍼: .region-selector ─── *!
!* 3개 이하: 한줄, 가운데, 간격 넓게 *!
.region-buttons.few {
    display: flex;
    justify-content: center;
    gap: 60px;   !* 더 넓게! *!
    overflow-x: visible; !* 스크롤 안생김 *!
    padding: 16px 0 16px 0;
}
.region-buttons.few .circle-btn {
    flex: 0 0 auto;
}

!* 4~6개: 자동 간격, 기본 flex *!
.region-buttons.normal {
    display: flex;
    justify-content: center;
    gap: 28px;
    overflow-x: visible;
    padding: 12px 0 12px 0;
}
.region-buttons.normal .circle-btn {
    flex: 0 0 auto;
}

!* 7개 이상: 스크롤 캐러셀 *!
.region-buttons.scrollable {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
}*/
.region-buttons.scrollable .circle-btn {
    flex: 0 0 auto;
}
.region-buttons.scrollable::-webkit-scrollbar { display: none; }
.region-buttons.scrollable { -ms-overflow-style: none; scrollbar-width: none; }


.region-selector {
    position: relative;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 40px;
}

/* 여행지 목록에서만 헤더부터 지역 선택 영역까지 한 톤으로 이어 준다. */
body:has(> main #region-fragment-container) .main-nav,
body:has(> main #region-fragment-container) > main {
    background-color: var(--tripbora-soft) !important;
}

/* 실제 1차 메뉴가 열렸을 때만 헤더 shell과 2차 메뉴를 흰색으로 잇는다. */
body:has(> main #region-fragment-container) .main-nav:hover .global-submenu {
    display: none;
}

body:has(> main #region-fragment-container) .main-nav:has(.main-menu > .menu-item:hover),
body:has(> main #region-fragment-container) .main-nav:has(.global-submenu:hover) {
    background-color: #fff !important;
}

body:has(> main #region-fragment-container) .main-nav:has(.main-menu > .menu-item:hover) .global-submenu,
body:has(> main #region-fragment-container) .main-nav:has(.global-submenu:hover) .global-submenu {
    display: block;
}

body:has(> main #region-fragment-container) #destination-list {
    display: flow-root;
    background: #fff;
}

/* 새로운 배경 래퍼 */
.region-bar-wrapper {
    background-color: var(--tripbora-soft);
    padding: 5px 0;
}

/* ─── 스크롤 리스트 ─── */
.region-buttons {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 10px 0;
    background: var(--tripbora-soft);
    scroll-behavior: smooth;
}
.region-buttons::-webkit-scrollbar { display: none; }
.region-buttons { -ms-overflow-style: none; scrollbar-width: none; }

/* ─── 좌/우 화살표 버튼 ─── */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: 1px solid #ccc;
    width: 32px;  height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}
.arrow.prev { left: 8px; }
.arrow.next { right: 8px; }

/* ─── 원형 버튼 ─── */
.circle-btn {
    flex: 0 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

/* ✅ 버튼 기본 리셋 및 정렬 */
.circle-btn button {
    all: unset;
    display: block;
    text-align: center;
    cursor: pointer;
}

/* 아이콘 이미지 */
.circle-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    /*
    object-fit: contain; !* 아이콘 전체가 원 안에 맞게 들어옴 *!
    */
    /*
    padding: 2px; !* 내부 콘텐츠 간 여백 확보 *!
    */
    margin: 0 auto 6px;
    border: 2px solid #ddd;
}

/*!* 도시 이름 텍스트 *!
.circle-btn button span {
    display: block;
    font-size: 12px;
    color: #333;
}*/

/*.circle-btn a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}*/

.circle-btn span {
    font-size: 12px;
    color: #333;
    margin-top: 6px;
    display: block;
    text-align: center;
    font-weight: bold; /* ✅ 볼드 처리 */
}

/* 선택된 버튼 스타일 */
.circle-btn.selected .circle-icon {
    border: 3px solid var(--tripbora-primary);
    box-shadow: 0 0 6px var(--tripbora-focus);
}

/* ─── 여행지 카드 리스트 ─── */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 60px 0 0 0 !important;
}
#page-title {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 20px;
    margin-left: 0;
    font-weight: bold;
    margin-top: 50px; /* 원하는 간격으로 조절 (예: 1.5rem = 24px) */
}

.region-bar-wrapper + #page-title {
    margin-top: 2rem;
}

.destination-list {
    justify-content: flex-start;
}
.destination-list-wrapper {
    max-width: 1300px;
    margin: 40px auto;
}
/* 데스크톱 4열 그리드 */
.destination-card-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 42px 30px; /* 세로 42px · 가로 30px */
}

.destination-card-wrapper {
    position: relative; /* 북마크 버튼 기준 */
    min-width: 0;
}

.destination-card {
    display: flex;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 14px;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.destination-card:hover {
    border-color: #dbe0e8;
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.08);
    transform: translateY(-2px);
}

/* 썸네일: 카드 폭에 맞춰 크게 */
.destination-card-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eef1f5;
}

.destination-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.destination-card:hover .destination-card-media img {
    transform: scale(1.03);
}

.destination-card .card-text-wrapper {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 16px 14px;
}

.destination-card h3 {
    margin: 0;
    overflow: hidden;
    color: #1e2939;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.destination-card p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.55;
    color: #5b6676;
}

.destination-card .short-description {
    margin-top: 7px;
    min-height: 2.9em;   /* 두 줄 기준 높이 통일 */
    font-size: 0.86rem;
    color: #6b7686;
}

/* 지역 · 댓글 메타 */
.destination-card .card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f3f6;
}

.destination-card .region {
    min-width: 0;
    overflow: hidden;
    color: #8c94a3;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.destination-card .card-comment-count {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 4px;
    color: #8c94a3;
    font-size: 0.82rem;
}

.destination-card .card-comment-count img {
    width: 15px;
    height: 15px;
    opacity: .65;
}

@media (max-width: 1024px) {
    .destination-card-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 22px;
    }
}

@media (max-width: 600px) {
    .destination-card-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .destination-card .short-description {
        min-height: 0;
    }
}

/* 하위 여행지 */
.subregion-selector {
    position: relative;
    padding: 5px 60px;
    margin: 20px auto;
    border-radius: 10px;
    max-width: 960px;
}

.subregion-scroll-container::-webkit-scrollbar {
    display: none;
}

.subregion-scroll-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.subregion-list {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    flex-wrap: nowrap;
}


/* 모던한 행정구 버튼 스타일 */
.subregion-btn {
    background: #ffffff;         /* ✅ 추천 배경색 */
    color: var(--tripbora-text);
    border: 1px solid var(--tripbora-border);
    border-radius: 999px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.subregion-btn:hover {
    background: var(--tripbora-soft);
    color: var(--tripbora-primary-hover);
}

.subregion-btn.active {
    background: var(--tripbora-primary);
    color: #ffffff;
    border-color: var(--tripbora-primary);
    font-weight: bold;
}

/* 좌우 화살표 */
.subregion-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: 1px solid #ccc;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}
.subregion-arrow.prev { left: 10px; }
.subregion-arrow.next { right: 10px; }

/* 북마크 */


/* 이미지 위 반투명 원형 버튼 (선택 상태는 아이콘 이미지로 유지) */
.bookmark-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(2px);
    cursor: pointer;
    z-index: 10;
    transition: background-color .18s ease, transform .18s ease;
}

.bookmark-icon:hover,
.bookmark-icon:focus-visible {
    background: #fff;
    transform: scale(1.06);
}

.bookmark-icon:focus-visible {
    outline: 3px solid rgba(53, 88, 240, 0.25);
    outline-offset: 2px;
}

.bookmark-icon img {
    width: 19px;
    height: 19px;
    transition: none;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 28px 0 0 0;
}

.short-description {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.subregion-btn.selected {
    background: var(--tripbora-primary);
    color: #fff;
    border: 1.5px solid var(--tripbora-primary);
    font-weight: 600;
}

.subregion-btn.active:hover,
.subregion-btn.selected:hover {
    background: var(--tripbora-primary-hover);
    color: #fff;
    border-color: var(--tripbora-primary-hover);
}

.subregion-btn:active {
    background: var(--tripbora-primary-active);
    color: #fff;
    border-color: var(--tripbora-primary-active);
}

/* 페이징 */
.pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 9px;
    color: #5b6676;
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.pagination a:hover {
    color: #1e2939;
    background: #f4f6fa;
    border-color: #dbe0e8;
}

.pagination a:focus-visible {
    outline: 3px solid rgba(53, 88, 240, 0.22);
    outline-offset: 2px;
}

.pagination .page-nav {
    font-size: 1.05rem;
    line-height: 1;
}

.pagination .page-number.is-current {
    color: #fff;
    background: var(--tripbora-primary);
    border-color: var(--tripbora-primary);
    font-weight: 750;
    pointer-events: none;
}

.pagination .is-disabled {
    color: #c2c8d2;
    background: #f7f8fb;
    border-color: #eceff4;
    pointer-events: none;
}

@media (max-width: 600px) {
    .pagination a,
    .pagination span {
        min-width: 30px;
        height: 30px;
        padding: 0 7px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .pagination-wrapper {
        margin: 24px 0 0 0;
    }
}

/* 정렬 (세그먼트 컨트롤) */
.list-sort-buttons {
    display: inline-flex;
    gap: 2px;
    margin: 0 0 22px auto !important;
    padding: 3px;
    background: #fafafc;
    border: 1px solid var(--tripbora-border);
    border-radius: 10px;
    width: fit-content;
}

.destination-list-wrapper .list-sort-buttons {
    display: flex;
    width: fit-content;
}

.sort-btn {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    color: #6b7686;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
    outline: none;
}

.sort-btn:hover,
.sort-btn:focus-visible {
    color: var(--tripbora-primary-hover);
    background: var(--tripbora-soft);
}

.sort-btn.active {
    color: #fff;
    background: var(--tripbora-primary);
    font-weight: 750;
    box-shadow: 0 1px 3px rgba(30, 41, 59, 0.1);
}

.sort-btn.active:hover,
.sort-btn.active:focus-visible {
    color: #fff;
    background: var(--tripbora-primary-hover);
}

.sort-btn:active {
    color: #fff;
    background: var(--tripbora-primary-active);
}
