/********** Template CSS **********/
:root {
    --primary: #B78D65;
    --light: #F8F8F8;
    --dark: #252525;
}

h1,
h2,
.h1,
.h2,
.fw-bold {
    font-weight: 600 !important;
}

h3,
h4,
.h3,
.h4,
.fw-medium {
    font-weight: 500 !important;
}

h5,
h6,
.h5,
.h6,
.fw-normal {
    font-weight: 400 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

/*** 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;
}


/*** Button ***/
.btn {
    font-weight: 500;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.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;
}

.btn-outline-body {
    color: var(--primary);
    border-color: #777777;
}

.btn-outline-body:hover {
    color: #FFFFFF;
    background: var(--primary);
    border-color: var(--primary);
}


/*** Navbar ***/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 30px 0;
    color: var(--dark);
    font-weight: 500;
    text-transform: uppercase;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }

    /* 移动端导航栏优化 */
    .navbar {
        padding: 0 !important;
        min-height: 60px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1030 !important;
        background: white !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .navbar-brand {
        flex: 1;
        max-width: calc(100% - 60px);
        padding: 0 !important;
        margin: 0 !important;
        display: flex;
        align-items: center;
        height: 60px !important;
    }

    .navbar-brand h1 {
        font-size: clamp(16px, 4.5vw, 24px) !important;
        display: flex;
        align-items: center;
        gap: 10px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        height: 100%;
        margin: 0 !important;
        padding-left: 15px !important;
    }

    .navbar-brand img {
        width: auto !important;
        height: clamp(40px, 4vw, 60px) !important;
        flex-shrink: 0;
        object-fit: contain;
    }

    .navbar-toggler {
        margin-right: 10px !important;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 超小屏幕优化 */
@media (max-width: 575.98px) {
    .navbar {
        min-height: 50px !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1030 !important;
        background: white !important;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .navbar-brand {
        height: 50px !important;
    }

    .navbar-brand h1 {
        font-size: clamp(14px, 5vw, 20px) !important;
        padding-left: 10px !important;
        gap: 8px;
    }

    .navbar-brand img {
        height: clamp(36px, 7vw, 50px) !important;
    }

    .navbar-toggler {
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 992px) {
    .navbar-brand img {
        height: clamp(45px, 3.5vw, 65px) !important;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: .5s;
        opacity: 0;
    }

    .navbar .nav-item:hover .dropdown-menu {
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}


/*** Header ***/
.owl-carousel-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, .65);
}

/* 轮播图容器固定16:9比例 */
.header-carousel .owl-carousel-item {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9比例 (9/16 = 0.5625) */
    overflow: hidden;
}

.header-carousel .owl-carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 图片填满容器，不留空白 */
    object-position: center;
}

@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        position: relative;
        min-height: 300px;
        padding-top: 56.25%;
    }

    .header-carousel .owl-carousel-item p {
        font-size: 14px !important;
    }
}

.header-carousel .owl-dots {
    position: absolute;
    width: 60px;
    height: 100%;
    top: 0;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-carousel .owl-dots .owl-dot {
    position: relative;
    width: 45px;
    height: 45px;
    margin: 5px 0;
    background: var(--dark);
    transition: .5s;
}

.header-carousel .owl-dots .owl-dot.active {
    width: 60px;
    height: 60px;
}

.header-carousel .owl-dots .owl-dot img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 2px;
    transition: .5s;
    opacity: .3;
}

.header-carousel .owl-dots .owl-dot.active img {
    opacity: 1;
}

.page-header {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #1a1a2e;
}

.page-header-about {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-2.jpg) center center no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #1a1a2e;
}

.page-header-service {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-3.jpg) center center no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #1a1a2e;
}

.page-header-project {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #1a1a2e;
}

.page-header-team {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-2.jpg) center center no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #1a1a2e;
}

.page-header-appointment {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-3.jpg) center center no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #1a1a2e;
}

.page-header-feature {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-1.jpg) center center no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #1a1a2e;
}

.page-header-testimonial {
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5)), url(../img/carousel-2.jpg) center center no-repeat;
    background-size: contain;
    background-position: center;
    background-color: #1a1a2e;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}


/*** Section Title ***/
.section-title {
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
}


/*** Facts ***/
.fact-item .fact-icon {
    width: 120px;
    height: 120px;
    margin-top: -60px;
    margin-bottom: 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 120px;
    transition: .5s;
}

.fact-item:hover .fact-icon {
    background: var(--dark);
}

.fact-item .fact-icon i {
    color: var(--primary);
    transition: .5;
}

.fact-item:hover .fact-icon i {
    color: #FFFFFF;
}


/*** About & Feature ***/
.about-img,
.feature-img {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.about-img img,
.feature-img img {
    position: absolute;
    width: 60%;
    height: 80%;
    object-fit: cover;
}

.about-img img:last-child,
.feature-img img:last-child {
    margin: 20% 0 0 40%;
}

.about-img::before,
.feature-img::before {
    position: absolute;
    content: "";
    width: 60%;
    height: 80%;
    top: 10%;
    left: 20%;
    border: 5px solid var(--primary);
    z-index: -1;
}


/*** Service ***/
.service-item .bg-img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.service-item .service-text {
    background: var(--light);
    transition: .5s;
}

.service-item:hover .service-text {
    background: rgba(0, 0, 0, .7);
}

.service-item * {
    transition: .5;
}

.service-item:hover * {
    color: #FFFFFF;
}

.service-item .btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    color: var(--dark);
    background: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    transition: .5s;
}

.service-item:hover .btn {
    width: 140px;
}


/*** Project ***/
.project .nav .nav-link {
    background: var(--light);
    transition: .5s;
}

.project .nav .nav-link.active {
    background: var(--primary);
}

.project .nav .nav-link.active h3 {
    color: #FFFFFF !important;
}


/*** Team ***/
.team-items {
    margin: -.75rem;
}

.team-item {
    padding: .75rem;
}

.team-item::after {
    position: absolute;
    content: "";
    width: 100%;
    height: 0;
    top: 0;
    left: 0;
    background: #FFFFFF;
    transition: .5s;
    z-index: -1;
}

.team-item:hover::after {
    height: 100%;
    background: var(--primary);
}

.team-item .team-social {
    position: absolute;
    width: 100%;
    bottom: -20px;
    left: 0;
}

.team-item .team-social .btn {
    display: inline-flex;
    margin: 0 2px;
    color: var(--primary);
    background: var(--light);
}

.team-item .team-social .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}


/*** Appointment ***/
.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}


/*** Testimonial ***/
.testimonial-carousel {
    display: flex !important;
    flex-direction: column-reverse;
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-carousel .owl-dots {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.testimonial-carousel .owl-dots .owl-dot {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 5px;
    transition: .5s;
}

.testimonial-carousel .owl-dots .owl-dot.active {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .owl-dots .owl-dot::after {
    position: absolute;
    width: 40px;
    height: 40px;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    content: "\f10d";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
    background: #FFFFFF;
    border-radius: 40px;
    transition: .5s;
    opacity: 0;
}

.testimonial-carousel .owl-dots .owl-dot.active::after {
    opacity: 1;
}

.testimonial-carousel .owl-dots .owl-dot img {
    opacity: .4;
    transition: .5s;
}

.testimonial-carousel .owl-dots .owl-dot.active img {
    opacity: 1;
}


/*** Footer ***/
.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #777777;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--primary);
    letter-spacing: 1px;
    box-shadow: none;
}

.footer .form-control {
    border-color: #777777;
}

.footer .copyright {
    padding: 25px 0;
    font-size: 15px;
    border-top: 1px solid rgba(256, 256, 256, .1);
}

.footer .copyright a {
    color: var(--light);
}

.footer .copyright a:hover {
    color: var(--primary);
}

/* News Item */
.news-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 212, 255, 0.9);
    color: #fff;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
}

.news-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.news-item-link:hover .news-item {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 技术详情展开/折叠样式 */
.tech-detail-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.3s ease;
    padding: 0;
}

.tech-detail-content.expanded {
    max-height: 500px;
    padding: 15px;
    overflow-y: auto;
}

.tech-detail-inner {
    border-top: 1px solid #dee2e6;
    padding-top: 15px;
    text-align: left;
}

.btn-toggle-detail {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #B78D65;
    background: transparent;
    color: #B78D65;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.btn-toggle-detail:hover {
    background: #B78D65;
    color: white;
}

.btn-toggle-detail.active {
    background: #B78D65;
    color: white;
}

.btn-toggle-detail .toggle-icon {
    transition: transform 0.3s ease;
}

.btn-toggle-detail.active .toggle-icon {
    transform: rotate(180deg);
}

/* 专利技术页面样式 */
.tech-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.tech-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    z-index: 10;
}

.tech-title {
    font-size: 24px;
    font-weight: 600;
    color: #252525;
    margin-bottom: 10px;
}

.tech-summary {
    font-size: 16px;
    color: #B78D65;
    font-weight: 500;
    margin-bottom: 25px;
}

.tech-section {
    margin-bottom: 25px;
}

.tech-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: #252525;
    margin-bottom: 12px;
}

.tech-section p {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

.tech-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tech-features li {
    font-size: 14px;
    line-height: 2;
    color: #666;
    padding-left: 5px;
}

.application-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.application-tags .tag {
    background: rgba(183, 141, 101, 0.1);
    color: #B78D65;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

@media (max-width: 991px) {
    .tech-title {
        font-size: 20px;
    }
    
    .tech-summary {
        font-size: 14px;
    }
    
    .tech-image-wrapper {
        margin-bottom: 20px;
    }
}