/* 自定义样式 */
/* Header styles */
/* 删除 .main-header */

.banner {
    background-color: #004fa5;
    color: white;
    text-align: center;
    padding: 20px 0;
    background-image: url('banner-bg.jpg');
    background-size: cover;
}

.banner h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #0056b3;
}

.nav-bar {
    background: none;
}

.nav-bar>.container {
    background: #003a75;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.nav-bar .nav-link {
    color: white;
    padding: 10px 15px;
    transition: color 0.3s ease, background-color 0.3s ease;
    /* 添加过渡效果 */
}

.nav-bar .nav-link:hover {
    color: #ffeb3b;
    background-color: rgba(255, 255, 255, 0.1);
    /* 鼠标悬停时添加背景色 */
}

.search-box button {
    border-radius: 0 4px 4px 0;
    background-color: #ff9800;
    border-color: #ff9800;
    padding: 0.25rem 0.75rem;
    transition: background-color 0.3s ease;
    /* 添加过渡效果 */
}

.search-box button:hover {
    background-color: #e68a00;
    /* 鼠标悬停时改变背景色 */
}

.section-header {
    border-bottom: 2px solid #0056b3;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    color: #1976d2;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 2px;
    position: relative;
    background: linear-gradient(90deg, #1976d2 10%, #42a5f5 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.more-link {
    font-weight: 700;
    letter-spacing: 1.2px;
    font-size: 1.01rem;
}

.news-item,
.list-group-item {
    padding: 8px 0;
    border-bottom: 1.5px dashed #cfd8dc !important;
}

.news-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1.5px dashed #cfd8dc !important;
    font-size: 1.08rem;
    font-weight: 600;
    color: #26334d;
    line-height: 1.7;
    letter-spacing: 0.5px;
    transition: color 0.2s, background 0.2s;
    background: transparent;
}

.news-item .file-title {
    color: #234a7d;
    /* 深钴蓝，黑中带蓝 */
    text-decoration: none;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 16px;
    transition: color 0.2s;
}

.news-item .file-title:hover {
    color: #0056b3;
    text-decoration: underline;
}

.news-item .file-date {
    color: #888;
    font-size: 0.98rem;
    min-width: 90px;
    text-align: right;
    margin-left: 8px;
    flex-shrink: 0;
    padding-right: 8px;
}

.news-item:hover {
    color: #1976d2;
    background: #f0f7ff;
}

.certificate-query-box {
    background-color: #0056b3;
    color: white;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.certificate-query-box h4 {
    font-size: 1.18rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

.service-boxes img {
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

/* Responsive adjustments */

@media (max-width: 768px) {
    .banner h1 {
        font-size: 1.8rem;
    }
}

/* Carousel/Banner styling */

#carouselBanner {
    width: 100%;
    overflow: hidden;
}

#carouselBanner .carousel-inner {
    height: 500px;
}

#carouselBanner .carousel-item {
    height: 100%;
}

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

/* Make carousel responsive */

@media (max-width: 768px) {
    #carouselBanner .carousel-inner {
        height: 200px;
        /* Smaller height on mobile devices */
    }
}

@media (max-width: 576px) {
    #carouselBanner .carousel-inner {
        height: 150px;
        /* Even smaller height on very small devices */
    }
}

/* Enhanced banner styling */

.main-banner {
    background: none !important;
}

.main-banner>.container {
    background: linear-gradient(to right, #0056b3, #0a4b8c);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding-top: 20px;
    padding-bottom: 20px;
}

.banner-content {
    display: flex;
    align-items: center;
}

.site-logo {
    margin-right: 20px;
}

/* 放大 logo */
.logo-img {
    max-height: 100px;
    width: auto;
}

/* 放大中文标题字体并设置为白色 */
.site-title h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    color: #fff;
    /* 设置标题颜色为白色 */
}

/* 缩小英文副标题字体 */
.subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    /* 原先是 1rem，现在缩小到 0.9rem，可根据需求调整 */
    margin-top: 5px;
    letter-spacing: 1px;
}

/* 调整小屏幕下的样式 */
@media (max-width: 992px) {
    .banner-content {
        justify-content: center;
        margin-bottom: 15px;
    }

    .banner-tools {
        align-items: center;
    }

    .logo-img {
        max-height: 80px;
        /* 适当放大 logo */
    }

    .site-title h1 {
        font-size: 2.2rem;
        /* 增大中文标题字体 */
    }

    .subtitle {
        font-size: 0.8rem;
        /* 缩小英文副标题字体 */
    }
}

/* 小屏幕下的顶部样式 */
@media (max-width: 576px) {
    .site-logo {
        margin-right: 10px;
    }

    .logo-img {
        max-height: 80px;
        /* 适当放大 logo */
    }

    .site-title h1 {
        font-size: 1rem;
        /* 增大中文标题字体 */
    }

    .subtitle {
        font-size: 0.7rem;
        /* 缩小英文副标题字体 */
    }
}

.banner-tools {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.search-box {
    width: 100%;
    margin-bottom: 10px;
}

.search-box form {
    display: flex;
}

.search-box input {
    border-radius: 4px 0 0 4px;
    border: none;
    font-size: 0.9rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-box button {
    border-radius: 0 4px 4px 0;
    background-color: #ff9800;
    border-color: #ff9800;
    padding: 0.25rem 0.75rem;
}

.quick-links {
    display: flex;
    align-items: center;
}

.quick-link {
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0 8px;
    transition: color 0.2s;
}

.quick-link:hover {
    color: #ffeb3b;
    text-decoration: none;
}

.separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}


/* Responsive adjustments */

/* 调整小屏幕下的样式 */
@media (max-width: 992px) {
    .banner-content {
        justify-content: center;
        margin-bottom: 15px;
    }

    .banner-tools {
        align-items: center;
    }

    .logo-img {
        max-height: 80px;
        /* 适当放大 logo */
    }

    .site-title h1 {
        font-size: 2.2rem;
        /* 增大中文标题字体 */
    }

    .subtitle {
        font-size: 0.8rem;
        /* 缩小英文副标题字体 */
    }
}

@media (max-width: 576px) {
    .site-logo {
        margin-right: 10px;
    }

    .logo-img {
        max-height: 75px;
        /* 适当放大 logo */
    }

    .site-title h1 {
        font-size: 1.2rem;
        /* 增大中文标题字体 */
    }

    .subtitle {
        font-size: 0.5rem;
        /* 缩小英文副标题字体 */
    }
}

/* 首页证书查询与教育培训高度对齐 */
@media (min-width: 768px) {
    .row>.col-md-6 {
        display: flex;
        flex-direction: column;
    }

    .section-header+.news-item,
    .section-header+.certificate-query-box {
        flex: 1 1 auto;
    }

    .certificate-query-box {
        height: 100%;
        min-height: 320px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
}

/* 首页证书查询模块输入框美化 */
.certificate-query-box input.form-control {
    border-radius: 8px;
    border: 1.5px solid #b0bec5;
    font-size: 1.08rem;
    padding: 0.7rem 1rem;
    margin-bottom: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fafdff;
    box-shadow: 0 1px 4px 0 rgba(33, 150, 243, 0.03);
}

.certificate-query-box input.form-control:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px #90caf9;
    background: #fff;
}

@media (max-width: 576px) {
    .certificate-query-box input.form-control {
        font-size: 0.98rem;
        padding: 0.55rem 0.7rem;
    }
}

/* 顶部搜索按钮始终水平排布，字体自适应 */
.banner-tools .search-box button {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    white-space: nowrap;
    font-size: 1rem;
}

@media (max-width: 576px) {
    .banner-tools .search-box button {
        font-size: 0.95rem;
    }
}

body {
    background-image: url('../images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.8) 100%);
}

body>* {
    position: relative;
    z-index: 1;
}

/* 教育培训模块左侧新闻列表高度平均，和右侧查询模块对齐 */
.edu-news-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 320px;
}

.edu-news-list .news-item {
    flex: 1 1 0;
    min-height: 0;
    align-items: center;
    display: flex;
}

@media (max-width: 768px) {
    .edu-news-list {
        display: block;
        min-height: 0;
        height: auto;
        margin-bottom: 18px;
    }

    .edu-news-list .news-item {
        display: flex;
        align-items: flex-start;
        min-height: unset;
        padding: 8px 0;
    }
}