/* IE11兼容性CSS文件 */
/* 包含所有IE11特定的修复和polyfill */

/* Object-fit Polyfill for IE11 */
/* 检测不支持object-fit的浏览器 */
@media screen and (-ms-high-contrast: active),
(-ms-high-contrast: none) {

    /* Swiper图片兼容性修复 */
    .swiper-slide {
        position: relative;
        overflow: hidden;
    }

    .swiper-slide img {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        -ms-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
        /* IE11的图片缩放方式 */
        -ms-interpolation-mode: bicubic;
    }

    /* 红色轮播图的图片修复 */
    .red-card-swiper .swiper-slide img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        -ms-transform: none;
        transform: none;
    }

    /* 蓝色卡片图片修复 */
    .blue img {
        position: relative;
        width: 100%;
        height: 100%;
        -ms-interpolation-mode: bicubic;
    }
}

/* CSS Grid IE11兼容性 */
@supports not (display: grid) {
    .content-row {
        display: -ms-flexbox;
        display: flex;
    }

    .content-row>*:first-child {
        -ms-flex: 2;
        flex: 2;
        margin-right: .16rem;
    }

    .content-row>*:last-child {
        -ms-flex: 1;
        flex: 1;
    }

    .service-cards {
        display: -ms-flexbox;
        display: flex;
        -ms-flex-wrap: wrap;
        flex-wrap: wrap;
        margin-left: -.075rem;
        margin-right: -.075rem;
    }

    .service-cards .service-card {
        -ms-flex: 0 0 calc(50% - .15rem);
        flex: 0 0 calc(50% - .15rem);
        margin: 0 .075rem .15rem;
    }

    .culture-units-row {
        display: -ms-flexbox;
        display: flex;
    }

    .culture-units-row>*:first-child {
        -ms-flex: 2;
        flex: 2;
        margin-right: .2rem;
    }

    .culture-units-row>*:last-child {
        -ms-flex: 1;
        flex: 1;
    }
}

/* IE11 Transform兼容性 */
.service-hall .section-header>div::after {
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

/* IE11 Transition兼容性 */
.progress-bar {
    -ms-transition: width 5000ms linear;
    transition: width 5000ms linear;
}

.units-content img,
.gov-btn img {
    -ms-transition: -ms-transform 0.6s;
    transition: transform 0.6s;
}

.units-content a:hover img,
.gov-btn:hover img {
    -ms-transform: scale(1.1);
    transform: scale(1.1);
}

.culture-tab-content {
    -ms-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

/* IE11 Animation兼容性 */
@keyframes slideInRight {
    from {
        -ms-transform: translate3d(100%, 0, 0);
        transform: translate3d(100%, 0, 0);
        visibility: visible;
    }

    to {
        -ms-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideOutLeft {
    from {
        -ms-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    to {
        visibility: hidden;
        -ms-transform: translate3d(-100%, 0, 0);
        transform: translate3d(-100%, 0, 0);
    }
}

@keyframes slideInLeft {
    from {
        -ms-transform: translate3d(-100%, 0, 0);
        transform: translate3d(-100%, 0, 0);
        visibility: visible;
    }

    to {
        -ms-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
}

@keyframes slideOutRight {
    from {
        -ms-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    to {
        visibility: hidden;
        -ms-transform: translate3d(100%, 0, 0);
        transform: translate3d(100%, 0, 0);
    }
}

/* IE11 Flexbox修复 */
.promo-cards {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: stretch;
    align-items: stretch;
}

.promo-cards .promo-card:first-of-type {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

.promo-cards .promo-card:nth-of-type(3) {
    -ms-flex: 1;
    flex: 1;
}

.promo-cards .promo-card:last-of-type {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

.notice-service-row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: stretch;
    align-items: stretch;
}

.notice-service-row .notice-section {
    -ms-flex: 1;
    flex: 1;
}

.section-header {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -ms-flex-align: center;
    align-items: center;
}

.service-buttons {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-align: end;
    align-items: flex-end;
    -ms-flex-pack: distribute;
    justify-content: space-evenly;
}

.gov-buttons {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.units-content {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-align: center;
    align-items: center;
}

.tabs-content-container {
    display: -ms-flexbox;
    display: flex;
    -ms-flex: 1;
    flex: 1;
}

.tab-nav {
    -ms-flex-negative: 0;
    flex-shrink: 0;
}

.tab-content-area {
    -ms-flex: 1;
    flex: 1;
}

.culture-news {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
}

.culture-news-item {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -ms-flex-align: start;
    align-items: flex-start;
}

.culture-news-item a {
    -ms-flex: 1;
    flex: 1;
}

/* IE11特定的性能优化 */
* {
    /* 禁用IE11的平滑滚动，防止性能问题 */
    -ms-scroll-behavior: auto;
}

/* IE11滚动条样式 */
::-ms-scrollbar {
    width: 8px;
    height: 8px;
}

::-ms-scrollbar-track {
    background: #f1f1f1;
}

::-ms-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-ms-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* IE11透明度兼容性 */
.swiper-pagination-bullet {
    /* IE11 opacity fallback */
    filter: alpha(opacity=20);
    opacity: 0.2;
}

.swiper-pagination-bullet-active {
    filter: alpha(opacity=100);
    opacity: 1;
}

.carousel-overlay {
    /* IE11 rgba fallback */
    background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, 0.7);
    filter: alpha(opacity=70);
}

/* IE11边框圆角兼容性 */
.swiper-pagination-bullet,
.service-buttons a {
    /* IE11不完全支持border-radius的百分比值 */
    -ms-border-radius: 50%;
    border-radius: 50%;
}

/* IE11 calc()兼容性检查 */
@supports not (width: calc(50% - 10px)) {
    .service-cards .service-card {
        width: 48%;
        margin: 0 1% .15rem;
    }
}

/* IE11媒体查询兼容性 */
@media screen and (-ms-high-contrast: active),
(-ms-high-contrast: none) {

    /* 确保在IE11中正确显示 */
    .swiper-wrapper {
        -ms-transform: translate3d(0px, 0, 0);
        transform: translate3d(0px, 0, 0);
    }

    .swiper-slide {
        -ms-transform: translate3d(0px, 0, 0);
        transform: translate3d(0px, 0, 0);
    }
}

/* IE11文本溢出兼容性 */
.news-item a,
.culture-news-item a {
    /* IE11需要明确的overflow属性 */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* IE11 placeholder兼容性 */
.search-input:-ms-input-placeholder {
    color: #999;
}

.search-input::-ms-input-placeholder {
    color: #999;
}

/* IE11 box-shadow兼容性 */
.social-icon::after {
    /* IE11 box-shadow fallback */
    -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(color='#a7d7fd', Direction=135, Strength=10)";
}

/* IE11最小高度兼容性 */
.culture-tab-content {
    /* IE11需要明确的min-height */
    min-height: 1px;
}

/* IE11 z-index问题修复 */
.swiper-pagination,
.carousel-progress {
    /* 确保在IE11中正确显示层级 */
    position: relative;
    z-index: 10;
}