/**
 * 黄山文物导览 - 首页专属样式
 * 根据效果图优化：山水画风格Banner + 手绘图标 + 横向滚动卡片
 */

/* ========== 首页头部Banner ========== */
.home-header {
    position: relative;
    min-height: 280px;
    overflow: hidden;
    background: linear-gradient(180deg, #E8E0D0 0%, #F5EFE6 60%, var(--bg-paper) 100%);
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

/* 山脉层 - 使用CSS绘制简化的山水画效果 */
.mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: 
        /* 远山 - 淡灰 */
        linear-gradient(165deg, transparent 40%, rgba(139, 115, 85, 0.15) 40%, rgba(139, 115, 85, 0.15) 42%, transparent 42%),
        linear-gradient(195deg, transparent 35%, rgba(139, 115, 85, 0.12) 35%, rgba(139, 115, 85, 0.12) 38%, transparent 38%),
        /* 中山 - 中灰 */
        linear-gradient(170deg, transparent 50%, rgba(92, 64, 51, 0.18) 50%, rgba(92, 64, 51, 0.18) 55%, transparent 55%),
        linear-gradient(190deg, transparent 45%, rgba(92, 64, 51, 0.15) 45%, rgba(92, 64, 51, 0.15) 52%, transparent 52%),
        /* 近山 - 深色 */
        linear-gradient(175deg, transparent 60%, rgba(92, 64, 51, 0.25) 60%, rgba(92, 64, 51, 0.25) 70%, transparent 70%);
}

/* HUANGSHAN 水印文字 */
.watermark-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Times New Roman', serif;
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 12px;
    color: rgba(139, 115, 85, 0.12);
    white-space: nowrap;
    pointer-events: none;
    text-transform: uppercase;
}

.header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: calc(var(--safe-top, 20px) + 30px) 20px 20px;
}

.main-title {
    font-family: "Noto Serif SC", serif;
    font-size: 28px;
    font-weight: 900;
    color: var(--theme-brown);
    letter-spacing: 6px;
    margin: 0 0 8px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
}

.sub-title {
    font-family: 'Times New Roman', serif;
    font-size: 10px;
    color: var(--theme-brown-light);
    letter-spacing: 2px;
    opacity: 0.8;
    margin: 0;
}

.header-illustration {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    margin-top: 10px;
    padding-bottom: 50px;
}

.illustration-img {
    width: 200px;
    height: auto;
    max-height: 160px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(92, 64, 51, 0.2));
}

/* ========== 导航卡片区域 ========== */
.nav-card {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    background: #FFFFFF;
    margin: -40px 16px 0;
    padding: 20px 12px;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(92, 64, 51, 0.12);
    position: relative;
    z-index: 10;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    flex: 1;
    max-width: 80px;
}

.nav-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
}

/* "说"字特殊图标 */
.speak-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #D4A574 0%, #8B6914 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(139, 105, 20, 0.3);
}

.speak-char {
    font-family: "Ma Shan Zheng", cursive;
    font-size: 28px;
    color: #FFFFFF;
    font-weight: normal;
}

.nav-label {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

/* ========== 搜索栏 ========== */
.search-bar {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    margin: 20px 16px;
    padding: 14px 20px;
    border-radius: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(198, 156, 109, 0.2);
}

.search-bar i {
    color: var(--theme-gold);
    font-size: 18px;
    margin-right: 12px;
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

/* ========== 区块通用 ========== */
.section-block {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--theme-brown);
    margin: 0;
    position: relative;
    padding-left: 14px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, var(--theme-gold) 0%, var(--theme-brown) 100%);
    border-radius: 2px;
}

.section-more {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== 互动体验 - 横向滚动 ========== */
.interact-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

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

.interact-card {
    flex: 0 0 140px;
    scroll-snap-align: start;
    background: linear-gradient(135deg, #FDF8F3 0%, #F5EDE3 100%);
    border-radius: 16px;
    padding: 16px 12px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(198, 156, 109, 0.15);
    box-shadow: 0 4px 16px rgba(92, 64, 51, 0.08);
}

.interact-content {
    flex: 1;
    display: flex;
    gap: 8px;
}

.interact-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.interact-text span {
    font-size: 13px;
    color: var(--theme-brown);
    font-weight: 500;
    line-height: 1.2;
}

.interact-text.secondary span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.interact-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-brown);
    margin-top: auto;
    padding-top: 8px;
}

.interact-img {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(198, 156, 109, 0.4);
    background: #E8E4DA;
}

.interact-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E8DFD3 0%, #D4C9BA 100%);
    font-size: 14px;
    color: var(--theme-brown);
    font-weight: 500;
}

.interact-img-placeholder::after {
    content: attr(data-text);
}

/* ========== 推荐探索 - 横向滚动大卡片 ========== */
.recommend-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 16px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

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

.recommend-card {
    flex: 0 0 160px;
    scroll-snap-align: start;
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.recommend-img {
    position: relative;
    height: 200px;
    background: #E8E4DA;
}

.recommend-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #D4C9BA 0%, #C4B8A8 100%);
    font-family: "Ma Shan Zheng", cursive;
    font-size: 32px;
    color: rgba(92, 64, 51, 0.4);
}

.recommend-img-placeholder::after {
    content: attr(data-text);
}

.like-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    color: #FFFFFF;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

.like-badge i {
    color: #FF6B6B;
    font-size: 12px;
}

.recommend-info {
    padding: 12px;
}

.recommend-title {
    font-family: "Ma Shan Zheng", cursive;
    font-size: 18px;
    color: var(--theme-brown);
    margin: 0 0 4px;
    font-weight: normal;
}

.recommend-loc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.recommend-loc i {
    color: var(--theme-gold);
    font-size: 11px;
}

/* ========== 世界遗产 ========== */
.heritage-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    padding: 0 16px;
}

.heritage-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.heritage-card.large {
    height: 180px;
}

.heritage-card.small {
    height: 180px;
}

.heritage-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #C4B8A8 0%, #A89888 100%);
    font-family: "Ma Shan Zheng", cursive;
    font-size: 36px;
    color: rgba(255, 255, 255, 0.6);
}

.heritage-img-placeholder::after {
    content: attr(data-text);
}

.heritage-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, var(--theme-gold) 0%, #8B6914 100%);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(139, 105, 20, 0.3);
}

.heritage-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #FFFFFF;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.heritage-overlay i {
    color: var(--theme-gold);
}

/* 指示器点 */
.heritage-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.heritage-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(198, 156, 109, 0.3);
}

.heritage-dots .dot.active {
    width: 18px;
    border-radius: 3px;
    background: var(--theme-gold);
}

/* ========== 快捷服务 ========== */
.service-list {
    padding: 0 16px;
}

.service-item {
    display: flex;
    align-items: center;
    background: #FFFFFF;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-item:active {
    transform: scale(0.99);
}

.service-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 22px;
}

.service-icon.style-1 {
    background: linear-gradient(135deg, #FFE8D6 0%, #FFDAB9 100%);
    color: #C69C6D;
}

.service-icon.style-2 {
    background: linear-gradient(135deg, #E6F7E6 0%, #D4EDDA 100%);
    color: #28a745;
}

.service-icon.style-3 {
    background: linear-gradient(135deg, #D8F5D8 0%, #C3E6CB 100%);
    color: #07c160;
}

.service-icon.style-4 {
    background: linear-gradient(135deg, #EAE6DC 0%, #DDD9CF 100%);
    color: var(--theme-brown);
}

.service-info {
    flex: 1;
}

.service-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 2px;
}

.service-info p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.service-arrow {
    color: var(--text-muted);
    font-size: 14px;
}

/* ========== 响应式优化 ========== */
@media (max-width: 360px) {
    .nav-card {
        padding: 16px 8px;
    }
    
    .nav-icon {
        width: 48px;
        height: 48px;
    }
    
    .speak-icon {
        width: 40px;
        height: 40px;
    }
    
    .speak-char {
        font-size: 24px;
    }
    
    .nav-label {
        font-size: 11px;
    }
    
    .interact-card {
        flex: 0 0 120px;
        min-height: 160px;
    }
    
    .recommend-card {
        flex: 0 0 140px;
    }
    
    .recommend-img {
        height: 180px;
    }
}

@media (min-width: 768px) {
    .home-header {
        min-height: 320px;
    }
    
    .main-title {
        font-size: 32px;
    }
    
    .watermark-text {
        font-size: 56px;
    }
}

