/* ==========================================================================
   Immersive Bento Grid — 몰입감 있는 여행 아카이브
   ========================================================================== */

/* 경쾌한 색상 팔레트 오버라이드 */
.archive-hero,
.bento-filters,
.bento-grid {
    --accent-primary: #0EA5E9;    /* Sky blue */
    --accent-secondary: #F97316;  /* Orange */
    --accent-tertiary: #10B981;   /* Emerald */
    --accent-purple: #8B5CF6;     /* Purple */
    --accent-pink: #EC4899;       /* Pink */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   Clean Minimal Hero
   ========================================================================== */

.archive-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ft-bg);
    padding: 60px 0 80px;
}

.archive-hero .container {
    position: relative;
    text-align: center;
    padding: 0 20px;
}

/* Breadcrumbs */
.archive-hero .breadcrumbs {
    margin-bottom: 16px;
}

.archive-hero .breadcrumbs,
.archive-hero .breadcrumbs a,
.archive-hero .breadcrumbs span {
    color: var(--ft-text-light) !important;
}

.archive-hero .breadcrumbs a:hover {
    color: var(--ft-primary) !important;
}

.archive-hero .breadcrumbs .separator {
    color: var(--ft-text-light) !important;
    opacity: 0.5;
}

.archive-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.archive-hero h1 {
    font-family: var(--ft-font-sans);
    font-size: 3rem;
    font-weight: 700;
    color: var(--ft-text);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.archive-hero p {
    font-size: 1.125rem;
    color: var(--ft-text-light);
    line-height: 1.6;
    margin-bottom: 28px;
}

/* ==========================================================================
   Clean Search Bar (Hero 내부용)
   ========================================================================== */

.hero-search {
    max-width: 560px;
    margin: 0 auto;
}

.hero-search .search-form {
    display: flex;
    background: var(--ft-bg-alt);
    border-radius: 100px;
    padding: 6px;
    box-shadow: var(--ft-shadow);
}

.hero-search .search-field {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 24px;
    font-size: 1rem;
    color: var(--ft-text);
    outline: none;
}

.hero-search .search-field::placeholder {
    color: var(--ft-text-light);
}

.hero-search .search-submit {
    background: var(--ft-primary);
    border: none;
    padding: 14px 28px;
    border-radius: 100px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.hero-search .search-submit:hover {
    background: var(--ft-primary-dark);
    transform: scale(1.02);
}

/* ==========================================================================
   Glassmorphism Filter Pills
   ========================================================================== */

.bento-filters {
    position: relative;
    z-index: 10;
    margin-bottom: 40px;
    padding: 0;
    background: transparent;
}

.filter-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ft-text-light);
    margin-right: 8px;
    padding: 8px 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ft-text);
    background: var(--ft-bg-alt, #f5f5f5);
    border: none;
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
}

.filter-pill:hover {
    transform: translateY(-2px);
    background: var(--accent-primary);
    color: #fff;
    box-shadow: none;
}

.filter-pill.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: #fff;
    box-shadow: none;
}

/* ==========================================================================
   Bento Grid — 경쾌한 스타일
   ========================================================================== */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 16px;
    margin-bottom: 60px;
}

/* Bento Card */
.bento-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.bento-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

.bento-card a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Card Image */
.bento-card-image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.bento-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bento-card:hover .bento-card-image img {
    transform: scale(1.15);
}

/* Card Gradient Overlay */
.bento-card-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        transparent 100%
    );
}

/* Card Content */
.bento-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 24px;
    color: #fff;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.bento-card:hover .bento-card-content {
    transform: translateY(0);
}

.bento-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.bento-card-tag {
    display: inline-block;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    color: #fff;
}

.bento-card-tag--dest {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
}

.bento-card-title {
    font-family: var(--ft-font-sans);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bento-card-excerpt {
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.bento-card:hover .bento-card-excerpt {
    opacity: 0.9;
    transform: translateY(0);
}

.bento-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    opacity: 0.85;
}

.bento-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Badge (Duration) */
.bento-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.95);
    color: var(--ft-text);
    border-radius: 100px;
    box-shadow: none;
    backdrop-filter: blur(8px);
}

/* ==========================================================================
   Card Size Variations
   ========================================================================== */

/* Featured Card (Large) */
.bento-card--featured {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-card--featured .bento-card-content {
    padding: 32px;
}

.bento-card--featured .bento-card-title {
    font-size: 2rem;
    -webkit-line-clamp: 3;
}

.bento-card--featured .bento-card-excerpt {
    display: -webkit-box;
    font-size: 1rem;
}

.bento-card--featured .bento-card-meta {
    font-size: 0.9rem;
}

/* Wide Card */
.bento-card--wide {
    grid-column: span 2;
}

.bento-card--wide .bento-card-title {
    font-size: 1.35rem;
}

/* Tall Card */
.bento-card--tall {
    grid-row: span 2;
}

.bento-card--tall .bento-card-content {
    padding: 28px;
}

.bento-card--tall .bento-card-title {
    font-size: 1.35rem;
    -webkit-line-clamp: 3;
}

.bento-card--tall .bento-card-excerpt {
    display: -webkit-box;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px;
    }
}

@media (max-width: 1024px) {
    .archive-hero h1 {
        font-size: 2.5rem;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .bento-card--featured {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 768px) {
    .archive-hero {
        padding: 40px 0 48px;
    }

    .archive-hero h1 {
        font-size: 1.75rem;
    }

    .archive-hero p {
        font-size: 0.938rem;
        margin-bottom: 20px;
    }

    /* 필터 섹션 개선 */
    .bento-filters {
        margin-bottom: 28px;
    }

    .filter-section {
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-section-label {
        width: 100%;
        flex-basis: 100%;
        margin-bottom: 4px;
    }

    .filter-pill {
        padding: 8px 14px;
        font-size: 0.813rem;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 180px;
        gap: 12px;
    }

    .bento-card {
        border-radius: 16px;
    }

    .bento-card-content {
        padding: 16px;
    }

    .bento-card-title {
        font-size: 1rem;
    }

    .bento-card--featured .bento-card-title {
        font-size: 1.35rem;
    }

    .bento-card--featured .bento-card-content {
        padding: 20px;
    }

    .bento-card-badge {
        padding: 6px 12px;
        font-size: 0.7rem;
    }

    .hero-search .search-form {
        padding: 4px;
    }

    .hero-search .search-field {
        padding: 12px 18px;
        font-size: 0.938rem;
    }

    .hero-search .search-submit {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .archive-hero {
        padding: 32px 0 40px;
    }

    .archive-hero h1 {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }

    .archive-hero p {
        font-size: 0.875rem;
        margin-bottom: 20px;
    }

    /* 검색바 - 컴팩트 + 돋보기 아이콘 */
    .hero-search {
        padding: 0 16px;
    }

    .hero-search .search-form {
        padding: 3px 3px 3px 14px;
        border-radius: 50px;
    }

    .hero-search .search-field {
        padding: 6px 8px;
        font-size: 0.875rem;
    }

    .hero-search .search-submit {
        width: 32px;
        height: 32px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .hero-search .search-submit svg {
        width: 14px;
        height: 14px;
        stroke: white;
    }

    /* 필터 섹션 - 세로 스크롤 개선 */
    .bento-filters {
        margin-bottom: 24px;
    }

    .filter-section {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 16px;
        overflow: visible;
        flex-wrap: wrap;
    }

    .filter-section-label {
        width: 100%;
        margin-bottom: 4px;
        padding: 0;
    }

    .filter-section .filter-pills-wrap {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }

    /* 필터 pills를 래핑하도록 수정 */
    .filter-section {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .filter-section-label {
        width: 100%;
        flex-basis: 100%;
    }

    .filter-pill {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 0.813rem;
    }

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

    .bento-card {
        min-height: 200px;
    }

    .bento-card--featured,
    .bento-card--wide,
    .bento-card--tall {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento-card--featured {
        min-height: 260px;
    }

    .bento-card--featured .bento-card-excerpt {
        display: none;
    }
}

/* ==========================================================================
   Scroll Animation (Optional Enhancement)
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
    .bento-card {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 0.6s ease forwards;
    }

    .bento-card:nth-child(1) { animation-delay: 0.1s; }
    .bento-card:nth-child(2) { animation-delay: 0.15s; }
    .bento-card:nth-child(3) { animation-delay: 0.2s; }
    .bento-card:nth-child(4) { animation-delay: 0.25s; }
    .bento-card:nth-child(5) { animation-delay: 0.3s; }
    .bento-card:nth-child(6) { animation-delay: 0.35s; }
    .bento-card:nth-child(7) { animation-delay: 0.4s; }
    .bento-card:nth-child(8) { animation-delay: 0.45s; }
    .bento-card:nth-child(n+9) { animation-delay: 0.5s; }

    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}
