/* ==========================================================================
   Destination Guide — 도시 가이드 스타일
   ========================================================================== */

/* ── 가이드 헤더 ── */
.guide-header {
    margin-bottom: 2rem;
}

.guide-header .guide-country-tag {
    display: inline-block;
    background: var(--ft-primary);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.guide-header .guide-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.guide-header .guide-intro {
    color: var(--ft-text-light, #64748b);
    font-size: 1rem;
    line-height: 1.7;
}

/* ── 구글맵 ── */
.guide-map-container {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    border: 1px solid var(--ft-border, #e2e8f0);
}

.guide-map-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    color: var(--ft-text-light, #64748b);
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-places .legend-dot { background: #2563eb; }
.legend-restaurants .legend-dot { background: #f59e0b; }
.legend-hotels .legend-dot { background: #8b5cf6; }

/* ── InfoWindow ── */
.guide-info-window {
    max-width: 320px;
    font-family: inherit;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--ft-text, #1e293b);
}

.giw-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--ft-text, #1e293b);
}

.giw-meta {
    font-size: 0.8rem;
    color: var(--ft-text-light, #64748b);
    margin: 0 0 8px;
}

.giw-detail {
    margin: 0 0 8px;
    font-size: 0.85rem;
}

.giw-section {
    margin: 0 0 8px;
}

.giw-section strong {
    display: block;
    font-size: 0.8rem;
    color: var(--ft-primary);
    margin-bottom: 2px;
}

.giw-section p {
    margin: 0;
    font-size: 0.83rem;
}

.giw-ratings {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 8px 0;
    font-size: 0.78rem;
}

.giw-rating {
    white-space: nowrap;
}

.giw-note {
    font-size: 0.8rem;
    color: var(--ft-text-light, #64748b);
    font-style: italic;
    margin: 4px 0 8px;
}

.giw-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--ft-border, #e2e8f0);
}

.giw-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.giw-link--map {
    background: #eff6ff;
    color: #2563eb;
}

.giw-link--map:hover {
    background: #dbeafe;
}

.giw-link--klook {
    background: #fff7ed;
    color: #ea580c;
}

.giw-link--klook:hover {
    background: #ffedd5;
}

/* 테이블 행에 좌표가 있으면 커서 변경 */
.guide-table tr[data-lat] {
    cursor: pointer;
}

.guide-table tr[data-lat]:hover {
    background: #eef2ff;
}

/* ── 탭 네비게이션 ── */
.guide-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--ft-border, #e2e8f0);
    padding-bottom: 0;
}

.guide-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ft-text-light, #64748b);
    transition: color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.guide-tab:hover {
    color: var(--ft-primary);
}

.guide-tab.active {
    color: var(--ft-primary);
    border-bottom-color: var(--ft-primary);
}

.guide-tab .tab-count {
    font-weight: 400;
    color: var(--ft-text-light, #94a3b8);
    font-size: 0.85em;
    margin-left: 4px;
}

/* ── 테이블 래퍼 ── */
.guide-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid var(--ft-border, #e2e8f0);
}

.guide-table-panel {
    display: none;
}

.guide-table-panel.active {
    display: block;
}

/* ── 테이블 ── */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    white-space: nowrap;
}

.guide-table thead {
    background: var(--ft-bg-alt, #f8fafc);
}

.guide-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--ft-text-light, #64748b);
    border-bottom: 2px solid var(--ft-border, #e2e8f0);
    user-select: none;
    position: relative;
}

.guide-table th[data-sort-key] {
    cursor: pointer;
}

.guide-table th[data-sort-key]:hover {
    color: var(--ft-primary);
}

.guide-table th .sort-icon {
    display: inline-block;
    width: 14px;
    text-align: center;
    margin-left: 2px;
    opacity: 0.4;
    font-size: 0.75rem;
}

.guide-table th.sort-asc .sort-icon,
.guide-table th.sort-desc .sort-icon {
    opacity: 1;
    color: var(--ft-primary);
}

.guide-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--ft-border, #e2e8f0);
    vertical-align: middle;
}

.guide-table tbody tr:hover {
    background: var(--ft-bg-alt, #f8fafc);
}

.guide-table .col-num {
    width: 40px;
    text-align: center;
    color: var(--ft-text-light, #94a3b8);
    font-weight: 600;
}

.guide-table .col-name {
    font-weight: 600;
    color: var(--ft-text, #1e293b);
    white-space: normal;
    min-width: 120px;
}

.guide-table .col-area {
    color: var(--ft-text-light, #64748b);
}

.guide-table .col-note {
    white-space: normal;
    min-width: 140px;
    max-width: 200px;
    color: var(--ft-text-light, #64748b);
    font-size: 0.85rem;
}

.guide-table .col-price {
    font-weight: 600;
}

/* ── 별점 ── */
.guide-stars {
    display: inline-flex;
    gap: 1px;
    white-space: nowrap;
}

.guide-star {
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1;
}

.guide-star--filled {
    color: #f59e0b;
}

/* 모바일용 숫자 별점 */
.guide-rating-compact {
    display: none;
    font-weight: 700;
    color: #f59e0b;
    font-size: 0.9rem;
}

/* ── 정렬 안내 ── */
.guide-sort-hint {
    text-align: center;
    color: var(--ft-text-light, #94a3b8);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* ── 아카이브 카드 ── */
.guide-card {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    color: inherit;
}

.guide-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.guide-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.guide-card:hover .guide-card__image img {
    transform: scale(1.05);
}

.guide-card__country {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--ft-primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 600;
}

.guide-card__body {
    padding: 16px;
}

.guide-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--ft-text, #1e293b);
}

.guide-card__counts {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--ft-text-light, #64748b);
}

.guide-card__counts span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ── 프론트 페이지 섹션 ── */
.section-guides .section-subtitle {
    color: var(--ft-text-light, #64748b);
}

/* ── 반응형: 768px 이하 ── */
@media (max-width: 768px) {
    .guide-map-container {
        height: 350px;
        border-radius: 8px;
    }

    .guide-map-legend {
        gap: 10px;
        font-size: 0.78rem;
    }

    .guide-info-window {
        max-width: 260px;
    }

    .guide-card__image {
        aspect-ratio: 4 / 3;
    }

    .guide-header .guide-title {
        font-size: 1.5rem;
    }

    .guide-tabs {
        gap: 4px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .guide-tab {
        padding: 8px 14px;
        font-size: 0.85rem;
        flex-shrink: 0;
    }

    /* 테이블: 첫 열 고정 */
    .guide-table-wrapper {
        position: relative;
    }

    .guide-table .col-name {
        position: sticky;
        left: 0;
        background: #fff;
        z-index: 1;
        box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
    }

    .guide-table thead .col-name {
        background: var(--ft-bg-alt, #f8fafc);
    }

    .guide-table tbody tr:hover .col-name {
        background: var(--ft-bg-alt, #f8fafc);
    }

    /* 별점: 숫자로 표시 */
    .guide-stars {
        display: none;
    }

    .guide-rating-compact {
        display: inline;
    }

    /* 메모 열 숨김 */
    .guide-table .col-note,
    .guide-table th.col-note-header {
        display: none;
    }

    /* 번호 열 숨김 */
    .guide-table .col-num,
    .guide-table th.col-num-header {
        display: none;
    }
}

/* ── 아카이브 히어로 ── */
.guide-archive-hero {
    background: linear-gradient(135deg, var(--ft-primary) 0%, var(--ft-primary-dark, #1d4ed8) 100%);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.guide-archive-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.guide-archive-hero p {
    opacity: 0.9;
    font-size: 1.05rem;
}

/* ── 액티비티 탭 ── */
.guide-activity-intro {
    color: var(--ft-text-light, #64748b);
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.guide-activity-city-link {
    display: inline-block;
    background: linear-gradient(135deg, #ea580c 0%, #f59e0b 100%);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 2rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.guide-activity-city-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
    color: #fff;
}

.guide-activity-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ft-text, #1e293b);
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--ft-border, #e2e8f0);
}

/* 카테고리 그리드 */
.guide-activity-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 2rem;
}

.guide-activity-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    border: 1px solid var(--ft-border, #e2e8f0);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
    background: #fff;
}

.guide-activity-card:hover {
    border-color: #ea580c;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.1);
    transform: translateY(-2px);
    color: inherit;
}

/* 카테고리 카드 */
.guide-activity-card--category .activity-card__icon {
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1;
}

.guide-activity-card--category .activity-card__name {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ft-text, #1e293b);
}

/* 인기 명소 카드 */
.guide-activity-grid--places {
    grid-template-columns: repeat(3, 1fr);
}

.guide-activity-card--place {
    align-items: flex-start;
    text-align: left;
    padding: 14px 16px;
}

.guide-activity-card--place .activity-card__name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ft-text, #1e293b);
    margin-bottom: 4px;
}

.activity-card__meta {
    font-size: 0.8rem;
    color: var(--ft-text-light, #64748b);
    margin-bottom: 10px;
}

.activity-card__cta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ea580c;
    margin-top: auto;
}

@media (max-width: 768px) {
    .guide-activity-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .guide-activity-grid--places {
        grid-template-columns: 1fr 1fr;
    }

    .guide-activity-card {
        padding: 12px 10px;
    }

    .guide-activity-card--category .activity-card__icon {
        font-size: 1.5rem;
    }

    .guide-activity-card--category .activity-card__name {
        font-size: 0.8rem;
    }
}
