/* Subnav Wrapper V1 */
.subnav-wrapper-v1 {
    width: 100%;
    margin: 20px 0;
    background: #fff;
    font-family: "Microsoft YaHei", sans-serif;
}

/* Tabs Header */
.subnav-tabs {
    display: flex;
    background-color: #5c9dff; /* Light blue base */
    height: 70px; /* Increased from 60px */
}

.subnav-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px; /* Increased from 18px */
    cursor: pointer;
    position: relative;
    transition: background-color 0.3s;
}

.subnav-tab img {
    margin-right: 10px;
    height: 30px; /* Increased from 28px */
    width: auto;
    vertical-align: middle;
}

.subnav-tab:hover {
    background-color: #4a8be8;
}

.subnav-tab.active {
    background-color: #3b7dd8; /* Darker blue for active */
}

/* Triangle Indicator */
.subnav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #fff; /* White triangle pointing up into the content */
}

/* Content Area */
.subnav-content {
    background: #fff;
    padding: 20px;
    min-height: 400px;
    border: 1px solid #eee;
    border-top: none;
}

.subnav-panel {
    display: none;
}

.subnav-panel.active {
    display: block;
}

/* --- Tab 1: 政策通 (Policy) Styles --- */
.policy-container {
    display: flex;
}

.policy-left {
    flex: 1;
    padding-left: 20px;
}

.policy-subtabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 15px;
}

.policy-subtab {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    position: relative;
}

.policy-subtab.active {
    color: #3b7dd8;
    font-weight: bold;
    border-bottom: 2px solid #3b7dd8;
    margin-bottom: -2px;
}

.policy-news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.policy-news-list li {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0;
    position: relative;
    padding-left: 15px;
    align-items: center; /* Ensure vertical centering */
}

.policy-news-list li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%; /* More robust vertical centering */
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #0066cc;
}

.policy-news-list li:last-child {
    border-bottom: none;
}

.policy-news-list li a {
    color: #333;
    text-decoration: none;
    font-size: 16px; /* Increased from 14px to match original */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    padding-right: 20px;
    max-width: 70%; /* Prevent text from hitting date */
}

.policy-news-list li a:hover {
    color: #0066cc;
}

.policy-news-list li span {
    color: #999;
    font-size: 14px;
    flex-shrink: 0; /* Prevent date from shrinking */
}

.policy-right {
    width: 300px;
    background: transparent;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute items evenly to fill height */
    gap: 10px;
}

/* Make the right side fill the height if possible, or at least look balanced */
.policy-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch; /* Stretch children to same height */
}

.gov-info-title {
    font-size: 16px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.gov-btn {
    display: flex;
    align-items: center;
    background: #fff;
    color: #333;
    text-decoration: none;
    padding: 12px 20px; /* Increased horizontal padding */
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    flex: 1; /* Make buttons grow to fill space if needed, though specific height is better controlled by container */
    max-height: 60px; /* Prevent them from getting too tall */
}

.gov-btn.full-width {
    /* No longer needed in single column, but keeping valid css */
    grid-column: auto;
}

.gov-icon-box {
    width: 40px; /* Increased from 36px */
    height: 40px; /* Increased from 36px */
    border-radius: 50%;
    background: #eef6ff; /* Light blue background for icon */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px; /* Increased margin */
    flex-shrink: 0;
    transition: all 0.3s;
}

.gov-icon-box img {
    width: 22px; /* Increased from 20px */
    height: 22px; /* Increased from 20px */
    object-fit: contain;
}

.gov-text {
    font-size: 16px; /* Increased from 14px */
    font-weight: bold; /* Make it bolder */
    color: #333;
    line-height: 1.2;
}

.gov-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(92, 157, 255, 0.2);
    border-color: #5c9dff;
    z-index: 1;
}

.gov-btn:hover .gov-icon-box {
    background: #5c9dff;
}

.gov-btn:hover .gov-icon-box img {
    filter: brightness(0) invert(1); /* Make icon white on hover */
}

.gov-btn:hover .gov-text {
    color: #5c9dff;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .subnav-tabs {
        height: auto;
        flex-wrap: wrap;
    }
    
    .subnav-tab {
        width: 33.33%;
        height: 60px;
        font-size: 14px;
    }
    
    .policy-container {
        flex-direction: column;
    }
    
    .policy-left, .policy-right {
        width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    
    .policy-right {
        margin-top: 20px;
        display: grid; /* Switch back to grid for mobile to save vertical space? Or keep stack? */
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns on mobile for compactness */
        gap: 10px;
        order: 1; /* Ensure visual order if needed, though HTML order is naturally 1st */
    }

    .policy-left {
        margin-top: 0;
    }
    
    .service-item {
        width: calc(50% - 20px); /* 2 items per row on mobile */
        min-height: 280px; /* Allow smaller height on mobile */
    }
    
    .service-item.col-5 {
        width: calc(50% - 20px);
        min-height: 280px; /* Allow smaller height on mobile */
    }
}

/* Very Small Screen Responsiveness */
@media (max-width: 480px) {
    .subnav-tab {
        font-size: 13px;
        padding: 0 5px;
    }

    .service-item, .service-item.col-5 {
        width: calc(100% - 20px); /* 1 item per row on very small screens */
        min-height: auto; /* Let content dictate height */
        padding: 20px;
    }

    .service-desc {
        -webkit-line-clamp: 4; /* Show fewer lines on mobile */
    }
}

/* --- Tab 2: 办事通 (Service) Styles & Generic Grid --- */
.service-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start; /* Changed from space-between to allow better filling */
    margin: 0 -10px; /* Negative margin for gutter */
}

.service-item {
    width: calc(25% - 20px); /* Default to 4 per row */
    margin: 0 10px 15px; /* Reduced bottom margin */
    padding: 20px 15px; /* Reduced padding */
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center; /* Default center */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 350px; /* Fill vertical space */
    position: relative;
    overflow: hidden; /* Contain content */
    background: #fff;
}

.service-item.col-5 {
    width: calc(20% - 20px); /* 5 items per row */
    min-height: 350px;
}

.service-item:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    transform: scale(1.05);
    z-index: 10;
    border-color: transparent;
}

.service-icon {
    width: 52px; /* Reduced from 60px */
    height: 52px; /* Reduced from 60px */
    margin-bottom: 10px; /* Reduced from 20px */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.service-icon img {
    max-width: 100%;
    max-height: 100%;
}

.service-label {
    font-size: 22px; /* Reduced from 22px */
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    margin-bottom: 10px; /* Reduced from 15px */
    transition: transform 0.3s ease;
}

.service-desc {
    font-size: 16px; /* Slightly smaller to fit more text */
    color: #888;
    line-height: 1.6;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 6; /* Increased lines since we have more space */
    -webkit-box-orient: vertical;
    flex: 1; /* Push to fill remaining space if needed */
    width: 100%;
}

/* --- Tab 3: 意见通 (Opinion) Styles --- */
.opinion-container {
    display: flex;
}

.opinion-left {
    width: 250px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding-right: 20px;
    border-right: 1px solid #eee;
}

.opinion-btn {
    width: 48%;
    text-align: center;
    margin-bottom: 15px;
    padding: 15px 5px;
    background: #f8faff;
    border: 1px solid #eef2f6;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.opinion-btn:hover {
    background: #eef5ff;
    border-color: #dbeeff;
}

.opinion-btn-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background: transparent; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.opinion-btn-icon img {
    max-width: 100%;
    max-height: 100%;
}
.opinion-btn:nth-child(1) .opinion-btn-icon { background-color: #64b5f6; }
.opinion-btn:nth-child(2) .opinion-btn-icon { background-color: #81c784; }
.opinion-btn:nth-child(3) .opinion-btn-icon { background-color: #e57373; }
.opinion-btn:nth-child(4) .opinion-btn-icon { background-color: #9575cd; }
.opinion-btn:nth-child(5) .opinion-btn-icon { background-color: #4db6ac; }
.opinion-btn:nth-child(6) .opinion-btn-icon { background-color: #ffb74d; }


.opinion-btn-label {
    font-size: 12px;
    color: #666;
}

.opinion-right {
    flex: 1;
    padding-left: 20px;
}

.opinion-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.opinion-table th {
    background: #f5f5f5;
    padding: 10px;
    text-align: left;
    color: #666;
    font-weight: normal;
}

.opinion-table td {
    padding: 10px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.opinion-table tr:hover {
    background-color: #f9f9f9;
}

.status-done {
    color: #999;
}
