/* ================================================
   홈 페이지 스타일
   ================================================ */

/* ================================================
   히어로 섹션
================================================ */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-top: 0;
    background: #faf9f7;
    --home-ink: #1a1a1a;
    --home-rose: #ff3b30;
    --home-peach: #ffdfc4;
    --home-mint: #d4ebd0;
    --home-paper: #faf9f7;
    --home-soft: #f0ece6;
    --home-line: rgba(26, 26, 26, 0.12);
}

/* 슬라이더 */
.hero-slider {
    position: relative;
    width: 100%;
    height: 560px;
}

.hero-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-bg {
    width: 100%;
    height: 100%;
    background-color: #2b201b;
    background-image: var(--bg-pc, none);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.02);
    transition: transform 6s ease;
}

.hero-slide.active .hero-bg {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 82% 22%, rgba(255, 179, 138, 0.28) 0, rgba(255, 179, 138, 0) 26%),
        linear-gradient(90deg, rgba(36, 26, 30, 0.9) 0%, rgba(36, 26, 30, 0.58) 52%, rgba(255, 248, 239, 0.1) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    padding-top: 40px;
    padding-bottom: 80px;
    max-width: 720px;
}

.hero-label {
    width: fit-content;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.4px;
    color: #ffe8d8;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-size: 50px;
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -1.8px;
    margin-bottom: 18px;
    color: #fff;
}

.hero-copy {
    max-width: 560px;
    margin-bottom: 20px;
    color: rgba(255, 248, 239, 0.82);
    font-size: 17px;
    line-height: 1.7;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.hero-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 248, 239, 0.92);
    font-size: 12px;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 26px;
    background: var(--home-ink);
    color: #fff8ef;
    border-radius: var(--radius-full);
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 18px 36px rgba(36, 26, 30, 0.18);
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    width: fit-content;
}

.hero-cta:hover {
    background: var(--home-rose);
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(232, 54, 93, 0.3);
}

.hero-cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 22px;
    border: 1px solid rgba(36, 26, 30, 0.16);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.62);
    color: var(--home-ink);
    font-size: 15px;
    font-weight: 800;
    transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.hero-cta-secondary:hover {
    transform: translateY(-2px);
    border-color: rgba(233, 79, 114, 0.42);
    background: #fff;
}

/* 슬라이더 인디케이터 */
.hero-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: transparent;
    transition: background var(--transition), width var(--transition);
    cursor: pointer;
    border: none;
    position: relative;
}

.hero-dot::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
}

.hero-dot.active {
    background: transparent;
    width: 32px;
    border-radius: 4px;
}

.hero-dot.active::before {
    width: 24px;
    background: #fff;
    border-radius: 4px;
}

/* 이전/다음 버튼 */
.hero-prev,
.hero-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background var(--transition);
    cursor: pointer;
}

.hero-prev:hover,
.hero-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

/* 기본 히어로 (배너 없을 때) */
.hero-default {
    min-height: 640px;
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 223, 196, 0.44) 0, rgba(255, 223, 196, 0) 30%),
        radial-gradient(circle at 20% 84%, rgba(212, 235, 208, 0.56) 0, rgba(212, 235, 208, 0) 28%),
        linear-gradient(135deg, var(--home-paper) 0%, var(--home-soft) 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* 히어로 배경 장식 */
.hero-default::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(26, 26, 26, 0.07) 1px, transparent 1px),
        linear-gradient(rgba(26, 26, 26, 0.05) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 88%, transparent 100%);
    opacity: 0.34;
}

.hero-default-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
    align-items: center;
    gap: 58px;
    padding: 96px var(--spacing-lg);
}

.hero-copy-block {
    max-width: 700px;
}

.hero-default-title {
    max-width: 680px;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: clamp(48px, 7vw, 88px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -3.2px;
    color: var(--home-ink);
    margin-bottom: 24px;
}

.hero-default-sub {
    max-width: 520px;
    font-size: 18px;
    color: rgba(26, 26, 26, 0.68);
    margin-bottom: 28px;
}

.hero-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.hero-default .hero-tags span {
    border-color: rgba(26, 26, 26, 0.12);
    background: rgba(255, 255, 255, 0.58);
    color: rgba(26, 26, 26, 0.76);
    box-shadow: 0 8px 24px rgba(26, 26, 26, 0.06);
}

.hero-diary-panel {
    position: relative;
    min-height: 440px;
}

.hero-diary-panel::before {
    content: '';
    position: absolute;
    inset: 42px 44px 50px 36px;
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(250, 249, 247, 0.24)),
        radial-gradient(circle at 70% 36%, rgba(212, 235, 208, 0.7), transparent 30%);
    box-shadow: 10px 10px 0 rgba(26, 26, 26, 0.05), 0 28px 80px rgba(26, 26, 26, 0.1);
}

.diary-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 170px;
    padding: 18px;
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--home-ink);
    box-shadow: 5px 5px 0 rgba(26, 26, 26, 0.06), 0 18px 50px rgba(26, 26, 26, 0.1);
    backdrop-filter: blur(18px);
}

.diary-card span {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--home-rose);
}

.diary-card strong {
    font-size: 20px;
    line-height: 1.1;
}

.diary-card em {
    font-size: 13px;
    color: rgba(26, 26, 26, 0.6);
    font-style: normal;
}

.diary-card-main {
    top: 74px;
    right: 64px;
    min-width: 220px;
    min-height: 154px;
}

.diary-card-peach {
    top: 248px;
    left: 10px;
    background: rgba(255, 242, 231, 0.92);
}

.diary-card-mint {
    right: 12px;
    bottom: 36px;
    background: rgba(238, 250, 234, 0.94);

}

.route-preview-section {
    padding: 10px 0 var(--spacing-2xl);
    background: var(--home-paper);
}

.route-preview-card {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
    gap: 34px;
    align-items: center;
    padding: 30px;
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: 22px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.44)),
        radial-gradient(circle at 82% 12%, rgba(255, 223, 196, 0.6), transparent 26%);
    box-shadow: 8px 8px 0 rgba(26, 26, 26, 0.05), 0 22px 60px rgba(26, 26, 26, 0.08);
}

.route-preview-copy h2 {
    max-width: 560px;
    margin-top: 12px;
    color: var(--home-ink);
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: clamp(32px, 4.2vw, 58px);
    line-height: 0.98;
    letter-spacing: -1.8px;
}

.route-preview-copy p {
    max-width: 480px;
    margin-top: 14px;
    color: rgba(26, 26, 26, 0.62);
    font-size: 15px;
    line-height: 1.7;
}

.route-timeline {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.route-timeline li {
    display: grid;
    grid-template-columns: 68px 1fr;
    gap: 8px 16px;
    padding: 16px;
    border: 1px solid rgba(26, 26, 26, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.route-timeline span {
    grid-row: span 2;
    color: var(--home-rose);
    font-size: 13px;
    font-weight: 900;
}

.route-timeline strong {
    color: var(--home-ink);
    font-size: 16px;
}

.route-timeline em {
    color: rgba(26, 26, 26, 0.56);
    font-size: 13px;
    font-style: normal;
}

/* ================================================
   카테고리 스트립
================================================ */
.category-strip {
    background: rgba(250, 249, 247, 0.9);
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
    position: sticky;
    top: var(--header-height);
    z-index: 50;
    backdrop-filter: blur(18px);
}

.category-scroll {
    display: flex;
    gap: var(--spacing-sm);
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.category-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 7px;
    border: 1px solid rgba(26, 26, 26, 0.12);
    background: rgba(255, 255, 255, 0.62);
    white-space: nowrap;
    flex-shrink: 0;
    transition: all var(--transition);
    cursor: pointer;
}

.category-chip:hover {
    border-color: var(--home-ink);
    color: #fff;
    background: var(--home-ink);
    transform: translateY(-2px);
}

.category-chip.chip-all {
    border-color: var(--home-ink);
    background: var(--home-ink);
    color: #fff;
}

.chip-label {
    font-size: 11px;
    font-weight: 800;
    color: rgba(26, 26, 26, 0.72);
}

.category-chip:hover .chip-label {
    color: #fff;
}

.category-chip.chip-all .chip-label {
    color: #fff;
}

/* ================================================
   홈 섹션 공통
================================================ */
.home-section {
    padding: var(--spacing-2xl) 0;
    background: var(--home-paper);
}

.home-section + .home-section {
    border-top: 1px solid rgba(26, 26, 26, 0.08);
}

.section-header {
    align-items: end;
}

.section-badge {
    display: inline-flex;
    width: fit-content;
    padding: 6px 11px;
    border: 1px solid rgba(233, 79, 114, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--home-ink);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.section-title {
    margin-top: 10px;
    color: var(--home-ink);
}

.section-subtitle {
    max-width: 480px;
    margin-top: 8px;
    color: rgba(26, 26, 26, 0.58);
    font-size: 15px;
}

.fomo-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.fomo-pill-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid rgba(26, 26, 26, 0.12);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.68);
    color: rgba(26, 26, 26, 0.7);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

/* ================================================
   팝업 그리드
================================================ */
.popup-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.popup-grid--popular {
    grid-template-columns: 1.2fr repeat(2, 1fr);
}

.popup-grid--popular .card-featured {
    grid-row: span 2;
}

.popup-grid--latest {
    grid-template-columns: repeat(4, 1fr);
}

.card-micro-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 10px;
}

.card-micro-badges span {
    padding: 4px 7px;
    border: 1px solid rgba(26, 26, 26, 0.1);
    border-radius: 6px;
    background: rgba(250, 249, 247, 0.86);
    color: rgba(26, 26, 26, 0.62);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ================================================
   코스 섹션
================================================ */
.course-section {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 223, 196, 0.38), transparent 30%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent),
        var(--home-soft);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.course-card {
    background: rgba(255, 250, 247, 0.86);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(26, 26, 26, 0.1);
    box-shadow: 6px 6px 0 rgba(26, 26, 26, 0.05), 0 16px 34px rgba(26, 26, 26, 0.08);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
}

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

.course-thumb {
    aspect-ratio: 16/9;
    background:
        linear-gradient(90deg, rgba(26, 26, 26, 0.05) 1px, transparent 1px),
        linear-gradient(rgba(26, 26, 26, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 72% 28%, rgba(212, 235, 208, 0.72), transparent 32%),
        linear-gradient(135deg, #f6e8dd 0%, #f7f2ed 100%);
    background-size: 32px 32px, 32px 32px, auto, auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-thumb-placeholder {
    font-size: 48px;
}

.course-body {
    padding: var(--spacing-md);
}

.course-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: 23px;
    line-height: 1;
    font-weight: 900;
    color: var(--home-ink);
    margin-bottom: 6px;
}

.course-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.course-count {
    display: inline-block;
    font-size: 11px;
    font-weight: 900;
    color: var(--home-ink);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(26, 26, 26, 0.1);
    padding: 5px 10px;
    border-radius: 7px;
    text-transform: uppercase;
}

.latest-section {
    background:
        radial-gradient(circle at 86% 16%, rgba(212, 235, 208, 0.34), transparent 28%),
        var(--home-paper);
}

.course-card-link {
    display: block;
    height: 100%;
    color: inherit;
}

.course-thumb-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-main-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================================
   반응형
================================================ */
@media (max-width: 1024px) {
    .popup-grid--latest {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-default-content {
        grid-template-columns: 1fr;
    }

    .hero-diary-panel {
        min-height: 340px;
        max-width: 520px;
    }

    .route-preview-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 360px;
    }

    .hero-bg {
        background-image: var(--bg-mobile, none);
    }

    .hero-title,
    .hero-default-title {
        font-size: 38px;
    }

    .hero-default-title {
        letter-spacing: -1.6px;
    }

    .hero-default-content {
        padding: 64px var(--spacing-lg);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .popup-grid--popular,
    .popup-grid--latest,
    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-prev,
    .hero-next {
        width: 36px;
        height: 36px;
    }

    .hero-prev { left: 12px; }
    .hero-next { right: 12px; }

    .hero-content {
        padding-left: var(--spacing-lg);
        padding-right: var(--spacing-lg);
    }

    .hero-diary-panel {
        display: none;
    }

    .hero-cta-row {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta,
    .hero-cta-secondary {
        width: 100%;
    }

    .route-preview-card {
        padding: 22px;
    }

    .route-timeline li {
        grid-template-columns: 58px 1fr;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 430px;
    }

    .hero-content {
        justify-content: flex-end;
        padding-bottom: 78px;
    }

    .hero-prev,
    .hero-next {
        display: none;
    }

    .popup-grid--popular,
    .popup-grid--latest,
    .course-grid {
        grid-template-columns: 1fr;
    }

    .hero-default-title {
        font-size: 34px;
    }

    .hero-default-sub,
    .hero-copy {
        font-size: 15px;
    }

    .hero-tags {
        gap: 6px;
    }

    .hero-tags span {
        font-size: 11px;
        padding: 5px 9px;
    }

    .route-preview-section {
        padding-top: 18px;
    }

    .route-timeline li {
        grid-template-columns: 1fr;
    }

    .route-timeline span {
        grid-row: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slide,
    .hero-bg,
    .hero-cta,
    .hero-cta-secondary,
    .category-chip,
    .course-card,
    .popup-card {
        transition: none;
    }
}
