/* 绿美园林 - 现代化前端设计优化 */

/* CSS变量定义 - 现代设计系统 */
:root {
    /* 主色调 - 自然绿色系 */
    --primary-green: #2e7d32;
    --primary-green-light: #4caf50;
    --primary-green-dark: #1b5e20;
    --secondary-green: #81c784;
    
    /* 中性色调 */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #eeeeee;
    --neutral-300: #e0e0e0;
    --neutral-400: #bdbdbd;
    --neutral-500: #9e9e9e;
    --neutral-600: #757575;
    --neutral-700: #616161;
    --neutral-800: #424242;
    --neutral-900: #212121;
    
    /* 渐变色彩 */
    --gradient-primary: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
    --gradient-secondary: linear-gradient(135deg, var(--primary-green-light), var(--secondary-green));
    --gradient-dark: linear-gradient(135deg, var(--neutral-800), var(--neutral-900));
    
    /* 阴影系统 */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2), 0 10px 20px rgba(0,0,0,0.1);
    
    /* 边框圆角 */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    
    /* 动画曲线 */
    --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out-cubic: cubic-bezier(0.215, 0.61, 0.355, 1);
    --ease-in-out-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 现代化重置样式 */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--neutral-800);
    background: var(--neutral-50);
    overflow-x: hidden;
}

/* 现代化的头部样式优化 */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s var(--ease-out-cubic);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
    border-bottom-color: rgba(46, 125, 50, 0.1);
}

/* 英雄区域现代化设计 */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><path fill="rgba(255,255,255,0.05)" d="M0,0V800H1200V0ZM600,400C600,400,400,600,400,600S200,400,200,400,400,200,400,200,600,400,600,400Z"/></svg>') center/cover;
    animation: float 20s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s var(--ease-out-cubic) 0.2s forwards;
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s var(--ease-out-cubic) 0.4s forwards;
}

.hero .btn {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s var(--ease-out-cubic) 0.6s forwards;
}

/* 现代化的按钮设计 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s var(--ease-out-cubic);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: rgba(255, 255, 255, 0.3);
}

.btn:hover::before {
    left: 100%;
}

/* 现代化的卡片设计系统 */
.service-card, .case-card, .plant-card, .career-item {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.4s var(--ease-out-cubic);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(50px);
}

.service-card.fade-in, .case-card.fade-in, .plant-card.fade-in, .career-item.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.service-card::before, .case-card::before, .plant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transition: left 0.4s var(--ease-out-cubic);
}

.service-card:hover, .case-card:hover, .plant-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-card:hover::before, .case-card:hover::before, .plant-card:hover::before {
    left: 0;
}

/* 现代化的图片容器 */
.service-image, .case-image, .plant-image {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.service-image img, .case-image img, .plant-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-cubic);
}

.service-card:hover .service-image img,
.case-card:hover .case-image img,
.plant-card:hover .plant-image img {
    transform: scale(1.1);
}

/* 现代化的内容区域 */
.service-content, .case-content, .plant-content {
    padding: 1.5rem;
}

.service-content h3, .case-content h3, .plant-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--neutral-900);
}

.service-content p, .case-content p, .plant-content p {
    color: var(--neutral-600);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* 现代化的网格布局 */
.services-grid, .cases-grid, .plants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
@media (min-width: 1200px) {
  .services-grid, .cases-grid, .plants-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* 现代化的表单设计 */
.form-control {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--neutral-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s var(--ease-out-cubic);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
    transform: translateY(-1px);
}

/* 现代化的标签页设计 */
.about-tabs {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background: var(--neutral-100);
    border-bottom: 1px solid var(--neutral-200);
}

.tab-button {
    flex: 1;
    padding: 1.2rem 2rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--neutral-600);
    cursor: pointer;
    transition: all 0.3s var(--ease-out-cubic);
    position: relative;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: all 0.3s var(--ease-out-cubic);
    transform: translateX(-50%);
}

.tab-button.active {
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary-green);
    font-weight: 600;
}

.tab-button.active::after {
    width: 80%;
}

.tab-button:hover {
    color: var(--primary-green);
    background: rgba(46, 125, 50, 0.05);
}

.tab-content {
    padding: 0;
}

.tab-pane {
    display: none;
    padding: 0;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s var(--ease-out-cubic);
}

/* 现代化的联系表单 */
.contact-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.contact-info {
    padding: 3rem;
    background: var(--color-surface);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border-light);
}

.contact-form {
    padding: 3rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.contact-icon {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* 现代化的地图容器 */
.map-section {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    padding: 2rem;
}

#map-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s var(--ease-out-cubic);
}

#map-container:hover {
    transform: translateY(-2px);
}

/* 现代化的导航按钮 */
.nav-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s var(--ease-out-cubic);
    box-shadow: var(--shadow-md);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.nav-btn img {
    width: 24px;
    height: 24px;
    background: white;
    border-radius: var(--radius-sm);
    padding: 0.2rem;
}

/* 现代化的动画定义 */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 现代化的响应式设计 */
@media (max-width: 768px) {
    .services-grid, .cases-grid, .plants-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: center;
    }
    
    .nav-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .contact-info, .contact-form {
        padding: 2rem;
    }
}

/* 现代化的滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green-dark);
}

/* 现代化的加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

/* 现代化的错误状态 */
.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

/* 现代化的成功状态 */
.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

/* 现代化的悬停效果增强 */
.card-hover {
    transition: all 0.3s var(--ease-out-cubic);
    position: relative;
}

.card-hover:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* 现代化的文本渐变效果 */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 现代化的玻璃拟态效果 */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 现代化的分割线 */
.divider {
    height: 1px;
    background: var(--neutral-200);
    margin: 2rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* 现代化的工具提示 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--neutral-800);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s var(--ease-out-cubic);
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: 120%;
}

/* 现代化的骨架屏加载效果 */
.skeleton {
    background: linear-gradient(90deg, var(--neutral-200) 25%, var(--neutral-300) 50%, var(--neutral-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
