/* ========================================
   江苏常宜律师事务所 - 离婚纠纷专业网站
   核心样式文件
   ======================================== */

/* CSS变量定义 */
:root {
    --primary-color: #1e3a5f;
    --primary-dark: #152a45;
    --primary-light: #2a4a73;
    --accent-color: #c9302c;
    --accent-hover: #a82521;
    --gold-color: #d4a853;
    --text-dark: #333;
    --text-gray: #666;
    --text-light: #999;
    --bg-light: #f8f9fa;
    --bg-white: #fff;
    --border-color: #e5e5e5;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-white);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部信息栏
   ======================================== */
.top-bar {
    background: var(--primary-color);
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}

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

.top-bar-left {
    display: flex;
    gap: 20px;
}

.top-bar-left span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-bar-right {
    display: flex;
    gap: 15px;
}

.top-bar a {
    color: #fff;
    opacity: 0.9;
}

.top-bar a:hover {
    opacity: 1;
    color: var(--gold-color);
}

/* ========================================
   主导航
   ======================================== */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

.logo-text h1 {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
}

.logo-text p {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

.main-nav ul {
    display: flex;
    gap: 35px;
}

.main-nav a {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--accent-color);
    color: #fff !important;
    padding: 10px 25px !important;
    border-radius: 25px;
    font-weight: 600;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--accent-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: var(--primary-color);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: #fff;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

/* ========================================
   区块标题
   ======================================== */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-header p {
    font-size: 16px;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

.section-header .subtitle {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 15px;
}

/* ========================================
   悬浮咨询栏
   ======================================== */
.float-consult {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.float-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-hover);
}

.float-btn:hover {
    transform: scale(1.1);
}

.float-btn.phone {
    background: var(--accent-color);
}

.float-btn.wechat {
    background: #07c160;
}

.float-btn.online {
    background: var(--primary-color);
}

.float-btn i {
    font-size: 24px;
    margin-bottom: 2px;
}

/* 底部固定咨询栏（移动端） */
.mobile-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
    padding: 10px 15px;
}

.mobile-bottom-bar .container {
    display: flex;
    gap: 10px;
}

.mobile-bottom-bar .btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
}

/* ========================================
   页脚
   ======================================== */
.main-footer {
    background: var(--primary-color);
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 14px;
    line-height: 1.8;
    opacity: 0.9;
    margin-bottom: 20px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-title {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.9;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--gold-color);
}

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

.footer-qr img {
    width: 120px;
    height: 120px;
    background: #fff;
    border-radius: 5px;
    margin: 0 auto;
    margin-bottom: 10px;
}

.footer-qr p {
    font-size: 12px;
    opacity: 0.9;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    opacity: 0.8;
}

.footer-bottom a {
    margin-left: 20px;
}

/* ========================================
   面包屑导航
   ======================================== */
.breadcrumb {
    background: var(--bg-light);
    padding: 15px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-gray);
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.breadcrumb span {
    color: var(--text-light);
    margin: 0 8px;
}

.breadcrumb .current {
    color: var(--text-dark);
}

/* ========================================
   卡片样式
   ======================================== */
.card {
    background: var(--bg-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card-img {
    overflow: hidden;
}

.card-img img {
    width: 100%;
    transition: var(--transition);
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-text {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ========================================
   标签样式
   ======================================== */
.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-light);
    color: var(--text-gray);
    font-size: 12px;
    border-radius: 15px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.tag-primary {
    background: rgba(201, 48, 44, 0.1);
    color: var(--accent-color);
}

.tag-success {
    background: rgba(7, 193, 96, 0.1);
    color: #07c160;
}

/* ========================================
   表单样式
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   分页样式
   ======================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: var(--transition);
}

.pagination a:hover,
.pagination .current {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 1024px) {
    .main-nav ul {
        gap: 25px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none;
    }
    
    .main-header .container {
        height: 60px;
    }
    
    .logo-text h1 {
        font-size: 18px;
    }
    
    .main-nav {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: var(--bg-white);
        flex-direction: column;
        padding: 30px 20px;
        transition: var(--transition);
        gap: 20px;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }
    
    .main-nav a {
        font-size: 18px;
        display: block;
        padding: 10px 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .float-consult {
        display: none;
    }
    
    .mobile-bottom-bar {
        display: block;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .btn-large {
        padding: 12px 30px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .section-header p {
        font-size: 14px;
    }
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* 延迟动画类 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
