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

    .text-shadow {
        text-shadow: none !important;
    }

    .text-shadow-glow {
        text-shadow: none !important;
    }

    .bg-gradient-primary {
        background: #FF6700;
    }

    .bg-gradient-dark {
        background: linear-gradient(135deg, #0A1220 0%, #0F1D2F 100%);
    }

    .border-glow {
        box-shadow: 0 0 10px rgba(56, 202, 244, 0.5);
    }

    .parallax {
        transform: translateZ(0);
        will-change: transform;
    }

    .section-divider {
        background: linear-gradient(90deg, transparent, rgba(56, 202, 244, 0.4), transparent);
        height: 1px;
        width: 100%;
        margin: 3rem 0;
    }

    .news-card-hidden {
        display: none;
    }

    .bg-dark-800 {
        background-color: #0F1D2F;
    }

    .bg-dark-700 {
        background-color: #1A3050;
    }

    .line-clamp-2 {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    html {
        scroll-behavior: smooth;
    }

    /* PC端视窗小于1400px时停止缩放，保持固定大小 */
    @media (max-width: 1399px) {
        html, body {
            min-width: 1400px;
            overflow-x: auto;
        }

        /* 强制显示桌面端导航菜单 */
        nav .hidden.lg\:flex {
            display: flex !important;
        }

        /* 强制隐藏移动端菜单按钮 */
        nav .lg\:hidden {
            display: none !important;
        }

        /* 强制隐藏移动端菜单面板 */
        #mobile-menu {
            display: none !important;
        }

        /* 强制lg断点样式生效 */
        .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
        .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
        .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
        .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
        .lg\:flex-row { flex-direction: row !important; }
        .lg\:block { display: block !important; }
        .lg\:w-1\/2 { width: 50% !important; }
        .lg\:w-1\/3 { width: 33.333333% !important; }
        .lg\:w-1\/4 { width: 25% !important; }

        /* 强制md断点样式生效 */
        .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
        .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
        .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
        .md\:flex-row { flex-direction: row !important; }
        .md\:block { display: block !important; }
        .md\:w-1\/2 { width: 50% !important; }

        /* 强制sm断点样式生效（flex布局等） */
        .sm\:flex-row { flex-direction: row !important; }
        .sm\:w-1\/2 { width: 50% !important; }
        .sm\:block { display: block !important; }

        /* 解决方案卡片内部布局 */
        .sm\:flex-row.flex-col {
            flex-direction: row !important;
        }
    }

    @keyframes fade-in-up {
        from { opacity: 0; transform: translateY(30px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .animate-fade-in-up {
        animation: fade-in-up 0.6s ease-out forwards;
    }
}

.animate-float {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
}

@media (prefers-reduced-motion: reduce) {
    .animate-float {
        animation: none !important;
    }
}

nav a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.5rem;
}

nav a:not(.mobile-dropdown-button):hover {
    background: rgba(56, 202, 244, 0.15);
    box-shadow:
        0 0 20px rgba(56, 202, 244, 0.3),
        inset 0 0 20px rgba(56, 202, 244, 0.05);
    transform: translateY(-1px);
}

nav a:not(.mobile-dropdown-button):active {
    transform: translateY(0);
}

nav .group a[href]:hover {
    background: rgba(56, 202, 244, 0.2);
    box-shadow:
        0 2px 8px rgba(56, 202, 244, 0.2),
        inset 0 0 15px rgba(56, 202, 244, 0.05);
}

.mobile-dropdown-button:hover {
    background: rgba(56, 202, 244, 0.15);
    box-shadow: 0 0 15px rgba(56, 202, 244, 0.2);
}

nav .relative.group > div.absolute {
    transition: all 0.300s ease-in-out;
    z-index: 1000 !important;
    pointer-events: auto !important;
}

@media (min-width: 1024px) {
    nav .relative.group:hover > div.absolute {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        z-index: 1000 !important;
    }
}

nav .dropdown-menu,
nav .relative.group > div.absolute {
    pointer-events: auto !important;
}

nav .relative.group {
    z-index: 1000;
}

nav.fixed {
    z-index: 1000 !important;
}

nav .dropdown-menu a {
    position: relative;
    z-index: 1001;
}

#mobile-menu {
    top: 64px;
    max-height: calc(100vh - 64px);
}

@media (max-width: 1023px) {
    #mobile-menu {
        top: 60px;
        max-height: calc(100vh - 60px);
    }
}

#mobile-menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-menu-button svg {
    transition: transform 0.3s ease;
}

#mobile-menu-button svg.rotate-90 {
    transform: rotate(90deg);
}

/* 新闻卡片样式 - 防止点击时背景消失 */
#home-news-grid {
    align-items: stretch;
}

#home-news-grid a,
#home-news-grid a:active,
#home-news-grid a:focus,
#home-news-grid a:visited {
    outline: none;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

#home-news-grid a:active img,
#home-news-grid a:focus img {
    opacity: 1 !important;
    transform: scale(1) !important;
}

#home-news-grid a .h-48 {
    overflow: hidden !important;
}

/* 确保新闻卡片图片在点击时保持可见 */
#home-news-grid img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

/* 新闻卡片渐变遮罩保持可见 */
#home-news-grid .absolute.inset-0 {
    pointer-events: none;
}

/* 背景图片层防止点击交互 */
.absolute.inset-0.z-0 {
    pointer-events: none !important;
}

.absolute.inset-0.z-0 img {
    pointer-events: none !important;
    -webkit-user-drag: none;
    user-select: none;
}

a:not(nav a):not(.btn-primary-glow):not(#home-news-grid a) {
    transition: box-shadow 0.3s ease-in-out;
}

a:not(nav a):not(.btn-primary-glow):not(#home-news-grid a):hover {
    box-shadow: 0 4px 12px rgba(56, 202, 244, 0.3);
}

.btn-primary-glow {
    position: relative;
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 0 rgba(56, 202, 244, 0);
}

.btn-primary-glow:hover {
    box-shadow:
        0 0 20px rgba(255, 103, 0, 0.8),
        0 0 40px rgba(56, 202, 244, 0.6),
        0 0 60px rgba(255, 103, 0, 0.4),
        0 8px 24px rgba(255, 103, 0, 0.5);
    background-color: rgba(255, 103, 0, 0.1);
}

.btn-primary-glow.bg-gradient-primary:hover {
    background: #FF8533;
}

@media (max-width: 640px) {
    .btn-primary-glow:hover {
        box-shadow:
            0 0 16px rgba(255, 103, 0, 0.7),
            0 0 32px rgba(56, 202, 244, 0.5),
            0 0 48px rgba(255, 103, 0, 0.3),
            0 6px 18px rgba(255, 103, 0, 0.4);
        background-color: rgba(255, 103, 0, 0.1);
    }

    .btn-primary-glow.bg-gradient-primary:hover {
        background: #FF8533;
    }
}

/* 橙色按钮发光效果 - 灵犀智界AI大管家 */
.btn-orange-glow {
    position: relative;
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
    box-shadow: 0 0 0 rgba(255, 103, 0, 0);
    background-color: #FF6700 !important;
}

.btn-orange-glow:hover,
.btn-orange-glow:active {
    box-shadow:
        0 0 20px rgba(255, 103, 0, 0.6),
        0 0 40px rgba(255, 130, 50, 0.4),
        0 0 60px rgba(255, 103, 0, 0.2),
        0 8px 24px rgba(255, 103, 0, 0.3);
    background-color: #FF6700 !important;
}

/* 蓝色按钮发光效果 - 联系我们 */
.btn-blue-glow {
    position: relative;
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s ease;
    box-shadow: 0 0 0 rgba(56, 202, 244, 0);
}

.btn-blue-glow:hover,
.btn-blue-glow:active {
    box-shadow:
        0 0 20px rgba(56, 202, 244, 0.6),
        0 0 40px rgba(56, 202, 244, 0.4),
        0 0 60px rgba(56, 202, 244, 0.2),
        0 8px 24px rgba(56, 202, 244, 0.3);
}

@media (max-width: 640px) {
    .btn-orange-glow {
        background-color: #FF6700 !important;
    }

    .btn-orange-glow:hover,
    .btn-orange-glow:active {
        box-shadow:
            0 0 16px rgba(255, 103, 0, 0.5),
            0 0 32px rgba(255, 130, 50, 0.3),
            0 0 48px rgba(255, 103, 0, 0.2),
            0 6px 18px rgba(255, 103, 0, 0.25);
        background-color: #FF6700 !important;
    }

    .btn-blue-glow:hover,
    .btn-blue-glow:active {
        box-shadow:
            0 0 16px rgba(56, 202, 244, 0.5),
            0 0 32px rgba(56, 202, 244, 0.3),
            0 0 48px rgba(56, 202, 244, 0.2),
            0 6px 18px rgba(56, 202, 244, 0.25);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-primary-glow,
    .btn-orange-glow,
    .btn-blue-glow {
        transition: none;
    }
}

.btn-text-shimmer {
    position: relative;
    display: inline-block;
    background: linear-gradient(
        120deg,
        #ffffff 0%,
        #ffffff 40%,
        rgba(255, 103, 0, 0.7) 50%,
        #ffffff 60%,
        #ffffff 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-position: 100% 0;
}

.btn-primary-glow:hover .btn-text-shimmer {
    animation: textShimmer 1.5s ease-in-out;
}

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

@media (max-width: 640px) {
    .btn-text-shimmer {
        background: linear-gradient(
            120deg,
            #ffffff 0%,
            #ffffff 45%,
            rgba(255, 103, 0, 0.5) 50%,
            #ffffff 55%,
            #ffffff 100%
        );
        background-size: 200% 100%;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .btn-primary-glow:hover .btn-text-shimmer {
        animation: textShimmer 1.2s ease-in-out;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-text-shimmer {
        background: #ffffff;
        -webkit-text-fill-color: currentColor;
    }
    
    .btn-primary-glow:hover .btn-text-shimmer {
        animation: none;
    }
}

.contact-section {
    background: transparent;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}
