/* ===================================
   雀窝心选官网 - 统一样式表
   =================================== */

/* 1. CSS变量 - 设计系统 */
:root {
    --primary-color: #ED1C24;
    --secondary-color: #2C3E50;
    --accent-color: #ED1C24;
    --success-color: #10B981;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --gradient-1: linear-gradient(135deg, #ED1C24 0%, #C41E3A 100%);
    --gradient-2: linear-gradient(135deg, #ED1C24 0%, #FF4757 100%);
    --gradient-3: linear-gradient(135deg, #ED1C24 0%, #FF6B6B 100%);

    /* 间距系统 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;

    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
}

/* 2. 全局重置 */
* {
    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;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 3. 导航栏 */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100px;
}

.logo {
    font-size: 0;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    height: 80px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    height: 80px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-dark);
}

/* 4. Hero区域 */
.hero {
    margin-top: 100px;
    background: var(--gradient-3);
    position: relative;
    overflow: hidden;
    padding: 120px var(--spacing-md);
}

.hero::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    top: -250px;
    right: -250px;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
}

.hero-content {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 52px;
    color: white;
    margin-bottom: var(--spacing-md);
    font-weight: 700;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 22px;
    color: rgba(255,255,255,0.95);
    margin-bottom: var(--spacing-lg);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease 0.2s both;
}

/* 5. 按钮样式 */
.btn {
    padding: 16px 40px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-accent {
    background: var(--primary-color);
    color: white;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* 6. 通用section样式 */
.section {
    padding: 100px var(--spacing-md);
}

.section-light {
    background: var(--bg-light);
}

.section-white {
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 42px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-weight: 700;
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
}

/* 7. 卡片样式 */
.card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* 8. 表单样式 */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.required {
    color: var(--primary-color);
    margin-left: 2px;
}

/* 9. 页脚 */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 60px var(--spacing-md) 30px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: var(--spacing-md);
    color: var(--accent-color);
    font-size: 20px;
}

.footer-section p {
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
}

/* 10. 浮动按钮 */
.floating-btn {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    font-size: 24px;
    z-index: 999;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* 11. 动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* 12. 工具类 */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

/* 13. 响应式设计 */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* 导航栏 */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
        gap: var(--spacing-sm);
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
    }

    /* Hero */
    .hero {
        padding: 80px var(--spacing-md);
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    /* 按钮 */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    /* Section */
    .section {
        padding: 60px var(--spacing-sm);
    }

    .section-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 18px;
    }

    /* 页脚 */
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .section-title {
        font-size: 28px;
    }
}

/* 14. 移动端特殊适配 - 社区团播供应链 */
@media (max-width: 768px) {
    /* 社区团店卡片 */
    .card[style*="linear-gradient(135deg, #f5f7fa"] {
        padding: 30px 20px !important;
    }

    /* 社区团播供应链卡片 */
    .card[style*="linear-gradient(135deg, #fa709a"] {
        padding: 30px 20px !important;
    }

    /* 强制单列布局 - 社区团播供应链主内容 */
    .card[style*="linear-gradient(135deg, #fa709a"] > div[style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }

    /* 社区团播供应链内部4格布局改为单列 */
    .card[style*="linear-gradient(135deg, #fa709a"] div[style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* 调整字体大小 */
    .card[style*="linear-gradient(135deg, #fa709a"] h3 {
        font-size: 24px !important;
    }

    .card[style*="linear-gradient(135deg, #fa709a"] p[style*="font-size: 18px"] {
        font-size: 16px !important;
    }

    /* 隐藏右侧装饰数字 */
    .card[style*="linear-gradient"] > div[style*="position: absolute"][style*="font-size: 120px"] {
        display: none;
    }

    /* 右侧信息框移动端样式 */
    .card[style*="linear-gradient(135deg, #fa709a"] > div > div[style*="backdrop-filter: blur"] {
        margin-top: 30px;
        padding: 30px 20px !important;
    }

    .card[style*="linear-gradient(135deg, #fa709a"] div[style*="font-size: 100px"] {
        font-size: 60px !important;
    }

    .card[style*="linear-gradient(135deg, #fa709a"] p[style*="font-size: 24px"] {
        font-size: 20px !important;
    }

    .card[style*="linear-gradient(135deg, #fa709a"] p[style*="font-size: 16px"] {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    /* 更小屏幕进一步优化 */
    .card[style*="linear-gradient(135deg, #fa709a"] h3 {
        font-size: 20px !important;
    }

    .card[style*="linear-gradient(135deg, #fa709a"] div[style*="backdrop-filter: blur"] h5 {
        font-size: 16px !important;
    }

    .card[style*="linear-gradient(135deg, #fa709a"] div[style*="backdrop-filter: blur"] p {
        font-size: 13px !important;
    }
}
