/* Header styles */
header {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0.5rem 0;
    /*background-color: #419143;*/
    /*这里是页眉的颜色不随root变换*/
    background-color: #167537;

    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-image {
    width: 60px;
    height: 60px;
    border-radius: 5%;
}

.logo h1 {
    font-size: 2rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    position: relative;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-dark);
    background-color: rgba(255, 255, 255, 0.1);
}

/* 移动菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* 页脚 */
footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.footer-section img {
    width: 120px;
    height: 120px;
    border: 2px solid var(--primary-light);
    border-radius: 5px;
}

.footer-nav {
    margin-top: 1.5rem;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.footer-nav ul li {
    margin-bottom: 0.5rem;
}

.footer-nav ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 0.5rem;
    text-align: center;
    border-radius: 4px;
}

.footer-nav ul li a:hover {
    color: var(--primary-light);
    background-color: rgba(46, 204, 113, 0.1);
}

/* 二维码部分 */
.qr-codes {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    justify-content: center;
}

.qr-code-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.qr-code-item img {
    width: 150px;
    height: 150px;
    border: 2px solid var(--primary-light);
    border-radius: 10px;
}

.qr-code-item p {
    margin: 0;
    font-size: 1rem;
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #555;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.2rem;
        font-weight: bold;
    }

    header .container {
        flex-direction: column;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: 1.8rem;
        right: 1rem;
    }

    nav ul {
        margin-top: 1rem;
        flex-direction: column;
        width: 100%;
        background-color: rgba(46, 204, 113, 0.95);
        border-radius: 5px;
        padding: 1rem;
        display: none;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0.5rem 0;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .footer-section {
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .qr-code-item {
        justify-content: center;
    }

    .qr-codes {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .qr-code-item img {
        width: 120px;
        height: 120px;
    }
}

/* 中屏设备如iPad Pro和Surface Pro 7 */
@media (max-width: 1024px) and (min-width: 769px) {
    header .container {
        flex-wrap: wrap;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    nav ul li {
        margin: 0.3rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo-image {
        width: 50px;
        height: 50px;
    }

    .footer-nav ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .qr-code-item img {
        width: 100px;
        height: 100px;
    }
}