/* Hero section */

.sidebar-douyin-link {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.douyin-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.douyin-icon {
    height: 24px;
    width: 24px;
    margin-right: 10px;
}

.hero {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
}

/* 浅灰色背景的部分 */
.section-gray {
    background-color: var(--light-gray);
}

/* 居中段落，字体更大 */
.section-description {
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* 居中按钮容器 */
.centered-button {
    text-align: center;
    margin-top: 2rem;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.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-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 10;
    padding: 0 20px;
}

.carousel-btn {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
}

.carousel-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator.active {
    background-color: white;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 20;
    width: 100%;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 主布局 */
.main-content {
    display: flex;
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 30px;
}

.content-wrapper {
    flex: 1;
}

/* 侧栏 */
.sidebar {
    width: 350px;
    padding: 20px;
    position: sticky;
    top: 100px;
    align-self: start;
    height: fit-content;
}

.sidebar-content {
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 0 10px 10px 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-content > div {
    margin-bottom: 5px;
}

.sidebar-content > div:last-child {
    margin-bottom: 0;
}

.sidebar h3 {
    color: var(--success-color);
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--success-color);
}

/* 日历 */
.calendar {
    text-align: center;
    padding: 5px;
    border-radius: 5px;
    font-size: 1rem;
    color: var(--success-color);
    margin-bottom: 5px;
}

.calendar-date {
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar-weekday {
    font-size: 0.9rem;
}

.company-service-time {
    font-size: 0.8rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* 文章列表 */
.articles-list {
    list-style: none;
}

.articles-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--light-border);
}

.articles-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.articles-list a {
    text-decoration: underline;
    color: var(--dark-medium-gray);
    transition: color 0.3s;
    display: block;
    font-size: 0.95rem;
}

.articles-list a:hover {
    color: var(--success-color);
}

/* 品牌信息 */
.sidebar-brand-message h3 {
    margin-top: 5px;
}

.sidebar-brand-message p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--medium-gray);
}

/* 产品展示 */
.product-showcase {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 500px;
    margin: 3rem 0;
}

.product-track {
    display: flex;
    width: max-content;
    animation: smooth-scroll 40s linear infinite;
}

@keyframes smooth-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.product-slide {
    flex: 0 0 auto;
    padding: 0 8px;
    box-sizing: border-box;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    min-height: 350px;
    margin: 0 auto;
}

.product-card-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.product-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card-content h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-card-content p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.5;
    flex-grow: 1;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .carousel-container {
        height: 300px;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .carousel-controls {
        padding: 0 10px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* iPad Pro、Surface Pro 7 及其他中型设备 */
@media (max-width: 1024px) and (min-width: 912px) {
    .main-content {
        display: flex;
        flex-direction: column;
    }

    .content-wrapper {
        order: 2;
    }

    .sidebar {
        width: 100%;
        position: static;
        padding: 20px 0;
        order: 1;
    }

    .hero-content h2 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.3rem;
    }

    .carousel-container {
        height: 400px;
    }

    .grid-4-cols {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .grid-4-cols .card {
        max-width: 100%;
    }

    .product-showcase {
        height: 450px;
        margin: 2.5rem 0;
    }

    .product-track {
        display: flex;
        width: max-content;
        animation: smooth-scroll 35s linear infinite;
    }

    .product-slide {
        flex: 0 0 auto;
        padding: 0 10px;
        box-sizing: border-box;
        width: 300px;
    }

    .product-card {
        max-width: 300px;
        min-height: 380px;
    }

    .product-card-img {
        height: 280px;
    }
}

@media (max-width: 768px) {
    .hero {
        margin-bottom: 1.5rem;
    }

    .carousel-container {
        height: 250px;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .sidebar {
        width: 100%;
        position: static;
        padding: 20px 0;
    }

    .product-showcase {
        height: 400px;
        margin: 2rem 0;
        overflow: hidden;
        position: relative;
    }

    .product-track {
        display: flex;
        width: max-content;
        animation: smooth-scroll 30s linear infinite;
    }

    .product-slide {
        flex: 0 0 auto;
        padding: 0 10px;
        box-sizing: border-box;
        width: 320px;
    }

    .product-card {
        background: var(--white);
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        height: 100%;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        min-height: 390px;
        margin: 0 auto;
    }

    .product-card-img {
        width: 100%;
        height: 250px;
        object-fit: cover;
    }

    .product-card-content {
        padding: 15px;
        flex-grow: 1;
        display: flex;
        flex-direction: column;
    }

    .product-card-content h3 {
        font-size: 1.1rem;
        color: var(--primary-color);
        margin-bottom: 8px;
    }

    .product-card-content p {
        font-size: 0.85rem;
        color: var(--gray);
        line-height: 1.5;
        flex-grow: 1;
    }

    @keyframes smooth-scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}

@media (max-width: 480px) {

    .main-content {
        padding: 0 5px;
    }

    .product-showcase {
        height: 460px;
        margin: 1.5rem 0;
    }

    .product-slide {
        width: 280px;
        padding: 0 5px;
    }

    .product-card {
        max-width: 280px;
        min-height: 350px;
    }

    .product-card-img {
        height: 300px;
    }

    .product-card-content {
        padding: 12px;
    }

    .product-card-content h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .product-card-content p {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    @keyframes smooth-scroll {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
}
