/* ==========================================
   DESIGN SYSTEM - XXYUN.HOMES (天空蓝主题)
   ========================================== */

:root {
    /* Color Palette */
    --primary-sky: #0ea5e9;       /* Sky 500 */
    --primary-deep: #0284c7;      /* Sky 600 */
    --accent-cyan: #06b6d4;       /* Cyan 500 */
    --accent-blue: #2563eb;       /* Blue 600 */
    
    --bg-light: #f0f9ff;          /* Sky 50 (Very light blue background) */
    --bg-white: #ffffff;
    --text-dark: #0f172a;         /* Slate 900 */
    --text-muted: #475569;        /* Slate 600 */
    --text-light: #f8fafc;        /* Slate 50 */
    
    /* Gradients */
    --gradient-sky: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    --gradient-glow: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-button: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 249, 255, 0.8) 100%);
    
    /* Layout Tokens */
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --box-shadow-soft: 0 10px 30px -10px rgba(14, 165, 233, 0.15);
    --box-shadow-hover: 0 20px 40px -15px rgba(14, 165, 233, 0.3);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Canvas Background for Floating Clouds */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
    background: radial-gradient(circle at top right, #e0f2fe, #f0f9ff, #ffffff);
}

/* ==========================================
   NAVBAR (HEADER)
   ========================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 100;
    background: rgba(240, 249, 255, 0.7); /* Background color matches the webpage's light blue background color */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(14, 165, 233, 0.1);
    transition: var(--transition-smooth);
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
    background: transparent; /* Ensures background matches the header/webpage background */
}

.logo-img {
    height: 40px;
    object-fit: contain;
    background: transparent;
}

/* Styled Fallback Logo */
.logo-fallback-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 900;
    font-style: italic;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(14, 165, 233, 0.1);
}

nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover {
    color: var(--primary-sky);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-glow);
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    text-decoration: none;
    padding: 10px 24px;
    background: var(--gradient-button);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    transition: var(--transition-smooth);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

/* Hamburger menu button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--primary-deep);
    border-radius: 10px;
    transition: var(--transition-smooth);
}

/* ==========================================
   HERO SECTION (FIRST SCREEN - 第一面)
   ========================================== */
.hero {
    position: relative;
    padding-top: 160px;
    padding-bottom: 100px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

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

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: 50px;
    color: var(--primary-deep);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.outfit-font {
    font-family: 'Outfit', sans-serif;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.gradient-text {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.hero-subtitle strong {
    color: var(--primary-deep);
    border-bottom: 2px dashed var(--primary-sky);
    padding-bottom: 2px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-button);
    color: white;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.5);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--primary-deep);
    border: 2px solid rgba(14, 165, 233, 0.3);
    box-shadow: var(--box-shadow-soft);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--primary-sky);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

.hero-cloud-decor {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    pointer-events: none;
    opacity: 0.8;
}

/* ==========================================
   SECTION COMMON STYLES
   ========================================== */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* ==========================================
   FEATURES SECTION
   ========================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--gradient-card);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--box-shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-glow);
    opacity: 0;
    transition: var(--transition-smooth);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
    border-color: rgba(14, 165, 233, 0.25);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon-wrap {
    width: 50px;
    height: 50px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-deep);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================
   PRICING SECTION (价格同排 - Same Row)
   ========================================== */
.pricing {
    background: linear-gradient(180deg, transparent 0%, #e0f2fe 50%, transparent 100%);
}

.pricing-grid {
    display: flex;
    flex-wrap: nowrap; /* Forces them in the same row on desktop */
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
}

.pricing-card {
    flex: 1;
    min-width: 280px;
    background: var(--gradient-card);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    box-shadow: var(--box-shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-smooth);
    position: relative;
}

.pricing-card.popular {
    background: radial-gradient(circle at top right, #0ea5e9, #0284c7, #0369a1);
    border-color: var(--primary-sky);
    color: #fff;
    transform: scale(1.03);
    z-index: 2;
    box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.4);
}

.popular-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-cyan);
    color: #fff;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
    letter-spacing: 0.5px;
}

.plan-header {
    margin-bottom: 2rem;
}

.plan-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-deep);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.pricing-card.popular .plan-badge {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.plan-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.plan-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.plan-price-wrap {
    display: flex;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-deep);
}

.price {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
}

.period {
    font-size: 1rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.alternative-price {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.plan-limits {
    background: rgba(14, 165, 233, 0.08);
    border: 1px dashed rgba(14, 165, 233, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 10px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--primary-deep);
    margin-bottom: 2rem;
}

.plan-features {
    list-style: none;
    margin-bottom: 2.5rem;
    flex-grow: 1;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.pricing-card.popular .plan-features li {
    color: rgba(255, 255, 255, 0.85);
}

.plan-features li svg {
    width: 16px;
    height: 16px;
    color: var(--primary-sky);
    flex-shrink: 0;
}

.plan-btn {
    width: 100%;
    padding: 12px;
}

.pricing-card:not(.popular):hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: var(--primary-sky);
}

.pricing-card.popular:hover {
    transform: scale(1.05);
    box-shadow: 0 25px 50px -10px rgba(2, 132, 199, 0.5);
}

/* ==========================================
   ARTICLES SECTION
   ========================================== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.article-card {
    background: var(--bg-white);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-soft);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
    border-color: rgba(14, 165, 233, 0.25);
}

.article-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.article-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-card h3 a {
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition-smooth);
}

.article-card h3 a:hover {
    color: var(--primary-sky);
}

.article-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-deep);
    transition: var(--transition-smooth);
}

.read-more:hover {
    color: var(--accent-cyan);
}

/* ==========================================
   TESTIMONIALS SECTION
   ========================================== */
.testimonials {
    background: rgba(240, 249, 255, 0.5);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: var(--bg-white);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--box-shadow-soft);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.rating {
    color: #eab308; /* Yellow 500 */
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.testimonial-quote {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 44px;
    height: 44px;
    background: var(--gradient-sky);
    color: var(--primary-deep);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.user-info h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
}

.user-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ==========================================
   FAQ SECTION (常见问题)
   ========================================== */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border: 1px solid rgba(14, 165, 233, 0.1);
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow-soft);
    overflow: hidden;
    transition: var(--transition-smooth);
}

.faq-header {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: left;
    transition: var(--transition-smooth);
}

.faq-header:hover {
    color: var(--primary-sky);
    background: rgba(240, 249, 255, 0.3);
}

.faq-arrow {
    transition: var(--transition-smooth);
    color: var(--primary-sky);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-body {
    padding: 0 24px 20px 24px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    border-top: 1px solid rgba(14, 165, 233, 0.05);
}

.faq-item.active {
    border-color: rgba(14, 165, 233, 0.3);
    box-shadow: var(--box-shadow-hover);
}

/* ==========================================
   FOOTER SECTION
   ========================================== */
footer {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); /* Changed black background to bright blue */
    color: #e0f2fe; /* Light blue text for better contrast */
    padding: 80px 0 40px 0;
    border-top: 2px solid rgba(14, 165, 233, 0.2);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.8;
    margin-top: 1rem;
    color: #e0f2fe; /* Light blue for better visibility on bright blue background */
}

.footer-links h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #bae6fd; /* Light sky blue for links */
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: #ffffff; /* White hover color on blue background */
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: #e0f2fe;
}

.footer-seo-meta {
    font-size: 0.75rem;
    color: #bae6fd; /* Improved contrast on blue background */
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */
@media (max-width: 1200px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    /* Header menu */
    header {
        height: 70px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(240, 249, 255, 0.98); /* Light blue background for mobile menu to match theme */
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 3rem;
        gap: 2.5rem;
        transition: var(--transition-smooth);
        z-index: 99;
        box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.05);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
    }
    
    .nav-link {
        font-size: 1.2rem;
        display: block;
        width: 100%;
        padding: 10px 0;
    }
    
    .nav-cta {
        display: inline-block;
        width: 80%;
        max-width: 280px;
        padding: 14px 0;
        font-size: 1.1rem;
    }

    /* Hero section */
    .hero {
        padding-top: 130px;
        padding-bottom: 60px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }

    /* Features section */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Pricing section (Allows wrap on mobile/tablet) */
    .pricing-grid {
        flex-wrap: wrap; /* Stacks when screen width is narrow */
        justify-content: center;
    }
    
    .pricing-card {
        width: 100%;
        max-width: 400px;
        flex: none;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .pricing-card.popular:hover {
        transform: translateY(-5px) scale(1.02);
    }

    /* Testimonials section */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Footer section */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 14px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }
}
