/* Pestico - Tailwind CSS Custom Styles */

/* 新配色方案：
   主色：深绿色 #2F6F4E
   辅色：草绿色 #6BBF59
   点缀色：浅米色 #F4F1E9
   强调色：橙色 #F2994A
   文本：深灰 #333333
*/

/* 自定义动画 */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

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

.animate-pulse-slow {
    animation: pulse 3s ease-in-out infinite;
}

.animate-slide-up {
    animation: slideInUp 0.6s ease-out;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F4F1E9;
}

::-webkit-scrollbar-thumb {
    background: #2F6F4E;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6BBF59;
}

/* 渐变背景 */
.gradient-primary {
    background: linear-gradient(135deg, #2F6F4E 0%, #6BBF59 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #2F6F4E 0%, #1a4a35 100%);
}

.gradient-overlay {
    background: linear-gradient(to right, rgba(47, 111, 78, 0.95) 0%, rgba(47, 111, 78, 0.7) 50%, transparent 100%);
}

/* 文字渐变 */
.text-gradient {
    background: linear-gradient(135deg, #2F6F4E 0%, #6BBF59 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(47, 111, 78, 0.15);
}

/* 图片悬停缩放 */
.img-zoom {
    overflow: hidden;
}

.img-zoom img,
.img-zoom i {
    transition: transform 0.5s ease;
}

.img-zoom:hover img,
.img-zoom:hover i {
    transform: scale(1.1);
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #2F6F4E 0%, #6BBF59 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(47, 111, 78, 0.3);
}

/* 导航链接下划线动画 */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #6BBF59;
    transition: width 0.3s ease;
}

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

/* Hero背景图案 */
.hero-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(107, 191, 89, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(242, 153, 74, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(107, 191, 89, 0.1) 0%, transparent 30%);
}

/* 服务卡片图标背景 */
.service-icon-bg {
    background: linear-gradient(135deg, #2F6F4E 0%, #6BBF59 100%);
    position: relative;
}

.service-icon-bg::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #2F6F4E 0%, #6BBF59 50%, #6BBF59 100%);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-icon-bg:hover::before {
    opacity: 1;
}

/* 数字计数器样式 */
.counter-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2F6F4E 0%, #6BBF59 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 页脚波浪效果 */
.footer-wave {
    position: relative;
}

.footer-wave::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-36.77,168.64-23.12,227.43,17.59C605.83,96.77,698.54,102.73,750,79.36c53.14-23.77,114.59-19.38,154.44,11.31C944.89,121.44,990,128.13,1050,96.36c30.67-16.25,60.33-32.5,90-48.75v72.41H0V56.44Z' fill='%231a1a1a'/%3E%3C/svg%3E") no-repeat;
    background-size: cover;
    transform: rotate(180deg);
}

/* 表单输入框焦点效果 */
.input-focus {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.input-focus:focus {
    border-color: #6BBF59;
    box-shadow: 0 0 0 3px rgba(107, 191, 89, 0.1);
    outline: none;
}

/* 新闻卡片日期标签 */
.date-badge {
    background: linear-gradient(135deg, #F2994A 0%, #e88a3a 100%);
    box-shadow: 0 4px 10px rgba(242, 153, 74, 0.3);
}

/* 案例分类标签 */
.category-badge {
    background: linear-gradient(135deg, #6BBF59 0%, #2F6F4E 100%);
    box-shadow: 0 4px 10px rgba(107, 191, 89, 0.3);
}

/* 团队成员社交图标 */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px) rotate(360deg);
}

/* 加载动画 */
.loading-spinner {
    border: 3px solid #F4F1E9;
    border-top: 3px solid #2F6F4E;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 背景色辅助类 */
.bg-cream {
    background-color: #F4F1E9;
}

.bg-primary-dark {
    background-color: #2F6F4E;
}

.bg-primary-light {
    background-color: #6BBF59;
}

.bg-accent {
    background-color: #F2994A;
}

/* 文本色辅助类 */
.text-primary-dark {
    color: #2F6F4E;
}

.text-primary-light {
    color: #6BBF59;
}

.text-accent {
    color: #F2994A;
}

.text-dark {
    color: #333333;
}

/* Hero轮播样式 */
.hero-slider {
    position: relative;
}

.hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.hero-indicator.active {
    opacity: 1 !important;
    transform: scale(1.2);
}


@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob {
    animation: blob 7s infinite;
}
.animation-delay-2000 {
    animation-delay: 2s;
}
/* 响应式调整 */
@media (max-width: 768px) {
    .counter-number {
        font-size: 2rem;
    }
}

/* 客户Logo网格轮播样式 */
.client-grid-carousel {
    position: relative;
    width: 100%;
}

.client-grid-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-grid-page {
    flex-shrink: 0;
    width: 100%;
}

/* 轮播控制按钮 */
.client-grid-prev,
.client-grid-next {
    transition: all 0.3s ease;
}

.client-grid-prev:hover,
.client-grid-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* 轮播指示器 */
.client-grid-dot {
    transition: all 0.3s ease;
}

/* 客户Logo卡片样式 */
.client-logo-card {
    transition: all 0.3s ease;
}

.client-logo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Logo图片灰度效果 */
.client-logo-card img {
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.client-logo-card:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* 客户统计数字动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 深色模式支持（可选） */
@media (prefers-color-scheme: dark) {
    /* 可以在这里添加深色模式样式 */
}

/* 客户合作轮播样式 */
.client-carousel {
    position: relative;
    width: 100%;
}

.client-carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-carousel-slide {
    flex-shrink: 0;
    width: 100%;
}

/* 轮播控制按钮样式 */
.client-carousel-prev,
.client-carousel-next {
    opacity: 0;
    transition: all 0.3s ease;
}

.client-carousel:hover .client-carousel-prev,
.client-carousel:hover .client-carousel-next {
    opacity: 1;
}

.client-carousel-prev:hover,
.client-carousel-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* 轮播指示器样式 */
.client-carousel-indicator {
    transition: all 0.3s ease;
}

.client-carousel-indicator.active {
    background-color: #6BBF59 !important;
    transform: scale(1.3);
}

/* 客户Logo卡片增强样式 */
.client-logo-card {
    position: relative;
    overflow: hidden;
}

.client-logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(107, 191, 89, 0.05) 0%, rgba(47, 111, 78, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.client-logo-card:hover::before {
    opacity: 1;
}

.client-logo-card > * {
    position: relative;
    z-index: 1;
}

/* Logo图片灰度效果和悬停动画 */
.client-logo-card img {
    filter: grayscale(100%) opacity(0.6);
    transition: all 0.4s ease;
}

.client-logo-card:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.08);
}

/* 轮播淡入动画 */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.client-carousel-slide .client-logo-card {
    animation: fadeInScale 0.5s ease-out;
}

/* 响应式调整 */
@media (max-width: 1024px) {
    .client-carousel-prev,
    .client-carousel-next {
        opacity: 1;
        transform: translateY(-50%) scale(0.9);
    }
}

@media (max-width: 768px) {
    .client-carousel-prev,
    .client-carousel-next {
        width: 40px;
        height: 40px;
        transform: translateY(-50%) translateX(0) scale(0.8);
    }
    
    .client-carousel-prev {
        left: 10px;
    }
    
    .client-carousel-next {
        right: 10px;
    }
}


/* =========================================
   Article Typography Styles (Simulating Tailwind Typography)
   ========================================= */
.article-content {
    color: #374151; /* gray-700 */
    font-size: 1.125rem; /* 18px */
    line-height: 1.75;
    /*max-width: 65ch; /* 优化阅读宽度 */
}

/* 标题样式 */
.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4, 
.article-content h5, 
.article-content h6 {
    color: #111827; /* gray-900 */
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.article-content h1 { font-size: 2.25em; }
.article-content h2 { 
    font-size: 1.5em; 
    border-bottom: 2px solid #e5e7eb; 
    padding-bottom: 0.3em; 
    color: #2F6F4E; /* 使用主题主色 */
}
.article-content h3 { font-size: 1.25em; color: #2F6F4E; }
.article-content h4 { font-size: 1.1em; }

/* 段落与列表 */
.article-content p {
    margin-bottom: 1.25em;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }

.article-content li {
    margin-bottom: 0.5em;
}

.article-content li::marker {
    color: #6BBF59; /* 使用主题辅色作为列表符号颜色 */
}

/* 引用块 */
.article-content blockquote {
    border-left: 4px solid #6BBF59; /* 主题辅色 */
    background-color: #f9fafb;
    padding: 1em 1.5em;
    margin: 1.5em 0;
    font-style: italic;
    color: #4b5563;
    border-radius: 0 0.5rem 0.5rem 0;
}

/* 代码块 */
.article-content code {
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.875em;
    color: #ef4444;
}

.article-content pre {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1.25em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5em 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    font-size: 0.9em;
    line-height: 1.6;
}

/* 图片 */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5em 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 链接 */
.article-content a {
    color: #2F6F4E; /* 主题主色 */
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}

.article-content a:hover {
    color: #6BBF59; /* 悬停使用辅色 */
}

/* 表格 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 0.95em;
}

.article-content th, 
.article-content td {
    border: 1px solid #e5e7eb;
    padding: 0.75em;
    text-align: left;
}

.article-content th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #2F6F4E;
}

.article-content tr:nth-child(even) {
    background-color: #f9fafb;
}

/* 分隔线 */
.article-content hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 2em 0;
}