/* =====================================================
   EasyCMS 前端样式表
   主色: #2563EB (科技蓝)
   辅色: #10B981 (翡翠绿)
   中性: #1E293B
   ===================================================== */

:root {
    --primary-color: #2563EB;
    --secondary-color: #10B981;
    --dark-color: #1E293B;
    --light-color: #F8FAFC;
    --gray-color: #94A3B8;
    --transition: all 0.3s ease;
}

/* ==================== 基础设置 ==================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    color: var(--dark-color);
    line-height: 1.8;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #1D4ED8;
}

/* ==================== 导航栏 ==================== */
.navbar {
    transition: var(--transition);
}

.navbar .nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
}

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

.navbar .nav-link.active::after,
.navbar .nav-link:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.navbar-brand {
    font-size: 1.4rem;
}

/* ==================== Logo ==================== */
.site-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.site-name-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
}

/* 移动端 Logo 缩小 */
@media (max-width: 768px) {
    .site-logo {
        height: 32px;
        max-width: 140px;
    }
    .site-name-text {
        font-size: 0.95rem;
    }
}

/* 如果只有 logo 没有文字名称，隐藏空文字 */
.navbar-brand:has(.site-logo:not([src=""])) .site-name-text:empty {
    display: none;
}

/* ==================== 轮播图 ==================== */
.carousel-bg {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
}

.carousel-caption {
    bottom: 35%;
    text-align: left;
}

.carousel-caption h2 {
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

/* ==================== 页面横幅 ==================== */
.page-banner {
    margin-top: 0;
}

.breadcrumb-item a {
    color: rgba(255,255,255,0.8) !important;
}

.breadcrumb-item a:hover {
    color: #fff !important;
}

/* ==================== 区块标题 ==================== */
.section-line {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ==================== 产品卡片 ==================== */
.product-card {
    transition: var(--transition);
    border: none;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

.product-img-wrap {
    overflow: hidden;
    position: relative;
    padding-top: 66.67%;
    background: #f8f9fa;
}

.product-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.1);
}

.product-card .card-body {
    padding: 1.2rem;
}

/* ==================== 案例卡片 ==================== */
.case-card {
    transition: var(--transition);
    border: none;
    overflow: hidden;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

.case-img-wrap {
    overflow: hidden;
    position: relative;
    padding-top: 60%;
    background: #f8f9fa;
}

.case-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.case-card:hover .case-img-wrap img {
    transform: scale(1.1);
}

/* ==================== 服务卡片 ==================== */
.service-card {
    background: #fff;
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid #e9ecef;
}

.service-card:hover {
    background: var(--primary-color);
    color: #fff !important;
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.3);
}

.service-card:hover h5,
.service-card:hover p {
    color: #fff !important;
}

.service-icon {
    width: 70px;
    height: 70px;
    line-height: 70px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), #60A5FA);
    color: #fff;
    border-radius: 50%;
    font-size: 1.8rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: #fff;
    color: var(--primary-color);
}

/* ==================== 服务列表卡片 ==================== */
.service-list-card {
    transition: var(--transition);
}

.service-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.service-icon-lg {
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #60A5FA);
    color: #fff;
    border-radius: 12px;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ==================== 技术文章卡片 ==================== */
.tech-card {
    transition: var(--transition);
    border: none;
    overflow: hidden;
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12) !important;
}

.tech-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* ==================== 产品详情图库 ==================== */
.product-gallery .main-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.thumbnail-list .thumbnail {
    width: 100px;
    height: 75px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.thumbnail-list .thumbnail.active,
.thumbnail-list .thumbnail:hover {
    border-color: var(--primary-color);
}

.product-content,
.case-content,
.service-content,
.about-content,
.article-content {
    line-height: 2;
}

.product-content h2,
.product-content h3,
.case-content h2,
.case-content h3,
.service-content h2,
.service-content h3,
.about-content h2,
.about-content h3,
.article-content h2,
.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.product-content ul,
.product-content ol,
.case-content ul,
.case-content ol,
.about-content ul,
.about-content ol,
.article-content ul,
.article-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.product-content img,
.case-content img,
.article-content img,
.about-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

/* CKEditor 图片对齐（前台渲染） */
.product-content figure.image,
.case-content figure.image,
.article-content figure.image,
.about-content figure.image {
    margin: 1rem 0;
}

.product-content figure.image img,
.case-content figure.image img,
.article-content figure.image img,
.about-content figure.image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0;
}

.product-content figure.image-style-align-center,
.case-content figure.image-style-align-center,
.article-content figure.image-style-align-center,
.about-content figure.image-style-align-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.product-content figure.image-style-align-left,
.case-content figure.image-style-align-left,
.article-content figure.image-style-align-left,
.about-content figure.image-style-align-left {
    float: left;
    margin-right: 1.5rem;
}

.product-content figure.image-style-align-right,
.case-content figure.image-style-align-right,
.article-content figure.image-style-align-right,
.about-content figure.image-style-align-right {
    float: right;
    margin-left: 1.5rem;
}

.product-content figure.image figcaption,
.case-content figure.image figcaption,
.article-content figure.image figcaption,
.about-content figure.image figcaption {
    text-align: center;
    color: #64748B;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ==================== 联系页面 ==================== */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    color: #fff;
    border-radius: 12px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ==================== 页脚 ==================== */
.footer {
    background: #F8FAFC !important;
}

.footer-muted {
    color: #64748B !important;
}

.footer-muted a {
    color: #64748B;
}

.footer-logo {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

.footer-divider {
    border-color: #E2E8F0 !important;
}

.footer-nav a {
    color: #475569;
    font-size: 0.9rem;
    line-height: 2;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

/* ==================== 分类筛选 ==================== */
.category-filter .btn {
    border-radius: 20px;
    padding: 0.3rem 1.2rem;
}

/* ==================== 回到顶部 ==================== */
.btn-back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-back-top.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease;
}

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
    .carousel-bg {
        height: 300px;
    }

    .carousel-caption {
        bottom: 20%;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .product-gallery .main-image img {
        height: 250px;
    }
}

/* ==================== Bootstrap覆盖 ==================== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1D4ED8;
    border-color: #1D4ED8;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

/* ===== 反垃圾：蜜罐隐藏字段 ===== */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
