/* Beijing Baotongyuan Property Management - Main Stylesheet */

/* ============================================
   CSS Variables & Reset
   ============================================ */
:root {
    --primary-color: #0066cc;
    --secondary-color: #00a0e9;
    --accent-color: #00d4aa;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #f5f7fa;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --shadow-default: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
    --transition-default: all 0.3s ease;
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-gray);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-default);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Page Loader
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Header & Navigation
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition-default);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo svg {
    transition: transform 0.3s ease;
}

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

.logo-text {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--medium-gray);
    font-weight: 400;
}

.nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    gap: 35px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-gray);
    position: relative;
    padding: 5px 0;
}

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

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

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

.nav-buttons {
    display: flex;
    gap: 15px;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: var(--dark-gray);
    border-radius: 2px;
    transition: var(--transition-default);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-default);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 25px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-stats {
    display: flex;
    gap: 50px;
    animation: fadeInUp 1s ease 0.6s both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-graphic {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    background: var(--gradient-hero);
    color: var(--white);
    padding: 150px 0 80px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.breadcrumb {
    margin-top: 30px;
    font-size: 0.95rem;
}

.breadcrumb a {
    opacity: 0.8;
}

.breadcrumb a:hover {
    opacity: 1;
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 10px;
    opacity: 0.6;
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: 100px 0;
    background: var(--light-gray);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--dark-gray);
    margin-bottom: 15px;
    position: relative;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--medium-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   About Section
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-content p {
    margin-bottom: 25px;
    line-height: 2;
    color: var(--medium-gray);
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

.feature-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feature-text p {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.about-image {
    position: relative;
}

.about-image-main {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-default);
}

.about-image-overlay {
    position: absolute;
    bottom: -30px;
    right: -30px;
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--shadow-default);
    text-align: center;
}

.about-image-overlay .number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.about-image-overlay .label {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

/* ============================================
   Services Section
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-default);
    transition: var(--transition-default);
    text-align: center;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(10deg);
}

.service-icon svg {
    width: 36px;
    height: 36px;
    fill: var(--white);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.service-card p {
    color: var(--medium-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.service-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-block;
}

.service-link:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* ============================================
   App Services Section
   ============================================ */
.app-services {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.app-services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.app-content {
    color: var(--white);
}

.app-content .section-title {
    color: var(--white);
}

.app-content > p {
    font-size: 1.1rem;
    line-height: 1.9;
    opacity: 0.9;
    margin-bottom: 30px;
}

.app-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.app-feature-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.app-feature-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-feature-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--white);
}

.app-feature-text h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.app-feature-text p {
    font-size: 0.85rem;
    opacity: 0.8;
}

.app-stores {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.store-badge {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
    padding: 15px 25px;
    border-radius: 12px;
    transition: var(--transition-default);
}

.store-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.store-badge svg {
    width: 35px;
    height: 35px;
}

.store-info .small {
    font-size: 0.75rem;
    color: var(--medium-gray);
}

.store-info .large {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.app-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: floatElement 4s ease-in-out infinite;
}

.floating-element:nth-child(1) { top: 10%; left: 20%; animation-delay: 0s; }
.floating-element:nth-child(2) { top: 30%; right: 10%; animation-delay: 1s; }
.floating-element:nth-child(3) { bottom: 20%; left: 10%; animation-delay: 2s; }
.floating-element:nth-child(4) { bottom: 30%; right: 20%; animation-delay: 3s; }

@keyframes floatElement {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 0.6; }
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: var(--dark-gray);
    border-radius: 40px;
    padding: 10px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: phoneFloat 5s ease-in-out infinite;
}

@keyframes phoneFloat {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 32px;
    overflow: hidden;
}

/* ============================================
   Stats Section
   ============================================ */
.stats {
    padding: 80px 0;
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-card {
    text-align: center;
    padding: 40px 20px;
    border-radius: 20px;
    background: var(--light-gray);
    transition: var(--transition-default);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-default);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--white);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-card .stat-label {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

/* ============================================
   Culture Section
   ============================================ */
.culture-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.culture-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-default);
    transition: var(--transition-default);
}

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

.culture-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.culture-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
}

.culture-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.culture-card p {
    font-size: 0.9rem;
    color: var(--medium-gray);
    line-height: 1.7;
}

/* ============================================
   News Section
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-default);
    transition: var(--transition-default);
}

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

.news-image {
    height: 200px;
    overflow: hidden;
}

.news-image svg {
    transition: transform 0.5s ease;
}

.news-card:hover .news-image svg {
    transform: scale(1.1);
}

.news-content {
    padding: 25px;
}

.news-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 500;
}

.news-content h3 {
    font-size: 1.2rem;
    margin: 10px 0 15px;
}

.news-content p {
    color: var(--medium-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.news-link {
    color: var(--primary-color);
    font-weight: 600;
}

.news-link:hover {
    color: var(--secondary-color);
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form {
    max-width: 500px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition-default);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

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

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.7);
    margin: 20px 0;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-default);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    fill: var(--white);
}

.footer-column h4 {
    font-size: 1.15rem;
    margin-bottom: 25px;
    color: var(--white);
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
}

.footer-legal {
    display: flex;
    gap: 30px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-legal a:hover {
    color: var(--white);
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-default);
    z-index: 999;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

/* ============================================
   Animations
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .hero-content {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-graphic {
        display: none;
    }
    
    .about-grid,
    .app-services-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .services-grid,
    .culture-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 30px;
    }
    
    .section {
        padding: 70px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid,
    .culture-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .app-features {
        grid-template-columns: 1fr;
    }
    
    .app-stores {
        flex-direction: column;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .contact-form {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .stat-item {
        flex: 1 1 45%;
    }
}
