
/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

:root {
    --primary-color: #153660;
    --secondary-color: #d4af37;
    --accent-color: #2c5282;
    --light-color: #f8f9fa;
    --dark-color: #333;
    --text-color: #444;
    --muted-color: #6b7280;
    --border-color: #dbe3ef;
    --surface-color: #ffffff;
    --border-radius: 6px;
    --box-shadow: 0 10px 26px rgba(21, 54, 96, 0.12);
    --transition: all 0.3s ease;
    --red-color: #8B0000;
}

body {
    color: var(--text-color);
    line-height: 1.6;
    background-color: #f6f8fb;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 36px 0;
}

h1, h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 600;
}

h2 {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 25px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
}

p {
    margin-bottom: 12px;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 11px 22px;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-weight: 500;
}

.btn:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary-color);
}

.section-title {
    text-align: center;
    margin-bottom: 28px;
}

.section-title p {
    color: var(--muted-color);
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.section-title h2::after {
    left: 50%;
    transform: translateX(-50%);
}

/* 加载动画样式 - 已移除相关代码，保留以防其他用途 */
.loading-container {
    display: none; /* 隐藏加载动画 */
}

/* 导航栏 */
header {
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 1px 16px rgba(21, 54, 96, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 62px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 26px;
}

.nav-links li {
    margin-left: 0;
}

.nav-links a {
    color: var(--dark-color);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

/* 英雄区域 */
.hero {
    background: linear-gradient(90deg, rgba(13, 35, 66, 0.9), rgba(21, 54, 96, 0.72)), url('../images/dating.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 88px 0 96px;
    text-align: left;
}

.hero h1 {
    font-size: 3rem;
    line-height: 1.18;
    margin-bottom: 18px;
    color: white;
    max-width: 760px;
}

.hero p {
    font-size: 1.08rem;
    max-width: 720px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.9);
}

.hero-eyebrow {
    color: var(--secondary-color) !important;
    font-size: 0.96rem !important;
    font-weight: 700;
    margin-bottom: 12px !important;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-facts span {
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.24);
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.9rem;
}

/* 关于我们 */
.about-content {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
    align-items: stretch;
    gap: 42px;
}

.about-text {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(21, 54, 96, 0.06);
    height: 100%;
}

.about-text p {
    line-height: 1.82;
    text-align: justify;
    text-justify: inter-ideograph;
}

.about-text p:last-child {
    margin-bottom: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.about-image {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    height: 100%;
}

.about-image img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    display: block;
}

/* 管委会 */
.management-section {
    background-color: var(--surface-color);
}

/* 管委会成员卡片样式 - 增强背景突出效果 */
.management-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
}

.management-card {
    background: var(--surface-color);
    padding: 20px 14px;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    font-size: 0.95rem;
    box-shadow: 0 8px 22px rgba(21, 54, 96, 0.07);
    position: relative;
    overflow: hidden;
}

.management-card::before {
    display: none;
}

.management-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.management-card strong {
    color: var(--primary-color);
    font-size: 0.95rem;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.management-card .name {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 500;
}

/* 律师团队 */
.lawyers-section {
    background-color: var(--surface-color);
}
.highlight-number {
    color: var(--red-color);
    font-weight: bold;
    font-size: 1.35rem;
    margin: 0 4px;
}
.lawyer-categories {
    margin-bottom: 30px;
}

.category {
    margin-bottom: 25px;
}

.lawyers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(138px, 1fr));
    gap: 10px;
}

.lawyer-card {
    background-color: #f8fafc;
    padding: 11px 10px;
    border-radius: 6px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    font-size: 0.95rem;
    cursor: pointer;
    position: relative;
}

.lawyer-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

.lawyer-card:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 100;
    margin-bottom: 5px;
}

.grid-error {
    grid-column: 1 / -1;
    color: var(--red-color);
    text-align: center;
    background-color: rgba(139, 0, 0, 0.06);
    border: 1px solid rgba(139, 0, 0, 0.12);
    border-radius: var(--border-radius);
    padding: 12px;
}

/* 行业排名表格 */
.ranking-section {
    background-color: #f8f9fa;
}

.enhanced-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: white;
}

.enhanced-table thead {
    background-color: var(--primary-color);
    color: white;
}

.enhanced-table th {
    padding: 16px 15px;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
}

.enhanced-table tbody tr {
    border-bottom: 1px solid #eaeaea;
    transition: var(--transition);
}

.enhanced-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.enhanced-table tbody tr:hover {
    background-color: #f0f4f8;
}

.enhanced-table tbody tr.current {
    background-color: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--secondary-color);
}

.enhanced-table tbody tr.current td:first-child {
    font-weight: bold;
    color: var(--primary-color);
}

.enhanced-table td {
    padding: 14px 15px;
    color: var(--text-color);
}

.enhanced-table td:first-child {
    font-weight: 500;
    color: var(--primary-color);
    width: 80px;
}

.enhanced-table td:nth-child(2) {
    font-weight: 500;
}

.enhanced-table td.count {
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
    width: 100px;
}

.timestamp {
    text-align: right;
    font-size: 0.85rem;
    color: #777;
    margin-top: 15px;
    font-style: italic;
}

.ranking-intro {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* 党支部 */
.party-section {
    background-color: #f1f5f9;
}

/* 党支部标题样式 - 添加党徽背景 */
.party-title-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

.party-title-container h2 {
    position: relative;
    z-index: 2;
    background-color: rgba(240, 244, 248, 0.9);
    padding: 0 20px;
}

/* 党徽背景图片样式 */
.party-emblem-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background-image: url('../images/danghui.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.15;
    z-index: 1;
}

/* 党员律师网格样式 - 修改去掉左侧边线并添加党徽 */
.party-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
}

.party-member-card {
    background-color: white;
    padding: 12px 10px;
    border-radius: 6px;
    text-align: center;
    transition: var(--transition);
    font-size: 0.9rem;
    position: relative;
    border: 1px solid rgba(139, 0, 0, 0.12);
    border-left: 3px solid var(--red-color);
}

/* 为党员律师添加党徽 */
.party-lawyer-card {
    padding-left: 40px; /* 为党徽留出更多空间 */
    border-left: none; /* 去掉左侧边线 */
}

/* 党员律师的党徽样式 */
.party-lawyer-card::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px; /* 增大党徽大小 */
    height: 28px;
    background-image: url('../images/danghui.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.8;
}

.party-member-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow);
}

/* 友情链接 */
.links-section {
    text-align: center;
    background-color: #f8fafc;
}

.links-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.link-card {
    background-color: var(--surface-color);
    color: var(--primary-color);
    padding: 14px 28px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 20px rgba(21, 54, 96, 0.07);
    transition: var(--transition);
    width: auto;
    min-width: 160px;
    font-weight: 500;
}

.link-card:hover {
    transform: translateY(-3px);
    background-color: var(--primary-color);
    color: white;
}

.link-card h3 {
    color: inherit;
    margin-bottom: 0;
    font-size: 1rem;
}

/* 联系方式 */
.contact-section {
    background: linear-gradient(135deg, var(--primary-color), #1b4b7f);
    color: white;
}

.contact-section h2 {
    color: white;
}

.contact-section h2::after {
    background-color: var(--secondary-color);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 20px;
}

.contact-item {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 20px;
}

.contact-item h3 {
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.contact-item p {
    margin-bottom: 0;
}

/* 页脚 */
footer {
    background-color: #12233d;
    color: white;
    padding: 24px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-admin-link {
    color: rgba(255, 255, 255, 0.72);
    margin-left: 12px;
    font-size: 0.9rem;
}

.footer-admin-link:hover {
    color: var(--secondary-color);
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 28px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.35rem;
    line-height: 1;
    box-shadow: 0 12px 28px rgba(21, 54, 96, 0.26);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.25s ease;
    z-index: 1001;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.back-to-top:focus-visible {
    outline: 3px solid rgba(212, 175, 55, 0.45);
    outline-offset: 3px;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .party-structure {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        height: auto;
    }

    .about-image img {
        min-height: 300px;
    }

    .management-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .lawyers-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    .enhanced-table {
        font-size: 0.9rem;
    }

    .enhanced-table th,
    .enhanced-table td {
        padding: 12px 10px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: var(--transition);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 12px 0;
    }

    .logo-img {
        height: 55px;
    }

    .hero {
        padding: 68px 0;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero p {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions,
    .hero-facts {
        justify-content: center;
    }

    .management-members-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 12px;
    }

    .management-card {
        padding: 15px 10px;
    }

    .lawyers-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .links-container {
        flex-direction: column;
        align-items: center;
    }

    .link-card {
        width: 200px;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .enhanced-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .enhanced-table th,
    .enhanced-table td {
        padding: 10px 8px;
    }

    .enhanced-table td:first-child,
    .enhanced-table td.count {
        width: auto;
    }

    /* 响应式调整党徽大小 */
    .party-lawyer-card::before {
        width: 24px;
        height: 24px;
        left: 5px;
    }

    .party-lawyer-card {
        padding-left: 35px;
    }

    .party-emblem-bg {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 30px 0;
    }

    .hero {
        padding: 50px 0;
    }

    .management-members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .management-card {
        padding: 12px 8px;
    }

    .lawyers-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .party-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .logo-img {
        height: 45px;
    }

    .back-to-top {
        right: 16px;
        bottom: 18px;
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .enhanced-table {
        font-size: 0.85rem;
    }

    /* 在小屏幕上进一步调整党徽 */
    .party-lawyer-card::before {
        width: 20px;
        height: 20px;
    }

    .party-lawyer-card {
        padding-left: 30px;
        font-size: 0.85rem;
    }

    .party-emblem-bg {
        width: 70px;
        height: 70px;
    }
}

/* 针对超小屏幕的优化 */
@media (max-width: 400px) {
    .management-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .party-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .party-lawyer-card::before {
        width: 18px;
        height: 18px;
        left: 4px;
    }

    .party-lawyer-card {
        padding-left: 28px;
    }
}
