/* ============================================
   Homepage Styles - /opt/peizhen-app/static/css/homepage.css
   Contains all styles for the homepage (index.html)
   ============================================ */

/* ============================================
   1. EXISTING STYLES (from index.html inline <style>)
   ============================================ */

/* Body Background */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}
@media (min-width: 768px) {
    body { background: #e2e8f0; }
}

/* Header */
.header {
    background: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-logo img {
    height: 36px;
    width: auto;
}
.header-logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #667eea;
}

/* Hero */
.hero {
    position: relative;
    padding: 60px 20px 50px;
    text-align: center;
    background: linear-gradient(135deg, rgba(102,126,234,0.85) 0%, rgba(118,75,162,0.85) 100%),
                url('/static/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    margin: 0;
    border-radius: 0 0 32px 32px;
    overflow: hidden;
}
.hero-content {
    position: relative;
    z-index: 1;
}
.hero h1 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.hero p {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 24px;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(20px);
    padding: 14px 28px;
    border-radius: 28px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.3s;
}
.hero-cta:hover {
    background: rgba(255,255,255,0.3);
}

/* Stats */
.stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #fff;
    margin: -20px 20px 0;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}
.stat-item {
    text-align: center;
}
.stat-num {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}
.stat-label {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 20px;
    justify-content: center;
}
.tag {
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: all 0.2s;
}
.tag:hover {
    color: #667eea;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Section */
.section {
    padding: 0 20px;
    margin-bottom: 24px;
}
.section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.section-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: #667eea;
    border-radius: 2px;
}

/* Service Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.service-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}
.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #8b9cf7;
}
.service-icon {
    font-size: 36px;
    margin-bottom: 10px;
}
.service-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.service-desc {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 8px;
}
.service-price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}
.service-price span {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
}

/* Feature Entry */
.feature-entry {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.feature-entry:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
.feature-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}
.feature-info p {
    font-size: 12px;
    color: var(--text-light);
}

/* Story Cards */
.story-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.story-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.story-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}
.story-name {
    font-size: 15px;
    font-weight: 600;
}
.story-meta {
    font-size: 12px;
    color: var(--text-light);
}
.story-content {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 8px;
}
.story-quote {
    font-size: 13px;
    font-weight: 500;
    font-style: italic;
}

/* Review Cards */
.review-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.review-name {
    font-size: 14px;
    font-weight: 600;
}
.review-stars {
    color: #fbbc04;
    font-size: 12px;
}
.review-content {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Trust Grid */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.trust-card {
    background: var(--card);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow);
}
.trust-icon {
    font-size: 28px;
    margin-bottom: 8px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.trust-icon img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}
.trust-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}
.trust-desc {
    font-size: 11px;
    color: var(--text-light);
}

/* FAQ */
.faq-item {
    background: var(--card);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.faq-item summary {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text);
}
.faq-item p {
    padding: 0 16px 14px;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.6;
}
.time-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    background: #f0f0f0;
    color: #555;
    cursor: pointer;
    border: 1.5px solid #e0e0e0;
    transition: all 0.2s;
}
.time-tag:hover,
.time-tag.active {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 32px 20px 80px;
    margin-top: 32px;
    text-align: center;
}
.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}
.footer-logo img {
    height: 28px;
}
.footer-logo span {
    font-size: 16px;
    font-weight: 600;
}
.footer p {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 4px;
}
.footer .copyright {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.5;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    box-shadow: 0 -1px 0 rgba(0,0,0,0.06);
    z-index: 100;
}
.nav-item {
    text-align: center;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    padding: 4px 12px;
}
.nav-item.active {
    color: #667eea;
}
.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
    line-height: 1;
}

/* Quick Book */
.quick-book {
    position: fixed;
    bottom: 88px;
    right: 16px;
    width: 52px;
    height: 52px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
    cursor: pointer;
    z-index: 99;
    transition: all 0.3s;
}
.quick-book:hover {
    transform: scale(1.1);
}
.quick-book svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

/* Loading */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.loading.active {
    display: flex;
}
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1001;
    display: none;
}
.toast.show {
    display: block;
    animation: fadeIn 0.3s;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* ============================================
   2. NEW - Ripple Effect for Service Cards
   ============================================ */

.service-card .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(102,126,234,0.3);
    transform: scale(0);
    animation: ripple-anim 0.6s ease-out;
    pointer-events: none;
}
@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}


/* ============================================
   3. NEW - Service Badge (hot/recommended)
   ============================================ */

.service-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(238,90,36,0.3);
    z-index: 1;
}
.service-badge.recommend {
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}


/* ============================================
   4. NEW - FAQ Smooth Animation
   ============================================ */

.faq-item {
    transition: all 0.3s;
}
.faq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-item summary::after {
    content: '+';
    font-size: 18px;
    font-weight: 300;
    transition: transform 0.3s;
    color: #667eea;
}
.faq-item[open] summary::after {
    content: '−';
}
.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 16px;
}
.faq-item[open] .faq-answer {
    max-height: 200px;
    padding: 0 16px 14px;
}


/* ============================================
   5. NEW - Counter Animation
   ============================================ */

.stat-num {
    display: inline-block;
}
.stat-num.counting {
    animation: countPulse 0.3s;
}
@keyframes countPulse {
    50% { transform: scale(1.1); }
}


/* ============================================
   6. NEW - Scroll Reveal Animation
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================
   7. NEW - Urgency Bar
   ============================================ */

.urgency-bar {
    background: linear-gradient(90deg, #ff6b6b, #ffa502);
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    animation: urgencyPulse 2s ease-in-out infinite;
}
@keyframes urgencyPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}


/* ============================================
   8. NEW - Skip to Content (Accessibility)
   ============================================ */

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: #667eea;
    color: #fff;
    padding: 8px 16px;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    font-size: 14px;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}


/* ============================================
   9. NEW - Wizard Steps
   ============================================ */

.wizard-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
}
.wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}
.wizard-step .step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    background: #e0e0e0;
    color: #999;
    transition: all 0.3s;
}
.wizard-step.active .step-num {
    background: #667eea;
    color: #fff;
}
.wizard-step.done .step-num {
    background: #48bb78;
    color: #fff;
}
.wizard-step.done {
    color: #48bb78;
}
.wizard-step-divider {
    width: 40px;
    height: 2px;
    background: #e0e0e0;
    margin: 0 8px;
    align-self: center;
}
.wizard-step-divider.done {
    background: #48bb78;
}
.wizard-page {
    display: none;
}
.wizard-page.active {
    display: block;
}
.wizard-nav {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}
.wizard-nav button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}
.wizard-prev {
    background: #f0f0f0;
    color: #666;
}
.wizard-prev:hover {
    background: #e0e0e0;
}
.wizard-next,
.wizard-submit {
    background: #667eea;
    color: #fff;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}
.wizard-next:hover,
.wizard-submit:hover {
    background: #5a6fd6;
}


/* ============================================
   10. NEW - Social Proof Bar
   ============================================ */

.social-proof {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin: 0 20px 12px;
    background: rgba(72,187,120,0.1);
    border-radius: 12px;
    font-size: 13px;
    color: #2e7d32;
    font-weight: 500;
}
.social-proof .dot {
    width: 8px;
    height: 8px;
    background: #48bb78;
    border-radius: 50%;
    animation: dotPulse 2s infinite;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* 移动端备案号可见 */
@media (max-width: 768px) {
    .footer {
        padding-bottom: 90px;
    }
    .footer .icp {
        margin-top: 8px;
    }
}
