/* ==========================================================================
   广东至泰（中山）律师事务所 - 全站样式
   主色调：中国红 + 留白 + 印章元素
   ========================================================================== */

/* ---------- 字体引入 ---------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ---------- 设计变量 ---------- */
:root {
    --red-primary: #C8102E;        /* 中国红 主色 */
    --red-deep: #8B0000;           /* 深红 */
    --red-light: #E63946;          /* 浅红 */
    --red-pale: #FDEAEC;           /* 极浅红 */
    --ink-black: #1a1a1a;          /* 主文字 */
    --ink-gray: #4a4a4a;           /* 次要文字 */
    --ink-light: #888;             /* 辅助文字 */
    --line-gray: #e5e5e5;          /* 分割线 */
    --bg-cream: #FAF8F5;           /* 米白背景 */
    --bg-paper: #ffffff;           /* 纯白 */
    --gold: #B8860B;               /* 印章金字 */
    --shadow-sm: 0 2px 8px rgba(0,0,0,.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.12);
    --serif: 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    --sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

/* ---------- 重置 ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--sans);
    color: var(--ink-black);
    background: var(--bg-paper);
    line-height: 1.7;
    overflow-x: hidden;
}

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

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

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ---------- 通用工具类 ---------- */
.container {
    max-width: 82%;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 1400px) {
    .container {
        max-width: 90%;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
}

.serif {
    font-family: var(--serif);
}

.text-red {
    color: var(--red-primary);
}

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

/* ---------- 顶部导航栏 ---------- */
.top-bar {
    background: var(--red-deep);
    color: #fff;
    font-size: 13px;
    padding: 8px 0;
}

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

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

.top-bar a:hover {
    opacity: 1;
}

.top-bar .info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.top-bar .info span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,.5);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.top-bar .info span:first-child::before {
    display: none;
}

/* ---------- 主导航 ---------- */
.header {
    background: #fff;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo img {
    height: 56px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text .cn {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink-black);
    letter-spacing: 1px;
}

.logo-text .en {
    font-family: var(--serif);
    font-size: 11px;
    color: var(--red-primary);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 500;
    white-space: nowrap;
}

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

.nav a {
    display: block;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-black);
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--red-primary);
    transition: var(--transition);
}

.nav a:hover,
.nav a.active {
    color: var(--red-primary);
}

.nav a:hover::after,
.nav a.active::after {
    width: 60%;
}

.nav-cta {
    background: var(--red-primary);
    color: #fff !important;
    border-radius: 4px;
    padding: 10px 22px !important;
    margin-left: 12px;
}

.nav-cta:hover {
    background: var(--red-deep);
}

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

/* 移动端菜单按钮 */
.menu-btn {
    display: none;
    width: 32px;
    height: 32px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.menu-btn span {
    width: 100%;
    height: 2px;
    background: var(--ink-black);
    transition: var(--transition);
}

.menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- 通用页面标题 ---------- */
.page-banner {
    background: linear-gradient(135deg, #fff5f5 0%, #fff 50%, #fff5f5 100%);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line-gray);
}

.page-banner::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: var(--red-primary);
    opacity: .04;
    border-radius: 50%;
}

.page-banner::after {
    content: '泰';
    position: absolute;
    bottom: -60px;
    right: 60px;
    font-family: var(--serif);
    font-size: 320px;
    font-weight: 900;
    color: var(--red-primary);
    opacity: .04;
    line-height: 1;
}

.page-banner .container {
    position: relative;
    z-index: 1;
}

.page-banner .breadcrumb {
    font-size: 13px;
    color: var(--ink-light);
    margin-bottom: 16px;
}

.page-banner .breadcrumb a {
    color: var(--ink-light);
}

.page-banner .breadcrumb a:hover {
    color: var(--red-primary);
}

.page-banner h1 {
    font-family: var(--serif);
    font-size: 56px;
    font-weight: 700;
    color: var(--ink-black);
    margin-bottom: 12px;
    letter-spacing: 4px;
}

.page-banner .subtitle {
    font-family: var(--serif);
    font-size: 18px;
    color: var(--ink-gray);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.page-banner .accent-line {
    width: 60px;
    height: 3px;
    background: var(--red-primary);
    margin-bottom: 24px;
}

.page-banner .desc {
    font-size: 16px;
    color: var(--ink-gray);
    max-width: 720px;
    line-height: 1.8;
}

/* ---------- 区块标题 ---------- */
.section {
    padding: 100px 0;
}

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

.section-title .en {
    font-size: 14px;
    color: var(--red-primary);
    letter-spacing: 6px;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 12px;
}

.section-title h2 {
    font-family: var(--serif);
    font-size: 44px;
    font-weight: 700;
    color: var(--ink-black);
    letter-spacing: 4px;
    margin-bottom: 16px;
    position: relative;
    display: inline-block;
}

.section-title h2::before,
.section-title h2::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 60px;
    height: 1px;
    background: var(--red-primary);
}

.section-title h2::before {
    right: calc(100% + 24px);
}

.section-title h2::after {
    left: calc(100% + 24px);
}

.section-title p {
    font-size: 16px;
    color: var(--ink-gray);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ---------- 印章装饰 ---------- */
.seal {
    display: inline-block;
    width: 64px;
    height: 64px;
    border: 3px solid var(--red-primary);
    border-radius: 4px;
    color: var(--red-primary);
    font-family: var(--serif);
    font-weight: 900;
    text-align: center;
    line-height: 1.1;
    padding-top: 6px;
    transform: rotate(-3deg);
    position: relative;
    flex-shrink: 0;
}

.seal::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid var(--red-primary);
}

.seal span {
    display: block;
    font-size: 22px;
    line-height: 1;
}

.seal small {
    display: block;
    font-size: 9px;
    letter-spacing: 1px;
    margin-top: 2px;
}

.seal-lg {
    width: 96px;
    height: 96px;
    padding-top: 12px;
}

.seal-lg span {
    font-size: 32px;
}

.seal-lg small {
    font-size: 12px;
    letter-spacing: 2px;
    margin-top: 4px;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-block;
    padding: 14px 36px;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 2px;
    transition: var(--transition);
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--red-deep);
    border-color: var(--red-deep);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(200, 16, 46, .25);
}

.btn-outline {
    background: transparent;
    color: var(--red-primary);
    border-color: var(--red-primary);
}

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

.btn-ghost {
    background: transparent;
    color: var(--ink-black);
    border-color: var(--ink-black);
}

.btn-ghost:hover {
    background: var(--ink-black);
    color: #fff;
}

/* ---------- 页脚 ---------- */
.footer {
    background: #1a1a1a;
    color: #aaa;
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 48px;
    padding-bottom: 60px;
    border-bottom: 1px solid #2a2a2a;
}

.footer h4 {
    font-family: var(--serif);
    color: #fff;
    font-size: 18px;
    margin-bottom: 24px;
    font-weight: 600;
    letter-spacing: 2px;
}

.footer-about .footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-about .footer-logo img {
    height: 50px;
    filter: brightness(0) invert(1);
}

.footer-about .footer-logo .cn {
    font-family: var(--serif);
    font-size: 18px;
    color: #fff;
    font-weight: 700;
}

.footer-about p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 16px;
}

.footer ul li {
    margin-bottom: 12px;
    font-size: 14px;
}

.footer ul li a {
    color: #aaa;
}

.footer ul li a:hover {
    color: var(--red-light);
}

.footer-contact li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.footer-contact li .icon {
    color: var(--red-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.copyright {
    padding: 24px 0;
    text-align: center;
    font-size: 13px;
    color: #777;
    margin-top: 24px;
}

.copyright a {
    color: #aaa;
}

.copyright a:hover {
    color: var(--red-light);
}

/* ---------- 响应式 ---------- */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .nav {
        position: fixed;
        top: 80px;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: calc(100vh - 80px);
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 0;
        box-shadow: -8px 0 24px rgba(0,0,0,.08);
        transition: right .3s ease;
    }

    .nav.open {
        right: 0;
    }

    .nav a {
        padding: 16px 0;
        border-bottom: 1px solid var(--line-gray);
    }

    .nav a::after {
        display: none;
    }

    .menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .page-banner {
        padding: 60px 0 50px;
    }

    .page-banner h1 {
        font-size: 36px;
        letter-spacing: 2px;
    }

    .page-banner .subtitle {
        font-size: 14px;
        letter-spacing: 4px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 30px;
    }

    .section-title h2::before,
    .section-title h2::after {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .header .container {
        height: 64px;
    }

    .logo img {
        height: 44px;
    }

    .logo-text .cn {
        font-size: 16px;
    }

    .top-bar {
        font-size: 12px;
        padding: 6px 0;
    }

    .top-bar .container {
        justify-content: center;
        gap: 16px;
    }
}

/* ---------- 通用动画 ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-up {
    animation: fadeInUp .8s ease both;
}

/* 滚动条 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--red-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-deep);
}

/* ---------- 咨询弹窗 ---------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(.96);
    transition: transform .3s ease;
    box-shadow: 0 24px 64px rgba(0, 0, 0, .3);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    background: linear-gradient(135deg, var(--red-deep) 0%, var(--red-primary) 100%);
    color: #fff;
    padding: 28px 32px;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.modal-header h3 {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.modal-header p {
    font-size: 13px;
    opacity: .9;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, .3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 32px;
}

.modal-body .form-group {
    margin-bottom: 16px;
}

.modal-body label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-black);
    margin-bottom: 8px;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line-gray);
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink-black);
    transition: var(--transition);
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--red-primary);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, .1);
}

.modal-body select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23C8102E' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.modal-body textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-body .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

.modal-body .form-submit {
    width: 100%;
    margin-top: 8px;
    padding: 14px;
    font-size: 15px;
    letter-spacing: 2px;
}

@media (max-width: 600px) {
    .modal {
        max-width: 100%;
    }

    .modal-body .form-row {
        grid-template-columns: 1fr;
    }

    .modal-header,
    .modal-body {
        padding: 24px 20px;
    }
}