/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Header styles */
header {
    width: 100%;
    background: #fff;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.logo img {
    height: 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.top-bar {
    background: #f5f5f5;
    padding: 10px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    color: #2b579a;
    text-decoration: none;
    font-weight: bold;
}

.contact-info a {
    color: #2b579a;
    text-decoration: none;
    font-weight: bold;
}

.search-social {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.search-box input {
    border: none;
    padding: 6px 10px;
    width: 200px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
}

.search-box button img {
    width: 16px;
    height: 16px;
}

.social-links {
    display: flex;
    gap: 15px;
}

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

.social-link {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

.qrcode-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    margin-top: 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.qrcode-dropdown img {
    width: 120px;
    height: 120px;
    display: block;
}

.qrcode-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: #fff;
    box-shadow: -2px -2px 5px rgba(0,0,0,0.05);
}

.social-item:hover .qrcode-dropdown {
    opacity: 1;
    pointer-events: auto;
}

.social-link:hover {
    color: #2b579a;
}

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

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.logo-text span {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.top-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.search-social {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.search-box input {
    border: none;
    padding: 6px 10px;
    width: 200px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    background: none;
    border: none;
    padding: 6px 10px;
    cursor: pointer;
}

.search-box button img {
    width: 16px;
    height: 16px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.social-link:hover {
    color: #2b579a;
}

/* Banner and Carousel styles */
.banner {
    width: 100%;
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.carousel {
    position: relative;
    width: 100%;
}

.carousel-container {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
    height: 520px;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-dot {
    width: 30px;
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #fff;
    width: 50px;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Navigation styles */
header nav {
    background: #2b579a;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav > li {
    position: relative;
}

.main-nav > li > a {
    color: #fff;
    text-decoration: none;
    padding: 15px 30px;
    display: block;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.main-nav > li > a:hover,
.main-nav > li > a.active {
    background-color: #1e3f7d;
}

.main-nav > li > a.active {
    background-color: #1e3f7d;
    font-weight: bold;
}

.main-nav > li > a::after {
    display: none;
}

/* Submenu styles */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 10px 0;
    z-index: 1000;
    border-radius: 0 0 4px 4px;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li {
    list-style: none;
}

.submenu a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.submenu a:hover {
    background: #f5f5f5;
    color: #2b579a;
}

/* Active state */
.main-nav > li > a.active {
    background: #1e3f7a;
    position: relative;
    font-weight: bold;
}

.main-nav > li > a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Main content styles */
main {
    max-width: 1200px;
    margin: 0 auto;
}

/* News section styles */
.news-section {
    margin: 30px auto;
}

.water-news {
    width: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    /* box-shadow: 0 2px 5px rgba(0,0,0,0.1); */
}

.water-notice {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #2b579a;
    padding-bottom: 10px;
}

.section-header h2 {
    color: #333;
    font-size: 20px;
    border: none;
    margin: 0;
    padding: 0;
}

.en-title {
    color: #999;
    font-size: 16px;
    font-weight: normal;
    margin-left: 5px;
}

.more {
    color: #999;
    text-decoration: none;
    font-size: 14px;
}

.news-content {
    display: flex;
    gap: 20px;
    height: 320px;
}

.news-image {
    flex: 0 0 40%;
    height: 100%;
}

.news-slider {
    position: relative;
    overflow: hidden;
    height: 320px;
}

.news-slider-container {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.news-slide {
    min-width: 100%;
    height: 100%;
}

.news-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-slider:hover .slider-nav {
    opacity: 1;
}

.slider-nav span {
    width: 40px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.slider-nav .prev {
    border-radius: 0 4px 4px 0;
}

.slider-nav .next {
    border-radius: 4px 0 0 4px;
}

.slider-nav span:hover {
    background: rgba(0, 0, 0, 0.5);
}

.news-lists {
    flex: 1;
    overflow: hidden;
}

.news-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.tab {
    padding: 10px 30px;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    transition: color 0.3s;
}

.tab:hover {
    color: #2b579a;
}

.tab.active {
    color: white;
    background: #2b579a;
}

.tab.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2b579a;
}

.news-items {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.news-items.active {
    display: flex;
}

.news-item {
    padding-bottom: 12px;
    border-bottom: 1px dashed #ddd;
}

.news-item:last-child {
    border-bottom: none;
}

.news-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333;
    gap: 15px;
}

.news-title {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}

.news-date {
    color: #999;
    font-size: 14px;
    white-space: nowrap;
}

.news-link:hover .news-title {
    color: #2b579a;
}

/* Service section styles */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.service-item {
    text-align: center;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 5px;
    transition: transform 0.3s;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

/* Service row styles */
.service-row {
    display: flex;
    gap: 20px;
    margin: 20px auto;
}

.bottom-sections {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.water-affairs {
    flex: 2;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.public-service {
    flex: 1;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-top: 0;
}

/* Water Affairs styles */
.affairs-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
}

.affairs-tabs .tab {
    padding: 10px 30px;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    transition: color 0.3s;
}

.affairs-tabs .tab.active:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    color: white;
    background: #2b579a;
}

.affairs-list {
    display: none;
    flex-direction: column;
    gap: 15px;
}

.affairs-list.active {
    display: flex;
}

.affairs-item {
    border-bottom: 1px dashed #ddd;
    padding-bottom: 15px;
}

.affairs-item:last-child {
    border-bottom: none;
}

.affairs-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333;
    gap: 15px;
}

.affairs-title {
    flex: 1;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.5;
}

.affairs-date {
    color: #999;
    font-size: 14px;
    white-space: nowrap;
}

.affairs-link:hover .affairs-title {
    color: #2b579a;
}

/* Public Service styles */
.public-service {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.service-content {
    margin-top: 0;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    background: #f8f8f8;
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item:nth-child(1) {
    background: #56eebe;
}

.service-item:nth-child(2) {
    background: #ffa69e;
}

.service-item:nth-child(3) {
    background: #5bb4ea;
}

.service-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 15px;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-item span {
    color: #fff;
    font-size: 16px;
}

.qrcode-section {
    background: #4477dd;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    color: #fff;
}

.qrcode-content {
    flex: 1;
    margin-right: 30px;
}

.qrcode-content p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.hotline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hotline img {
    width: 24px;
    height: 24px;
}

.hotline span {
    font-size: 18px;
    font-weight: bold;
}

.qrcode {
    width: 140px;
    height: 140px;
    background: #fff;
    /* padding: 10px; */
    border-radius: 8px;
    overflow: hidden;
}

.qrcode img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Procurement section styles */
.procurement-section {
    margin: 30px 0;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 15px;
}

.section-header h2 span {
    color: #999;
    font-size: 16px;
    margin-left: 10px;
    font-weight: normal;
}

.procurement-tabs {
    display: flex;
    gap: 30px;
    border-bottom: 2px solid #e6e6e6;
    padding-bottom: 10px;
}

.procurement-tabs a {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    padding-bottom: 10px;
    position: relative;
}

.procurement-tabs a.active {
    color: #2b579a;
}

.procurement-tabs a.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2b579a;
}

.procurement-content {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.procurement-list {
    flex: 2;
}

.procurement-image {
    flex: 1;
}

.procurement-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.procurement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e6e6e6;
}

.item-left {
    flex: 1;
}

.item-left h3 {
    font-size: 16px;
    color: #333;
    margin: 0 0 5px 0;
    font-weight: normal;
}

.date {
    color: #999;
    font-size: 14px;
}

.views {
    color: #999;
    font-size: 14px;
}

.procurement-item:hover h3 {
    color: #2b579a;
}

/* Footer styles */
footer {
    background: #333;
    color: #fff;
    padding: 20px 0 20px;
}

.footer-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
}

.footer-column {
    flex: 1;
}

.footer-column h3 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: normal;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: #999;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #fff;
}

.footer-qrcode {
    text-align: center;
}

.footer-qrcode img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

.footer-qrcode p {
    color: #999;
    font-size: 12px;
    margin: 5px 0;
}

.footer-info {
    max-width: 1200px;
    margin: 0 auto;
    /* padding-top: 20px; */
    /* border-top: 1px solid #444; */
    text-align: left;
}

.footer-info p {
    color: #999;
    font-size: 14px;
    margin: 5px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .news-section {
        grid-template-columns: 1fr;
    }
    
    .service-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer-nav {
        grid-template-columns: repeat(2, 1fr);
    }
    
    nav ul {
        flex-direction: column;
    }
}
