/* Global Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Navigation */
#mobile-menu {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

/* Solution listing: prevent a sticky desktop sidebar from covering content on
   tablets and phones. Language sites reuse this page and stylesheet. */
.solutions-page, .solutions-page * { min-width: 0; }
.solutions-page img { max-width: 100%; height: auto; }
@media (max-width: 1100px) {
    .solutions-page .solutions-layout { flex-direction: column !important; }
    .solutions-page .solutions-sidebar { position: static !important; top: auto !important; width: 100% !important; max-width: none; }
    .solutions-page .solutions-content { width: 100%; }
}
@media (max-width: 767px) {
    .solutions-page { overflow-x: hidden; }
    .solutions-page .solution-card { padding: 1rem; gap: 1rem; flex-direction: column !important; }
    .solutions-page .solution-card > div:first-child { width: 100% !important; height: 11rem; }
    .solutions-page .solution-card > div:last-child > div:last-child { align-items: flex-start; flex-direction: column; gap: .75rem; }
    .solutions-page .solutions-sidebar .sticky { position: static !important; }
}

/* Footer columns use deliberate visual rhythm rather than equal empty space. */
.footer-columns {
    display: grid;
    grid-template-columns: minmax(15rem, 1.38fr) minmax(9rem, .82fr) minmax(9rem, .82fr) minmax(15rem, 1.12fr);
    column-gap: clamp(2.5rem, 5vw, 5.75rem);
    row-gap: 2.5rem;
    margin-bottom: 2.75rem;
}
.footer-columns h4 { min-height: 1.5rem; margin-bottom: 1.35rem; line-height: 1.5rem; }
.footer-columns .footer-brand-column > a { margin-bottom: 1.25rem; }
.footer-columns .footer-brand-column p { max-width: 21rem; }
.footer-columns .footer-menu-column ul { line-height: 1.7; }
.footer-columns .footer-contact-column ul { line-height: 1.6; }
@media (max-width: 1023px) {
    .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
}
@media (max-width: 640px) {
    .footer-columns { grid-template-columns: minmax(0, 1fr); gap: 2rem; margin-bottom: 2rem; }
    .footer-columns .footer-brand-column p { max-width: none; }
}

/* Backgrounds */
.bg-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

.bg-grid-pattern {
    background-image: radial-gradient(#CBD5E1 1px, transparent 1px);
    background-size: 32px 32px;
}

/* Typography */
.text-gradient {
    background: linear-gradient(135deg, #0F52BA 0%, #1e40af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Home Page: Mega Tabs */
/* Home Page: Mega Tabs */
.bg-tab-gray {
    background-color: #F1F5F9;
    /* Slate-100 - Darker than before */
    border: 1px solid #E2E8F0;
    /* Slate-200 Border */
    border-bottom: 2px solid #E2E8F0;
    /* Thicker bottom for 3D feel */
}

.mega-tab {
    transition: all 0.2s ease-out;
    position: relative;
    margin-right: -1px;
    /* Collapse borders */
}

.mega-tab h3 {
    transition: color 0.3s;
    font-size: 1.25rem;
    /* Ensure readable size */
}

.mega-tab.active {
    background-color: white;
    border: 1px solid #0F52BA;
    /* Blue Line Border */
    border-top: 4px solid #0F52BA;
    /* Thick Top */
    border-bottom: 1px solid white;
    /* Hide bottom border to merge with content */
    margin-bottom: -1px;
    /* Overlap container border */
    z-index: 20;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    /* Subtle lift */
}

/* Active Top Border - REMOVE pseudo, use border-top directly */
.mega-tab.active::before {
    display: none;
}

.mega-tab:hover:not(.active) {
    background-color: #E2E8F0;
    /* Slate-200 Hover */
    border-color: #CBD5E1;
}

.mega-tab:hover:not(.active) h3 {
    color: #0F52BA;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}

.tab-content.active {
    display: block;
}

/* Icons */
.icon-box-filled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #0F52BA;
    color: white;
    border-radius: 2px;
    margin-right: 8px;
}

.icon-box-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #0F52BA;
    margin-right: 8px;
}

/* Markdown Styles */
.markdown-body ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.markdown-body ol {
    list-style-type: decimal;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.markdown-body p {
    margin-bottom: 0.8em;
}

.markdown-body strong {
    color: #60a5fa;
    font-weight: 600;
}

.markdown-body h3 {
    font-size: 1.1em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 0.5em;
    color: white;
}

/* Product Cards */
.product-card {
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(15, 82, 186, 0.15), 0 8px 10px -6px rgba(15, 82, 186, 0.1);
    border-color: #BFDBFE;
}

/* Category Buttons */
.category-btn {
    transition: all 0.2s;
}

.category-btn.active {
    background-color: #0F52BA;
    color: white;
    font-weight: 600;
}

.category-btn:hover:not(.active) {
    background-color: #F1F5F9;
    color: #0F52BA;
}

/* Solution Cards */
.solution-card {
    transition: all 0.3s;
    border: 1px solid #E5E7EB;
}

.solution-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #BFDBFE;
}

/* News Cards */
.news-card {
    transition: all 0.3s;
}

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

/* Tags */
.tag-item {
    transition: all 0.2s;
}

.tag-item:hover {
    background-color: #0F52BA;
    color: white;
    border-color: #0F52BA;
}

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

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

.view-more-btn {
    border: 1px solid #D1D5DB;
    color: #4B5563;
    padding: 6px 20px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.view-more-btn:hover {
    border-color: #0F52BA;
    color: #0F52BA;
    background-color: #EFF6FF;
}

/* Filter Items (Solutions Page) */
.filter-item {
    cursor: pointer;
    transition: all 0.2s;
}

.filter-item:hover {
    color: #0F52BA;
}

.filter-item.active {
    color: #0F52BA;
    font-weight: 700;
}

.filter-checkbox {
    accent-color: #0F52BA;
}

/* Background Grid Pattern from 首页.html */
.bg-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
}

/* Flip Cards */
.ping-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.ping-section-padding { padding: 70px 0; }
.ping-bg-white { background: #fff; }
.ping-bg-gray { background: #f1f5f9; }

.ping-section-title {
    margin: 0 0 45px;
    color: #1e293b;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.35;
    position: relative;
    text-align: center;
}

.ping-section-title::after {
    background: #0F52BA;
    border-radius: 2px;
    content: '';
    display: block;
    height: 3px;
    margin: 12px auto 0;
    width: 40px;
}

.perspective-1000 {
    perspective: 1000px;
}

.transform-style-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

.solution-flip-card.is-flipped .flip-card-inner,
.solution-flip-card:has(.flip-image-trigger:hover) .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-inner {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* 后台模板的通用可选副标题。内容为空时不会生成此元素。 */
.module-common-title-line {
    display: block !important;
    position: static !important;
    width: 48px !important;
    height: 4px !important;
    margin: 16px auto 0 !important;
    border-radius: 999px !important;
    background: var(--primary, #0f52ba) !important;
}

.module-common-subtitle {
    display: block !important;
    position: static !important;
    max-width: 800px !important;
    margin: 14px auto 0 !important;
    color: #64748b !important;
    font-size: 16px !important;
    line-height: 1.7 !important;
    text-align: center !important;
}

/* 所有页面模块中的留言表单统一使用网站蓝色，避免导入页面保留旧的黄色按钮。 */
.site-module .site-contact-submit {
    background: var(--primary, #0f52ba) !important;
    color: #fff !important;
    border-color: var(--primary, #0f52ba) !important;
}

.site-module .site-contact-submit:hover {
    background: #0b3f94 !important;
    border-color: #0b3f94 !important;
}

/* Responsive Rich Text Constraints */
.prose {
    width: 100%;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    overflow-x: hidden;
    /* Force hide any rogue elements that try to break out */
}

/* Force all embedded media to shrink to the container */
.prose img,
.prose video,
.prose iframe,
.prose figure {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Allow horizontal scrolling on deeply nested wide tables, rather than breaking the page */
.prose table {
    max-width: 100%;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}
/* 导入的隔音房工程参数表：始终完整适配容器，不显示横向滚动条。 */
.acoustic-spec-table-wrap {
    overflow: hidden !important;
}

.acoustic-spec-table {
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed;
}

.acoustic-spec-table th,
.acoustic-spec-table td {
    overflow-wrap: anywhere;
}
