/* 自定义样式 */

/* 全局样式 */
body {
    font-family: 'Inter', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333333;
}

/* 导航栏样式 */
header {
    transition: box-shadow 0.3s ease;
}

header:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 按钮样式 */
.btn-primary {
    @apply bg-green-700 hover:bg-green-800 text-white font-medium py-3 px-6 rounded-lg inline-block transition duration-300;
}

.btn-secondary {
    @apply text-green-700 hover:text-green-800 font-medium inline-flex items-center transition duration-300;
}

/* 卡片样式 */
.card {
    @apply bg-white p-6 rounded-lg shadow-md transition duration-300;
}

.card:hover {
    @apply shadow-lg transform -translate-y-1;
}

/* 表单样式 */
.form-input {
    @apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-green-500 transition duration-300;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        @apply px-4;
    }
    
    h1 {
        @apply text-3xl;
    }
    
    h2 {
        @apply text-2xl;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* 图片懒加载 */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.lazy.loaded {
    opacity: 1;
}

/* 面包屑导航 */
.breadcrumb {
    @apply flex items-center space-x-2 text-sm text-gray-500;
}

.breadcrumb a {
    @apply hover:text-green-700 transition duration-300;
}

.breadcrumb .separator {
    @apply text-gray-300;
}

/* 页脚链接 */
footer a {
    @apply transition duration-300;
}

footer a:hover {
    @apply text-white;
}

/* 社交媒体图标 */
.social-icon {
    @apply text-gray-400 hover:text-white transition duration-300;
}

/* 客户评价卡片 */
.testimonial-card {
    @apply bg-gray-50 p-6 rounded-lg shadow-md transition duration-300;
}

.testimonial-card:hover {
    @apply shadow-lg;
}

/* 产品卡片 */
.product-card {
    @apply bg-white rounded-lg overflow-hidden shadow-md transition duration-300;
}

.product-card:hover {
    @apply shadow-lg transform -translate-y-1;
}

/* 功效卡片 */
.benefit-card {
    @apply bg-white p-6 rounded-lg shadow-md text-center transition duration-300;
}

.benefit-card:hover {
    @apply shadow-lg transform -translate-y-1;
}

/* 常见问题 */
.faq-item {
    @apply border-b border-gray-200 py-4;
}

.faq-question {
    @apply font-medium text-lg text-green-800 cursor-pointer flex justify-between items-center;
}

.faq-answer {
    @apply mt-2 text-gray-600;
}

/* 联系表单 */
.contact-form {
    @apply bg-white p-6 rounded-lg shadow-lg;
}

/* 加载动画 */
.loading {
    @apply animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-green-700;
}

/* 无障碍支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 图片轮播样式 */
.carousel {
    position: relative;
    width: 100%;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #f3f4f6;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 500px;
}

@media (max-width: 768px) {
    .carousel-track {
        height: 300px;
    }
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #d1d5db;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
}

.indicator:hover {
    background-color: #9ca3af;
}

.indicator.active {
    background-color: #047857;
}

.carousel-main {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #f3f4f6;
}

@media (max-width: 768px) {
    .carousel-main {
        height: 300px;
    }
}

.carousel-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-nav:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 16px;
}

.carousel-next {
    right: 16px;
}

.carousel-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.carousel-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.375rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.carousel-thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.carousel-thumbnail.active {
    opacity: 1;
    border-color: #047857;
}

/* 图片查看器样式 */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.image-viewer-img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.image-viewer-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    background-color: transparent;
    color: white;
    border: none;
    font-size: 36px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    line-height: 1;
}

.image-viewer-close:hover {
    opacity: 0.7;
}

.image-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-nav:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.image-viewer-prev {
    left: -64px;
}

.image-viewer-next {
    right: -64px;
}

@media (max-width: 768px) {
    .image-viewer-prev {
        left: 8px;
    }
    
    .image-viewer-next {
        right: 8px;
    }
    
    .image-viewer-close {
        top: 8px;
        right: 8px;
    }
}

/* 渐进式加载样式 */
.progressive-loading {
    filter: blur(10px);
    transition: filter 0.5s ease;
}

.progressive-loaded {
    filter: blur(0);
}

/* 手风琴折叠样式 */
.accordion-item {
    border-bottom: 1px solid #e5e7eb;
}

.accordion-header {
    padding: 1rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #065f46;
    transition: color 0.3s ease;
}

.accordion-header:hover {
    color: #047857;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-content.open {
    max-height: 500px;
    padding-bottom: 1rem;
}

/* 特性标签样式 */
.feature-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

/* 客户评价轮播 */
.testimonial-carousel {
    position: relative;
}

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

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #d1d5db;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.testimonial-dot.active {
    background-color: #047857;
}

/* 交互动画增强 */
.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.icon-wrapper {
    transition: transform 0.3s ease;
}

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

/* 骨架屏效果 */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
