/********** Template CSS **********/
:root {
    --primary: #1363C6;
    --secondary: #15ACE1;
    --light: #F4F7FE;
    --dark: #14183E;
}

@font-face {
    font-family: 'Ballo2-Bold';
    src: url('../fonts/Baloo2-Bold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Ballo2-ExtraBold';
    src: url('../fonts/Ballo2-ExtraBold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Baloo2-Medium';
    src: url('../fonts/Baloo2-Medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Baloo2-Regular';
    src: url('../fonts/Baloo2-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Baloo2-SemiBold';
    src: url('../fonts/Baloo2-SemiBold.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Heading ***/
h1,
h2,
h3,
.fw-bold {
    font-weight: 700 !important;
    font-family: 'Ballo2-Bold';
}

h4,
h5,
h6,
.fw-medium {
    font-weight: 500 !important;
    font-family: 'Ballo2-Bold';
}

p,small,span{
    font-family: 'Baloo2-Regular';
    font-weight: normal;
}

/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}


/*** Navbar ***/
.sticky-top {
    top: -150px;
    transition: .5s;
}

.navbar {
    padding: 11px 0 !important;
    height: 75px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 0;
    color: rgba(255, 255, 255, .7);
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: rgba(255, 255, 255, 1);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        padding: 0 15px;
        /* 移动端展开菜单背景色（可修改此值调整） */
        background: var(--primary);
        border-radius: 8px;
        margin-top: 4px;
    }

    .navbar .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
        /* 移动端菜单文字颜色（可修改此值调整） */
        color: #ffffff !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
}

/* ========== 移动端导航栏滚动后文字颜色修复 ========== */
@media (max-width: 991.98px) {
    /* 滚动后导航栏变白时，链接文字改为深色 */
    .sticky-top.bg-primary .navbar-nav .nav-link {
        color: var(--dark) !important;   /* 滚动后文字色 */
        border-bottom-color: rgba(0,0,0,0.06);
    }
    .sticky-top.bg-primary .navbar-nav {
        background: #ffffff !important;   /* 展开区域背景也变白 */
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }
    /* 未滚动时保持原始样式 */
    .sticky-top:not(.bg-primary) .navbar-nav {
        background: var(--primary);
    }
    .sticky-top:not(.bg-primary) .navbar-nav .nav-link {
        color: #ffffff !important;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Hero Header ***/
.hero-header {
    margin-top: -75px;
    background: url(../img/home-bg.png) center center no-repeat;
    background-size: cover;
}

.hero-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}


/*** Section Title ***/
.section-title::before {
    position: absolute;
    content: "";
    width: 45px;
    height: 4px;
    bottom: 0;
    left: 0;
    background: var(--dark);
}

.section-title::after {
    position: absolute;
    content: "";
    width: 4px;
    height: 4px;
    bottom: 0;
    left: 50px;
    background: var(--dark);
}

.section-title.text-center::before {
    left: 50%;
    margin-left: -25px;
}

.section-title.text-center::after {
    left: 50%;
    margin-left: 25px;
}

.section-title h6::before,
.section-title h6::after {
    position: absolute;
    content: "";
    width: 10px;
    height: 10px;
    top: 2px;
    left: 0;
    background: rgba(33, 66, 177, .5);
}

.section-title h6::after {
    top: 5px;
    left: 3px;
}


/*** About ***/
.about-img {
    position: relative;
    overflow: hidden;
}

.about-img::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: url(../img/bg-about-img.png) top left no-repeat;
    background-size: contain;
}


/*** Service ***/
.service-item {
    position: relative;
    padding: 45px 30px;
    background: #FFFFFF;
    transition: .5s;
}

.service-item:hover {
    background: var(--primary);
}

.service-item .service-icon {
    margin: 0 auto 20px auto;
    width: 90px;
    height: 90px;
    color: var(--primary);
    background: var(--light);
    transition: .5s;
}

.service-item:hover .service-icon {
    background: #FFFFFF;
}

.service-item h5,
.service-item p {
    transition: .5s;
}

.service-item:hover h5,
.service-item:hover p {
    color: #FFFFFF;
}

.service-item a.btn {
    position: relative;
    display: flex;
    color: var(--primary);
    transition: .5s;
    z-index: 1;
}

.service-item:hover a.btn {
    color: var(--primary);
}

.service-item a.btn::before {
    position: absolute;
    content: "";
    width: 35px;
    height: 35px;
    top: 0;
    left: 0;
    border-radius: 35px;
    background: var(--light);
    transition: .5s;
    z-index: -1;
}

.service-item:hover a.btn::before {
    width: 100%;
    background: var(--light);
}


/*** Feature ***/
.feature {
    background: url(../img/bg-hero.png) center center no-repeat;
    background-size: cover;
}


/*** Newsletter ***/
.newsletter {
    background: url(../img/bg-hero.png) center center no-repeat;
    background-size: cover;
}

@media (min-width: 992px) {
    .newsletter .container {
        max-width: 100% !important;
    }

    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 960px) / 2) + .75rem);
    }
}

@media (min-width: 1200px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1140px) / 2) + .75rem);
    }
}

@media (min-width: 1400px) {
    .newsletter .newsletter-text  {
        padding-right: calc(((100% - 1320px) / 2) + .75rem);
    }
}


/*** Case Study ***/
.case-item img {
    transition: .5s;
}
  
.case-item:hover img {
    transform: scale(1.2);
}
  
.case-overlay {
    position: absolute;
    padding: 30px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    background: linear-gradient(rgba(20, 24, 62, 0), var(--dark));
    z-index: 1;
}

.case-overlay small {
    display: inline-block;
    padding: 3px 15px;
    color: #FFFFFF;
    background: rgba(20, 24, 62, .7);
    border-radius: 25px;
    margin-bottom: 15px;
}

.case-overlay span.btn:hover {
    color: var(--primary);
    background: #FFFFFF;
    border-color: #FFFFFF;
}



/*** FAQs ***/
.accordion .accordion-item {
    border: none;
    margin-bottom: 15px;
}

.accordion .accordion-button {
    background: var(--light);
    border-radius: 2px;
}

.accordion .accordion-button:not(.collapsed) {
    color: #FFFFFF;
    background: var(--primary);
    box-shadow: none;
}

.accordion .accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.accordion .accordion-body {
    padding: 15px 0 0 0;
}


/*** Testimonial ***/
.testimonial-carousel {
    position: relative;
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 40px;
    height: 100%;
    top: calc(50% - 50px);
    left: -21px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    margin: 5px 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #FFFFFF;
    border: 1px solid var(--primary);
    border-radius: 40px;
    font-size: 18px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    color: #FFFFFF;
}

.testimonial-carousel .owl-dots {
    margin-top: 35px;
    margin-left: 3rem;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    width: 15px;
    height: 15px;
    background: #FFFFFF;
    border: 1px solid var(--primary);
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    width: 30px;
    background: var(--primary);
}


/*** Team ***/
.team-item {
    transition: .5s;
    border: 1px solid transparent;
    transition: .5s;
}

.team-item:hover {
    border-color: var(--primary);
}

/*** Card Hover Effect for Role Cards ***/
a .card-hover {
    transition: all 0.3s ease;
    cursor: pointer;
}

a .card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 80, 253, 0.2);
    border-color: var(--primary);
}

a .card-hover:hover .btn-outline-primary {
    background-color: var(--primary);
    color: #ffffff;
}


/*** Footer ***/
.footer {
    background: url(../img/footer.png) center center no-repeat;
    background-size: contain;
}

.footer .btn.btn-social {
    margin-right: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.5);
    border: 1px solid rgba(256, 256, 256, .1);
    border-radius: 40px;
    transition: .3s;
}

.footer .btn.btn-social:hover {
    color: var(--primary);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 10px;
    padding: 0;
    text-align: left;
    color: rgba(255,255,255,.5);
    font-weight: normal;
    transition: .3s;
}

.footer .btn.btn-link:hover {
    color: #FFFFFF;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: rgba(255,255,255,.5);
}

.footer .copyright a:hover {
    color: #FFFFFF;
}

.footer .footer-menu a {
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, .1);
}

.footer .footer-menu a:last-child {
    margin-right: 0;
    padding-right: 0;
    border-right: none;
}

.inline-titles {
    display: flex;
    align-items: center;
}

/* 导航栏滚动后背景色覆盖 */
.bg-primary {
    background-color: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
}


/* ========== 移动端响应式优化（全局） ========== */

/* 全局防水平溢出 */
html, body {
    overflow-x: hidden;
}

/* 角色页面组件样式定义 */
.feature-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(19,99,198,0.15);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    border-radius: 16px;
    font-size: 28px;
    color: var(--primary);
}
.feature-card h5 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: #666; }

.step-number {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
    flex-shrink: 0;
}


/* ---------- 平板及大手机 (<=768px) ---------- */
@media (max-width: 767.98px) {

    /* 标题字号缩小 */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.4rem !important; }
    h3 { font-size: 1.2rem !important; }

    /* Hero 区域压缩 */
    .hero-header { padding: 60px 0 40px !important; }
    .help-hero { padding: 50px 0 30px !important; }

    /* Navbar 高度缩减 */
    .navbar { height: 60px !important; }
    .sticky-top { top: -120px !important; }

    /* Logo 响应式 */
    .navbar-brand img,
    .navbar-brand-img { max-width: 140px !important; height: auto !important; }

    /* 容器内边距缩减 */
    .container-fluid.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
    .container.pt-5.pb-5,
    .container.py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }

    /* 视频容器响应式 */
    .video-container { max-width: 100% !important; }
    .video-container video { width: 100% !important; height: auto !important; }

    /* 按钮触摸目标 >= 44px */
    .btn-sm-square { width: 40px !important; height: 40px !important; min-width: 40px; min-height: 40px; }

    /* Section title 缩小 */
    .section-title h6 { font-size: 13px !important; }
    .section-title::before { width: 35px !important; }
    .section-title::after { left: 40px !important; }
    .section-title.text-center::before { margin-left: -17px !important; }
    .section-title.text-center::after { margin-left: 17px !important; }

    /* Feature card 紧凑化 */
    .feature-card { padding: 18px 14px !important; }
    .feature-icon { width: 52px; height: 52px; font-size: 24px; margin-bottom: 12px; }
    .feature-card h5 { font-size: 15px !important; }
    .feature-card p { font-size: 13px !important; }

    /* Step number */
    .step-number { width: 38px; height: 38px; font-size: 16px; }

    /* Footer 内边距缩减 */
    .footer .pt-5 { padding-top: 2rem !important; }
    .footer .copyright { padding: 15px 0 !important; }

    /* About 模块图片 */
    .about-img img { max-width: 220px !important; }

    /* Newsletter 响应式覆盖 */
    @media (min-width: 992px) {
        .newsletter .newsletter-text { padding-right: 1rem !important; }
    }
    @media (min-width: 1200px) {
        .newsletter .newsletter-text { padding-right: 1rem !important; }
    }
    @media (min-width: 1400px) {
        .newsletter .newsletter-text { padding-right: 1rem !important; }
    }

    /* 角色卡片网格间距缩小 */
    .g-5 { --bs-gutter-y: 1.2rem; }
    .g-3 { --bs-gutter-y: 0.8rem; }

    /* Contact box 联系我们模块 */
    .contact-box { padding: 24px 16px !important; }

    /* Accordion FAQ */
    .accordion-item { margin-bottom: 10px; }
    .accordion-body { font-size: 14px; padding: 12px 0 0 !important; }
}


/* ---------- 小手机 (<=576px) ---------- */
@media (max-width: 575.98px) {

    /* 标题进一步缩小 */
    h1 { font-size: 1.45rem !important; }
    h2 { font-size: 1.2rem !important; }
    h3 { font-size: 1.05rem !important; }

    /* Hero 区域进一步压缩 */
    .hero-header { padding: 45px 0 30px !important; }
    .help-hero { padding: 36px 0 24px !important; }

    /* Logo 更小 */
    .navbar-brand img,
    .navbar-brand-img { max-width: 120px !important; }

    /* 容器内边距更紧凑 */
    .container-fluid.py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
    .container.pt-5.pb-5,
    .container.py-5 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

    /* 触摸目标放大到 44px */
    .btn-sm-square { width: 44px !important; height: 44px !important; min-width: 44px; min-height: 44px; font-size: 14px; }
    .btn-square { width: 42px !important; height: 42px !important; }

    /* Section title 更小 */
    .section-title h6 { font-size: 12px !important; }
    .section-title::before { width: 28px !important; }
    .section-title::after { left: 33px !important; width: 3px !important; height: 3px !important; }

    /* feature-card 更紧凑 */
    .feature-card { padding: 14px 10px !important; border-radius: 10px; }
    .feature-icon { width: 46px; height: 46px; font-size: 22px; margin-bottom: 10px; border-radius: 12px; }
    .feature-card h5 { font-size: 14px !important; margin-bottom: 6px; }
    .feature-card p { font-size: 12px !important; line-height: 1.5; }

    /* Step number 更小 */
    .step-number { width: 34px; height: 34px; font-size: 15px; margin-bottom: 10px; }

    /* 角色卡片 */
    [class*="col-"] > div.p-3 { padding: 12px 10px !important; }
    [class*="col-"] > div.p-3 img { max-width: 70px !important; }

    /* About 图片 */
    .about-img img { max-width: 180px !important; }

    /* Footer 链接换行 */
    .footer-menu a { display: inline-block; margin: 2px 0; border-right: none !important; padding-right: 8px !important; }

    /* Contact box */
    .contact-box { padding: 20px 14px !important; }
    .contact-box h4 { font-size: 16px !important; }

    /* 导航栏链接间距 */
    .navbar-nav .nav-link { padding: 8px 0 !important; font-size: 14px; }

    /* 按钮文字大小调整 */
    .btn { font-size: 14px; padding: 6px 16px; }
}