/* 全局样式 */
:root {
    --primary-color: #003366;
    --secondary-color: #FFFFFF;
    --accent-color: #333333;
    --background-color: #F5F5F5;
    --text-color: #333333;
    --light-text: #666666;
}

body {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    color: var(--text-color);
    background-color: var(--background-color);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    background-color: var(--primary-color) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

/* Logo样式 */
.navbar-brand .logo {
    max-height: 40px;
    width: auto;
    transition: opacity 0.3s ease;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
}

.navbar-brand .logo:hover {
    opacity: 0.9;
}

/* 响应式Logo调整 */
@media (max-width: 576px) {
    .navbar-brand .logo {
        max-height: 35px;
    }
}

/* 主内容区样式 */
main {
    min-height: 70vh;
    padding: 2rem 0;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-weight: bold;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #002244;
    border-color: #002244;
}

/* 全局查看详情按钮样式 */
.btn-view-details {
    display: inline-block;
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
    color: var(--secondary-color);
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: normal;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.btn-view-details:hover {
    background-color: #002244;
    border-color: #002244;
    color: var(--secondary-color);
    text-decoration: none;
}

.btn-view-details:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 51, 102, 0.25);
}

/* 适配不同尺寸 */
.btn-view-details-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.btn-view-details-lg {
    font-size: 1.05rem;
    padding: 0.5rem 1rem;
}

/* 列表样式 */
ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
}

/* 页脚样式 */
footer {
    background-color: var(--accent-color);
    color: var(--secondary-color);
    padding: 2rem 0;
    margin-top: 2rem;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover {
    color: #CCCCCC;
    text-decoration: underline;
}

/* 首页样式 */
.hero-section {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.feature-section {
    padding: 3rem 0;
    background-color: var(--secondary-color);
}

.feature-item {
    text-align: center;
    margin-bottom: 2rem;
}

.feature-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* 关于我们页面样式 */
.about-section {
    margin-bottom: 2rem;
}

.about-section h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* 律师团队页面样式 */
.lawyer-card {
    margin-bottom: 2rem;
}

.lawyer-photo {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* 案例卡片样式 */
.case-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* 法律法规元数据样式 */
.law-meta {
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.law-meta .category {
    color: #007bff;
    font-weight: bold;
    margin-right: 10px;
}

.law-meta .issuing-authority {
    margin-right: 15px;
}

.law-meta .publish-date, .law-meta .effective-date {
    margin-right: 15px;
    color: #888;
}

.law-meta .publish-date::before, .law-meta .effective-date::before {
    content: "| ";
    margin-right: 5px;
    color: #ccc;
}

/* 详情页元数据样式 */
.text-muted .category {
    color: #007bff !important;
    font-weight: bold;
    margin-right: 10px;
}

.text-muted .issuing-authority {
    margin-right: 15px;
}

.text-muted .publish-date, .text-muted .effective-date {
    margin-right: 15px;
    color: #666;
}

.text-muted .publish-date::before, .text-muted .effective-date::before {
    content: "| ";
    margin-right: 5px;
    color: #ccc;
}

/* 案例详情页面样式 */
.case-detail-header {
    background: linear-gradient(135deg, #b8ddfb 0%, #a1d4fe 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.case-meta {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.case-content {
    line-height: 1.8;
    font-size: 16px;
}

.case-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.case-tags {
    margin: 20px 0;
}

.case-tags .tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 10px;
    margin-bottom: 10px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    text-decoration: none;
    color: #0d6efd;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: #0a58ca;
    transform: translateX(-5px);
}

.back-link i {
    margin-right: 8px;
}

.related-cases {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
}

.related-cases h4 {
    margin-bottom: 25px;
}

/* 知识专栏页面样式 */
.knowledge-category {
    margin-bottom: 2rem;
}

.knowledge-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #EEEEEE;
}

.knowledge-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.knowledge-item h4 {
    margin-bottom: 0.5rem;
}

.knowledge-item .date {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* 公告栏目样式 */
.announcement-item {
    background-color: var(--secondary-color);
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.announcement-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.announcement-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.announcement-meta {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.announcement-meta .date {
    font-weight: bold;
}

.announcement-excerpt {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.announcement-item .btn-primary {
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
}

/* 公告详情页面样式 */
#announcement-detail {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

#announcement-detail h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.3;
    text-align: center;
}

#announcement-detail .content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-top: 2rem;
}

#announcement-detail .content p {
    margin-bottom: 1.5rem;
    text-indent: 2em;
}

#announcement-detail .content h2, 
#announcement-detail .content h3, 
#announcement-detail .content h4, 
#announcement-detail .content h5, 
#announcement-detail .content h6 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

#announcement-detail .content h2 {
    font-size: 1.6rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

#announcement-detail .content h3 {
    font-size: 1.4rem;
}

#announcement-detail .content h4 {
    font-size: 1.2rem;
}

#announcement-detail .content ul, 
#announcement-detail .content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

#announcement-detail .content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

#announcement-detail .content ul {
    list-style-type: disc;
}

#announcement-detail .content ol {
    list-style-type: decimal;
}

#announcement-detail .content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

#announcement-detail .content table, 
#announcement-detail .content th, 
#announcement-detail .content td {
    border: 1px solid #ddd;
    padding: 0.75rem;
}

#announcement-detail .content th {
    background-color: #f5f5f5;
    font-weight: bold;
    text-align: left;
}

#announcement-detail .content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1.5rem;
    font-style: italic;
    color: var(--light-text);
}

#announcement-detail .content code {
    background-color: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
}

#announcement-detail .content pre {
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

#announcement-detail .content pre code {
    background-color: transparent;
    padding: 0;
}

#announcement-detail .content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 1rem 0;
    display: block;
}

#announcement-detail .content .text-center {
    text-align: center;
}

#announcement-detail .content .text-right {
    text-align: right;
}

#announcement-detail .content .text-left {
    text-align: left;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #announcement-detail {
        padding: 1.5rem;
    }
    
    #announcement-detail h1 {
        font-size: 1.6rem;
    }
    
    #announcement-detail .content {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    #announcement-detail {
        padding: 1rem;
    }
    
    #announcement-detail h1 {
        font-size: 1.4rem;
    }
    
    #announcement-detail .content {
        font-size: 0.9rem;
    }
}

/* 联系我们页面样式 */
.contact-info {
    margin-bottom: 2rem;
}

.contact-form {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .feature-section {
        padding: 2rem 0;
    }
    
    /* 导航栏响应式调整 */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* 卡片布局响应式调整 */
    .card {
        margin-bottom: 1rem;
    }
    
    /* 联系表单响应式调整 */
    .contact-form {
        padding: 1rem;
    }
    
    /* 地图响应式调整 */
    .map-container iframe,
    .map-container img.amap-static-map {
        height: 200px;
    }

/* 高德地图静态图样式 */
.map-container {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
}

/* 页脚Logo样式 */
.footer-logo {
    width: 320px !important;
    height: 240px !important;
    display: block;
    filter: brightness(100%);
    transition: opacity 0.3s ease;
    margin-bottom: 1rem;
    object-fit: cover;
}

.footer-logo:hover {
    opacity: 0.9;
}

/* 响应式页脚Logo调整 */
@media (max-width: 768px) {
    .footer-logo {
        width: 240px !important;
        height: 180px !important;
        object-fit: cover;
    }
}

@media (max-width: 576px) {
    .footer-logo {
        width: 160px !important;
        height: 120px !important;
        object-fit: cover;
    }
}

@media (max-width: 384px) {
    .footer-logo {
        width: 120px !important;
        height: 90px !important;
        object-fit: cover;
    }
}

@media (max-width: 288px) {
    .footer-logo {
        width: 100px !important;
        height: 75px !important;
        object-fit: cover;
    }
}

.map-container img.amap-static-map {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 150px;
    border: none;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.map-container img.amap-static-map:hover {
    transform: scale(1.02);
}

/* 确保地图容器有合适的高度 */
.map-container {
    height: auto;
    min-height: 150px;
    display: block;
    overflow: hidden;
}
    
    /* 律师团队响应式调整 */
    .lawyer-card {
        margin-bottom: 1.5rem;
    }
    
    /* 知识专栏响应式调整 */
    .knowledge-item {
        padding: 1rem 0;
    }
    
    /* 搜索栏响应式调整 */
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control {
        margin-bottom: 0.5rem;
        border-radius: 0.375rem;
    }
    
    .input-group .btn {
        border-radius: 0.375rem;
    }
    
    /* 分类导航响应式调整 */
    .nav-tabs {
        flex-direction: column;
    }
    
    .nav-tabs .nav-link {
        margin-bottom: 0.5rem;
    }
    
    /* 筛选按钮响应式调整 */
    .filter-btn {
        margin-bottom: 0.5rem;
    }
    
    /* 页脚响应式调整 */
    footer {
        padding: 1.5rem 0;
    }
    
    footer h5 {
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }
}