/* ========================================
   爱心家政 - 首页新版样式
   现代、简洁、专业
   ======================================== */

:root {
    --primary: #FF6B6B;
    --primary-dark: #EE5A5A;
    --secondary: #4ECDC4;
    --accent: #FFE66D;
    --dark: #2D3436;
    --gray: #636E72;
    --light-gray: #B2BEC3;
    --bg: #F8F9FA;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
    overscroll-behavior-x: none;
    padding-bottom: 80px;
}

/* ========================================
   1. 轮播图 Banner
   ======================================== */
.banner {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    margin: 0 10px;
    border-radius: var(--radius-xl);
    touch-action: pan-y;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.banner-slide:nth-child(1) {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A5A 100%);
}

.banner-slide:nth-child(2) {
    background: linear-gradient(135deg, #4ECDC4 0%, #44A08D 100%);
}

.banner-slide:nth-child(3) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.banner-content {
    text-align: center;
    color: var(--white);
}

.banner-content h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.banner-content p {
    font-size: 14px;
    opacity: 0.95;
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--white);
}

/* ========================================
   2. 搜索栏
   ======================================== */
.search-section,
.search-bar {
    background: #fff;
    padding: 15px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

.search-box,
.search-bar {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    background: #fff;
}

.search-input:focus {
    border-color: #667eea;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 12px 20px;
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-btn:active {
    background: #5a6fd6;
}

/* ========================================
   3. 分类标签导航
   ======================================== */
.category-section,
.tab-nav {
    padding: 0 15px 15px;
}

.category-scroll,
.tab-nav {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.category-tab {
    flex-shrink: 0;
    padding: 10px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    font-size: 14px;
    color: var(--gray);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
    white-space: nowrap;
}

.category-tab.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255,107,107,0.4);
}

/* ========================================
   4. 服务列表
   ======================================== */
.services-section,
.subcategories-section {
    padding: 0 15px 20px;
}

.services-grid,
.subcategories-list {
    display: grid;
    gap: 12px;
}

.service-card {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
    cursor: pointer;
}

.service-card:active {
    transform: scale(0.98);
    box-shadow: var(--shadow);
}

.service-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.service-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.service-info {
    flex: 1;
}

.service-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.service-info p {
    font-size: 12px;
    color: var(--gray);
    line-height: 1.4;
}

.service-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 16px;
}

/* ========================================
   5. 为什么选择我们
   ======================================== */
.why-section,
.advantages-section {
    padding: 20px 15px;
    background: var(--white);
    margin: 0 15px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.section-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 12px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
}

.why-grid,
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.why-item {
    display: block;
    text-align: left;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    transition: all 0.3s;
}

.why-item:active {
    transform: scale(0.98);
}

.why-icon {
    float: left;
    width: 48px;
    height: 48px;
    margin-right: 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-sm);
}

.why-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.why-item h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}

.why-item p {
    font-size: 11px;
    color: var(--gray);
    line-height: 1.4;
    word-wrap: break-word;
}

/* ========================================
   6. 底部导航
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    background: var(--white);
    box-shadow: 0 -2px 20px rgba(0,0,0,0.08);
    z-index: 1000;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--light-gray);
    font-size: 11px;
    transition: color 0.3s;
    padding: 5px 15px;
}

.bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 3px;
    font-style: normal;
}

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

.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* ========================================
   7. 预约弹窗
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--gray);
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* ========================================
   8. 空状态
   ======================================== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--light-gray);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

/* ========================================
   9. 搜索结果分组标题
   ======================================== */
.search-group-title {
    padding: 12px 16px;
    background: var(--bg);
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
}
