/* 广州文汇涂建材科技有限公司 - 前端样式 */

/* 基础样式 */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
    /* 移动端优化 */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* 触摸优化 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* 移动端性能优化 */
@media (max-width: 768px) {
    * {
        /* 减少重绘和重排 */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    img {
        /* 图片优化 */
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* 减少动画以提高性能 */
    .card {
        transition: transform 0.2s ease;
    }
}

/* 导航栏样式 */
.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
}

.brand-icon {
    transition: transform 0.3s ease;
}

.navbar-brand:hover .brand-icon {
    transform: scale(1.1);
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    position: relative;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* 移动端导航优化 */
@media (max-width: 991.98px) {
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-item {
        margin: 0.25rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
    }
}

/* 固定导航栏平滑过渡 */
.navbar.fixed-top {
    transition: all 0.3s ease;
}

/* 悬停效果增强 */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* 企业级按钮样式 */
.btn-enterprise {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
}

.btn-enterprise:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    color: white;
}

/* Hero区域样式 */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: relative;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-slide .container {
    position: relative;
    z-index: 2;
}

/* 卡片样式 */
.card {
    transition: all 0.3s ease;
    border: none;
}

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

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

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

/* 特色图标样式 */
.feature-icon {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover .feature-icon {
    transform: scale(1.1);
}

/* 按钮样式 */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* 页脚样式 */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .hero-slide {
        min-height: 400px !important;
        text-align: center;
    }
    
    .hero-slide i {
        font-size: 6rem !important;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .feature-icon {
        width: 3rem !important;
        height: 3rem !important;
        font-size: 1.2rem !important;
    }
    
    .product-filters {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .filter-btn {
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .contact-info {
        margin-bottom: 2rem;
    }
    
    .qrcode-container {
        width: 120px;
        height: 120px;
    }
    
    .qrcode-image {
        max-width: 110px;
        max-height: 110px;
    }
}

@media (max-width: 576px) {
    .hero-slide {
        min-height: 350px !important;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    .feature-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 1rem !important;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .filter-btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 产品卡片特殊样式 */
.product-card {
    overflow: hidden;
    border-radius: 0.75rem;
}

.product-card .card-img-top {
    border-radius: 0;
}

/* 表单样式 */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* 提示消息样式 */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}

/* 产品筛选样式 */
.product-filters {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-btn {
    border: 1px solid #e2e8f0;
    color: #64748b;
    background: white;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 联系表单样式 */
.contact-form {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border-radius: 1rem;
    color: white;
}

.contact-info-item {
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 二维码样式 */
.qrcode-container {
    width: 150px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.qrcode-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.375rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qrcode-placeholder {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

/* 后台设置页面的二维码预览样式 */
.qrcode-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.qrcode-preview img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.375rem;
}

.qrcode-preview .placeholder {
    text-align: center;
    color: #6c757d;
}

/* 企业文化页面 */
.culture-values li::marker {
    color: var(--primary-color);
}

.ratio.ratio-16x9.rounded {
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

/* 企业级产品卡片增强 */
.product-card {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

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

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

/* 企业级按钮样式增强 */
.btn-enterprise {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    border: none;
    color: white;
    font-weight: 600;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-enterprise::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-enterprise:hover::before {
    left: 100%;
}

.btn-enterprise:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
    color: white;
}

/* 节标题装饰线 */
.section-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #3b82f6);
    border-radius: 2px;
}

/* 企业级阴影系统 */
.shadow-enterprise {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.shadow-enterprise-lg {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* 响应式优化 */
@media (max-width: 768px) {
    .btn-enterprise {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .product-card .card-body {
        padding: 1.5rem;
    }
    
    .section-divider {
        width: 40px;
        height: 2px;
    }
}

/* 加载状态优化 */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* 企业级表单样式 */
.form-control-enterprise {
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control-enterprise:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

/* 企业级徽章样式 */
.badge-enterprise {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

/* 关键数据展示样式 */
.stat-item {
    padding: 3rem 2rem;
    transition: all 0.3s ease;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.15);
}

.stat-item:hover .stat-icon i {
    transform: scale(1.1);
    color: var(--primary-color) !important;
}

.stat-icon {
    transition: all 0.3s ease;
}

.stat-icon i {
    transition: all 0.3s ease;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-item small {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 时间线样式 */
.timeline {
    position: relative;
    padding: 1.5rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color) 0%, #3b82f6 100%);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
    margin-left: 0;
    padding-right: 2rem;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
    margin-right: 0;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.timeline-year {
    background: var(--primary-color);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-year {
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.timeline-content {
    flex: 1;
    max-width: 40%;
}

.timeline-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #e9ecef;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 15px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-card::before {
    right: -30px;
    border-left-color: white;
    transform: translateY(-50%);
}

.timeline-item:nth-child(even) .timeline-card::before {
    left: -30px;
    border-right-color: white;
    transform: translateY(-50%);
}

.timeline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.timeline-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.timeline-card:hover .timeline-icon {
    transform: scale(1.1);
}

.timeline-title {
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.timeline-description {
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* 企业级页脚样式 */
.footer-section {
    padding: 1rem 0;
}

.footer-link {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.footer-link:hover {
    background-color: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.contact-item {
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-icon {
    transition: all 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--primary-color) 0%, #3b82f6 100%) !important;
}

/* 页脚快速链接样式 */
.footer-link {
    transition: all 0.3s ease;
    border: 1px solid transparent;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.footer-link:hover {
    background-color: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.footer-link:hover i {
    transform: scale(1.1);
}

.footer-link i {
    transition: transform 0.3s ease;
}

/* 统计数据响应式优化 */
@media (max-width: 768px) {
    .stat-item {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-item h3 {
        font-size: 2.5rem;
    }
    
    .stat-icon i {
        font-size: 2.5rem !important;
    }
    
    .stat-item p {
        font-size: 1rem;
    }
}

/* 时间线响应式优化 */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 60px;
    }
    
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin: 0;
        padding: 0;
        max-width: 100%;
    }
    
    .timeline-marker {
        left: 30px;
        transform: none;
    }
    
    .timeline-year {
        width: 60px;
        height: 60px;
        font-size: 0.875rem;
    }
    
    .timeline-card {
        padding: 1.5rem;
    }
    
    .timeline-card::before {
        display: none;
    }
    
    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .stat-item {
        padding: 1.5rem 1rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .stat-icon i {
        font-size: 2rem !important;
    }
}

/* 页脚响应式优化 */
@media (max-width: 768px) {
    .footer-section {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .contact-item {
        justify-content: center;
    }
    
    .footer-link {
        margin-bottom: 0.5rem;
        min-height: 70px;
    }
    
    .footer-link i {
        font-size: 18px !important;
    }
}

@media (max-width: 576px) {
    .footer-link {
        min-height: 60px;
        padding: 1rem !important;
    }
    
    .footer-link i {
        font-size: 16px !important;
    }
}