/* ===== 基础字体 ===== */
html, body {
    font-family: 'Noto Sans SC', 'Open Sans', 'Inter', serif;
    overflow-x: hidden;
    max-width: 100%;
}
h1, h2, h3, h4, h5, .navbar-brand, .btn, .section-heading, .masthead-subheading, .masthead-heading {
    font-family: 'Noto Sans SC', 'Open Sans', sans-serif;
}

/* ===== 导航栏 ===== */
.navbar-marketing {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    background-color: rgba(3, 3, 3, 0.01) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 1030;
}

/* 桌面端毛玻璃 */
@media (min-width: 992px) {
    .navbar-marketing {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    .navbar-marketing.navbar-scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.navbar-marketing .navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: #fff;
}

.navbar-marketing .nav-link {
    font-weight: 450;
    padding: 0.75rem 1rem;
    color: #ffffff;
    transition: color 0.2s ease;
}

.navbar-marketing .nav-link:hover,
.navbar-marketing .nav-link:focus,
.navbar-marketing .nav-link.active {
    color: #0061f2;
}

/* 导航底色 滚动后样式（桌面端透明→白色，移动端始终白色） */
.navbar-marketing.navbar-scrolled {
    background-color: #ffffff !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
}
/* 导航字体普通颜色 */
.navbar-marketing.navbar-scrolled .navbar-brand,
.navbar-marketing.navbar-scrolled .nav-link {
    color: #6d6d6d !important;
}

/* 导航字体激活颜色 */
.navbar-marketing.navbar-scrolled .nav-link:hover,
.navbar-marketing.navbar-scrolled .nav-link:focus,
.navbar-marketing.navbar-scrolled .nav-link.active {
    color: #0061f2 !important;
}

/* 移除默认下拉箭头 */
.dropdown-toggle::after {
    content: none !important;
}

/* 自定义下拉箭头 */
.dropdown-toggle .dropdown-arrow {
    width: 0.625rem;
    height: 0.625rem;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.dropdown-toggle .dropdown-arrow svg {
    width: 0.65rem;
    height: 0.65rem;
    fill: currentColor;
}

.dropdown:hover > .dropdown-toggle .dropdown-arrow {
    transform: rotate(90deg);
}

/* ===== 下拉菜单 ===== */
.dropdown-menu {
    animation: fadeInUp 0.2s ease-out;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
}

.dropdown-menu .dropdown-header {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1rem 1.5rem 0.5rem;
    color: #0061f2;
}

.dropdown-menu .dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    color: #69707a;
    transition: all 0.15s ease;
}

.dropdown-menu .dropdown-item:hover {
    color: #0061f2;
    background-color: #f2f6fc;
}

.dropdown-menu.dropdown-xl {
    width: 50rem;
}

.dropdown-menu.dropdown-lg {
    width: 45rem;
}

.dropdown-menu.dropdown-xl,
.dropdown-menu.dropdown-lg {
    max-width: 100vw;
    padding: 0;
    overflow: hidden;
}

/* 二级下拉菜单 */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.25rem;
    min-width: 220px;
}

/* 桌面端悬停显示菜单 */
@media (min-width: 992px) {
    .dropdown:hover > .dropdown-menu,
    .dropdown-menu .dropdown-submenu:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* 移动端适配 */
@media (max-width: 991.98px) {
    /* 导航栏始终白色 */
    #mainNav.navbar-marketing,
    #mainNav.navbar-marketing.navbar-scrolled {
        background-color: #ffffff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1) !important;
    }
    
    #mainNav.navbar-marketing .navbar-brand,
    #mainNav.navbar-marketing.navbar-scrolled .navbar-brand,
    #mainNav.navbar-marketing .nav-link,
    #mainNav.navbar-marketing.navbar-scrolled .nav-link {
        color: #212832 !important;
    }
    
    #mainNav.navbar-marketing .nav-link:hover,
    #mainNav.navbar-marketing .nav-link:focus,
    #mainNav.navbar-marketing .nav-link.active {
        color: #0061f2 !important;
    }
    
    /* 下拉菜单 */
    .dropdown-menu.dropdown-xl,
    .dropdown-menu.dropdown-lg {
        width: 100%;
        position: static !important;
        max-height: 70vh;
        overflow-y: auto;
        margin-top: 0.5rem;
        animation: none;
        transform: none !important;
    }
    
    .dropdown-menu,
    .dropdown-menu .dropdown-submenu .dropdown-menu {
        box-shadow: none;
        overflow-x: hidden;
    }
    
    .dropdown-menu .bg-img-cover {
        display: none !important;
    }
    
    .dropdown-menu .row {
        margin: 0;
    }
    
    .dropdown-menu .col-lg-4,
    .dropdown-menu .col-lg-6,
    .dropdown-menu .col-lg-7 {
        padding: 0.5rem 1rem;
    }
    
    .dropdown-submenu .dropdown-menu {
        position: static;
        float: none;
        width: auto;
        margin-top: 0;
        background-color: rgba(0,0,0,0.03);
        border-left: 2px solid #0061f2;
        border-radius: 0;
        padding-left: 1rem;
    }
    
    .dropdown-submenu .dropdown-toggle::after {
        float: none;
        content: "▼";
        font-size: 0.7rem;
        margin-left: 0.5rem;
    }
    
    .dropdown-submenu:hover > .dropdown-menu {
        display: none;
    }
    
    .dropdown-submenu .dropdown-toggle[aria-expanded="true"] + .dropdown-menu {
        display: block;
    }
    
    .navbar-collapse {
        max-height: 85vh;
        overflow-y: auto;
    }
    
    /* 时间线 */
    .timeline:before {
        left: 30px;
    }
    
    .timeline-item .timeline-badge {
        left: 30px;
        margin-left: -30px;
        width: 80px;
        height: 80px;
    }
    
    .timeline-panel {
        width: calc(100% - 90px);
        left: 80px !important;
    }
    
    .timeline-panel:before {
        left: -15px !important;
        border-left: none;
        border-right: 15px solid #fff;
    }
}

/* ===== 工具类 ===== */
.icon-stack {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.bg-primary-soft { background-color: rgba(0, 97, 242, 0.1); }
.text-primary-soft { color: #0061f2; }
.text-gray-500 { color: #a7aeb8 !important; }
.fw-500 { font-weight: 500; }

.bg-img-cover {
    background-size: cover;
    background-position: center;
    position: relative;
}

.bg-img-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 97, 242, 0.7);
    z-index: 0;
}

.bg-img-cover > * {
    position: relative;
    z-index: 1;
}

/* ===== 按钮 ===== */
.btn-primary {
    background-color: #0061f2;
    border-color: #0061f2;
    color: #fff;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #0052ce;
    border-color: #004ec4;
}

.btn-white {
    background-color: #fff;
    border-color: #fff;
    color: #0061f2;
}

.btn-white:hover {
    background-color: #f2f2f2;
    border-color: #f2f2f2;
}

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

/* ===== 全屏轮播 ===== */
#homeCarousel,
.fullscreen-carousel {
    height: 100vh;
    height: 100svh;
    min-height: 500px;
}

#homeCarousel .carousel-inner,
#homeCarousel .carousel-item,
.fullscreen-carousel .carousel-inner,
.fullscreen-carousel .carousel-item {
    height: 100%;
}

.fullscreen-carousel {
    position: relative;
    min-height: 650px;
}

.fullscreen-carousel .carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

.fullscreen-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* 轮播图遮罩（home.html 内联样式移到这里） */
#homeCarousel .carousel-item {
    position: relative;
}

#homeCarousel .carousel-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

#homeCarousel .carousel-caption,
#homeCarousel .carousel-control-prev,
#homeCarousel .carousel-control-next {
    z-index: 2;
}

/* 轮播图文字 */
.carousel-caption-custom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 90%;
    max-width: 900px;
}

.masthead-subheading {
    font-size: 1.8rem;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 1rem;
}

.masthead-heading {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: 0.1rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.carousel-item.active .masthead-subheading {
    animation: fadeInUp 0.8s ease 0.3s forwards;
}

.carousel-item.active .masthead-heading {
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

.carousel-item.active .btn {
    animation: fadeInUp 0.8s ease 0.7s forwards;
}

/* 轮播图指示器 */
.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255, 255, 255, 0.4);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #fff;
    transform: scale(1.2);
}

/* 轮播图控制按钮 */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    opacity: 1;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.carousel-control-prev { left: 30px; }
.carousel-control-next { right: 30px; }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
}

/* ===== 页面区块 ===== */
.section-padding {
    padding: 100px 0;
}

.section-heading {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subheading {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 3rem;
}

/* ===== 作品集 ===== */
.portfolio-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s ease;
    border: none;
    background: transparent;
}

.portfolio-card .portfolio-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.portfolio-card img {
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
    display: block;
}

.portfolio-card .portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 120, 160, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: 0.5rem;
}

.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-card:hover img { transform: scale(1.05); }

.portfolio-card .portfolio-overlay i {
    font-size: 3rem;
    color: white;
}

.portfolio-caption {
    text-align: center;
    margin-top: 1.2rem;
}

.portfolio-caption-heading {
    font-weight: 700;
    font-size: 1.2rem;
}

/* ===== 时间线 ===== */
.timeline {
    position: relative;
    list-style: none;
    padding: 0;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: #e9ecef;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-item .timeline-badge {
    position: absolute;
    top: 0;
    left: 50%;
    width: 120px;
    height: 120px;
    margin-left: -60px;
    background: #fff;
    border: 7px solid #e9ecef;
    border-radius: 50%;
    z-index: 10;
    overflow: hidden;
    box-shadow: 0 0 0 4px #fff;
}

.timeline-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline-panel {
    position: relative;
    width: 45%;
    background: #fff;
    padding: 1.5rem;
    border-radius: 0.8rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.timeline-item:nth-child(odd) .timeline-panel { left: 0; }
.timeline-item:nth-child(even) .timeline-panel { left: 55%; }

.timeline-panel:before {
    content: '';
    position: absolute;
    top: 40px;
    right: -15px;
    width: 0;
    height: 0;
    border: 15px solid transparent;
    border-left-color: #fff;
}

.timeline-item:nth-child(even) .timeline-panel:before {
    left: -15px;
    right: auto;
    border-left-color: transparent;
    border-right-color: #fff;
}

.timeline-heading h4 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.timeline-heading .subheading {
    font-weight: 600;
    color: #0d6efd;
}

/* ===== 团队 ===== */
.team-member img {
    width: 180px;
    height: 180px;
    border: 7px solid rgba(0,0,0,0.1);
    object-fit: cover;
}

.btn-social {
    border-radius: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #212529;
    color: white;
    transition: all 0.2s;
}

.btn-social:hover {
    background-color: #0d6efd;
}

/* ===== 联系表单 ===== */
.contact-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1497366815503-2e3b9e3c6b5b?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') no-repeat center/cover;
}

.contact-section .section-heading,
.contact-section .section-subheading {
    color: white;
}

.contact-section .section-subheading {
    color: rgba(255,255,255,0.8);
}

/* ===== Footer ===== */
.footer-dark {
    background-color: #1a1e2e;
    color: #a0aec0;
}

.footer-dark .footer-brand {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.footer-dark .footer-brand strong { font-weight: 900; }

.footer-dark .footer-description {
    color: #8896ab;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-dark .footer-heading {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.footer-dark .footer-link {
    color: #8896ab;
    text-decoration: none;
    font-size: 0.875rem;
    display: block;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.footer-dark .footer-link:hover { color: #fff; }

.footer-dark hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0;
}

.footer-dark .copyright-text {
    color: #6b7b8e;
    font-size: 0.875rem;
}

.footer-dark .copyright-text a {
    color: #a0aec0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.footer-dark .copyright-text a:hover { color: #fff; }

.footer-dark .social-nav .nav-link {
    color: #8896ab;
    padding: 0.5rem;
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.footer-dark .social-nav .nav-link:hover { color: #fff; }

/* ===== 响应式 ===== */
@media (min-width: 768px) {
    .masthead-heading { font-size: 4.5rem; }
}

@media (max-width: 767.98px) {
    .fullscreen-carousel {
        min-height: 500px;
    }
    
    .masthead-subheading { font-size: 1.3rem; }
    .masthead-heading { font-size: 2.2rem; }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 45px;
        height: 45px;
    }
    
    .carousel-control-prev { left: 15px; }
    .carousel-control-next { right: 15px; }
    
    .footer-dark .social-nav {
        margin-top: 1rem;
        justify-content: center !important;
    }
    
    .footer-dark .copyright-text { text-align: center; }
}

/* 桌面端轮播图最小高度 */
@media (min-width: 992px) {
    #homeCarousel { min-height: 650px; }
}

/* ===== 富文本内容 ===== */
.rich-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #374151;
}

.rich-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.rich-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}

.rich-content p { margin-bottom: 1.25rem; }

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    display: block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.rich-content .image-style-align-center {
    margin-left: auto;
    margin-right: auto;
}

.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
}

.rich-content th,
.rich-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.rich-content th {
    background: #f8fafc;
    font-weight: 600;
    color: #1a1a1a;
}

.rich-content tr:nth-child(even) { background: #fafafa; }

.rich-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    color: #1e40af;
    font-style: italic;
}

.rich-content ul,
.rich-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.rich-content li { margin-bottom: 0.5rem; }

.rich-content hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
}

.rich-content a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.2);
}

.rich-content a:hover {
    border-bottom-color: #2563eb;
}
