/* ===== Design Tokens ===== */
:root {
    /* Colors */
    --color-primary-blue: #2f93f7;
    --color-text-primary: #111111;
    --color-text-secondary: #767676;
    --color-bg-white: #ffffff; /* 완전 흰색 */

    /* Layout */
    --card-width: 280px;
    --card-gap: 24px;
    --radius-card: 20px;
}

/* ===== Base Styles ===== */
* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    color: var(--color-text-primary);
    overflow-x: hidden;
}

/* ===== Layout Structure ===== */
.hero-banner {
    background: #e0eef7;
    height: 162px;
    width: 100%;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.content {
    display: flex;
    flex-direction: column;
    padding-top: 40px;
    padding-bottom: 100px;
}

/* ===== Typography ===== */
.section-title {
    font-size: 24px; font-weight: 700;
    margin-bottom: 24px;
    display: flex; align-items: center; gap: 8px;
    color: var(--color-text-primary);
}

.badge-live {
    background-color: #ff4d4f; color: white;
    font-size: 12px; padding: 2px 6px;
    border-radius: 4px; vertical-align: middle; font-weight: 600;
}

/* =========================================
   [SECTION 1] 특가 항공권 슬라이더 (Center Mode)
   ========================================= */
.special-offers-section {
    position: relative;
    width: 100%;
    margin-top: 60px;
    margin-bottom: 100px;
    background: transparent;
}

/* 슬라이더 컨테이너 */
.slider-wrapper {
    background: transparent;
    position: relative;
    width: 100%;
    /* max-width 제거 또는 넓게 잡아서 그라데이션 영역 확보 */
    max-width: 100%;
    height: 480px; /* 카드+그림자 공간 충분히 확보 */
    display: flex;
    align-items: center;
    /* justify-content: center;  <- JS로 위치 계산하므로 제거 */
    overflow: hidden;
    padding: 20px 0;
    margin-top: 70px!important;
}

/* --- 양쪽 사이드 화이트 그라데이션 (Pure White) --- */
.slider-wrapper::before,
.slider-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 20%; /* 너비를 넓혀서 자연스럽게 흐리게 */
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* 왼쪽 그라데이션 */
.slider-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(224, 242, 254, 0.9) 0%, transparent 100%);
}

/* 오른쪽 그라데이션 */
.slider-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(241, 245, 249, 0.9) 0%, transparent 100%);
}

/* 트랙 */
.main-slider-track {
    display: flex;
    gap: var(--card-gap);
    padding: 0;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
    align-items: center;
    height: 100%;
}

/* 개별 카드 */
.offer-card {
    flex: 0 0 var(--card-width);
    height: 360px;
    border-radius: var(--radius-card);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

/* 활성화(가운데)된 카드 강조 효과 (선택 사항) */
.offer-card.active {
    transform: scale(1.05); /* 가운데 오면 약간 커짐 */
    z-index: 5;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.offer-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    z-index: 6;
}

/* 오버레이 */
.offer-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 75%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: white; padding: 24px 20px;
    display: flex; flex-direction: column; justify-content: flex-end;
}

/* 배지 & 텍스트 */
.card-badges { position: absolute; top: 20px; left: 20px; display: flex; gap: 6px; }
.card-badge { background: rgba(255,255,255,0.95); color: #333; padding: 5px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.card-badge.blue { background: var(--color-primary-blue); color: white; }

.offer-airline { font-size: 13px; opacity: 0.9; margin-bottom: 5px; }
.offer-city { font-size: 28px; font-weight: 800; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
.offer-date { font-size: 13px; opacity: 0.9; margin-bottom: 12px; }
.offer-price-area { display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto; }
.offer-original-price { font-size: 13px; text-decoration: line-through; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.offer-price { font-size: 24px; font-weight: 800; color: #87CEFA; }

/* 네비게이션 버튼 (화이트 그라데이션 위에 뜸) */
.nav-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 56px; height: 56px;
    border-radius: 50%;
    background: white;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-size: 20px; color: #333;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.2s;
}
.nav-btn:hover { background: var(--color-primary-blue); color: white; border-color: var(--color-primary-blue); }

/* 버튼 위치 조정 (화면 안쪽으로) */
.nav-btn.prev { left: 10%; }
.nav-btn.next { right: 10%; }

/* =========================================
   실시간 인기 (Bento Grid V2)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;600;700;800;900&display=swap');

.trending-section-v2 {
    background: #f8fafc;
    padding: 80px 0 100px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.trending-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.trending-header-v2 {
    display: flex;
    flex-direction: column;
    margin-bottom: 48px;
}

.trending-title-area {
    max-width: 600px;
}

.trending-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #60a5fa;
    margin-bottom: 16px;
}

.trending-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

.trending-title .highlight {
    color: #2563eb;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}

/* Bento Grid */
.trending-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 200px);
    gap: 20px;
}

/* Card Base */
.trend-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trend-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.15);
}

/* Hero Card (Rank 1) - 2x2 */
.trend-card.hero {
    grid-column: span 2;
    grid-row: span 2;
}

/* Small Cards */
.trend-card.small {
    grid-column: span 1;
    grid-row: span 1;
}

/* Wide Cards */
.trend-card.wide {
    grid-column: span 2;
    grid-row: span 1;
}

/* Full Width Card (8th) */
.trend-card.full {
    grid-column: span 4;
    grid-row: span 1;
}

/* Card Inner Structure */
.trend-card-inner {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Rank Ribbon */
.trend-rank-ribbon {
    width: 48px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 10;
}

.trend-card.hero .trend-rank-ribbon {
    background: #2563eb;
}

.trend-card:not(.hero) .trend-rank-ribbon {
    background: rgba(241, 245, 249, 0.95);
}

.rank-label {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    writing-mode: vertical-lr;
    transform: rotate(180deg);
}

.trend-card.hero .rank-label {
    color: rgba(255, 255, 255, 0.7);
}

.trend-card:not(.hero) .rank-label {
    color: #94a3b8;
}

.rank-number {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 900;
}

.trend-card.hero .rank-number {
    color: #ffffff;
}

.trend-card:not(.hero) .rank-number {
    color: #2563eb;
}

/* Card Content */
.trend-card-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.trend-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.7s ease;
}

.trend-card:hover .trend-card-bg {
    transform: scale(1.1);
}

.trend-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.3) 50%, transparent 100%);
}

/* Top Stats */
.trend-card-top {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    z-index: 10;
}

.live-views {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 6px 12px;
    width: fit-content;
}

.live-views .dot {
    width: 6px;
    height: 6px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-live 1.5s ease-in-out infinite;
}

.live-views span {
    font-size: 10px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hot-badge {
    background: #fbbf24;
    color: #0f172a;
    font-size: 10px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 10px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
    animation: bounce-soft 2s ease-in-out infinite;
}

@keyframes bounce-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Diff Badge */
.diff-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.diff-badge.up {
    background: rgb(255, 0, 0);
    color: #ffffff;
}

.diff-badge.down {
    background: rgb(23, 115, 255);
    color: #ffffff;
}

.diff-badge.new {
    background: rgb(145, 1, 161);
    color: #ffffff;
}

.diff-badge.same {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Bottom Info */
.trend-card-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    z-index: 10;
}

.trend-country {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #60a5fa;
    margin-bottom: 4px;
}

.trend-city-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
    margin-bottom: 4px;
}

.trend-card.hero .trend-city-name {
    font-size: 42px;
}

.trend-card:not(.hero) .trend-city-name {
    font-size: 24px;
}

.trend-tagline {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Live Views Badge - Bottom Position */
.trend-card-bottom .live-views {
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
    .trending-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto;
    }

    .trend-card.hero {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 360px;
    }

    .trend-card.small {
        grid-column: span 1;
        min-height: 240px;
    }

    .trend-card.wide,
    .trend-card.full {
        grid-column: span 2;
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .trending-section-v2 {
        padding: 60px 0 80px;
    }

    .trending-title {
        font-size: 42px;
    }

    .trending-bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .trend-card.hero,
    .trend-card.small,
    .trend-card.wide,
    .trend-card.full {
        grid-column: span 1;
        min-height: 280px;
    }

    .trend-rank-ribbon {
        width: 40px;
    }

    .rank-number {
        font-size: 22px;
    }

    .trend-card.hero .trend-city-name {
        font-size: 32px;
    }
}

@media (max-width: 1400px) {
    .container { padding: 0 100px; }
    .nav-btn.prev { left: 20px; }
    .nav-btn.next { right: 20px; }
    .trending-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .trending-grid { grid-template-columns: 1fr; }
    .nav-btn { display: none; }
    .slider-wrapper { overflow-x: auto; padding-left: 20px; height: 400px; }
    .slider-wrapper::before, .slider-wrapper::after { display: none; }
    .offer-card { height: 300px; flex: 0 0 240px; }
    .offer-city { font-size: 22px; }
    .offer-price { font-size: 20px; }
    .special-offers-section { margin-top: 40px; margin-bottom: 60px; }
    .section-title-modern { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .slider-wrapper { height: 360px; padding-left: 16px; }
    .offer-card { height: 280px; flex: 0 0 220px; }
    .offer-overlay { padding: 16px; }
    .offer-city { font-size: 20px; }
    .offer-price { font-size: 18px; }
    .card-badges { top: 12px; left: 12px; }
    .card-badge { font-size: 10px; padding: 4px 8px; }
    .trend-item { padding: 16px; }
    .trend-thumb { width: 50px; height: 50px; }
    .rank-num { font-size: 22px; width: 32px; margin-right: 12px; }
    .trend-city { font-size: 15px; }
    .score-val { font-size: 18px; }
}