﻿/* MasterPage CSS */
body {
    background-color: #F6F6F6;
}
/* 原有样式（不变，省略重复部分） */
.logo {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: 0.5rem;
}

.carousel-item img {
    max-height: 300px;
    object-fit: cover;
}

.list-group-item-override {
    padding: 0rem !important;
}

.list-group-item a {
    color: #333;
    text-decoration: none;
}

    .list-group-item a:hover {
        color: #007bff;
    }

.top-banner {
    background-image: url("../Images/bg-header.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 180px;
    padding: 30px 0;
    background-color: #f8f9fa;
    position: relative;
}

    .top-banner::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.1);
        z-index: 1;
    }

    .top-banner .container {
        position: relative;
        z-index: 2;
    }

.bg-primary {
    background-color: #1E63B0 !important;
}

h5 {
    color: #1E63B0 !important;
}

/* ========== 核心修改：导航菜单hover背景色 ========== */
/* 一级菜单容器：取消默认padding，确保hover背景铺满 */
.navbar-nav .nav-item {
    position: relative; /* 用于hover背景定位 */
}
/* 一级菜单链接基础样式 */
.navbar-nav .nav-link {
    padding: 0.75rem 1rem !important; /* 统一内边距，增大点击区域 */
    color: #ffffff !important; /* 文字白色 */
    transition: background-color 0.2s ease-in-out; /* 过渡动画 */
}
/* 一级菜单hover/active背景色（包括下拉父项） */
.navbar-nav .nav-item:hover .nav-link,
.navbar-nav .nav-item.active .nav-link,
.navbar-nav .dropdown:hover .nav-link {
    background-color: #0F4A8A !important; /* 深色背景（比主色深，视觉更突出） */
    color: #ffffff !important;
}
/* 二级菜单容器样式优化 */
.dropdown-menu {
    background-color: #1E63B0;
    border: none;
    border-radius: 0;
    display: none;
    margin-top: 0 !important; /* 消除下拉菜单与一级菜单的间隙 */
    padding: 0; /* 取消默认内边距 */
}
/* 二级菜单item样式 */
.dropdown-item {
    color: #ffffff;
    padding: 0.75rem 1.5rem; /* 与一级菜单内边距匹配 */
    transition: background-color 0.2s ease-in-out;
}
    /* 二级菜单item hover/focus背景色（与一级菜单hover色统一） */
    .dropdown-item:hover, .dropdown-item:focus {
        background-color: #0F4A8A !important;
        color: #ffffff !important;
    }

@media (min-width: 768px) {
    .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transition: opacity 0.2s ease-in-out;
    }

    .dropdown-menu {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    }

    .dropdown-toggle::after {
        transition: transform 0.2s ease-in-out;
    }

    .dropdown:hover .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    .navbar-collapse #navbarNav {
        width: 100%;
    }

    .navbar-nav {
        width: 100%;
        display: flex !important;
        justify-content: space-around;
    }
        /* 大屏下一级菜单hover背景铺满整行 */
        .navbar-nav .nav-item {
            flex: 1; /* 平均占宽 */
            text-align: center; /* 文字居中 */
        }
}

/* 移动端导航适配（点击展开后hover效果） */
@media (max-width: 767.98px) {
    .navbar-nav .nav-item {
        border-bottom: 1px solid rgba(255,255,255,0.1); /* 移动端分隔线 */
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
    }
}

/* 友情链接样式 */
/*.friendlink-trigger {
    cursor: pointer;
    display: inline-block;
    padding: 8px 16px;
    color: #007bff;
    text-decoration: none;
    position: relative;
}

    .friendlink-trigger:hover {
        color: #0069d9;
        text-decoration: none;
    }*/

/* 固定通栏占位容器：父相对定位，高度由JS动态赋值 */
/*.friendlink {
    width: 100%;
    padding: 20px 0;
    margin-top: 15px;
    border-top: 1px dashed #eee;
    position: relative;
}*/

/* 分组：绝对定位重叠，脱离文档流，不会撑开父容器 */
/*.friendlink-group {
    position: absolute;
    left: 0;
    top: 20px;
    width: 100%;
    display: none;
    justify-content: left;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

    .friendlink-group.active {
        display: flex;
    }*/

/* 内容项统一样式 */
/*.friendlink-item {
    text-align: center;
}

    .friendlink-item img {
        height: 50px;
        width: auto;
        display: block;
        margin: 0 auto 5px;
        object-fit: contain;
    }

    .friendlink-item span {
        color: #333;
        font-size: 14px;
    }*/

/* 公众号分组图片高度单独设置 */
/*.group-3 .friendlink-item img {
    height: 120px;
}*/

/* 给pre强制移动端自动换行，禁止横向滚动条 */
.footer-pre {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    overflow-x: hidden !important;
}




/* Default CSS */

/* 1. 定义轮播容器的尺寸（可根据需求调整，也可设为100%自适应父容器） */
#carouselBanner {
    width: 100%; /* 宽度铺满父容器 */
    height: 100%; /* 固定高度，也可设为100vh占满视口高度，或100%继承父容器 */
    overflow: hidden; /* 隐藏超出容器的部分 */
}

    /* 2. 让轮播项高度继承容器高度 */
    #carouselBanner .carousel-inner {
        height: 100%;
    }

    #carouselBanner .carousel-item {
        height: 100%; /* 轮播项高度100% */
    }

        /* 3. 核心：图片横竖都100%铺满，同时处理比例问题 */
        #carouselBanner .carousel-item img {
            display: block; /* 等价于d-block */
            width: 100% !important; /* 强制宽度100% */
            height: 100% !important; /* 强制高度100% */
            /* 关键属性：处理图片比例 */
            /* object-fit: cover;  铺满容器，裁剪多余部分（推荐，保持图片比例） */
            /* object-fit: fill;    拉伸图片填满容器（会变形，不推荐） */
            /* object-fit: contain; 完整显示图片，可能留空白（不满足铺满需求） */
            object-fit: cover;
        }

/* 新增：新闻切换标题样式，复用友情链接trigger逻辑 */
.news-tab-trigger {
    cursor: pointer;
    display: inline-block;
    padding: 4px 12px;
    color: #1E63B0;
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
}

    .news-tab-trigger:hover {
        color: #0F4A8A;
        border-bottom: 2px solid #0F4A8A;
    }

.news-tab-link {
    color: #1E63B0;
    text-decoration: none !important;
}
/* 新闻列表分组默认隐藏 */
.news-tab-group {
    display: none !important;
}

    .news-tab-group.active {
        display: block !important;
    }

/* ========== 顶部通栏轮播样式 ========== */
#topFullCarousel {
    width: 100%;
}

    #topFullCarousel .carousel-inner,
    #topFullCarousel .carousel-item {
        height: auto;
    }

        #topFullCarousel .carousel-item img {
            width: 100%;
            height: auto;
            display: block;
        }


