/* ========== 全局初始化 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: Arial, sans-serif;
}

.main {
    max-width: 1280px;
    min-width: 980px;
    margin:0 auto;
}

a {
    text-decoration: none;
    color: #333;
}

/* ========== 头部 Header ========== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to right, #02319c 0%, #549ae8 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 999;
    opacity: 0.95;
}

.logo {
    color: #fff;
    font-size: 1.2rem;
    font-weight: bold;
    line-height: 0; /* 消除行高对高度的影响 */
}

.logo a {
    color: #fff;
    /* display: inline-block; 确保链接可以正确包裹图片 */
}

/* PC端主导航 */
nav ul{
    list-style: none;
}
nav > ul {
    display: flex;
    /* PC时横向菜单 */
}

nav ul li {
    position: relative;
    margin-left: 10px;
}

nav ul li a {
    color: #fff;
    padding: 8px 12px;
    display: block;
}

/* PC端二级菜单（使用动画效果） */
.submenu {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(to right, #093fb6 0%, #4887cd 100%);
    min-width: 120px;

    /* 初始：不可见 + 透明度0 + 无法点击 */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sub-submenu {
    position: absolute;
    top: 0;
    left: 100.2%;
    /* transform: translateX(-50%); */
    background: linear-gradient(to right, #093fb6 0%, #4887cd 100%);
    min-width: 120px;

    /* 初始：不可见 + 透明度0 + 无法点击 */
    visibility: hidden;
    opacity: 1;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.submenu:before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -8px;
    width: 0;
    height: 0;
    border-bottom: 8px solid #093fb6;
    border-right: 8px solid transparent;
    border-left: 8px solid transparent
}

.submenu li {
    border-top: 1px solid rgba(255,255,255,.07);
    margin: 0;
}

.submenu li a {
    color: #fff;
    padding: 16px 24px;
    white-space: nowrap;
}

.submenu li a:hover {
    background: linear-gradient(to right, #207fd7 0%, #87bae5 100%);
}

.arrow-left::after {
    width: 0;
    height: 0;
    border-top: 10px solid transparent; /* 上边框透明 */
    border-bottom: 10px solid transparent; /* 下边框透明 */
    border-right: 10px solid black; /* 右边框为黑色，形成箭头 */
    margin-right: 5px; /* 箭头与文本之间的间距 */
}

/* 鼠标悬停时：可见，透明度1 */
nav ul li:hover .submenu {
    visibility: visible;
    opacity: 1;
}

/* 鼠标悬停时：可见，透明度1 */
nav ul.submenu li:hover .sub-submenu {
    visibility: visible;
    opacity: 1;
}

/* ========== 汉堡按钮（PC隐藏，移动端显示） ========== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: 0.3s;
}

/* ========== 主体轮播区 ========== */
.slider {
    position: relative;
    margin-top: 0;
    /* 避开固定Header */
    height: calc(100vh - 170px);;
    width: 100%;
    background: #ccc;
    /* 这里仅作示例，可用实际轮播 */
    display: flex;
    overflow: hidden;
}

.slider .slide {
    min-width: 100%;
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}
.slide.active {
    opacity: 1;
}
.slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== 菜单区域（左侧竖向 + 右侧网格） ========== */
.menu-area {
    display: flex;
    padding-top: 1px;
    background: #f4f4f4;
    margin-bottom: 20px;
}

.menu-left {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 22%;
}

.menu-left ul {
    list-style: none;
    margin-left: 47px;
}

.menu-left ul li a {
    display: block;
    color: #FFF;
    background: linear-gradient(to right, #093fb6 0%, #4887cd 100%);
    margin: 1px 0;
    padding: 20px;
}

.menu-left ul li a:hover {
    background: linear-gradient(to right, #207fd7 0%, #87bae5 100%)
}

/* 长条样式 */
.menu-left .vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background-color: #093fb6;
    color: #fff;
    padding: 12px;
    position: absolute;
    left: -0px; /* 根据需要调整位置 */
    top: 1px;
    bottom: 1px; /* 高度与ul保持一致 */
    display: flex;
    align-items: center;
    justify-content: center;
  }

.menu-right {
    width: 78%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0px;
    margin-left: 0px;
    border-bottom: 3px dotted #dce3e9;
    border-right: 3px dotted #dce3e9;
}

.menu-right .grid-item {
    background: #fff;
    border-left: 3px dotted #dce3e9;
    border-top: 3px dotted #dce3e9;
    justify-content: center; 
    height:100%;
    font-weight: bold;
}

.menu-right .grid-item img{
    width: 100px; /* 使图像宽度为100% */
    height: 100px; /* 使图像高度为100% */
    object-fit: cover; /* 以cover方式显示图像 */
    object-position: center; /* 居中显示图像 */
    /* box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.2); */
    /* transition: filter 0.3s ease; 添加过渡效果 */
    transition: transform 0.2s;
    /* border-radius: 1cap; */
    
}
.menu-right a:hover img{
    box-shadow: none;
    transform: translate(4px, 4px);
}

.menu-right .grid-item span{
    padding-top: 8px;
}
.menu-right a {
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    height:100%
}
.menu-right a:hover {
    background-color: #8cc9fb;
    color: #fff;
    /* border-radius: 1cap; */
}


/* ========== banners ========== */
.banners{
    display: flex;
    margin-bottom: 20px;
}
.banner-item{
    flex: 0 0 calc(100% / 2);
    border-bottom: 5px solid #dce3e9;
}
.banner-bg{
    height: 120px;
    overflow: hidden;
    background-color: #4887cd;
}
.banner-bg img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.5s;
}
.banner-item a:hover img{
    transform: scale(1.1);
    transition: transform 0.5s;
}
.banner-tit{
    flex: 0 0 calc(100% / 2);
    padding: 20px;
    color:#FFF;
    background: linear-gradient(to right, #093fb6 0%, #4887cd 100%);
}

/* ========== 特长区域 ========== */
.features {
    padding: 20px;
    background-color: #E0EFFC;
}

.features h2 {
    font-size: 1.6rem;
    text-align: center;
    color: #004b9b;
}

.feature-row {
    display: grid;
    gap: 24px;
    padding: 30px 0;
}

.feature-sub-row {
    display: grid;
    gap: 0px;
}

.row-of-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* .row-of-2 {
    grid-template-columns: repeat(2, 1fr);
    margin-left: 16%;
    margin-right: 16%;
} */

.feature-box {
    position: relative;
    /* background: #e9f4ff;
    border: 1px solid #ccc; */
    height: 280px;
    /* 仅作示例 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    overflow: hidden;
}
.feature-bg{
    overflow: hidden;
}
.feature-btn{
    position: absolute; bottom:20px; left:50%;transform: translateX(-50%);background: linear-gradient(to right, #093fb6 0%, #4887cd 100%); border-radius: 50px; width: 60%; padding: 16px 0; text-align: center;box-shadow: 0 0 0 2px rgba(205, 215, 223, 0.7); color:#FFF
}
.feature-box img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 0.5s;
}
a.feature-box:hover .feature-btn{
    background: linear-gradient(to right, #207fd7 0%, #87bae5 100%);
}

a.feature-box:hover img{
    transform: scale(1.1);
    transition: transform 0.5s;
}
.feature-box span{
    border-top: #063292 2px solid;
    border-bottom: #063292 2px solid;
    padding: 16px 4px;
    color: #063292;
    position: absolute;
    font-weight: bold;
}

.appointment {
    position: fixed; /* 固定定位 */
    right: 0; /* 靠左 */
    top: 60%; /* 垂直居中 */
    transform: translateY(-50%); /* 垂直居中调整 */
    color: #fff; /* 按钮文字颜色 */
     /* 按钮内边距 */
     /* 按钮圆角 */
    text-align: center; /* 文字居中 */
    z-index: 10; /* 确保按钮在最上层 */
    
}

.aname{
    scroll-margin-top: 110px;
}

.appointment a {
    border-radius: 15px 0  0 15px ;
    background: linear-gradient(to right, #093fb6 0%, #4887cd 100%);
    box-shadow: 0 0 0 2px rgba(205, 215, 223, 0.7);
    font-size: 1.2rem;
    color: #fff; /* 链接文字颜色 */
    padding: 15px 20px; /* 按钮内边距 */
    margin-bottom: 16px;
    text-decoration: none; /* 去掉下划线 */
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
}

.appointment a i {
    margin-right: 8px;
    font-size: 1.2em;
    display: none;
}

.appointment a:hover {
    background: linear-gradient(to right, #207fd7 0%, #87bae5 100%);
}

/* ========== 6. 地图区域 ========== */
.map-area {
    text-align: center;
}

.map-area iframe {
    width: 100%;
    display:block;
    height: 50vh;
    border: 0;
    padding: 0;
    margin: 0;
}

/* ========== 底部Footer (3列) ========== */
footer {
    background: linear-gradient(to right, #093fb6 0%, #4887cd 100%);
    color: #fff;
    padding: 20px;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 1280px;
    margin: 0 auto;
}

.footer-col {
    padding: 16px;
    min-height: 100px;
    /* 示例高度 */
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}
.footer-col h4 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

.footer-col p {
    margin-bottom: 20px;
    line-height: 180%;
}

.footer-col p img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* ========== 移动端样式 <768px ========== */
@media (max-width: 768px) {

    .main{
        min-width: 240px;
    }
    header {
        padding: 0 20px;
    }

    .logo {
        font-size: 1rem;
    }

    /* 隐藏PC导航, 显示汉堡按钮 */
    nav ul {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* 轮播尺寸可略小 */
    .slider {
        margin-top: 0;
        height: 40vh;
    }

    /* 菜单区：上下堆叠 */
    .menu-area {
        display: block;
    }

    .menu-left,
    .menu-right {
        width: 100%;
        grid-template-columns: repeat(2, 1fr);
        /* 移动端每行2个 */
        padding-left: 0;
    }
    .menu-right .grid-item a{
        padding: 40px 0;
    }
    /* banners */
    .banners{
        flex-direction: column;
        padding: 0;
    }
    .banner-item{
        margin-bottom: 20px;
    }
    /* 特长区：改为单列展示 */
    .feature-row.row-of-3,
    .feature-row.row-of-2, .feature-sub-row.row-of-3 {
        grid-template-columns: 1fr;
        margin-left:0;
        margin-right:0;
    }
    .feature-bg{
        margin: 0;
    }

    /* 底部footer：3列改1列 */
    .footer-columns {
        grid-template-columns: 1fr;
    }

    /* 移动端appointment按钮样式 */
    .appointment a {
        font-size: 1.2rem; /* 缩小字体 */
        margin-bottom: 8px; /* 缩小间距 */
    }

    .appointment a .text {
        display: none; /* 隐藏文字 */
    }

    .appointment a i {
        display: block;
        margin-right: 0; /* 移除右边距 */
        font-size: 1.4em; /* 稍微增大图标 */
    }
}

/* ========== 移动端右侧滑出菜单(材料设计风格) ========== */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 66%;
    /* 占66%宽度 */
    height: 100%;
    background: linear-gradient(to right, #093fb6 0%, #4887cd 100%);
    transform: translateX(100%);
    /* 默认藏在右侧 */
    transition: transform 0.3s ease;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    /* 需高于遮罩mask */
    padding: 20px;
}

.mobile-menu.open {
    transform: translateX(0);
    /* 滑入 */
}

.mobile-menu ul {
    list-style: none;
}
.mobile-menu > ul {
    margin: 20px 0;
    /* 留给右上角按钮的空间 */
}

.mobile-menu > ul > li {
    margin-bottom: 10px;
}

.mobile-menu li a{
    color: #fff;
    display: block;
    padding: 8px 0;
}

/*一级菜单*/
.mobile-menu > ul > li > a {
    border-bottom: 1px solid #ccc;
}

/* 子菜单在移动端默认隐藏，可JS控制显示 */
.mobile-submenu {
    display: none;
    margin-top: 10px;
    padding-left: 20px;
}

.mobile-sub-submenu {
    display: none;
    padding-left: 20px;
}

/* 关闭按钮(在滑出菜单右上角) */
.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2.5rem;
    color: #FFF;
    cursor: pointer;
}

/* ========== 通用遮罩层 ========== */
.mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    /* 遮罩在菜单之下，但在页面之上 */
}

.mask.show {
    opacity: 1;
    visibility: visible;
}
