/* =====================================================
   🗼 JAPAN TRIP - STABLE VERSION
   Consistent with Bus Tour & Site Branding
   ===================================================== */

:root {
    --km-blue: #0f294d;
    --km-gold: #ffc11c;
    --km-brand: #1962EB;
    --km-bg-faint: #f8f9fb;
    --km-border: #edf2f4;
}

/* 1. Hero Area - Fix Contrast & Alignment */
.jp-trip-hero {
    position: relative;
    height: 600px;
    background: url('/img/japan-trip/banner1.jpg') center center / cover no-repeat;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* 真正垂直居中 */
    justify-content: flex-start;
    /* 恢复从顶部开始布局 */
    text-align: center;
    color: white;
    overflow: hidden;
}

.jp-trip-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 30, 80, 0.2);
    /* Darker overlay for better text readability */
    z-index: 1;
}

#service_nav-placeholder {
    width: 100%;
    display: block;
    /* 恢复自然占位 */
    z-index: 50;
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1000px;
    margin-top: auto;
    /* 自动撑开顶部距离 */
    margin-bottom: 110px;
    /* 固定底部距离，确保搜索框不贴边 */
    transform: none;
    /* 移除之前的位移 */
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 40px;
}

/* 🔍 Search Bar - Premium Float Design */
.search-container {
    background: #ffffff;
    padding: 6px;
    border-radius: 80px;
    display: flex;
    max-width: 750px;
    margin: 0 auto;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 1);
    position: relative;
    z-index: 20;
    transform: translateY(15px);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}


.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 30px;
}

.search-icon {
    color: #a0aec0;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.search-container:focus-within .search-icon {
    color: var(--km-brand);
}

.search-container input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 20px;
    color: #1a202c;
    /* Strong contrast */
    font-size: 17px;
    outline: none;
    width: 100%;
}

.search-container input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-btn {
    background: var(--km-gold);
    color: #000;
    border: none;
    padding: 0 40px;
    height: 56px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 193, 28, 0.3);
}

.search-btn:hover {
    background: #000;
    color: var(--km-gold);
    transform: translateX(2px);
}

/* 2. Common Layout */
.jp-section {
    padding: 80px 0;
}

.container-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-head {
    text-align: center;
    margin-bottom: 70px;
}

.section-head h2 {
    font-size: 34px;
    color: var(--km-blue);
    margin-bottom: 20px;
    font-weight: 800;
}

.section-head p {
    font-size: 16px;
    color: #666;
}

/* 4. Service Grid - Premium Classic Style */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-item {
    padding: 45px 35px;
    background: #ffffff;
    border: 1px solid #eee;
    /* 极细边框 */
    border-radius: 4px;
    /* 小圆角更显稳重 */
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-item:hover {
    border-color: var(--km-brand);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fcfdfe;
    border-radius: 8px;
}

.service-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.service-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--km-blue);
    margin-bottom: 15px;
}

.service-item p {
    font-size: 14.5px;
    color: #666;
    line-height: 1.7;
    margin: 0;
}


/* Handled by section-head and service-grid styles */

/* 3. About Us - Classic Split */
.about-split {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-img {
    flex: 1;
}

.about-img img {
    width: 100%;
    border-radius: 8px;
}

.about-text {
    flex: 1;
}

.motto-tag {
    color: var(--km-brand);
    font-weight: 800;
    font-size: 14px;
    display: inline-block;
    margin-bottom: 10px;
}

.about-text h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--km-blue);
}

.about-text p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

/* 4. Service Grid Styles Handled in Matrix Split */

/* 5. Trip Cards - Based on Bus Tour */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.tab-btn {
    padding: 10px 25px;
    border: 1px solid var(--km-border);
    border-radius: 50px;
    background: white;
    cursor: pointer;
    font-weight: 600;
}

.tab-btn.active {
    background: var(--km-blue);
    color: white;
}

/* 5. Trip Cards - Compact Gallery Style (4 Column) */
.trips-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* 改为4列 */
    gap: 20px;
    /* 间距稍微收紧 */
}

.view-more-container {
    text-align: center;
    margin-top: 50px;
}

.btn-view-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 45px;
    border: 2px solid var(--km-brand);
    color: var(--km-brand);
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-view-more:hover {
    background: var(--km-brand);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(25, 98, 235, 0.2);
}

.btn-view-more svg {
    transition: transform 0.3s ease;
}

.btn-view-more:hover svg {
    transform: translateX(4px);
}

.trip-card {
    background: white;
    border-radius: 12px;
    /* 圆角稍微改小，适配小卡片 */
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.trip-card:hover {
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(25, 98, 235, 0.15);
}

.trip-img {
    aspect-ratio: 3/2;
    /* 宽幅比例，不再那么高 */
    position: relative;
    overflow: hidden;
}

.trip-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.trip-card:hover .trip-img img {
    transform: scale(1.06);
}

/* Image Badges - Scaled down for smaller cards */
.trip-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}

.badge-promo {
    background: #FF4757;
    /* 促销红 */
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 50px;
    /* Pill style */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.badge-promo svg {
    flex-shrink: 0;
    /* 💡 通过滤镜增加图标厚度，提升小尺寸下的清晰度 */
    filter: drop-shadow(0.5px 0 0 currentColor) drop-shadow(-0.5px 0 0 currentColor) drop-shadow(0 0.5px 0 currentColor);
    transform: scale(1.1);
    /* 稍微放大一点点 */
}

.promo-deadline-text {
    opacity: 0.9;
    font-weight: 500;
    font-size: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 6px;
    margin-left: 2px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.badge-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 10;
    display: flex;
    align-items: center;
}

/* 🔵 Short Trips (Hours) - White background with blue text */
.badge-duration.is-hour {
    background: #ffffff;
    color: var(--km-brand);
}

/* 🔵 Long Trips (Days) - Blue background with white text */
.badge-duration.is-day {
    background: var(--km-brand);
    color: #ffffff;
}

.trip-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Premium Trip Tags */
.trip-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.trip-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    background: #f8f9fb;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.trip-tag svg {
    flex-shrink: 0;
    opacity: 0.7;
    stroke-width: 2px;
}

/* 🎨 Minimalist refinements for specific categories */
.trip-tag.hot, .trip-tag.snow, .trip-tag.culture, .trip-tag.day, .trip-tag.group {
    background: #ffffff;
    border-color: #e2e8f0;
}

/* Optional: Slight color accent on the icon only, or keeping it monochrome for maximum business feel */
.trip-tag.day svg { color: #0891b2; }
.trip-tag.group svg { color: #4f46e5; }
.trip-tag.hot svg { color: #e11d48; }
.trip-tag.snow svg { color: #0284c7; }
.trip-tag.culture svg { color: #ea580c; }

.trip-name {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

/* New: Feature Row (Group size, Languages) */
.trip-features-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 11px;
    color: #64748b;
    align-items: center;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trip-meta {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    /* 底部对齐 */
    justify-content: space-between;
    border-top: 1px solid #f1f5f9;
    padding-top: 12px;
}

.price-container {
    display: flex;
    flex-direction: row;
    /* 水平排列 */
    align-items: flex-end;
    /* 底部对齐 */
    gap: 6px;
}

.price-old {
    font-size: 11px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-bottom: 3px;
    /* 微调对齐 */
}

.price-box {
    display: flex;
    align-items: baseline;
    gap: 1px;
}

.price-symbol {
    font-size: 12px;
    color: var(--km-brand);
    font-weight: 700;
}

/* Promo Price Color */
.price-symbol.promo-text,
.price-num.promo-text {
    color: #FF4757;
    /* 促销红 */
}

.price-num {
    font-size: 20px;
    font-weight: 900;
    color: var(--km-brand);
    letter-spacing: -0.5px;
}

.price-unit {
    font-size: 11px;
    color: #94a3b8;
    margin-left: 2px;
}

.trip-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: all 0.3s ease;
    margin-bottom: 4px;
    /* Align with price baseline */
}

.trip-card:hover .trip-arrow {
    background: var(--km-blue);
    color: white;
    transform: translateX(3px);
}

/* 6. CTA Banner - Immersive Premium Style */
.jp-section-cta {
    position: relative;
    padding: 120px 0;
    background: url('/img/japan-trip/cta_banner.jpg') center center / cover no-repeat;
    background-attachment: fixed;
    /* 视差效果 */
    overflow: hidden;
    text-align: center;
}

.jp-section-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 30, 80, 0.2);
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    margin: 0 auto;
    color: white;
}

.cta-content h2 {
    font-size: 46px;
    font-weight: 900;
    margin-bottom: 25px;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.cta-content p {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 45px;
    line-height: 1.6;
}

.cta-btn-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--km-gold);
    color: #000;
    padding: 20px 48px;
    border-radius: 60px;
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cta-btn-main:hover {
    transform: scale(1.05) translateY(-5px);
    background: white;
    color: var(--km-brand);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cta-btn-main svg {
    transition: transform 0.3s ease;
}

.cta-btn-main:hover svg {
    transform: translateX(5px);
}

/* 之前的老旧样式重置 */
.cta-box {
    display: none;
}

/* Mobile Fixes */
@media (max-width: 900px) {
    .about-split {
        flex-direction: column;
    }

    .service-grid,
    .trips-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content h1 {
        font-size: 32px;
    }
}

@media (max-width: 600px) {

    .service-grid,
    .trips-container {
        grid-template-columns: 1fr;
    }

    /* 搜索栏移动端优化 */
    .search-container {
        flex-direction: column;
        border-radius: 20px;
        padding: 10px;
        transform: translateY(25px);
        /* 稍微增加下移，防止和上方文案太近 */
    }

    .search-input-wrapper {
        padding-left: 15px;
        margin-bottom: 8px;
    }

    .search-container input {
        padding: 12px 10px;
        font-size: 16px;
    }

    .search-btn {
        width: 100%;
        height: 50px;
        border-radius: 12px;
        padding: 0;
    }

    /* CTA Mobile Optimization */
    .jp-section-cta {
        padding: 80px 20px;
    }

    .cta-content h2 {
        font-size: 32px;
    }

    .cta-content p {
        font-size: 16px;
    }

    .cta-btn-main {
        padding: 16px 32px;
        width: 100%;
        justify-content: center;
    }
}

/* =====================================================
   🛠️ UTILITIES & DYNAMIC STATES
   ===================================================== */

.bg-white {
    background: #ffffff !important;
}

.bg-faint {
    background: #f8f9fb !important;
}

/* Loading & Empty States */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
}

.loading-text {
    color: #999;
    margin-top: 15px;
    font-size: 14px;
}

.spin-anim {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.trip-empty,
.trip-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Card Features */
.feature-sep {
    border-left: 1px solid #e2e8f0;
    padding-left: 8px;
}