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

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
    overflow-x: hidden;
}

/* 自定义颜色变量 */
:root {
    --primary-color: #05b974;
    --secondary-color: #1A1A1A;
    --accent-color: #41d999;
    --light-color: #F9F9F9;
    --dark-color: #333333;
    --gray-color: #666666;
    --light-gray: #F5F5F5;
    --border-color: #E5E5E5;
}

/* 工具类 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-primary {
    color: var(--primary-color);
}

.text-secondary {
    color: var(--secondary-color);
}

.text-dark {
    color: var(--dark-color);
}

.text-gray {
    color: var(--gray-color);
}

/* 移动端底部元素隐藏 - 保留顶部导航栏和底部菜单栏 */
@media (max-width: 767px) {
    footer,
    #back-to-top,
    #notification-center {
        display: none !important;
    }
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-secondary {
    background-color: var(--secondary-color);
}

.bg-light {
    background-color: var(--light-color);
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-xl {
    border-radius: 1rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.transition-shadow {
    transition: box-shadow 0.3s ease;
}

/* 安全区域适配 */
.safe-area {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* 移动端滚动条隐藏 */
.mobile-scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.mobile-scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 移动端触摸优化 */
.touch-active {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    touch-action: manipulation;
}

.touch-active:active {
    transform: scale(0.97);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-in {
    animation: slideIn 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 2s ease infinite;
}

.animate-float {
    animation: float 3s ease infinite;
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(5, 185, 116, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* 表单元素样式 */
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    outline: none;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 185, 116, 0.1);
}

/* 导航栏样式 */
#navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* 移动端菜单 */
#mobile-menu.active {
    transform: translateX(0);
}

/* 返回顶部按钮 */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* 英雄区域 */
#home {
    background-size: cover;
    background-position: center;
    position: relative;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(5, 185, 116, 0.05) 0%, rgba(249, 249, 249, 0.1) 100%);
    z-index: -1;
}

/* 服务卡片 */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 服务流程 */
.process-step {
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
}

/* 城市卡片 */
.city-item {
    transition: all 0.3s ease;
}

.city-item:hover {
    background-color: var(--light-color);
    transform: translateY(-3px);
}

/* 用户评价轮播 */
.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

/* 预约表单 */
#booking-form button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* CMS特有组件 */
/* 消息通知中心 */
#notification-center.active {
    transform: translateX(0);
}

/* 底部导航栏 */
.bottom-nav {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

/* 客服悬浮按钮 */
.support-btn {
    box-shadow: 0 4px 12px rgba(5, 185, 116, 0.3);
}

.support-btn:hover {
    box-shadow: 0 6px 16px rgba(5, 185, 116, 0.4);
}

/* 响应式设计 */
/* 移动端优化 */
@media (max-width: 767px) {
    .container {
        padding: 0 16px;
    }
    
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    p {
        font-size: 1rem;
    }
    
    /* 调整部分间距 */
    section {
        padding-bottom: 100px !important;
    }
    
    /* 移动端菜单 */
    #mobile-menu {
        width: 85%;
    }
    
    /* 服务卡片 */
    .service-card {
        margin-bottom: 24px;
    }
    
    /* 预约表单 */
    #booking-form {
        width: 100%;
    }
    
    /* 底部导航栏 */
.mobile-bottom-nav {
    height: 80px;
}

/* 底部导航栏链接 - 确保主色优先显示 */
.mobile-bottom-nav a.text-primary {
    color: var(--primary-color) !important;
}
    
    /* 调整元素大小 */
    .btn-primary,
    .btn-secondary {
        font-size: 1rem;
        padding: 12px 20px;
    }
}

/* 平板端优化 */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 24px;
    }
    
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    section {
        padding-top: 120px !important;
        padding-bottom: 120px !important;
    }
}

/* 桌面端优化 */
@media (min-width: 1024px) {
    /* 平滑滚动 */
    html {
        scroll-behavior: smooth;
    }
}

/* 安全区域适配 */
@supports (padding: env(safe-area-inset-top)) {
    .safe-top {
        padding-top: env(safe-area-inset-top);
    }
    
    .safe-bottom {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* 渐入动画元素 */
.fade-in-element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 加载状态样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* CMS消息通知样式 */
.cms-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--dark-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cms-notification.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 优化字体渲染 */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 图像优化 */
img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}