/**
 * 투어 · 카드뉴스 CSS
 * Bootstrap 미사용 · pub_routes.css(네비·푸터)를 페이지 head에서 함께 로드
 */

.pub-tours-main {
    padding-top: 64px;
    min-height: 60vh;
}

.pub-tours-section {
    padding: 72px 24px 96px;
    background: var(--light-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pub-tours-section > .section-label,
.pub-tours-section > .section-title,
.pub-tours-section > .section-sub {
    width: 100%;
    max-width: 1080px;
}

.pub-tours-region-block {
    width: 100%;
    max-width: 1080px;
    margin: 0;
}

.pub-tours-region-block + .pub-tours-region-block {
    margin-top: 40px;
}

.pub-tours-region-title {
    margin: 0 0 24px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
}

.pub-tours-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 300px));
    justify-content: center;
    gap: 24px;
    margin: 0 auto 8px;
    width: 100%;
}

.pub-tours-card-grid > .pub-tours-card {
    width: 100%;
    max-width: 300px;
    justify-self: center;
}

.pub-tours-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pub-tours-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.pub-tours-card--static {
    cursor: default;
}

.pub-tours-card--static:hover {
    transform: none;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
}

.pub-tours-card-thumb {
    position: relative;
    min-height: 168px;
    background: linear-gradient(135deg, #0ea5e9 0%, #1a56db 55%, #0d1b2a 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.pub-tours-card-thumb--seoul {
    background: linear-gradient(135deg, #7c3aed 0%, #1a56db 55%, #0d1b2a 100%);
}

.pub-tours-card-thumb--busan {
    background: linear-gradient(135deg, #0ea5e9 0%, #1a56db 55%, #0d1b2a 100%);
}

.pub-tours-card-thumb--has-image,
.pub-tours-card-thumb--has-image.pub-tours-card-thumb--seoul,
.pub-tours-card-thumb--has-image.pub-tours-card-thumb--busan {
    overflow: hidden;
    background: #0d1b2a;
}

.pub-tours-card-thumb-img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pub-tours-card-badge {
    position: relative;
    z-index: 1;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pub-tours-card-body {
    padding: 22px 22px 24px;
    text-align: left;
}

.pub-tours-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    margin: 0 0 10px;
}

.pub-tours-card-desc {
    font-size: 0.92rem;
    line-height: 1.65;
    color: #64748b;
    margin: 0 0 14px;
}

.pub-tours-card-duration {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1a56db;
    margin: -6px 0 12px;
}

.pub-tours-card-meta {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
}

@media (max-width: 1024px) {
    .pub-tours-card-grid {
        grid-template-columns: repeat(2, minmax(0, 300px));
    }
}

@media (max-width: 768px) {
    .pub-tours-section {
        padding: 56px 16px 72px;
    }

    .pub-tours-card-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 360px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ── 부산7beach 상세 ── */
.pub-tours-hero {
    padding: 96px 24px 48px;
    background: linear-gradient(135deg, #0ea5e9 0%, #1a56db 50%, #0d1b2a 100%);
    color: var(--white);
}

.pub-tours-hero--seoul {
    background: linear-gradient(135deg, #7c3aed 0%, #1a56db 55%, #0d1b2a 100%);
}

.pub-tours-hero--busan {
    background: linear-gradient(135deg, #0ea5e9 0%, #1a56db 55%, #0d1b2a 100%);
}

.pub-tours-hero-badge {
    display: inline-block;
    margin: 14px 0 0;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pub-tours-hero-lead {
    max-width: 720px;
    line-height: 1.7;
}

.pub-tours-hero-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

/* 투어 상세 hero — 뒤로가기 왼쪽 · 뱃지·타이틀·요약 중앙 */
.pub-tours-detail-page .pub-tours-hero-inner {
    width: 100%;
}

.pub-tours-detail-page .pub-tours-hero-top {
    text-align: left;
    margin-bottom: 10px;
}

.pub-tours-detail-page .pub-tours-hero-center {
    width: 100%;
    text-align: center;
}

.pub-tours-detail-page .pub-tours-hero-center .pub-tours-hero-badge {
    margin-left: auto;
    margin-right: auto;
}

.pub-tours-detail-page .pub-tours-hero-center h1 {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.pub-tours-detail-page .pub-tours-hero-center .pub-tours-hero-lead {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.pub-tours-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 900;
    margin: 8px 0 12px;
}

.pub-tours-hero h1 .highlight {
    color: var(--accent);
}

.pub-tours-hero p {
    color: rgba(255, 255, 255, 0.88);
    margin-bottom: 18px;
}

.pub-tours-back {
    display: inline-block;
    color: var(--white);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
}

.pub-tours-back:hover {
    background: rgba(255, 255, 255, 0.12);
}

.pub-tours-detail {
    padding: 48px 24px 80px;
    background: var(--light-bg);
}

.pub-tours-detail-inner {
    max-width: var(--content-max);
    margin: 0 auto;
}

.pub-tours-content-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 18px;
}

.pub-tours-content-head h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
}

.pub-tours-count {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
}

.pub-tours-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    position: static;
    height: auto;
    padding: 0;
    background: transparent;
}

.pub-tours-tab {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1.5px solid #dde3f0;
    background: var(--white);
    color: #475569;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.pub-tours-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.pub-tours-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.pub-tours-search-form input[type="search"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1.5px solid #dde3f0;
    border-radius: 8px;
    font-size: 0.92rem;
}

.pub-tours-search-form button {
    padding: 10px 18px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.pub-tours-table-wrap {
    overflow-x: auto;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.pub-tours-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.pub-tours-table th,
.pub-tours-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf0f8;
    text-align: left;
    vertical-align: top;
}

.pub-tours-table th {
    background: #f8fafc;
    font-weight: 700;
    color: #475569;
}

.pub-tours-empty-cell {
    color: #94a3b8;
}

.pub-tours-empty-msg {
    padding: 32px 16px;
    text-align: center;
    color: #64748b;
    background: var(--white);
    border-radius: 12px;
}

.pub-tours-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.pub-tours-pagination a,
.pub-tours-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.84rem;
    text-decoration: none;
    color: #475569;
    background: var(--white);
    border: 1.5px solid #dde3f0;
}

.pub-tours-pagination a:hover {
    background: var(--light-bg);
    color: var(--primary);
}

.pub-tours-pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    font-weight: 700;
    border-radius: 4px;
}

.pub-tours-pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pub-tours-api-note {
    margin-top: 24px;
    font-size: 0.82rem;
    color: #64748b;
}

.pub-tours-api-note a {
    color: var(--primary);
    text-decoration: none;
}

/* ── 투어 상세 (tour_detail.php) ── */
.pub-tours-info-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
    padding: 28px 28px 32px;
}

.pub-tours-info-title {
    margin: 0 0 20px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
}

.pub-tours-info-list {
    margin: 0;
    display: grid;
    gap: 0;
}

.pub-tours-info-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px 20px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f8;
}

.pub-tours-info-row:last-child {
    border-bottom: 0;
}

.pub-tours-info-row dt {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
}

.pub-tours-info-row dd {
    margin: 0;
    font-size: 0.95rem;
    color: #0f172a;
    line-height: 1.6;
    word-break: break-word;
}

.pub-tours-info-row--block {
    grid-template-columns: 1fr;
    gap: 8px;
}

.pub-tours-extra-link {
    margin: 20px 0 0;
    text-align: center;
    font-size: 0.92rem;
}

.pub-tours-extra-link a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.pub-tours-extra-link a:hover {
    text-decoration: underline;
}

.pub-tours-companies {
    margin: 20px 0 0;
    padding: 28px 28px 32px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
}

.pub-tours-companies-title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
}

.pub-tours-companies-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
    border: 1px solid #e8ecf4;
    border-radius: 10px;
    overflow: hidden;
    background: #fafbff;
}

.pub-tours-companies-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f8;
}

.pub-tours-companies-item:last-child {
    border-bottom: 0;
}

.pub-tours-companies-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
}

.pub-tours-companies-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1d4ed8;
    line-height: 1.45;
    text-decoration: none;
}

.pub-tours-companies-link:hover {
    text-decoration: underline;
}

.pub-tours-companies-addr {
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.45;
    word-break: break-word;
}

.pub-tours-companies-desc {
    margin: 2px 0 0;
    font-size: 0.88rem;
    color: #334155;
    line-height: 1.55;
    word-break: break-word;
}

.pub-tours-detail-back {
    margin: 28px 0 0;
    text-align: center;
}

.pub-tours-detail-back-btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 8px;
    background: var(--primary);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.pub-tours-detail-back-btn:hover {
    opacity: 0.92;
}

.pub-tours-gallery {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #edf0f8;
}

.pub-tours-gallery-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
}

.pub-tours-gallery-slider {
    display: block;
}

.pub-tours-gallery-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #0f172a;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.08);
    touch-action: pan-y pinch-zoom;
}

.pub-tours-gallery-track {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
}

.pub-tours-gallery-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.pub-tours-gallery-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.pub-tours-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pub-tours-gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 44px;
    height: 44px;
    margin: 0;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #1d4ed8;
    font-size: 1.6rem;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    transform: translateY(-50%);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
}

.pub-tours-gallery-arrow--prev {
    left: 12px;
}

.pub-tours-gallery-arrow--next {
    right: 12px;
}

.pub-tours-gallery-arrow:hover:not(:disabled) {
    background: #eff6ff;
}

.pub-tours-gallery-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.pub-tours-gallery-status {
    margin: 14px 0 0;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
}

@media (max-width: 768px) {
    .pub-tours-detail-page .pub-tours-hero {
        padding: 80px 16px 36px;
    }

    .pub-tours-detail-page .pub-tours-hero h1 {
        font-size: clamp(1.45rem, 6vw, 1.9rem);
        line-height: 1.35;
    }

    .pub-tours-detail-page .pub-tours-hero-lead {
        font-size: 0.92rem;
        line-height: 1.65;
    }

    .pub-tours-detail-page .pub-tours-back {
        padding: 10px 14px;
        font-size: 0.84rem;
    }

    .pub-tours-detail {
        padding: 28px 12px 56px;
    }

    .pub-tours-detail-inner {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .pub-tours-info-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 12px 0;
    }

    .pub-tours-info-title {
        font-size: 1.05rem;
        margin-bottom: 14px;
    }

    .pub-tours-info-card {
        padding: 20px 14px 24px;
        border-radius: 14px;
    }

    .pub-tours-info-row dt {
        font-size: 0.78rem;
    }

    .pub-tours-info-row dd {
        font-size: 0.9rem;
    }

    .pub-tours-gallery {
        margin-top: 18px;
        padding-top: 18px;
        margin-left: -6px;
        margin-right: -6px;
    }

    .pub-tours-gallery-viewport {
        border-radius: 10px;
    }

    .pub-tours-gallery-track {
        aspect-ratio: 4 / 3;
    }

    .pub-tours-gallery-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.45rem;
        border-radius: 999px;
    }

    .pub-tours-gallery-arrow--prev {
        left: 8px;
    }

    .pub-tours-gallery-arrow--next {
        right: 8px;
    }

    .pub-tours-gallery-status {
        margin-top: 12px;
        font-size: 0.84rem;
    }

    .pub-tours-detail-back {
        margin-top: 22px;
    }

    .pub-tours-detail-back-btn {
        display: block;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
        padding: 12px 18px;
        text-align: center;
        box-sizing: border-box;
    }
}
