:root {
    /* 中国风配色体系 */
    --primary: #C0392B;       /* 丹红 */
    --primary-light: #FFECEA;
    --secondary: #D4AC0D;     /* 缃色 */
    --accent: #27AE60;        /* 翠绿 */
    
    --bg-body: #F9F7F5;       /* 米白 */
    --bg-card: #FFFFFF;
    
    --text-dark: #2C3E50;
    --text-gray: #7F8C8D;
    
    --shadow-card: 0 4px 16px rgba(139, 69, 19, 0.08);
    
    --radius-main: 12px;
    
    --safe-bottom: env(safe-area-inset-bottom);
}

body {
    margin: 0;
    padding: 0;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
    background-color: var(--bg-body);
    color: var(--text-dark);
    padding-bottom: 70px;
    /* 移除背景小圆点，保留纯色/极淡纹理 */
}

/* 顶部全屏大图区域 */
.hero-header {
    position: relative;
    width: 100%;
    height: 380px; /* 增加高度以容纳两行金刚区 */
    background-image: url('../img/topbg.avif');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* 调整渐变位置，适应更高的头部 */
    background: linear-gradient(180deg, rgba(44,62,80,0.4) 0%, rgba(192, 57, 43, 0.1) 40%, var(--bg-body) 98%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 12px 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 顶部搜索栏 */
.top-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding: 8px 0;
}

.location-simple {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.location-simple i {
    font-size: 12px;
}

.search-box {
    flex: 1;
    margin: 0 16px;
    background: #fff;
    border-radius: 4px;
    height: 38px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-box i {
    color: var(--primary);
    margin-right: 8px;
    font-size: 14px;
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-dark);
    width: 100%;
    font-size: 14px;
}

.msg-icon {
    color: #fff;
    font-size: 22px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* 标题区域 */
.hero-title {
    margin-top: 20px;
    color: #fff;
    text-align: left;
}

.hero-title h2 {
    margin: 0;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 2px;
    font-family: "KaiTi", "STKaiti", serif;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.hero-title p {
    margin: 8px 0 0;
    font-size: 15px;
    opacity: 0.95;
    font-weight: 500;
    background: rgba(192, 57, 43, 0.8);
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 金刚区 - 实体卡片风格 */
.nav-card {
    margin-top: auto;
    margin-bottom: 10px;
    background: var(--bg-card);
    border-radius: var(--radius-main);
    padding: 16px 10px;
    box-shadow: var(--shadow-card);
    border-bottom: 2px solid var(--primary);
}

.nav-grid {
    display: flex;
    flex-wrap: wrap; /* 允许换行 */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%; /* 每行5个 */
    margin-bottom: 12px; /* 行间距 */
    text-decoration: none; /* 去除下划线 */
}

/* 最后5个去除底部间距 */
.nav-item:nth-last-child(-n+5) {
    margin-bottom: 0;
}

.nav-icon-box {
    width: 44px; /* 稍微调小图标以适应两行 */
    height: 44px;
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 6px;
    background: #fff;
    color: var(--primary);
    transition: all 0.2s;
}

/* 统一图标配色，保持整洁 */
.nav-item .nav-icon-box { color: var(--primary); border-color: #FADBD8; background: #FDEDEC; }
/* 偶数项稍微变化 */
.nav-item:nth-child(even) .nav-icon-box { color: #D35400; border-color: #FAE5D3; background: #FEF5E7; }


.nav-item span {
    font-size: 11px;
    color: var(--text-dark);
    font-weight: 600;
}

/* 内容区域 */
.main-content {
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

/* 老年人能力评估通栏 */
.assessment-banner {
    background: linear-gradient(90deg, #FEF5E7 0%, #FFFFFF 100%); /* 改为暖金色渐变 */
    border: 1px solid #FDEBD0;
    border-radius: var(--radius-main);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    margin-top: 10px; /* 增加顶部间距 */
    box-shadow: 0 2px 8px rgba(212, 172, 13, 0.05);
}

.assessment-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.assess-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #F39C12, #D35400); /* 暖橙色图标背景 */
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    box-shadow: 0 2px 6px rgba(211, 84, 0, 0.2);
}

.assess-text {
    flex: 1;
}

.assess-text h3 {
    margin: 0;
    font-size: 16px;
    color: #A04000; /* 深赭色文字 */
    font-weight: bold;
}

.assess-text p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #D68910; /* 金棕色副标题 */
}

.assess-btn {
    background: #E67E22; /* 按钮改为暖橙色 */
    color: white;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.3);
}

/* 民政通广告横幅 */
.mzt-ad-banner {
    display: block;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: var(--radius-main);
    padding: 12px 14px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s;
}
.mzt-ad-banner:active {
    box-shadow: 0 2px 12px rgba(99,102,241,0.15);
}
.mzt-ad-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}
.mzt-ad-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}
.mzt-ad-text {
    flex: 1;
    min-width: 0;
}
.mzt-ad-label {
    font-size: 14px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mzt-ad-label span {
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    flex-shrink: 0;
}
.mzt-ad-desc {
    font-size: 11px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mzt-ad-arrow {
    color: #6366f1;
    font-size: 14px;
    flex-shrink: 0;
}

/* 广告网格 (2行2列) */
.ad-grid-cn {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.ad-item-cn {
    background: var(--bg-card);
    border-radius: var(--radius-main);
    padding: 8px 10px; /* 减小内边距 */
    height: 72px; /* 减小高度，原为90px */
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.ad-info-cn {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ad-title-cn {
    margin: 0;
    font-size: 13px; /* 稍微调小字号 */
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 2px;
    line-height: 1.2;
}

/* 不同广告标题色 */
.ad-item-cn:nth-child(1) .ad-title-cn { color: #C0392B; }
.ad-item-cn:nth-child(2) .ad-title-cn { color: #D35400; }
.ad-item-cn:nth-child(3) .ad-title-cn { color: #27AE60; }
.ad-item-cn:nth-child(4) .ad-title-cn { color: #8E44AD; }

.ad-sub-cn {
    margin: 0;
    font-size: 10px;
    color: var(--text-gray);
    transform: scale(0.9); /* 视觉上更小一点 */
    transform-origin: left;
}

.ad-item-cn img {
    width: 48px; /* 图片也相应调小 */
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    margin-left: 6px;
}

/* 地图横幅 - 中国风 */
.map-banner-cn {
    margin-bottom: 24px;
    background: linear-gradient(90deg, #FDF2E9 0%, #fff 100%);
    border-radius: var(--radius-main);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #FAE5D3;
}

.map-text h4 {
    margin: 0;
    font-size: 16px;
    color: #D35400;
}
.map-text p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-gray);
}

.map-btn-cn {
    background: var(--secondary);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(212, 172, 13, 0.4);
}

/* 列表区 */
.list-wrapper {
    margin-top: 10px;
}

.section-header-cn {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
    padding-left: 10px;
}

.section-header-cn h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
}

.section-header-cn .sub-text {
    font-size: 12px;
    color: var(--text-gray);
    margin-left: 8px;
    margin-top: 2px;
}

.filter-tabs-cn {
    display: flex;
    gap: 16px;
    margin-left: auto;
}

.filter-tabs-cn span {
    font-size: 14px;
    color: var(--text-gray);
    position: relative;
    padding-bottom: 4px;
}

.filter-tabs-cn span.active {
    color: var(--primary);
    font-weight: bold;
    border-bottom: 2px solid var(--primary);
}

/* 列表卡片 */
.inst-card-cn {
    background: var(--bg-card);
    border-radius: var(--radius-main);
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    height: 110px;
    border: 1px solid #f0f0f0;
}

.inst-img-box {
    width: 120px;
    height: 100%;
    position: relative;
}

.inst-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inst-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--secondary);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-bottom-right-radius: 8px;
}

.inst-info {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.inst-name {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
    line-height: 1.3;
}

.inst-tags {
    display: flex;
    gap: 4px;
}

.tag-cn {
    font-size: 10px;
    padding: 1px 4px;
    border: 1px solid #ddd;
    color: var(--text-gray);
    border-radius: 2px;
}

.tag-cn.red {
    border-color: rgba(192, 57, 43, 0.3);
    color: var(--primary);
    background: var(--primary-light);
}

.inst-price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.price-cn {
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
}
.price-cn span { font-size: 12px; font-weight: normal; color: var(--text-gray); }

.dist-cn {
    font-size: 11px;
    color: var(--text-gray);
}

/* 底部导航 */
.dock-tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: var(--safe-bottom);
    z-index: 100;
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    flex: 1;
    height: 100%;
}

.dock-item.active {
    color: var(--primary);
}

.dock-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.dock-item span {
    font-size: 11px;
}

.dock-item.center-btn {
    position: relative;
}
.center-icon {
    width: 46px;
    height: 46px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: -24px;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    border: 3px solid #fff;
}
.dock-item.center-btn span {
    margin-top: 2px;
}
