﻿/* 防止手机端水平滚动 */
html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

/* 环保主题色彩变量 */
:root {
    --primary-color: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #4ade80;
    --secondary-color: #059669;
    --accent-color: #065f46;
    --text-dark: #1f2937;
    --text-light: #6b7280;
}

/* 轮播图样式 */
.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-content {
    position: absolute;
    bottom: 50px;
    left: 50px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
}

.carousel-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.carousel-dot.active {
    background: var(--primary-color);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 响应式轮播图 */
@media (max-width: 768px) {
    .carousel-container {
        height: 300px;
    }
    
    .carousel-content {
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
        padding: 15px;
    }
    
    .carousel-prev,
    .carousel-next {
        padding: 10px;
    }
} 