body, html {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* 防止横向滚动条 */
}

header {
    background: url('https://www.w-maro.com/kyc/_upload/tpl/01/07/263/template263/images/3.png') no-repeat center center;
    background-size: 200%;
    padding: 20px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

header img {
    height: 120px;
    width: auto;
    max-width: 100%; /* 确保图片不会超过父容器宽度 */
}

header .search-container {
    display: flex;
    align-items: center;
    margin-left: auto; /* 将搜索容器推到右侧 */
}

header .search-input {
    padding: 10px;
    font-size: 1em;
    border: none;
    border-radius: 5px 0 0 5px;
    outline: none;
    box-sizing: border-box;
}

header .search-button {
    padding: 10px;
    font-size: 1em;
    border: none;
    border-radius: 0 5px 5px 0;
    background-color: #fff;
    cursor: pointer;
    margin-left: -5px; /* 消除按钮和输入框之间的间距 */
    box-sizing: border-box;
}

header .search-button i {
    color: #33691E;
}

header .search-button:hover {
    background-color: #f0f0f0;
}

/* 通用导航菜单样式 */
nav {
    background-color: #33691E;
    overflow: visible;
    text-align: center;
    position: relative;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* 确保导航菜单宽度占满屏幕 */
}

nav a {
    display: inline-block;
    color: white;
    padding: 10px 12px;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-size: 1em;
}

nav a:hover {
    background-color: #ddd;
    color: #33691E;
}

.nav-item {
    position: relative;
    display: inline-block;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #33691E;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 999;
    white-space: nowrap;
}

.sub-menu a {
    display: block;
    padding: 10px 12px;
    color: white;
    text-align: left;
    text-decoration: none;
}

.sub-menu a:hover {
    background-color: #ddd;
    color: #33691E;
}

.nav-item:hover .sub-menu {
    display: block;
}

.container {
    display: flex;
    flex-wrap: wrap;
    padding: 20px;
    margin: 0 auto;
    max-width: 100%; /* 改为占满整个页面宽度 */
    box-sizing: border-box;
}

.left-panel, .right-panel {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
    flex: 1 1 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.right-panel {
    flex: 2 1 100%;
}

.box {
    margin-bottom: 20px;
}

.box h2 {
    background-color: #33691E;
    color: white;
    padding: 10px;
    margin: 0;
    border-radius: 5px 5px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
}

.box h2 i {
    margin-right: 10px;
}

.box h2 a {
    color: #fff;
    text-decoration: underline;
}

.box ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

.box ul li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
}

.box ul li:last-child {
    border-bottom: none;
}

.box ul li a {
    color: #33691E;
    text-decoration: none;
    flex-grow: 1;
}

.box ul li:hover {
    background-color: #f9f9f9;
}

.box ul li .date {
    color: #999;
    font-size: 0.9em;
    white-space: nowrap;
    margin-left: 10px;
}

footer {
    background-color: #33691E;
    color: white;
    text-align: center;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    color: white;
    padding: 14px 16px;
    font-size: 1.5em;
}

/* 手机端样式 */
@media (max-width: 825px) {
    header {
        flex-direction: column; /* 手机端改为纵向排列 */
        align-items: center;
        padding: 10px;
    }

    header img {
        width: 80%;
        height: auto;
        margin-bottom: 10px;
    }

    .search-container {
        width: 100%;
        text-align: center;
    }

    .search-container input {
        width: 90%;
        padding: 8px;
        border-radius: 4px 0 0 4px; /* 改变边框半径使其与按钮对齐 */
        border: none;
        box-sizing: border-box;
    }

    .search-container button {
        padding: 8px;
        width: auto;
        background-color: #fff;
        color: #33691E;
        border: none;
        border-radius: 0 4px 4px 0; /* 改变边框半径使其与输入框对齐 */
        cursor: pointer;
        margin-left: -4px; /* 消除按钮和输入框之间的间距 */
        box-sizing: border-box;
    }

    nav {
        display: block; /* 手机端取消 flex 布局 */
        height: auto;
        width: 100%;
    }

    .nav-popup {
        flex-direction: column;
        display: none;
        width: 100%;
    }

    nav.open .nav-popup {
        display: flex;
    }

    .nav-popup .nav-item {
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid #ddd;
        color: white;
        width: 100%;
        position: relative;
        overflow: hidden;
    }

    .nav-popup .nav-item a {
        color: white;
        text-decoration: none;
        width: 100%;
    }

    .nav-popup .nav-item .sub-menu {
        display: none;
        position: relative;
        background-color: #33691E;
        width: 100%;
        z-index: 999;
    }

    .nav-popup .nav-item.active {
        height: auto;
    }

    .nav-popup .nav-item .sub-menu a {
        display: block;
        padding: 10px 12px;
        text-align: center;
        color: white;
        border-bottom: 1px solid #ddd;
        text-decoration: none;
    }

    .nav-popup .nav-item .sub-menu a:hover {
        background-color: #2a5c1e;
    }

    .nav-toggle {
        display: block;
        cursor: pointer;
        padding: 10px;
        background-color: #33691E;
        color: white;
        font-size: 1.5em;
        text-align: center;
    }

    .container {
        max-width: 100%;
    }
}

@media (min-width: 825px) {

    .left-panel,
    .right-panel {
        flex: 1;
    }
    .right-panel {
        flex: 2;
    }
    
    .container {
        width: 70%;
    }
}
