/* ============ 深圳市荣力达新材料有限公司 - 全站样式 ============ */
/* 配色参考企业蓝主题 */
:root {
    --primary: #0080ff;
    --primary-dark: #0066cc;
    --primary-deeper: #005bb5;
    --card-blue: #0080ff;
    --accent-green: #599f46;
    --red: #db4d4c;
    --text: #333;
    --text-light: #666;
    --gray-bg: #f7f8fa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* 语言防闪烁：翻译完成前先隐藏 body，i18n.js 应用完翻译并加 .i18n-ready 后再显示 */
html:not(.i18n-ready) body {
    visibility: hidden;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    color: var(--text);
    font-size: 14px;
    line-height: 1.7;
    background: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all .3s ease;
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.clearfix::after {
    content: "";
    display: block;
    clear: both;
}

/* ============ 顶部导航栏 ============ */
.header {
    position: relative;
    z-index: 999;
}

.header-top {
    background: #fff;
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 92px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
}

.logo-text h1 {
    font-size: 22px;
    color: var(--primary-dark);
    font-weight: bold;
    letter-spacing: 1px;
}

.logo-text p {
    font-size: 12px;
    color: #999;
    letter-spacing: 2px;
    margin-top: 2px;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-tools a {
    color: #666;
    font-size: 13px;
}

.header-tools a i {
    margin-right: 4px;
    color: var(--primary);
}

.header-tools a:hover {
    color: var(--primary);
}

.lang-switch {
    display: flex;
    gap: 4px;
}

.lang-switch span {
    padding: 2px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.lang-switch span.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* 菜单栏 */
.menu-bar {
    background: var(--primary);
}

.menu-bar .container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.main-menu {
    display: flex;
    align-items: center;
}

.main-menu > li {
    position: relative;
}

.main-menu > li > a {
    display: block;
    padding: 0 26px;
    line-height: 56px;
    color: #fff;
    font-size: 15px;
    letter-spacing: 1px;
    position: relative;
}

.main-menu > li > a::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: #fff;
    transition: width .3s ease;
}

.main-menu > li > a:hover::after,
.main-menu > li.active > a::after {
    width: 100%;
}

.main-menu > li > a:hover,
.main-menu > li.active > a {
    background: var(--primary-deeper);
}

/* 下拉菜单 */
.main-menu > li .dropdown {
    position: absolute;
    top: 56px;
    left: 0;
    min-width: 160px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .3s ease;
    z-index: 99;
}

.main-menu > li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-menu > li .dropdown a {
    display: block;
    padding: 10px 20px;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
}

.main-menu > li .dropdown a:hover {
    color: var(--primary);
    background: var(--gray-bg);
    padding-left: 26px;
}

/* 咨询电话 */
.menu-tel {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 14px;
    white-space: nowrap;
}

.menu-tel i {
    font-size: 20px;
}

.menu-tel b {
    font-size: 17px;
    letter-spacing: 1px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 56px;
    padding: 0 10px;
}

/* ============ 轮播图 ============ */
.banner {
    position: relative;
    overflow: hidden;
}

.banner .swiper {
    height: 600px;
}

.banner .swiper-slide {
    position: relative;
    background-size: cover;
    background-position: center;
}

.banner .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 0 20px;
    z-index: 3;
}

.banner-caption h2 {
    font-size: 46px;
    color: #fff;
    font-weight: bold;
    letter-spacing: 4px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
    margin-bottom: 16px;
}

.banner-caption p {
    font-size: 18px;
    color: rgba(255, 255, 255, .9);
    letter-spacing: 2px;
}

.banner .swiper-pagination {
    bottom: 24px;
}

.banner .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #fff;
    opacity: .5;
    border-radius: 50%;
    margin: 0 5px;
}

.banner .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .6);
}

/* ============ 通用区块标题 ============ */
.section-title {
    text-align: center;
    margin-bottom: 42px;
}

.section-title h2 {
    font-size: 30px;
    color: #222;
    letter-spacing: 3px;
    font-weight: bold;
}

.section-title .en {
    display: block;
    font-size: 13px;
    color: #aaa;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-top: 6px;
}

.section-title .line {
    display: block;
    width: 56px;
    height: 3px;
    background: var(--primary);
    margin: 14px auto 0;
    position: relative;
}

.section-title .line::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid var(--primary);
    border-radius: 50%;
}

/* ============ 关于我们 ============ */
.about-section {
    background: var(--gray-bg);
    padding: 70px 0;
}

.about-box {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text h3 {
    font-size: 26px;
    color: var(--primary-dark);
    margin-bottom: 6px;
    letter-spacing: 2px;
}

.about-text .sub {
    color: #999;
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.about-text p {
    color: #555;
    font-size: 14px;
    line-height: 2;
    margin-bottom: 14px;
    text-align: justify;
}

.about-text .features {
    margin: 18px 0 24px;
}

.about-text .features li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    color: #444;
    font-size: 14px;
}

.about-text .features li::before {
    content: "\f00c";
    font-family: "FontAwesome";
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--accent-green);
    font-size: 13px;
}

.about-img {
    flex: 0 0 560px;
    max-width: 48%;
}

.about-img img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.btn-more {
    display: inline-block;
    padding: 10px 30px;
    background: var(--primary);
    color: #fff;
    border-radius: 3px;
    font-size: 14px;
    letter-spacing: 1px;
    border: 1px solid var(--primary);
}

.btn-more:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 123, 167, .3);
}

.btn-more i {
    margin-left: 6px;
}

/* ============ 应用领域 ============ */
.apply-section {
    padding: 70px 0;
    background: #fff;
}

.apply-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.apply-item {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.apply-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .5s ease;
}

.apply-item:hover img {
    transform: scale(1.08);
}

.apply-item .mask {
    position: absolute;
    inset: 0;
    background: rgba(39, 123, 167, .85);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .4s ease;
}

.apply-item:hover .mask {
    opacity: 1;
}

.apply-item .mask h4 {
    font-size: 18px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.apply-item .mask p {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, .9);
}

.apply-item .name {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px;
    text-align: center;
    color: #fff;
    font-size: 16px;
    letter-spacing: 2px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}

/* ============ 产品推荐 ============ */
.product-section {
    background: var(--gray-bg);
    padding: 70px 0;
}

.product-wrap {
    display: flex;
    gap: 30px;
}

.product-main {
    flex: 0 0 46%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    align-self: flex-start; /* 高度自适应图片，不被右侧列表拉伸 */
}

.product-main img,
.product-main svg {
    width: 100%;
    height: auto; /* 按图片自身分辨率等比显示，不裁剪 */
    display: block;
}

.product-list {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.product-card {
    background: var(--card-blue);
    border-radius: 6px;
    padding: 26px 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    transition: all .35s ease;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: "";
    position: absolute;
    right: -20px;
    top: -20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}

.product-card:hover {
    background: var(--accent-green);
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.product-card .icon {
    font-size: 34px;
    margin-bottom: 14px;
}

.product-card h4 {
    font-size: 17px;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.product-card p {
    font-size: 12px;
    color: rgba(255, 255, 255, .85);
    line-height: 1.7;
}

.product-card .arrow {
    margin-top: 12px;
    font-size: 13px;
    opacity: .9;
}

/* ============ 新闻资讯 ============ */
.news-section {
    padding: 70px 0;
    background: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.news-item {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    transition: all .35s ease;
}

.news-item:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
    transform: translateY(-6px);
}

.news-item .thumb {
    overflow: hidden;
}

.news-item .thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform .5s ease;
}

.news-item:hover .thumb img {
    transform: scale(1.08);
}

.news-item .info {
    padding: 20px;
}

.news-item .date {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.news-item .date i {
    color: var(--primary);
    margin-right: 5px;
}

.news-item .info h4 {
    font-size: 16px;
    line-height: 1.6;
    height: 52px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.news-item .info h4 a:hover {
    color: var(--primary);
}

.news-item .info .more {
    margin-top: 12px;
    font-size: 13px;
    color: var(--primary);
}

.news-item .info .more i {
    font-size: 12px;
    margin-left: 4px;
    transition: margin .3s;
}

.news-item .info .more:hover i {
    margin-left: 8px;
}

/* ============ 页脚 ============ */
.footer {
    background: var(--primary);
    color: #fff;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 40px;
    padding: 50px 0 40px;
}

.footer h4 {
    font-size: 17px;
    letter-spacing: 2px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: #fff;
}

.footer-about p {
    font-size: 13px;
    line-height: 1.9;
    color: rgba(255, 255, 255, .85);
    text-align: justify;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
}

.footer-links li a:hover {
    color: #fff;
    padding-left: 6px;
}

.footer-links li a::before {
    content: "\f105";
    font-family: "FontAwesome";
    margin-right: 8px;
}

.footer-contact li {
    display: flex;
    margin-bottom: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, .85);
    line-height: 1.7;
}

.footer-contact li i {
    width: 20px;
    margin-right: 8px;
    margin-top: 4px;
}

.footer-qr {
    text-align: center;
}

.footer-qr .qr-box {
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
    background: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    flex-direction: column;
    gap: 4px;
}

.footer-qr .qr-box i {
    font-size: 40px;
    color: #ccc;
}

.footer-qr p {
    font-size: 12px;
    color: rgba(255, 255, 255, .85);
}

.footer-bottom {
    background: var(--primary-dark);
    padding: 14px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, .8);
}

.footer-bottom a {
    color: rgba(255, 255, 255, .8);
}

.footer-bottom a:hover {
    color: #fff;
}

/* ============ 浮动按钮 ============ */
.float-btns {
    position: fixed;
    right: 0;
    top: 45%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.float-btns a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 56px;
    height: 66px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
}

.float-btns a i {
    font-size: 20px;
}

.float-btns a:hover {
    background: var(--accent-green);
}

.float-btns .to-top {
    background: var(--primary-dark);
}

.float-btns .to-top:hover {
    background: var(--accent-green);
}

/* ============ 响应式 ============ */
@media (max-width: 991px) {
    .container {
        width: 100%;
    }

    .header-top .container {
        height: 70px;
    }

    .logo-text h1 {
        font-size: 18px;
    }

    /* 英文长 Logo：允许收缩，单行省略，避免换行撑高溢出 */
    .logo {
        flex: 1;
        min-width: 0;
    }

    .logo-text {
        min-width: 0;
        overflow: hidden;
    }

    .logo-text h1,
    .logo-text p {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 小屏隐藏邮箱，为 Logo 与语言切换留出空间 */
    .header-tools a {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .main-menu {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
        background: var(--primary);
        flex-direction: column;
    }

    .main-menu.open {
        display: flex;
    }

    .main-menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, .15);
    }

    .main-menu > li > a {
        line-height: 46px;
        padding: 0 20px;
    }

    .main-menu > li .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 0, 0, .08);
    }

    .main-menu > li .dropdown a {
        color: #fff;
        border-color: rgba(255, 255, 255, .1);
    }

    .menu-tel {
        display: none;
    }

    .banner .swiper {
        height: 320px;
    }

    .banner-caption h2 {
        font-size: 26px;
    }

    .banner-caption p {
        font-size: 14px;
    }

    .about-box {
        flex-direction: column;
    }

    .about-img {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .apply-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-wrap {
        flex-direction: column;
    }

    .product-main {
        flex: none;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr;
    }

    .footer-contact {
        grid-column: 1 / -1;
    }

    .float-btns {
        display: none;
    }
}

@media (max-width: 575px) {
    .apply-grid {
        grid-template-columns: 1fr;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .footer-top {
        grid-template-columns: 1fr;
    }

    /* 手机端保留语言切换，缩小字号以适配窄屏 */
    .lang-switch span {
        padding: 1px 6px;
        font-size: 11px;
    }
}
