/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* 导航栏样式 */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: background 0.3s, box-shadow 0.3s;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #fd858e;
}

.logo-img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

@font-face {
    font-family: "阿里妈妈方圆体 VF Regular";
    src: url("ziti/AlimamaFangYuanTiVF-Thin.woff2") format("woff2"),
         url("ziti/AlimamaFangYuanTiVF-Thin.woff") format("woff");
    font-display: swap;
  }
  
/* 应用字体到Logo */
.logo span {
    font-family: 
      "阿里妈妈方圆体 VF Regular",
      "AlimamaFangYuanTi",
      "Hiragino Sans GB", 
      "Microsoft YaHei",
      "PingFang SC", 
      sans-serif;
    
    font-size: clamp(1.5rem, 4vw + 0.8rem, 2.2rem);
    line-height: 1.0;
    letter-spacing: 0.08em;  /* 书法字需更大间距 */
    
    text-shadow: 
      0.5px 0.5px 0 rgba(0, 0, 0, 0.2),
      -1px -1px 1px rgba(255, 255, 255, 0.3);
    font-variation-settings: "wght" 300;
    transform: rotate(-0.8deg) skewX(1deg);
    display: inline-block;
    transition: transform 0.3s ease;  /* 悬停动态效果 */
  }
  
  /* 字体加载完成后增强效果 */
  .fonts-loaded .logo span {
    text-shadow: 
      1px 1px 1px rgba(0, 0, 0, 0.25),
      -1.5px -1.5px 2px rgba(255, 255, 255, 0.4);
  }

  @media (max-width: 768px) {
    .logo span {
      transform: rotate(-0.5deg) skewX(0.5deg);
    }
  }

  li::before {
    content: "🌱";
    vertical-align: -0.2em;
    margin-right: 0.3em;
  }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a:hover {
    color: #fd858e;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #fd858e;
    transition: width 0.3s;
}

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

/* 英雄区域样式 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
                url('https://images.unsplash.com/photo-1519741497674-611481863552?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(253, 133, 142, 0.2) 0%, rgba(0, 0, 0, 0.4) 70%);
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
    position: relative;
    z-index: 1;
    animation: fadeIn 1.5s ease-out;
}

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

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cta-button {
    padding: 1rem 2rem;
    font-size: 1.2rem;
    background-color: #fd858e;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(253, 133, 142, 0.4);
}

.cta-button:hover {
    transform: translateY(-3px);
    background-color: #ff6b78;
    box-shadow: 0 6px 20px rgba(253, 133, 142, 0.6);
}

/* 服务区域样式 */
.services {
    padding: 5rem 5%;
    background-color: #f9f9f9;
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, white, #f9f9f9);
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    color: #333;
}

.services h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #fd858e;
    margin: 15px auto 0;
    border-radius: 2px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: linear-gradient(to bottom, rgba(253, 133, 142, 0.1), transparent);
    transition: height 0.3s;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    transition: transform 0.3s;
}

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

.service-card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.4rem;
    position: relative;
    display: inline-block;
}

.service-card h3::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fd858e;
    transition: width 0.3s;
}

.service-card:hover h3::after {
    width: 50px;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* 关于我们区域样式 */
.about {
    padding: 5rem 5%;
    background-color: white;
    position: relative;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(253, 133, 142, 0.2), transparent);
    z-index: 1;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    position: relative;
}

.about-text h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: #fd858e;
    margin-top: 15px;
    border-radius: 2px;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
}

/* 成功案例区域样式 */
.success-stories {
    padding: 5rem 5%;
    background-color: #f9f9f9;
    text-align: center;
    position: relative;
}

.success-stories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, white, #f9f9f9);
}

.success-stories h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    color: #333;
}

.success-stories h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #fd858e;
    margin: 15px auto 0;
    border-radius: 2px;
}

.story-slider {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.story-card {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: none;
    transition: opacity 0.5s;
}

.story-card.active {
    display: block;
    animation: fadeInStory 0.8s ease-out;
}

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

.story-content p {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.8;
    position: relative;
}

.story-content p::before,
.story-content p::after {
    content: '"';
    font-size: 2rem;
    color: #fd858e;
    opacity: 0.3;
    position: absolute;
}

.story-content p::before {
    left: -15px;
    top: -10px;
}

.story-content p::after {
    right: -15px;
    bottom: -10px;
}

.author {
    color: #666;
    font-weight: 500;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.slider-dot.active {
    background-color: #fd858e;
    transform: scale(1.2);
}

.slider-dot:hover {
    background-color: #fd858e;
}

/* 联系我们区域样式 */
.contact {
    padding: 5rem 5%;
    background-color: white;
    position: relative;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    color: #333;
}

.contact h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #fd858e;
    margin: 15px auto 0;
    border-radius: 2px;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.info-content {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.info-content h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.5rem;
    position: relative;
    display: inline-block;
}

.info-content h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    bottom: -8px;
    left: 0;
    background-color: #fd858e;
}

.info-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    color: #555;
}

.contact-form-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-form input {
    padding: 1rem 1.2rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: white;
}

.contact-form input:focus {
    border-color: #fd858e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(253, 133, 142, 0.2);
}

.submit-button {
    padding: 1rem;
    background-color: #fd858e;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(253, 133, 142, 0.3);
}

.submit-button:hover {
    background-color: #ff6b78;
    box-shadow: 0 6px 15px rgba(253, 133, 142, 0.4);
    transform: translateY(-2px);
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 5% 1rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, #fd858e, #ff6b78);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    position: relative;
}

.footer-logo::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    bottom: -8px;
    left: 0;
    background-color: #fd858e;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -3px;
    left: 0;
    background-color: #fd858e;
    transition: width 0.3s;
}

.footer-links a:hover {
    color: #fd858e;
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-icon {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: #fd858e;
    color: white;
    border-color: #fd858e;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    color: rgba(255, 255, 255, 0.6);
}

/* 在线客服浮窗样式 */
.customer-service-widget {
    position: fixed;
    right: 30px;
    bottom: 100px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.cs-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #fd858e;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(253, 133, 142, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cs-button:hover {
    background-color: #ff6b78;
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 6px 20px rgba(253, 133, 142, 0.6);
}

.cs-button i {
    font-size: 1.5rem;
    position: relative;
    z-index: 2;
}

.cs-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.cs-button:hover::after {
    opacity: 1;
}

.cs-button span {
    position: absolute;
    white-space: nowrap;
    background-color: #fd858e;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    top: 50%;
    right: 70px;
    transform: translateY(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cs-button:hover span {
    opacity: 1;
    visibility: visible;
    right: 75px;
}

.cs-chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 450px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cs-chat-window.active {
    transform: scale(1);
    opacity: 1;
}

.cs-header {
    background-color: #fd858e;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cs-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 1.1rem;
}

.cs-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.cs-close:hover {
    transform: scale(1.1);
}

.cs-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background-color: #f8f9fa;
}

.cs-messages {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.cs-message {
    display: flex;
    margin-bottom: 15px;
    max-width: 100%;
}

.cs-message-sent {
    margin-left: auto;
    flex-direction: row-reverse;
}

.cs-message-received {
    margin-right: auto;
}

.cs-avatar {
    width: 90px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #fff;
}

.cs-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cs-avatar:hover img {
    transform: scale(1.1);
}

.cs-bubble {
    background-color: white;
    padding: 12px 15px;
    border-radius: 18px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cs-message-sent .cs-bubble {
    background-color: #fd858e;
    color: white;
}

.cs-input-area {
    display: flex;
    gap: 10px;
    padding: 10px 0 0;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.cs-input-area textarea {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 15px;
    resize: none;
    height: 45px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.cs-input-area textarea:focus {
    outline: none;
    border-color: #fd858e;
}

.cs-input-area button {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #fd858e;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.cs-input-area button:hover {
    background-color: #ff6b78;
    transform: scale(1.05);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .service-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .customer-service-widget {
        right: 20px;
        bottom: 80px;
    }
    
    .cs-chat-window {
        width: 320px;
        height: 420px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .about-content {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-logo::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .cs-chat-window {
        width: 300px;
        height: 400px;
        right: 0;
    }
}

@media (max-width: 480px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .services h2,
    .about-text h2,
    .success-stories h2,
    .contact h2 {
        font-size: 2rem;
    }
    
    .customer-service-widget {
        right: 10px;
        bottom: 70px;
    }
    
    .cs-button {
        width: 50px;
        height: 50px;
    }
    
    .cs-chat-window {
        width: 280px;
        height: 380px;
        right: 0;
    }
}