/*
 * 君信联合律师楼 - Trust Attorney NYC
 * Professional Law Firm Website Stylesheet
 */

/* ===== CSS Variables ===== */
:root {
    --primary-color: #1a365d;
    --primary-dark: #0f2440;
    --secondary-color: #c9a227;
    --accent-color: #2c5282;
    --text-dark: #1a202c;
    --text-light: #4a5568;
    --text-white: #ffffff;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

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

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

/* ===== Header ===== */
.header {
    background: var(--primary-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-top {
    background: var(--primary-dark);
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-white);
}

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

.header-top a {
    color: var(--text-white);
}

.header-top a:hover {
    color: var(--secondary-color);
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
    color: var(--secondary-color);
}

.header-main {
    padding: 15px 0;
}

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

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

.logo-text {
    color: var(--text-white);
}

.logo-text h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    font-weight: 700;
}

.logo-text span {
    font-size: 0.85rem;
    color: var(--secondary-color);
    letter-spacing: 1px;
}

/* ===== Navigation ===== */
.nav-menu {
    display: flex;
    gap: 5px;
}

.nav-menu a {
    color: var(--text-white);
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 4px;
    transition: var(--transition);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--secondary-color);
    color: var(--text-white);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-white);
    font-size: 24px;
    cursor: pointer;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 180px 0 100px;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><rect fill="%23ffffff" fill-opacity="0.03" width="50" height="50"/><rect fill="%23ffffff" fill-opacity="0.03" x="50" y="50" width="50" height="50"/></svg>');
    background-size: 30px 30px;
}

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

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--secondary-color);
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 2rem;
}

.badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 5px;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--text-white);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-white);
    border: 2px solid var(--text-white);
    margin-left: 15px;
}

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

/* ===== Section Styles ===== */
.section {
    padding: 80px 0;
}

.section-light {
    background: var(--bg-light);
}

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

.section-title h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.section-title p {
    max-width: 600px;
    margin: 0 auto;
}

.section-title .underline {
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ===== Services Grid ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 28px;
    color: var(--text-white);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card p {
    font-size: 15px;
    margin-bottom: 20px;
}

.service-card a {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 14px;
}

.service-card a:hover {
    color: var(--primary-color);
}

/* ===== Features ===== */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.feature-box {
    background: var(--bg-white);
    padding: 30px 25px;
    text-align: center;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.feature-box i {
    font-size: 40px;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.feature-box h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.feature-box p {
    font-size: 14px;
    margin-bottom: 0;
}

/* ===== About Section ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text .highlight {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 20px;
}

.about-list {
    margin: 25px 0;
}

.about-list li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.about-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--secondary-color);
    color: var(--text-white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.experience-badge .number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.experience-badge span {
    font-size: 14px;
}

/* ===== Cases Section ===== */
.cases-list {
    max-width: 900px;
    margin: 0 auto;
}

.case-item {
    background: var(--bg-white);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.case-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.case-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.case-item p {
    margin-bottom: 0;
}

/* ===== FAQ Section ===== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question i {
    transition: var(--transition);
    color: var(--secondary-color);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px;
    max-height: 500px;
}

/* ===== Contact Section ===== */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info-box {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 50px;
    border-radius: 10px;
}

.contact-info-box h3 {
    margin-bottom: 30px;
    color: var(--text-white);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 20px;
    color: var(--secondary-color);
}

.contact-item-text h4 {
    color: var(--text-white);
    margin-bottom: 5px;
    font-size: 16px;
}

.contact-item-text p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 0;
}

.contact-form {
    background: var(--bg-white);
    padding: 50px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== Footer ===== */
.footer {
    background: var(--primary-dark);
    color: var(--text-white);
    padding-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about h3 {
    color: var(--text-white);
    margin-bottom: 20px;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
}

.footer-links h4 {
    color: var(--text-white);
    margin-bottom: 20px;
    font-size: 18px;
}

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

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    color: rgba(255,255,255,0.7);
    font-size: 15px;
    margin-bottom: 10px;
}

.footer-contact i {
    color: var(--secondary-color);
    margin-right: 10px;
    width: 20px;
}

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    margin-bottom: 0;
}

/* ===== Page Header ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 150px 0 80px;
    color: var(--text-white);
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
}

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

.breadcrumb span {
    color: var(--secondary-color);
}

/* ===== Service Detail ===== */
.service-detail {
    padding: 60px 0;
}

.service-detail-content {
    max-width: 900px;
    margin: 0 auto;
}

.service-detail h2 {
    color: var(--primary-color);
    margin-top: 40px;
    margin-bottom: 20px;
}

.service-detail ul {
    margin: 20px 0;
    padding-left: 25px;
}

.service-detail li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.service-detail li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
    font-weight: bold;
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    padding: 60px 0;
    text-align: center;
    color: var(--text-white);
}

.cta-section h2 {
    color: var(--text-white);
    margin-bottom: 15px;
}

.cta-section p {
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-top {
        display: none;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--primary-color);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 140px 0 60px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-badges {
        flex-direction: column;
    }

    .btn-secondary {
        margin-left: 0;
        margin-top: 15px;
    }

    .features {
        grid-template-columns: 1fr;
        margin-top: -30px;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 50px 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo-text h1 {
        font-size: 1.4rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .contact-info-box,
    .contact-form {
        padding: 30px;
    }
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.mb-0 { margin-bottom: 0; }
.mt-30 { margin-top: 30px; }
.mb-30 { margin-bottom: 30px; }
