* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #F5F5DC;
    scroll-behavior: smooth;
}

.whole {
    width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 60px 0;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    opacity: 0;
    transform: translateY(20px);
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #1a56db;
    font-size: 2rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #1a56db;
    transition: width 0.3s ease;
}

h2:hover::after {
    width: 100px;
}

h3 {
    margin-bottom: 20px;
    color: #1e40af;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

h3:hover {
    color: #3b82f6;
}

p {
    margin-bottom: 15px;
}

.daohang {
    display: flex;
    list-style: none;
}

.daohang li {
    margin-left: 25px;
    position: relative;
}

.daohang a {
    color: whitesmoke;
    text-decoration: none;
    transition: color 0.3s;
    padding: 5px 0;
}

.daohang a:hover {
    color: #bfdbfe;
}

.daohang a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #bfdbfe;
    transition: width 0.3s ease;
}

.daohang a:hover::after {
    width: 100%;
}

nav {
    background-color: #1e40af;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
    background-color: #1a365d;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    nav.scrolled .daohang {
        background: #1a365d;
    }
}

.shouye {
    background-image: url("../images/home.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 150px 0;
    position: relative;
    opacity: 1;
    transform: none;
}

.shouye::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.shouye>div {
    position: relative;
    z-index: 2;
}

.shouye h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 1s forwards 0.3s;
}

.shouye p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 1s forwards 0.6s;
}

.about {
    background-color: white;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    overflow: hidden;
    border-radius: 8px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.teams {
    background-color: #f1f5f9;
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.dept-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dept-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #1e40af;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.dept-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.dept-card:hover::before {
    transform: scaleX(1);
}

.dept-icon {
    font-size: 2rem;
    color: #1e40af;
    margin-bottom: 15px;
}

.awards {
    background-color: white;
}

.awards-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.award-item {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.award-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.questions {
    background-image: url("../images/background2.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    position: relative;
}

.questions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 1;
}

.questions>div {
    position: relative;
    z-index: 2;
}

.qlist {
    color: purple;
    max-width: 800px;
    margin: 0 auto;
}

details {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

details:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

summary {
    padding: 15px;
    background-color: rgba(128, 0, 128, 0.1);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    position: relative;
    list-style: none;
}

summary:hover {
    background-color: rgba(128, 0, 128, 0.2);
}

summary::after {
    content: '+';
    position: absolute;
    right: 15px;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: rotate(45deg);
}

details p,
details ul {
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.9);
}

.contact {
    background-color: #1e40af;
    color: white;
}

.contact h2 {
    color: white;
}

.contact h2::after {
    background-color: white;
}

.contact h3 {
    color: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.contact-item {
    padding: 20px;
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: scale(1.05);
}

.contact-icon {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #bfdbfe;
    transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: translateY(-10px);
}

footer {
    background-color: #0f172a;
    color: white;
    text-align: center;
    padding: 30px 0;
    transition: background-color 0.3s ease;
}

footer:hover {
    background-color: #1e293b;
}

.btn {
    display: inline-block;
    background-color: #1e40af;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    font-weight: bold;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 1s forwards 0.9s;
}

.btn:hover {
    background-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@keyframes fadeUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    transition: filter 0.3s ease;
}

.logo:hover img {
    filter: brightness(1.1);
}

/* 图片自适应 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 导航栏移动端优化 */
@media (max-width: 900px) {
    nav .whole {
        flex-direction: column;
        align-items: center;
    }

    .daohang {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0;
    }

    .daohang li {
        margin: 10px 0 0 0;
        width: 100%;
        text-align: center;
    }

    .daohang a {
        display: block;
        width: 100%;
        padding: 12px 0;
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .daohang a {
        font-size: 1.1rem;
        padding: 10px 0;
    }

    .logo img {
        width: 70px;
    }
}

/* 宽图自适应 */
.dept-card img,
.awards-list img,
.about-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* 二维码自适应 */
.contact-item img[alt*="二维码"],
.contact-item img.qrcode {
    width: 100%;
    max-width: 180px;
    height: auto;
    margin: 0 auto;
    display: block;
}

@media (max-width: 600px) {

    .contact-item img[alt*="二维码"],
    .contact-item img.qrcode {
        max-width: 80vw;
    }
}

@media (max-width: 900px) {
    .whole {
        width: 98%;
        padding: 0 5px;
    }

    nav .whole {
        flex-direction: column;
        align-items: flex-start;
    }

    .daohang {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 10px;
    }

    .daohang li {
        margin-left: 10px;
        margin-right: 10px;
    }

    .about-content {
        flex-direction: column;
        gap: 15px;
    }

    .about-image,
    .about-text {
        min-width: 0;
    }

    .dept-grid,
    .awards-list,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .dept-card,
    .award-item,
    .contact-item {
        padding: 15px;
    }

    .shouye {
        padding: 80px 0;
    }

    .shouye h1 {
        font-size: 2rem;
    }

    .logo img {
        width: 110px;
    }
}

@media (max-width: 600px) {
    h2 {
        font-size: 1.3rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .shouye {
        padding: 40px 0;
    }

    .shouye h1 {
        font-size: 1.3rem;
    }

    .shouye p {
        font-size: 1rem;
    }

    .btn {
        padding: 8px 12px;
        font-size: 1rem;
    }

    .logo img {
        width: 80px;
    }

    nav {
        padding: 8px 0;
    }

    .daohang {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .daohang li {
        margin: 5px 0 0 0;
    }

    .about-content {
        gap: 8px;
    }

    .about-image img {
        border-radius: 4px;
    }

    .dept-card,
    .award-item,
    .contact-item {
        padding: 8px;
        font-size: 0.95rem;
    }

    .contact-grid {
        gap: 8px;
    }

    .contact-item img,
    .about-image img {
        max-width: 100%;
        height: auto;
    }

    footer {
        padding: 15px 0;
        font-size: 0.95rem;
    }
}

/* 汉堡菜单按钮样式 */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 10px;
    z-index: 200;
}

.nav-toggle .bar {
    width: 28px;
    height: 4px;
    background: #fff;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
        z-index: 201;
    }

    .daohang {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 100vw;
        background: #1e40af;
        position: absolute;
        left: 0;
        top: 100%;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
        border-radius: 0 0 8px 8px;
        padding-bottom: 10px;
        z-index: 200;
        min-height: unset;
        padding-top: 0;
    }

    .daohang.open {
        display: flex;
        animation: fadeInMenu 0.3s;
    }

    .nav-toggle.open .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.open .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.open .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@keyframes fadeInMenu {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}