/* ============================================
   德润集团官网 - 全局样式表
   配色方案：炭黑 #1A1F2E / 轻奢金 #BFA88A / 暖米白 #F8F5F0
   设计规范：极简轻奢 · 高级稳重 · 现代国际化
   ============================================ */

/* ==================== Tailwind 自定义配置 ==================== */
tailwind.config = {
    theme: {
        extend: {
            fontFamily: {
                sans: ['"Noto Sans SC"', 'sans-serif'],
                montserrat: ['Montserrat', 'sans-serif'],
            },
        },
    },
};

/* ==================== 全局基础 ==================== */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.75;
    letter-spacing: 0.02em;
}

::selection {
    background: rgba(191, 168, 138, 0.2);
    color: #1A1F2E;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #F8F5F0;
}
::-webkit-scrollbar-thumb {
    background: #BFA88A;
    border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
    background: #A89070;
}

/* ==================== 导航栏样式 ==================== */
#header.scrolled {
    background: rgba(26, 31, 46, 0.98) !important;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
    padding-bottom: 4px;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #BFA88A;
    transition: width 0.28s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* 移动端菜单按钮动画 */
#mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
#mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==================== 板块标题装饰 ==================== */
.section-header .title-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.section-header .title-divider::before,
.section-header .title-divider::after {
    content: '';
    display: block;
    height: 1px;
    background: #BFA88A;
}
.section-header .title-divider::before {
    width: 60px;
    opacity: 0.6;
}
.section-header .title-divider::after {
    width: 20px;
    opacity: 0.3;
}

/* 大板块标题下的金色装饰线 */
.section-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}
.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==================== 滚动渐入动画 ==================== */
[data-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}
[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* 延迟入场（产生层次感） */
[data-animate-delay="1"] { transition-delay: 0.05s; }
[data-animate-delay="2"] { transition-delay: 0.10s; }
[data-animate-delay="3"] { transition-delay: 0.15s; }
[data-animate-delay="4"] { transition-delay: 0.20s; }

/* ==================== 按钮样式 ==================== */
.btn-primary {
    border: 1px solid rgba(191, 168, 138, 0.4);
    letter-spacing: 0.08em;
}
.btn-primary:hover {
    background: #252B3D !important;
    border-color: #BFA88A;
}

.btn-outline {
    letter-spacing: 0.08em;
}
.btn-outline:hover {
    background: rgba(191, 168, 138, 0.08);
    border-color: #BFA88A;
    color: #BFA88A;
}

/* ==================== 卡片通用样式 ==================== */
.industry-card,
.news-card,
.subsidiary-card,
.honor-card,
.partner-item,
.advantage-card,
.career-card {
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.industry-card:hover,
.news-card:hover,
.subsidiary-card:hover,
.honor-card:hover,
.partner-item:hover,
.advantage-card:hover,
.career-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
}

/* 新闻卡片行数限制 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==================== 表单输入框 ==================== */
.contact-input {
    font-family: 'Noto Sans SC', sans-serif;
}
.contact-input:focus {
    background: rgba(255, 255, 255, 0.06);
}

/* ==================== 导航下拉子菜单 ==================== */
.nav-dropdown {
    position: relative;
}
.nav-submenu {
    z-index: 100;
}
.nav-submenu a {
    white-space: nowrap;
}

/* ==================== 内页通用 Banner ==================== */
.page-banner {
    background: linear-gradient(135deg, #1A1F2E 0%, #252B3D 40%, #1A1F2E 100%);
    position: relative;
    overflow: hidden;
}
.page-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(191,168,138,0.3) 2px, rgba(191,168,138,0.3) 4px);
    pointer-events: none;
}

/* 内页面包屑 */
.breadcrumb a {
    transition: color 0.28s ease;
}
.breadcrumb a:hover {
    color: #BFA88A;
}

/* ==================== 荣誉资质专区样式 ==================== */
.honor-card .honor-icon {
    transition: background 0.28s ease;
}
.honor-card:hover .honor-icon {
    background: rgba(191,168,138,0.12) !important;
}

/* ==================== 右侧悬浮客服 ==================== */
.floating-item {
    min-width: 48px;
    justify-content: center;
}
.floating-item:hover {
    background: #252B3D !important;
}
.floating-item:hover .floating-text {
    color: #BFA88A;
}

/* 微信二维码弹出 */
.wechat-qr {
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
}
.floating-item:hover .wechat-qr {
    display: block;
}

/* 回到顶部按钮 */
#back-to-top.visible {
    opacity: 1 !important;
    visibility: visible !important;
}
#back-to-top:hover {
    background: #A89070 !important;
}

/* ==================== 响应式设计 ==================== */

/* 平板 (768px - 1024px) */
@media (max-width: 1024px) {
    .section-header .title-divider::before {
        width: 40px;
    }
    .section-header .title-divider::after {
        width: 14px;
    }

    #floating-sidebar {
        right: 8px;
    }
    .floating-item {
        padding: 10px 12px;
    }
    .floating-item svg {
        width: 16px;
        height: 16px;
    }
}

/* 手机 (< 768px) */
@media (max-width: 768px) {
    /* 导航栏 */
    #header {
        height: 60px;
    }
    #header > div {
        height: 60px;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Banner 标题缩小 */
    #home h1 {
        font-size: 2rem;
        letter-spacing: 0.04em;
    }
    #home p {
        font-size: 0.875rem;
        letter-spacing: 0.08em;
    }

    /* 板块间距缩小 */
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    /* 标题缩小 */
    .section-header h2 {
        font-size: 1.75rem;
    }

    /* 卡片内边距缩小 */
    .industry-card,
    .news-card .p-8,
    .subsidiary-card,
    .honor-card,
    .advantage-card,
    .career-card {
        padding: 1.5rem !important;
    }

    /* 数据看板 */
    .grid.grid-cols-2.lg\\:grid-cols-4 > div {
        padding: 1.5rem 1rem !important;
    }
    .grid.grid-cols-2.lg\\:grid-cols-4 p.font-montserrat {
        font-size: 2rem !important;
    }

    /* 底部网格 */
    footer .grid {
        gap: 2rem;
    }

    /* 悬浮客服缩小 */
    .floating-item {
        padding: 8px 10px;
    }
    .floating-item svg {
        width: 14px;
        height: 14px;
    }

    /* 联系表单 */
    .grid.grid-cols-2.gap-5 {
        grid-template-columns: 1fr;
    }

    /* 按钮全宽 */
    #home .flex.flex-wrap {
        flex-direction: column;
    }
    #home .flex.flex-wrap a {
        justify-content: center;
    }
}

/* 小手机 (< 480px) */
@media (max-width: 480px) {
    #home h1 {
        font-size: 1.6rem;
    }
    #home p.font-montserrat {
        font-size: 0.7rem;
        letter-spacing: 0.2em;
    }

    .btn-primary,
    .btn-outline {
        padding: 0.7rem 1.5rem;
        font-size: 0.8rem;
    }
}
