@layer utilities {
    .content-auto {
        content-visibility: auto;
    }

    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .text-shadow-lg {
        text-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
    }

    .bg-gradient-blue {
        background: linear-gradient(135deg, #00316e 0%, #0a5cad 100%);
    }

    .card-hover {
        transition: all 0.3s ease;
    }

    .card-hover:hover {
        transform: translateY(-8px);
    }

    .nav-active {
        position: relative;
    }

    .nav-active::after {
        content: '';
        position: absolute;
        bottom: -6px;
        left: 0;
        width: 100%;
        height: 3px;
        background-color: #ffe500;
        border-radius: 3px;
    }

    .animate-fade-in {
        animation: fadeIn 0.8s ease forwards;
    }
}

html {
    scroll-behavior: smooth;
}

/* 轮播图核心样式 */
.carousel {
    position: relative;
    overflow: hidden;
    height: 100vh;
}

.carousel-inner {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.carousel-content {
    position: relative;
    z-index: 20;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(22, 50, 91, 0.35);
    z-index: 10;
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 30;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    width: 30px;
    border-radius: 6px;
    background-color: #ffe500;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 30;
}

.carousel-control:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.carousel-control.prev {
    left: 20px;
}

.carousel-control.next {
    right: 20px;
}

/* 动画效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.caselogo {
    background-color: #16325b33 !important;
    width: 20rem !important;
}

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

.object-contain {
    width: 17rem !important;
}

.number-counter {
    transition: all 0.8s ease-out;
}

/* 产品卡片动画 */
.product-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.product-card img {
    transition: transform 0.6s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* 加载动画 */
.loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    display: none;
}

.loader.show {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 按钮动画 */
.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 229, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 229, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 229, 0, 0);
    }
}

/* 产品分类样式 */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.category-tab {
    padding: 0.75rem 1.5rem;
    background-color: #f8fafc;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-tab.active {
    background-color: #00316e;
    color: white;
}

.category-tab:hover:not(.active) {
    background-color: #e2e8f0;
    color: #0f172a;
}

.category-content {
    display: none;
}

.category-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* 新闻板块样式 */
.news-card {
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.news-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #00316e;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 1440px) {
    .caselogo {
        background-color: #16325b33 !important;
        width: 8rem !important;
    }

    .contactinfo {
        flex-direction: column;
    }

    .rightcontact {
        display: none;
    }
}

.contactinfo {
    display: flex;
    gap: 10px
}

.tipscolor{
    color: rgb(255 229 0) !important;
}

.h-serice {
    height: 25vh;
}

/* ★★★ 客户案例 无缝滚动【最终最终版】看完你的站量身定制 根治所有问题 ★★★ */
#case-scroll-container {
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
    /* 精准适配你的320px卡片+md:gap-12，电脑端刚好只显示4个案例，不多不少 */
    max-width: calc(320px * 4 + 48px);
    position: relative;
}
.case-list {
    display: flex;
    align-items: center;
    gap: 6px;
    @apply md:gap-12 py-12;
    /* 核心：禁止卡片压缩，宽度绝对固定320，间距不乱 */
    flex-shrink: 0;
    flex-wrap: nowrap;
}
/* 每个案例卡片强制固定宽+禁止压缩，彻底解决宽度偏差 */
#case-list > div {
    min-width: 200px;
    @apply md:min-w-[320px];
    flex-shrink: 0 !important;
}
/* 保留你的卡片悬浮上移动画，不变 */
#case-list .card-hover {
    transition: all 0.3s ease;
}
#case-list .card-hover:hover {
    transform: translateY(-8px);
}
/* 移动端适配，自动显示2-3个，无错位 */
@media (max-width: 768px) {
    #case-scroll-container {
        max-width: calc(200px * 3 + 18px);
    }
}
