/* ========================================
   门窗家优选 - 18年老房门窗修复专家
   极简高端风格 (更新版)
   ======================================== */

/* CSS Variables */
:root {
    --color-bg-dark: #1A1A1A;
    --color-bg-card: #222222;
    --color-accent: #C9A96E;
    --color-text-light: #E5E5E5;
    --color-text-dark: #333333;
    --color-text-muted: #999999;
    --color-border: #333333;
    --font-heading-en: 'Playfair Display', serif;
    --font-heading-cn: 'Noto Serif SC', 'Source Han Serif CN', serif;
    --font-body: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
    --font-number: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
    line-height: 1.8;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.3; }

.title-en {
    font-family: var(--font-heading-en);
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
}
.title-cn {
    font-family: var(--font-heading-cn);
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    color: var(--color-text-muted);
    font-weight: 400;
}
.section-title { text-align: center; margin-bottom: 5rem; }
.section-title .title-en { color: var(--color-text-light); }
.title-accent { color: var(--color-accent); }

.section-with-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.section-with-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 26, 26, 0.75);
    z-index: 1;
}
.section-with-bg > * { position: relative; z-index: 2; }

.slide-1 .hero-slide-bg { background: url('../images/hero-slide1.jpg') center/cover no-repeat !important; }
.slide-2 .hero-slide-bg { background: url('../images/hero-slide2.jpg') center/cover no-repeat !important; }
.slide-3 .hero-slide-bg { background: url('../images/hero-slide3.jpg') center/cover no-repeat !important; }
.slide-4 .hero-slide-bg { background: url('../images/hero-slide1.jpg') center/cover no-repeat !important; }

.hero-slide-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(26, 26, 26, 0.5) 50%, rgba(26, 26, 26, 0.7) 100%);
}

.page-hero {
    padding: 200px 5% 120px;
    background: var(--color-bg-dark);
    text-align: center;
    position: relative;
    background-image: url('../images/about-bg.jpg');
    background-size: cover;
    background-position: center;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(26, 26, 26, 0.8);
}
.page-hero .section-title { position: relative; z-index: 1; }
.page-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    border: 1px solid rgba(201, 169, 110, 0.1);
    border-radius: 50%;
}

.services-hero { background-image: url('../images/services-bg.jpg') !important; }
.cases-hero { background-image: url('../images/cases-bg.jpg') !important; }
.craftsman-hero { background-image: url('../images/craftsman-bg.jpg') !important; }
.news-hero { background-image: url('../images/news-bg.jpg') !important; }

.container { max-width: 1400px; margin: 0 auto; padding: 0 5%; }

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(20px);
    transition: var(--transition);
}
.nav.scrolled { background: rgba(26, 26, 26, 0.98); padding: 1rem 5%; }
.nav-logo { font-family: var(--font-heading-cn); font-size: 1.5rem; font-weight: 700; color: var(--color-text-light); }
.nav-logo span { color: var(--color-accent); }
.nav-menu { display: flex; gap: 3rem; }
.nav-menu a { font-size: 0.95rem; color: var(--color-text-muted); position: relative; }
.nav-menu a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--color-accent); transition: var(--transition); }
.nav-menu a:hover { color: var(--color-text-light); }
.nav-menu a:hover::after { width: 100%; }
.nav-menu a.active { color: var(--color-accent); }
.nav-cta { background: var(--color-accent); color: var(--color-bg-dark) !important; padding: 0.6rem 1.5rem !important; font-weight: 600; }
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: #d4b57d; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; }
.nav-toggle span { width: 25px; height: 2px; background: var(--color-text-light); transition: var(--transition); }

@media (max-width: 1024px) {
    .nav-toggle { display: flex; }
    .nav-menu { position: fixed; top: 0; right: -100%; width: 80%; max-width: 400px; height: 100vh; background: var(--color-bg-dark); flex-direction: column; justify-content: center; align-items: center; gap: 2rem; transition: var(--transition); }
    .nav-menu.active { right: 0; }
    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
}

.hero { height: 100vh; position: relative; overflow: hidden; }
.hero-slider { height: 100%; position: relative; }
.hero-slide { height: 100%; display: none; position: relative; }
.hero-slide.active { display: flex; }
.hero-slide-bg { position: absolute; inset: 0; }
.hero-content { position: relative; z-index: 10; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; height: 100%; padding: 0 5%; }
.hero-content .title-en { font-size: clamp(3.5rem, 7vw, 6rem); margin-bottom: 1.5rem; }
.hero-content .title-cn { font-size: clamp(1.2rem, 2.5vw, 1.6rem); max-width: 600px; }
.hero-decoration { position: absolute; width: 400px; height: 400px; border: 1px solid rgba(201, 169, 110, 0.1); border-radius: 50%; }
.hero-decoration-1 { top: -100px; right: -100px; }
.hero-decoration-2 { bottom: -150px; left: -150px; width: 500px; height: 500px; }
.hero-nav { position: absolute; bottom: 3rem; left: 50%; transform: translateX(-50%); display: flex; gap: 1rem; z-index: 20; }
.hero-dot { width: 12px; height: 12px; border: 1px solid var(--color-text-muted); cursor: pointer; transition: var(--transition); }
.hero-dot.active { background: var(--color-accent); border-color: var(--color-accent); }

.mission { padding: 120px 5%; background: var(--color-bg-dark); text-align: center; }
.mission-content { max-width: 900px; margin: 0 auto; }
.mission-item { margin-bottom: 3rem; }
.mission-item:last-of-type { margin-bottom: 4rem; }
.mission-label { font-size: 0.9rem; color: var(--color-accent); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 1rem; }
.mission-text { font-family: var(--font-heading-cn); font-size: clamp(1.3rem, 2.5vw, 1.8rem); color: var(--color-text-light); line-height: 1.8; }

.btn { display: inline-block; padding: 1rem 2.5rem; border: 1px solid var(--color-accent); color: var(--color-accent); font-size: 0.95rem; letter-spacing: 0.1em; transition: var(--transition); background: transparent; cursor: pointer; }
.btn:hover { background: var(--color-accent); color: var(--color-bg-dark); }
.btn-primary { background: var(--color-accent); color: var(--color-bg-dark); }
.btn-primary:hover { background: #d4b57d; }

.timeline { padding: 120px 5%; background: var(--color-bg-card); }
.timeline-title { text-align: center; margin-bottom: 5rem; }
.timeline-wrapper { max-width: 1000px; margin: 0 auto; position: relative; }
.timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--color-border); }
.timeline-item { display: flex; justify-content: center; padding-left: 50%; position: relative; margin-bottom: 4rem; }
.timeline-item:nth-child(even) { padding-left: 0; padding-right: 50%; }
.timeline-item::before { content: ''; position: absolute; top: 0; width: 12px; height: 12px; background: var(--color-accent); border-radius: 50%; }
.timeline-item:nth-child(odd)::before { left: calc(50% - 6px); }
.timeline-item:nth-child(even)::before { right: calc(50% - 6px); }
.timeline-content { width: 45%; padding: 2rem; background: var(--color-bg-dark); }
.timeline-year { font-family: var(--font-number); font-size: 2.5rem; font-weight: 700; color: var(--color-accent); margin-bottom: 0.5rem; }
.timeline-title-text { font-family: var(--font-heading-cn); font-size: 1.2rem; margin-bottom: 0.5rem; }
.timeline-desc { color: var(--color-text-muted); font-size: 0.95rem; }

@media (max-width: 768px) {
    .timeline-line { left: 20px; }
    .timeline-item, .timeline-item:nth-child(even) { padding-left: 50px; padding-right: 0; }
    .timeline-item::before, .timeline-item:nth-child(odd)::before, .timeline-item:nth-child(even)::before { left: 14px; right: auto; }
    .timeline-content { width: 100%; }
}

.services { padding: 120px 5%; background: var(--color-bg-dark); }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.service-card { padding: 3rem 2rem; background: var(--color-bg-card); border: 1px solid var(--color-border); transition: var(--transition); }
.service-card:hover { border-color: var(--color-accent); transform: translateY(-5px); }
.service-number { font-family: var(--font-number); font-size: 3rem; font-weight: 700; color: var(--color-accent); opacity: 0.3; margin-bottom: 1.5rem; }
.service-title { font-family: var(--font-heading-cn); font-size: 1.4rem; margin-bottom: 1rem; }
.service-desc { color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.8; }
@media (max-width: 1024px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .services-grid { grid-template-columns: 1fr; } }

.cases { padding: 120px 5%; background: var(--color-bg-card); }
.cases-tabs { display: flex; justify-content: center; gap: 3rem; margin-bottom: 4rem; }
.cases-tab { font-size: 1rem; color: var(--color-text-muted); cursor: pointer; transition: var(--transition); position: relative; padding-bottom: 0.5rem; }
.cases-tab::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--color-accent); transition: var(--transition); }
.cases-tab:hover, .cases-tab.active { color: var(--color-text-light); }
.cases-tab.active::after { width: 100%; }
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.case-card { position: relative; overflow: hidden; aspect-ratio: 4/3; background: var(--color-bg-dark); cursor: pointer; }
.case-card-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%); transition: var(--transition); }
.case-card:hover .case-card-bg { transform: scale(1.05); }
.case-card-content { position: relative; z-index: 10; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem; }
.case-card-tag { display: inline-block; padding: 0.3rem 0.8rem; background: var(--color-accent); color: var(--color-bg-dark); font-size: 0.75rem; font-weight: 600; margin-bottom: 1rem; width: fit-content; }
.case-card-title { font-family: var(--font-heading-cn); font-size: 1.3rem; margin-bottom: 0.5rem; }
.case-card-desc { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.6; }
.view-more { text-align: center; margin-top: 4rem; }
@media (max-width: 1024px) { .cases-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .cases-tabs { gap: 1.5rem; flex-wrap: wrap; } .cases-grid { grid-template-columns: 1fr; } }

.craftsmanship { padding: 120px 5%; background: var(--color-bg-dark); text-align: center; }
.craftsmanship-content { max-width: 900px; margin: 0 auto; }
.craftsmanship-text { font-family: var(--font-heading-cn); font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 2.2; color: var(--color-text-light); margin-bottom: 4rem; }
.craftsmanship-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; max-width: 1000px; margin: 0 auto; }
.craftsmanship-value { text-align: center; }
.craftsmanship-value-title { font-family: var(--font-heading-cn); font-size: 1.4rem; margin-bottom: 0.8rem; }
.craftsmanship-value-desc { color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.8; }
@media (max-width: 1024px) { .craftsmanship-values { grid-template-columns: repeat(2, 1fr); gap: 2rem; } }
@media (max-width: 768px) { .craftsmanship-values { grid-template-columns: 1fr; } }

.news { padding: 120px 5%; background: var(--color-bg-card); }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: 1200px; margin: 0 auto; }
.news-card { background: var(--color-bg-dark); border: 1px solid var(--color-border); overflow: hidden; transition: var(--transition); display: block; }
.news-card:hover { border-color: var(--color-accent); transform: translateY(-5px); }
.news-card-image { aspect-ratio: 16/10; background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%); }
.news-card-content { padding: 2rem; }
.news-card-date { font-size: 0.85rem; color: var(--color-accent); margin-bottom: 1rem; }
.news-card-title { font-family: var(--font-heading-cn); font-size: 1.2rem; margin-bottom: 1rem; line-height: 1.5; }
.news-card-excerpt { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.8; }
@media (max-width: 1024px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) { .news-grid { grid-template-columns: 1fr; } }

/* Footer with QR Code */
.footer { background: var(--color-bg-dark); border-top: 1px solid var(--color-border); padding: 80px 5% 30px; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr 1fr; gap: 3rem; max-width: 1200px; margin: 0 auto 4rem; }
.footer-logo { font-family: var(--font-heading-cn); font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.footer-logo span { color: var(--color-accent); }
.footer-tagline { color: var(--color-text-muted); font-size: 0.9rem; line-height: 1.8; margin-bottom: 1.5rem; }
.footer-title { font-size: 1rem; font-weight: 600; margin-bottom: 1.5rem; }
.footer-links { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links a { color: var(--color-text-muted); font-size: 0.95rem; }
.footer-links a:hover { color: var(--color-accent); }
.footer-contact p { color: var(--color-text-muted); font-size: 0.95rem; margin-bottom: 0.8rem; }
.footer-contact a { color: var(--color-accent); }
.footer-contact a:hover { text-decoration: underline; }

.footer-qrcode { text-align: center; }
.footer-qrcode-img { width: 100px; height: 100px; margin: 0 auto 0.8rem; background: white; padding: 8px; border-radius: 4px; }
.footer-qrcode-img img { width: 100%; height: 100%; object-fit: contain; }
.footer-qrcode-text { font-size: 0.8rem; color: var(--color-text-muted); }
.footer-social { margin-top: 1.5rem; }
.footer-social-title { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 0.8rem; }
.social-icons { display: flex; gap: 0.8rem; justify-content: center; }
.social-icon { width: 34px; height: 34px; border: 1px solid var(--color-border); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; color: var(--color-text-muted); transition: var(--transition); cursor: pointer; }
.social-icon:hover { border-color: var(--color-accent); color: var(--color-accent); }

.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.footer-bottom p { font-size: 0.85rem; color: var(--color-text-muted); }

@media (max-width: 1024px) { .footer-content { grid-template-columns: repeat(3, 1fr); } .footer-qrcode { grid-column: span 3; order: -1; } }
@media (max-width: 768px) { .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; } .footer-qrcode { grid-column: span 2; } }

@media (max-width: 768px) {
    .title-en { font-size: clamp(2.5rem, 8vw, 4rem); }
    .title-cn { font-size: clamp(1.1rem, 3vw, 1.4rem); }
    .section-title { margin-bottom: 3rem; }
    .mission, .timeline, .services, .cases, .craftsmanship, .news { padding: 80px 5%; }
    .view-more { margin-top: 3rem; }
}

/* ========================================
   社交媒体二维码样式
   ======================================== */
.footer-social-links {
    min-width: 180px;
}

.social-qr-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-qr-item {
    text-align: center;
    position: relative;
}

.social-qr-item > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.social-qr-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.social-qr-item > a:hover .social-qr-icon {
    border-color: var(--color-accent);
    transform: scale(1.1);
}

.douyin-icon:hover { border-color: #FE2C55; }
.xhs-icon:hover { border-color: #FF2442; }
.toutiao-icon:hover { border-color: #E6162D; }

.social-qr-name {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.social-qr-img {
    position: relative;
}

.social-qr-img img {
    border-radius: 4px;
    background: white;
    padding: 4px;
    width: 60px;
    height: 60px;
}

.social-qr-hover {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 100;
    margin-bottom: 10px;
}

.social-qr-hover img {
    width: 120px;
    height: 120px;
}

.social-qr-hover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.social-qr-img:hover .social-qr-hover {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .social-qr-grid {
        justify-content: center;
    }
    
    .social-qr-hover {
        left: 0;
        transform: translateX(0);
    }
    
    .social-qr-hover::after {
        left: 30px;
        transform: none;
    }
    
    .social-qr-img:hover .social-qr-hover {
        display: block;
        animation: fadeInMobile 0.2s ease;
    }
    
    @keyframes fadeInMobile {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}


/* ========================================
   社交媒体二维码样式
   ======================================== */
.footer-social-links {
    min-width: 180px;
}

.social-qr-grid {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-qr-item {
    text-align: center;
    position: relative;
}

.social-qr-item > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.social-qr-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.social-qr-item > a:hover .social-qr-icon {
    border-color: var(--color-accent);
    transform: scale(1.1);
}

.douyin-icon:hover { border-color: #FE2C55; }
.xhs-icon:hover { border-color: #FF2442; }
.toutiao-icon:hover { border-color: #E6162D; }

.social-qr-name {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.social-qr-img {
    position: relative;
}

.social-qr-img img {
    border-radius: 4px;
    background: white;
    padding: 4px;
    width: 60px;
    height: 60px;
}

.social-qr-hover {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    z-index: 100;
    margin-bottom: 10px;
}

.social-qr-hover img {
    width: 120px;
    height: 120px;
}

.social-qr-hover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: white;
}

.social-qr-img:hover .social-qr-hover {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(10px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (max-width: 768px) {
    .social-qr-grid {
        justify-content: center;
    }
    
    .social-qr-hover {
        left: 0;
        transform: translateX(0);
    }
    
    .social-qr-hover::after {
        left: 30px;
        transform: none;
    }
    
    .social-qr-img:hover .social-qr-hover {
        display: block;
        animation: fadeInMobile 0.2s ease;
    }
    
    @keyframes fadeInMobile {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}


.wechat-icon:hover { border-color: #07C160; }
