/**
 * GOV 主题 - 通用样式
 * 村委会官网专用
 */

/* ==========================================
   顶部导航条
   ========================================== */
.top-bar {
    background: #1a4a8a;
    color: #fff;
    font-size: 13px;
    line-height: 36px;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar a {
    color: #fff;
    margin: 0 8px;
}

.top-bar a:hover {
    color: #ffcc00;
}

.top-bar .divider {
    color: rgba(255,255,255,0.4);
}

.top-bar-right {
    display: flex;
    align-items: center;
}

/* ==========================================
   头部区域
   ========================================== */
.header {
    background: linear-gradient(135deg, #2c5aa0 0%, #1a4a8a 100%);
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-link {
    display: block;
}

.logo-img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.logo-subtitle {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin-top: 4px;
}

.search-area {
    width: 320px;
}

.search-form {
    display: flex;
    background: #fff;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-input {
    flex: 1;
    padding: 10px 18px;
    border: none;
    font-size: 14px;
    outline: none;
}

.search-btn {
    padding: 10px 25px;
    background: #e65c00;
    color: #fff;
    border: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn:hover {
    background: #cc5200;
}

/* ==========================================
   主导航
   ========================================== */
.main-nav {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 20px;
    color: #333;
    font-size: 15px;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-item > a:hover,
.nav-item.active > a {
    color: #2c5aa0;
    border-bottom-color: #2c5aa0;
    background: rgba(44, 90, 160, 0.05);
}

.nav-item.highlight > a {
    background: #e65c00;
    color: #fff;
}

.nav-item.highlight > a:hover {
    background: #cc5200;
    color: #fff;
    border-bottom-color: #cc5200;
}

.nav-icon {
    font-size: 20px;
    margin-bottom: 2px;
}

.nav-text {
    font-weight: 500;
}

/* ==========================================
   面包屑导航
   ========================================== */
.breadcrumb-bar {
    background: #f8f8f8;
    border-bottom: 1px solid #e8e8e8;
    padding: 12px 0;
}

.breadcrumb {
    font-size: 13px;
    color: #666;
}

.breadcrumb a {
    color: #2c5aa0;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #ccc;
}

.breadcrumb .current {
    color: #999;
}

/* ==========================================
   主内容区域
   ========================================== */
.main-content {
    min-height: calc(100vh - 400px);
    padding: 25px 0;
}

/* ==========================================
   首页轮播图
   ========================================== */
.home-banner {
    margin-bottom: 25px;
}

.banner-slider {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.banner-item {
    display: none;
    position: relative;
}

.banner-item.active {
    display: block;
}

.banner-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.banner-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
}

.banner-caption h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.banner-caption p {
    font-size: 14px;
    opacity: 0.9;
}

.banner-dots {
    position: absolute;
    bottom: 15px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
}

.banner-dot.active {
    background: #fff;
}

.banner-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    pointer-events: none;
}

.banner-arrow {
    width: 45px;
    height: 45px;
    background: rgba(0,0,0,0.4);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.3s;
}

.banner-arrow:hover {
    background: rgba(0,0,0,0.6);
}

/* ==========================================
   快捷服务入口
   ========================================== */
.quick-services {
    margin-bottom: 25px;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.quick-item {
    background: #fff;
    border-radius: 8px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    cursor: pointer;
}

.quick-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.quick-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #2c5aa0, #1a4a8a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.quick-item h4 {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.quick-item p {
    font-size: 12px;
    color: #999;
}

/* ==========================================
   内容区块
   ========================================== */
.section-block {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 2px solid #2c5aa0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title h3 {
    font-size: 18px;
    color: #2c5aa0;
}

.section-title-icon {
    width: 24px;
    height: 24px;
    background: #2c5aa0;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.section-more {
    font-size: 13px;
    color: #666;
}

.section-more:hover {
    color: #2c5aa0;
}

.section-content {
    padding: 15px 20px;
}

/* ==========================================
   文章列表
   ========================================== */
.article-list {
    list-style: none;
}

.article-list li {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: center;
}

.article-list li:last-child {
    border-bottom: none;
}

.article-list .date {
    flex-shrink: 0;
    width: 65px;
    font-size: 12px;
    color: #999;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    text-align: center;
    margin-right: 15px;
}

.article-list .title {
    flex: 1;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-list li:hover .title {
    color: #2c5aa0;
}

/* ==========================================
   卡片列表
   ========================================== */
.card-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card-item {
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.card-body {
    padding: 15px;
}

.card-title {
    font-size: 15px;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.5;
}

/* ==========================================
   底部区域
   ========================================== */
.footer {
    background: #1a4a8a;
    color: #fff;
    margin-top: 40px;
}

/* 服务热线条 */
.service-bar {
    background: #164078;
    padding: 15px 0;
}

.service-list {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-icon {
    font-size: 24px;
}

.service-label {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.service-value {
    font-size: 14px;
    font-weight: bold;
}

/* 底部导航 */
.footer-nav {
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.footer-col h4 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e65c00;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
}

.footer-col a:hover {
    color: #ffcc00;
}

.qrcode-box {
    text-align: center;
}

.qrcode-box img {
    width: 100px;
    height: 100px;
    background: #fff;
    padding: 5px;
    border-radius: 8px;
}

.qrcode-box span {
    display: block;
    margin-top: 8px;
    font-size: 12px;
}

/* 底部版权 */
.footer-bottom {
    padding: 20px 0;
    background: #0f2d5a;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.copyright,
.icp {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.icp a {
    color: rgba(255,255,255,0.6);
}

.icp a:hover {
    color: #fff;
}

/* ==========================================
   返回顶部
   ========================================== */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 80px;
    width: 50px;
    height: 50px;
    background: #2c5aa0;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #1a4a8a;
    transform: translateY(-5px);
}

/* ==========================================
   文章内容
   ========================================== */
.post-content {
    line-height: 1.8;
    color: #333;
}

.post-content p {
    margin-bottom: 1em;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 1.5em 0 0.8em;
    color: #2c5aa0;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

.post-content ul,
.post-content ol {
    margin: 1em 0;
    padding-left: 2em;
}

.post-content li {
    list-style: disc;
    margin-bottom: 0.5em;
}

.post-content blockquote {
    background: #f5f5f5;
    padding: 15px 20px;
    border-left: 4px solid #2c5aa0;
    margin: 1em 0;
}

/* ==========================================
   分页
   ========================================== */
.page-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.page-nav a,
.page-nav span {
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
}

.page-nav a:hover {
    background: #2c5aa0;
    color: #fff;
    border-color: #2c5aa0;
}

.page-nav .current {
    background: #2c5aa0;
    color: #fff;
    border-color: #2c5aa0;
}

/* ==========================================
   栏目页样式
   ========================================== */
.column-header {
    background: linear-gradient(135deg, #2c5aa0, #1a4a8a);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.column-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.column-header p {
    opacity: 0.9;
}

.column-grid {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 25px;
}

/* 侧边栏目导航 */
.column-sidebar {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.column-nav-title {
    font-size: 16px;
    color: #2c5aa0;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c5aa0;
    margin-bottom: 15px;
}

.column-nav-list {
    list-style: none;
}

.column-nav-list li {
    margin-bottom: 5px;
}

.column-nav-list a {
    display: block;
    padding: 10px 15px;
    color: #333;
    border-radius: 6px;
    transition: all 0.3s;
}

.column-nav-list a:hover,
.column-nav-list a.active {
    background: #2c5aa0;
    color: #fff;
}

/* ==========================================
   响应式适配
   ========================================== */
@media (max-width: 1024px) {
    .nav-list {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .nav-item > a {
        padding: 12px 15px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .column-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        gap: 15px;
    }

    .search-area {
        width: 100%;
    }

    .nav-text {
        font-size: 13px;
    }

    .banner-item img {
        height: 250px;
    }

    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-list {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .service-list {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .top-bar {
        display: none;
    }

    .logo-text h1 {
        font-size: 20px;
    }

    .nav-list {
        flex-wrap: nowrap;
    }

    .nav-icon {
        font-size: 16px;
    }

    .quick-grid {
        grid-template-columns: 1fr;
    }
}
