/* Bootstrap 5 升级修复 CSS */

/* 修复 media 组件移除后的样式问题 */
.doc_features_item.d-flex {
    align-items: flex-start;
}

.post_author.d-flex {
    align-items: center;
}

.post_author .round_img {
    flex-shrink: 0;
}

/* 确保 flex-grow-1 元素有正确的间距 */
.d-flex .flex-grow-1.ms-3 {
    margin-left: 1rem !important;
}

/* 修复可能的按钮样式问题 */
.btn {
    border: 1px solid transparent;
}

/* 修复表单控件样式 */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-image: none;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* 修复导航栏对齐问题 */
.navbar-nav.ms-auto {
    margin-left: auto !important;
}

/* 修复文本对齐 */
.text-end {
    text-align: right !important;
}

/* 修复间距类 */
.mb-3 {
    margin-bottom: 1rem !important;
}

/* 修复可能的响应式问题 */
@media (max-width: 767.98px) {
    .d-flex.doc_features_item {
        flex-direction: column;
        text-align: center;
    }
    
    .d-flex.doc_features_item .flex-grow-1.ms-3 {
        margin-left: 0 !important;
        margin-top: 1rem;
    }
}

/* 修复可能的下拉菜单问题 */
.dropdown-menu {
    position: absolute;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0;
    font-size: 1rem;
    color: var(--bs-body-color);
    text-align: left;
    list-style: none;
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.375rem;
}

.dropdown-menu.show {
    display: block;
}

/* 修复模态框问题 */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: #000;
}

.modal-backdrop.fade {
    opacity: 0;
}

.modal-backdrop.show {
    opacity: 0.5;
}

/* 修复工具提示问题 */
.tooltip {
    position: absolute;
    z-index: 1080;
    display: block;
    margin: 0;
    font-family: var(--bs-font-sans-serif);
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    text-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    word-break: normal;
    white-space: normal;
    word-spacing: normal;
    line-break: auto;
    font-size: 0.875rem;
    word-wrap: break-word;
    opacity: 0;
}

.tooltip.show {
    opacity: 0.9;
}

/* 修复可能的网格系统问题 */
.container-fluid {
    width: 100%;
    padding-right: var(--bs-gutter-x, 0.75rem);
    padding-left: var(--bs-gutter-x, 0.75rem);
    margin-right: auto;
    margin-left: auto;
}

/* 确保旧的自定义类仍然工作 */
.pl-30 {
    padding-left: 30px !important;
}

.pl-60 {
    padding-left: 60px !important;
}

.pl-70 {
    padding-left: 70px !important;
}

.pl-100 {
    padding-left: 100px !important;
}

.pr-60 {
    padding-right: 60px !important;
}

/* 修复可能的按钮关闭样式 */
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: #000;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='m.235.867 4.596-4.596a.5.5 0 0 1 .708 0L8 3.732l2.461-2.46a.5.5 0 0 1 .708 0l4.596 4.596a.5.5 0 0 1 0 .708L13.732 8l2.46 2.461a.5.5 0 0 1 0 .708l-4.596 4.596a.5.5 0 0 1-.708 0L8 13.732l-2.461 2.46a.5.5 0 0 1-.708 0L.235 11.596a.5.5 0 0 1 0-.708L3.268 8 .235 5.539a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.375rem;
    opacity: 0.5;
}

.btn-close:hover {
    color: #000;
    text-decoration: none;
    opacity: 0.75;
}

/* 修复Slick轮播图样式 */
.slick-slider {
    position: relative;
    display: block;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -ms-touch-action: pan-y;
    touch-action: pan-y;
    -webkit-tap-highlight-color: transparent;
}

.slick-list {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.slick-track {
    position: relative;
    top: 0;
    left: 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.slick-slide {
    display: none;
    float: left;
    height: 100%;
    min-height: 1px;
}

.slick-slide.slick-loading img {
    display: none;
}

.slick-initialized .slick-slide {
    display: block;
}

/* 确保轮播图容器有正确的样式 */
.doc_testimonial_slider,
.doc_img_slider {
    width: 100%;
}

.doc_testimonial_slider .item,
.doc_img_slider .item {
    outline: none;
}

/* 修复搜索表单样式 - 恢复原始设计 */
.header_search_form {
    max-width: 720px;
    margin: 57px auto 0;
}

.header_search_form .form-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 0;
}

.header_search_form .input-wrapper {
    position: relative;
    flex: 1;
    max-width: 570px;
    margin-right: 10px;
}

.header_search_form .input-wrapper i {
    position: absolute;
    left: 25px;
    font-size: 16px;
    color: #b6bac3;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.header_search_form .input-wrapper input {
    background: #fff;
    border: 0;
    height: 60px;
    font-size: 16px;
    padding-left: 60px;
    border-top-left-radius: 45px;
    border-bottom-left-radius: 45px;
    line-height: 60px;
    padding-right: 30px;
    outline: none;
    box-shadow: none;
    width: 100%;
    color: #1d2746;
}

.header_search_form .input-wrapper input::placeholder {
    color: #848996;
    font-size: 16px;
}

.header_search_form .input-wrapper input:focus {
    box-shadow: 0 0 10px rgba(96, 209, 174, 0.3);
}

.header_search_form .custom-select {
    height: 60px;
    line-height: 60px;
    font-weight: 500;
    color: #1d2746;
    padding: 0 65px 0 25px;
    background: #f8f9fa;
    border: 0;
    outline: none;
    border-top-right-radius: 45px;
    border-bottom-right-radius: 45px;
    min-width: 150px;
    font-size: 16px;
    cursor: pointer;
}

.header_search_form .custom-select:focus {
    box-shadow: none;
    outline: none;
}

/* 搜索面板样式 */
.header_search_form_info {
    position: relative;
}

.header_search_form_info .header_search_form_panel {
    border: 1px solid #e6eeef;
    box-shadow: 0 3px 4px 0 rgba(4, 73, 89, 0.06);
    background-color: #fff;
    border-radius: 3px;
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    text-align: left;
    z-index: 99;
    padding: 30px;
}

.header_search_form_info .header_search_form_panel:before {
    content: "";
    width: 12px;
    height: 12px;
    background: #fff;
    position: absolute;
    top: -6px;
    transform: rotate(45deg);
    left: 40px;
    border-left: 1px solid #e6eeef;
    border-top: 1px solid #e6eeef;
}

.header_search_form_info .header_search_form_panel ul {
    margin-bottom: 0;
}

.header_search_form_info .header_search_form_panel ul > li {
    font-size: 16px;
    color: #1d2746;
    font-weight: 600;
    margin-bottom: 15px;
}

.header_search_form_info .header_search_form_panel ul > li .search_item {
    border-top: 1px solid #e6eeef;
    padding: 10px 0 5px;
    margin-top: 8px;
}

.header_search_form_info .header_search_form_panel ul > li .search_item li {
    color: #898d99;
    font-weight: 400;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    border: 0;
    margin-bottom: 8px;
}

.header_search_form_info .header_search_form_panel ul > li .search_item li span {
    width: 165px;
    text-align: right;
    border-right: 1px solid #dee7e8;
    line-height: 32px;
    padding-right: 15px;
    font-size: 12px;
    color: #999;
}

.header_search_form_info .header_search_form_panel ul > li .search_item li > a {
    line-height: 26px;
    font-weight: 400;
    color: #6b707f;
    padding: 3px 22px;
    flex: 1;
    display: block;
    position: relative;
    text-decoration: none;
}

.header_search_form_info .header_search_form_panel ul > li .search_item li > a::before {
    content: "";
    width: 2px;
    height: 0;
    position: absolute;
    left: -1px;
    top: 0;
    background: var(--brand_color);
    opacity: 0;
    transition: all 0.2s linear;
}

.header_search_form_info .header_search_form_panel ul > li .search_item li > a:hover {
    background: #f4f9fa;
    color: var(--brand_color);
}

.header_search_form_info .header_search_form_panel ul > li .search_item li > a:hover:before {
    opacity: 1;
    height: 100%;
}

/* 建议搜索关键词样式 */
.header_search_keyword {
    text-align: left;
    margin-top: 40px;
}

.header_search_keyword .header-search-form__keywords-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    font-weight: 500;
    display: inline-block;
    margin-right: 15px;
}

.header_search_keyword ul {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.header_search_keyword ul li {
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}

.header_search_keyword ul li a {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.header_search_keyword ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header_search_form {
        margin: 30px auto 0;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .header_search_form .form-group {
        flex-direction: column;
    }
    
    .header_search_form .input-wrapper {
        max-width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .header_search_form .custom-select {
        border-radius: 45px;
        width: 100%;
    }
    
    .header_search_keyword {
        text-align: center;
        margin-top: 25px;
    }
    
    .header_search_keyword .header-search-form__keywords-label {
        display: block;
        margin-bottom: 10px;
        margin-right: 0;
    }
    
    .header_search_keyword ul {
        justify-content: center;
        width: 100%;
    }
}

/* 修复订阅表单样式 */
.doc_subscribe_form .form-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.doc_subscribe_form .input-fill {
    flex: 1;
    position: relative;
}

.doc_subscribe_form .input-fill input {
    width: 100%;
    height: 50px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 0 20px;
    font-size: 16px;
    color: #1d2746;
    background: #fff;
    outline: none;
    transition: all 0.3s ease;
}

.doc_subscribe_form .input-fill input:focus {
    border-color: var(--brand_color);
    box-shadow: 0 0 0 2px rgba(96, 209, 174, 0.2);
}

.doc_subscribe_form .input-fill input::placeholder {
    color: #999;
}

.doc_subscribe_form .submit_btn {
    height: 50px;
    padding: 0 30px;
    background: var(--brand_color);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.doc_subscribe_form .submit_btn:hover {
    background: #4db896;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(96, 209, 174, 0.4);
}

.doc_subscribe_form ul {
    margin-top: 15px;
}

.doc_subscribe_form ul li {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 8px;
}

.doc_subscribe_form ul li a {
    color: #6b707f;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.doc_subscribe_form ul li a:hover {
    color: var(--brand_color);
}

/* 响应式订阅表单 */
@media (max-width: 768px) {
    .doc_subscribe_form .form-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .doc_subscribe_form .submit_btn {
        width: 100%;
    }
}

/* 修复 search-banner-light 样式 (blog-grid.html) - 简化版本 */
.search-banner-light .header_search_form {
    max-width: 650px;
    margin: 0 auto;
}

.search-banner-light .header_search_form .header_search_form_info .form-group {
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.search-banner-light .header_search_form .header_search_form_info .form-group .input-wrapper {
    max-width: 650px;
    margin-right: 0;
    position: relative;
    width: 100%;
}

.search-banner-light .header_search_form .header_search_form_info .form-group .input-wrapper i {
    color: var(--brand_color) !important;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 2;
}

.search-banner-light .header_search_form .header_search_form_info .form-group .input-wrapper input {
    color: var(--black_400);
    font-size: 14px;
    font-weight: 400;
    height: 50px;
    line-height: 50px;
    box-shadow: 0 1px 1px rgba(11, 80, 115, 0.3), 0 1px 5px rgba(60, 64, 67, 0.1);
    padding-left: 50px;
    padding-right: 30px;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    width: 100%;
    background: #fff;
    outline: none;
}

.search-banner-light .header_search_form .header_search_form_info .form-group .input-wrapper input:focus,
.search-banner-light .header_search_form .header_search_form_info .form-group .input-wrapper input:hover {
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    border-color: var(--brand_color);
}

.search-banner-light .header_search_form .header_search_form_info .form-group .input-wrapper input::placeholder {
    color: #6b707f;
    font-size: 14px;
    font-weight: 400;
}

/* 搜索建议面板样式 */
.search-banner-light .header_search_form_panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

.search-banner-light .header_search_form_panel ul {
    margin: 0;
    padding: 10px 0;
}

.search-banner-light .header_search_form_panel > ul > li {
    padding: 8px 20px;
    font-weight: 600;
    color: var(--brand_color);
    border-bottom: 1px solid #f0f0f0;
}

.search-banner-light .header_search_form_panel .search_item li {
    padding: 5px 30px;
    font-weight: normal;
    border-bottom: none;
}

.search-banner-light .header_search_form_panel .search_item li span {
    color: #999;
    font-size: 12px;
    margin-right: 8px;
}

.search-banner-light .header_search_form_panel .search_item li a {
    color: #333;
    text-decoration: none;
    font-size: 13px;
}

.search-banner-light .header_search_form_panel .search_item li a:hover {
    color: var(--brand_color);
}

.search-banner-light .header_search_keyword {
    text-align: center;
    justify-content: center;
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.search-banner-light .header_search_keyword .header-search-form__keywords-label {
    color: #54595d;
    font-weight: 400;
    font-size: 16px;
    margin-right: 8px;
    margin-bottom: 0;
    display: inline-block;
}

.search-banner-light .header_search_keyword ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.search-banner-light .header_search_keyword ul li {
    display: inline-block;
    margin: 0;
    line-height: 1.2;
}

.search-banner-light .header_search_keyword ul li:not(:last-child)::after {
    content: ', ';
    color: #54595d;
    font-size: 14px;
    margin-left: 0;
}

.search-banner-light .header_search_keyword ul li a {
    background: transparent;
    padding: 2px 0;
    border: none;
    border-bottom: 2px solid transparent;
    transition: border-bottom-color 300ms ease;
    border-radius: 0;
    color: #54595d;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    display: inline;
    outline: none;
}

.search-banner-light .header_search_keyword ul li a:hover {
    border-bottom: 2px solid var(--brand_color);
    color: #54595d; /* 保持文字颜色不变，只显示底部线条 */
}

.search-banner-light .header_search_keyword ul li a:focus {
    border-bottom: 2px solid var(--brand_color);
    outline: none;
}

/* search-banner-light 响应式样式 */
@media (max-width: 768px) {
    .search-banner-light .header_search_form {
        max-width: 100%;
        padding: 0 15px;
    }
    
    .search-banner-light .header_search_form .header_search_form_info .form-group .input-wrapper {
        max-width: 100%;
    }
    
    .search-banner-light .header_search_form .header_search_form_info .form-group .input-wrapper input {
        height: 45px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .search-banner-light .header_search_keyword {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .search-banner-light .header_search_keyword .header-search-form__keywords-label {
        margin-right: 0;
        display: block;
        text-align: center;
    }
}

/* 修复 Nice Select 下拉框样式 */
.nice-select {
    -webkit-tap-highlight-color: transparent;
    background-color: #f8f9fa;
    border-radius: 0 45px 45px 0;
    border: none;
    box-sizing: border-box;
    clear: both;
    cursor: pointer;
    display: block;
    float: left;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    height: 60px;
    line-height: 58px;
    outline: none;
    padding-left: 25px;
    padding-right: 65px;
    position: relative;
    text-align: left !important;
    transition: all 0.2s ease-in-out;
    user-select: none;
    white-space: nowrap;
    width: auto;
    min-width: 150px;
    color: #1d2746;
}

.nice-select:hover {
    border-color: #dbdbdb;
}

.nice-select:active, .nice-select.open, .nice-select:focus {
    border-color: var(--brand_color);
    box-shadow: 0 0 0 2px rgba(96, 209, 174, 0.2);
}

.nice-select:after {
    border-bottom: 2px solid #1d2746;
    border-right: 2px solid #1d2746;
    content: '';
    display: block;
    height: 8px;
    margin-top: -6px;
    pointer-events: none;
    position: absolute;
    right: 25px;
    top: 50%;
    transform-origin: 66% 66%;
    transform: rotate(45deg);
    transition: all 0.15s ease-in-out;
    width: 8px;
}

.nice-select.open:after {
    transform: rotate(-135deg);
}

.nice-select.open .list {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

.nice-select.disabled {
    border-color: #ededed;
    color: #999;
    pointer-events: none;
}

.nice-select.disabled:after {
    border-color: #cccccc;
}

.nice-select.wide {
    width: 100%;
}

.nice-select.wide .list {
    left: 0 !important;
    right: 0 !important;
}

.nice-select.right {
    float: right;
}

.nice-select.right .list {
    left: auto;
    right: 0;
}

.nice-select.small {
    font-size: 12px;
    height: 36px;
    line-height: 34px;
}

.nice-select.small:after {
    height: 4px;
    width: 4px;
}

.nice-select.small .option {
    line-height: 34px;
    min-height: 34px;
}

.nice-select .list {
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(68, 68, 68, 0.11), 0 4px 16px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
    margin-top: 4px;
    opacity: 0;
    overflow: hidden;
    padding: 0;
    pointer-events: none;
    position: absolute;
    top: 100%;
    left: 0;
    transform-origin: 50% 0;
    transform: scale(0.75) translateY(-21px);
    transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
    z-index: 9;
    min-width: 100%;
}

.nice-select .list:hover .option:not(:hover) {
    background-color: transparent !important;
}

.nice-select .option {
    cursor: pointer;
    font-weight: 400;
    line-height: 50px;
    list-style: none;
    min-height: 50px;
    outline: none;
    padding-left: 25px;
    padding-right: 29px;
    text-align: left;
    transition: all 0.2s;
    color: #1d2746;
    font-size: 14px;
}

.nice-select .option:hover, .nice-select .option.focus, .nice-select .option.selected.focus {
    background-color: #f4f9fa;
    color: var(--brand_color);
}

.nice-select .option.selected {
    font-weight: 500;
    color: var(--brand_color);
}

.nice-select .option.disabled {
    background-color: transparent;
    color: #999;
    cursor: default;
}

/* 确保在搜索表单中的nice-select样式正确 */
.header_search_form .nice-select {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 45px;
    border-bottom-right-radius: 45px;
}

/* search-banner-light 中隐藏下拉选择 */
.search-banner-light .nice-select {
    display: none;
}
