/* ============================================
   交通事故律师网站 - 主样式表
   配色: 深蓝(#1a365d) + 金色(#c5a572)
   ============================================ */

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #1a365d;
    --primary-light: #2a5680;
    --primary-dark: #0f2340;
    --accent: #c5a572;
    --accent-light: #d4b886;
    --bg: #f8f9fa;
    --white: #ffffff;
    --text: #333333;
    --text-light: #6c757d;
    --border: #e0e0e0;
    --success: #28a745;
    --danger: #dc3545;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

html { scroll-behavior: smooth; }

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

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }

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

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

/* ===== Top Bar ===== */
.top-bar {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    padding: 8px 0;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-item { margin-right: 20px; }
.top-contact { display: flex; align-items: center; gap: 20px; }
.top-phone {
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
}

/* ===== Header ===== */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-text { display: flex; flex-direction: column; }
.logo-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}
.logo-sub {
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 2px;
}

/* ===== Navigation ===== */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
    padding: 8px 14px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: rgba(26,54,93,0.08);
}
.nav-btn {
    padding: 9px 24px;
    background: var(--accent);
    color: var(--white) !important;
    border-radius: 6px;
    font-weight: 600;
    margin-left: 8px;
}
.nav-btn:hover { background: var(--accent-light); color: var(--white) !important; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 400px; height: 100%;
    background: radial-gradient(circle, rgba(197,165,114,0.15) 0%, transparent 70%);
}
.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.3;
}
.hero-title .accent { color: var(--accent); }
.hero-desc {
    font-size: 17px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 28px;
    line-height: 1.8;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-light); color: var(--white); }
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Hero Stats Card */
.hero-card {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 36px;
}
.hero-card-title {
    font-size: 18px;
    margin-bottom: 24px;
    text-align: center;
    color: var(--accent);
}
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.stat-item { text-align: center; }
.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}
.stat-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 6px;
}

/* ===== Section ===== */
.section { padding: 60px 0; }
.section-gray { background: var(--bg); }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}
.section-subtitle {
    font-size: 15px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}
.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

/* ===== Service Cards ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}
.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    font-size: 24px;
    color: var(--accent);
}
.service-card h3 {
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 10px;
}
.service-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== Case Cards ===== */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.case-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}
.case-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.case-card-body { padding: 24px; }
.case-tag {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(26,54,93,0.1);
    color: var(--primary);
    font-size: 12px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.case-amount {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(197,165,114,0.15);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    margin-bottom: 12px;
    margin-left: 8px;
}
.case-card h3 {
    font-size: 17px;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.5;
}
.case-card p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 14px;
}
.case-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
}

/* ===== Article List ===== */
.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.article-item:hover { box-shadow: var(--shadow-lg); border-color: var(--accent); }
.article-date {
    flex-shrink: 0;
    width: 64px;
    text-align: center;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    padding: 10px 0;
}
.article-date .day { font-size: 24px; font-weight: 700; line-height: 1; }
.article-date .month { font-size: 12px; opacity: 0.8; margin-top: 4px; }
.article-content { flex: 1; }
.article-content h3 {
    font-size: 17px;
    margin-bottom: 8px;
}
.article-content h3 a { color: var(--primary); }
.article-content h3 a:hover { color: var(--accent); }
.article-content .summary {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 8px;
}
.article-meta { font-size: 12px; color: var(--text-light); }
.article-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(197,165,114,0.15);
    color: var(--accent);
    font-size: 12px;
    border-radius: 4px;
    margin-right: 8px;
}

/* ===== Testimonials ===== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.testimonial-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
}
.testimonial-stars { color: var(--accent); margin-bottom: 12px; font-size: 16px; }
.testimonial-content {
    font-size: 15px;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 16px;
    font-style: italic;
}
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}
.testimonial-name { font-weight: 600; color: var(--primary); }
.testimonial-type { font-size: 12px; color: var(--text-light); }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.faq-question {
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    font-size: 15px;
    transition: var(--transition);
}
.faq-question:hover { background: rgba(26,54,93,0.03); }
.faq-toggle {
    width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
    color: var(--accent);
    font-size: 20px;
}
.faq-item.active .faq-toggle { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer-inner {
    padding: 0 24px 18px;
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.8;
}

/* ===== CTA Banner ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}
.cta-banner::before {
    content: '';
    position: absolute;
    top: 50%; right: -50px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(197,165,114,0.2), transparent 70%);
    transform: translateY(-50%);
}
.cta-banner h2 { font-size: 26px; margin-bottom: 12px; position: relative; z-index: 1; }
.cta-banner p { font-size: 16px; color: rgba(255,255,255,0.85); margin-bottom: 24px; position: relative; z-index: 1; }
.cta-banner .btn { position: relative; z-index: 1; }

/* ===== Forms ===== */
.form-container {
    max-width: 640px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 6px;
    font-size: 14px;
}
.form-label .required { color: var(--danger); }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,54,93,0.1);
}
textarea.form-control { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}
.form-error {
    background: #ffebee;
    border: 1px solid #ffcdd2;
    color: #c62828;
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

/* ===== Page Banner ===== */
.page-banner {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 50px 0;
    text-align: center;
}
.page-banner h1 { font-size: 30px; margin-bottom: 8px; }
.page-banner .breadcrumb { font-size: 14px; color: rgba(255,255,255,0.7); }
.page-banner .breadcrumb a { color: var(--accent); }

/* ===== About Page ===== */
.about-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}
.about-photo {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    padding: 40px 20px;
    text-align: center;
    color: var(--white);
    position: sticky;
    top: 90px;
}
.about-photo-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--accent);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: var(--white);
}
.about-photo-name { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.about-photo-title { font-size: 14px; color: var(--accent); }
.about-info { margin-top: 20px; text-align: left; }
.about-info-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-size: 14px;
}
.about-info-item strong { color: var(--accent); }

.about-content h2 {
    font-size: 22px;
    color: var(--primary);
    margin: 30px 0 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.about-content h2:first-child { margin-top: 0; }
.about-content p {
    font-size: 15px;
    color: var(--text);
    line-height: 1.9;
    margin-bottom: 14px;
}
.about-content ul { padding-left: 20px; margin-bottom: 14px; }
.about-content li { font-size: 15px; line-height: 2; color: var(--text); }

/* ===== Case Detail ===== */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}
.detail-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 24px;
}
.detail-header h1 {
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 12px;
}
.detail-meta { display: flex; gap: 16px; flex-wrap: wrap; }
.detail-meta-item {
    font-size: 13px;
    color: var(--text-light);
}
.detail-meta-item strong { color: var(--primary); }
.detail-section { margin-bottom: 28px; }
.detail-section h3 {
    font-size: 17px;
    color: var(--primary);
    margin-bottom: 10px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}
.detail-section p, .detail-section li {
    font-size: 15px;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 10px;
}
.detail-amount {
    background: rgba(197,165,114,0.1);
    border: 1px solid rgba(197,165,114,0.3);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 20px 0;
    text-align: center;
}
.detail-amount .label { font-size: 13px; color: var(--text-light); }
.detail-amount .value { font-size: 28px; font-weight: 700; color: var(--accent); }

/* ===== Article Detail ===== */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}
.article-detail h1 {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 12px;
    line-height: 1.4;
}
.article-detail-meta {
    font-size: 13px;
    color: var(--text-light);
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}
.article-detail-body h3 {
    font-size: 18px;
    color: var(--primary);
    margin: 24px 0 12px;
}
.article-detail-body p {
    font-size: 15px;
    line-height: 1.9;
    margin-bottom: 14px;
    color: var(--text);
}

/* ===== Contact Page ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.contact-info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
}
.contact-info-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}
.contact-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(26,54,93,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.contact-info-label { font-size: 13px; color: var(--text-light); }
.contact-info-value { font-size: 16px; color: var(--primary); font-weight: 600; }

/* ===== Filter Tabs ===== */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 30px;
}
.filter-tab {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    transition: var(--transition);
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); }
.filter-tab.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    padding: 50px 0 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 36px;
}
.footer-title {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 16px;
}
.footer-text { font-size: 13px; line-height: 1.8; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 13px; }
.footer-links a:hover { color: var(--accent); }
.footer-contact { list-style: none; }
.footer-contact li { font-size: 13px; margin-bottom: 8px; }
.footer-contact strong { color: var(--accent); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}
.footer-disclaimer { margin-top: 6px; font-size: 12px; opacity: 0.6; }

/* ===== Pagination ===== */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 40px;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ===== Badges (Admin) ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-pending { background: #fff3cd; color: #856404; }
.badge-processing { background: #d1ecf1; color: #0c5460; }
.badge-completed { background: #d4edda; color: #155724; }

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero-inner { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .about-photo { position: static; max-width: 320px; margin: 0 auto; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .top-bar-inner { flex-direction: column; gap: 6px; }
    .top-contact { gap: 10px; }
    .menu-toggle { display: flex; }
    .nav {
        position: fixed;
        top: 0; right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 70px 20px 20px;
        gap: 4px;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    .nav.open { right: 0; }
    .nav-link { width: 100%; padding: 12px 16px; }
    .nav-btn { width: 100%; text-align: center; margin-top: 10px; margin-left: 0; }
    .hero { padding: 40px 0; }
    .hero-title { font-size: 26px; }
    .hero-card { padding: 24px; }
    .stat-number { font-size: 26px; }
    .section { padding: 40px 0; }
    .section-title { font-size: 22px; }
    .services-grid, .cases-grid, .testimonials-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .article-item { flex-direction: column; }
    .cta-banner { padding: 32px 24px; }
    .form-container, .detail-container, .article-detail { padding: 24px; }
    .page-banner h1 { font-size: 24px; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 22px; }
    .hero-desc { font-size: 14px; }
    .btn { padding: 11px 24px; font-size: 14px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
}
