/* 自定义样式 */

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* 版块内容居中 */
.section-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* 网格布局居中 */
.product-grid,
.application-grid,
.news-grid {
    display: grid;
    gap: 2rem;
    margin: 0 auto;
    max-width: 1000px;
}

/* 产品网格布局 */
.product-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* 应用领域网格布局 */
.application-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* 新闻网格布局 */
.news-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 导航栏滚动效果 */
nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 按钮悬停效果 */
button:hover, a:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-item i {
        margin-bottom: 8px;
    }
}

/* 表单样式 */
form input:focus, form textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* 加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay1 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay2 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay3 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay4 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay5 {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    animation: fadeIn 0.8s ease-in-out;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-delay-1 {
    animation: fadeInDelay1 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-fade-in-delay-2 {
    animation: fadeInDelay2 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

.animate-fade-in-delay-3 {
    animation: fadeInDelay3 0.8s ease-out 0.6s forwards;
    opacity: 0;
}

.animate-fade-in-delay-4 {
    animation: fadeInDelay4 0.8s ease-out 0.8s forwards;
    opacity: 0;
}

.animate-fade-in-delay-5 {
    animation: fadeInDelay5 0.8s ease-out 1s forwards;
    opacity: 0;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* 按钮样式 */
.btn-red {
    background-color: #dc2626;
    color: white;
    font-weight: bold;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-red:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag-red {
    background-color: #fef2f2;
    color: #b91c1c;
}

.tag-blue {
    background-color: #ebf8ff;
    color: #2b6cb0;
}

/* 图标样式 */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #fef2f2;
    color: #dc2626;
    margin-right: 0.75rem;
}

/* 分隔线 */
.divider {
    height: 4px;
    width: 6rem;
    background-color: #dc2626;
    margin: 1.5rem auto;
}

/* 标题样式 */
.section-title {
    position: relative;
    display: block;
    margin: 0 auto 2rem;
    text-align: center;
}

/* 背景渐变 */
.bg-gradient-red {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

/* 阴影效果 */
.shadow-custom {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 响应式导航 */
@media (max-width: 768px) {
    #mobile-menu {
        transition: all 0.3s ease;
    }
    
    #mobile-menu.show {
        display: block;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* 卡片样式 */
.card {
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* 文字效果 */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #dc2626, #b91c1c);
}

/* 图片效果 */
.img-hover {
    transition: all 0.3s ease;
}

.img-hover:hover {
    transform: scale(1.05);
}

/* 表单提交按钮 */
.submit-btn {
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 社交媒体图标 */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: #b91c1c;
}

/* 导航链接效果 */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #dc2626;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* 加载动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 按钮悬停效果增强 */
a.btn-primary {
    transition: all 0.3s ease;
}

a.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* 图片悬停效果 */
.img-hover {
    transition: transform 0.5s ease;
}

.img-hover:hover {
    transform: scale(1.05);
}

/* 卡片悬停效果增强 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}