/* ==========================================
   Attorney AI Help - 美国华人法律咨询平台
   ========================================== */

/* CSS Variables */
:root {
    --primary-color: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0d1b2a;
    --accent-color: #c9a227;
    --accent-light: #d4b03a;
    --accent-dark: #a8871e;
    --text-color: #2d3748;
    --text-light: #718096;
    --bg-color: #ffffff;
    --bg-light: #f7fafc;
    --bg-warm: #fffbf0;
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --danger-color: #e53e3e;
    --white: #ffffff;
    --dark-color: #1a202c;
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 6px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.04), 0 10px 25px rgba(0,0,0,0.08);
    --shadow-xl: 0 4px 6px rgba(0,0,0,0.03), 0 10px 20px rgba(0,0,0,0.06), 0 20px 40px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--text-color);
    background: var(--bg-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

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

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

ul, ol {
    list-style: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================
   Header & Navigation
   ========================================== */
header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--accent-dark), var(--accent-color), var(--accent-light), var(--accent-color), var(--accent-dark)) 1;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

.logo a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.logo a:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.logo-icon {
    font-size: 1.8rem;
    transition: transform 0.4s ease;
}

.logo a:hover .logo-icon {
    transform: rotate(-8deg) scale(1.1);
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--text-light);
    display: block;
    letter-spacing: 1px;
    text-transform: uppercase;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.92rem;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    color: var(--primary-color);
    background: rgba(26, 54, 93, 0.06);
}

nav a.btn-nav {
    background: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    padding: 0.5rem 1.2rem;
}

nav a.btn-nav:hover {
    background: var(--accent-dark);
    color: var(--white);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.3rem;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    background-size: 200% 200%;
    animation: heroGradientShift 8s ease infinite;
    color: var(--white);
    padding: 6rem 0 7rem;
    position: relative;
    overflow: hidden;
}

@keyframes heroGradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Hero wave divider at bottom */
.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60'%3E%3Cpath fill='%231a365d' d='M0,30 C360,60 720,0 1080,30 C1260,45 1380,40 1440,30 L1440,60 L0,60 Z'/%3E%3C/svg%3E") no-repeat bottom;
    background-size: cover;
    z-index: 1;
}

/* Floating decoration icons */
.hero-float {
    position: absolute;
    font-size: 2rem;
    opacity: 0.08;
    animation: heroFloat 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.hero-float:nth-child(1) { top: 12%; left: 8%; animation-delay: 0s; font-size: 2.5rem; }
.hero-float:nth-child(2) { top: 60%; left: 5%; animation-delay: 1.2s; font-size: 1.8rem; }
.hero-float:nth-child(3) { top: 20%; right: 10%; animation-delay: 2.4s; font-size: 2.2rem; }
.hero-float:nth-child(4) { top: 70%; right: 8%; animation-delay: 0.8s; font-size: 1.6rem; }
.hero-float:nth-child(5) { top: 40%; left: 15%; animation-delay: 3s; font-size: 1.4rem; }
.hero-float:nth-child(6) { top: 50%; right: 15%; animation-delay: 1.8s; font-size: 2rem; }

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-15px) rotate(5deg); }
    75% { transform: translateY(10px) rotate(-3deg); }
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    letter-spacing: 1px;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 1.2rem;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 1; }
}

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

.hero-badge {
    display: inline-block;
    background: rgba(201, 162, 39, 0.2);
    color: var(--accent-color);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(201, 162, 39, 0.3);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(201, 162, 39, 0); }
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #e8d5a3 40%, #ffffff 60%, #c9a227 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroTextShine 4s ease-in-out infinite;
}

@keyframes heroTextShine {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

.hero .subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero .description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 650px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
}

.btn-primary:hover {
    background: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

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

.btn-accent:hover {
    background: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-white {
    background: var(--white);
    color: var(--primary-color);
    font-weight: 700;
}

.btn-white:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.trust-icon {
    font-size: 1.3rem;
}

/* ==========================================
   Section Styles
   ========================================== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

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

.section-header .section-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    display: block;
}

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

.bg-warm {
    background: var(--bg-warm);
}

.bg-dark {
    background: var(--primary-dark);
    color: var(--white);
}

/* ==========================================
   AI Consultation Module
   ========================================== */
.ai-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8eeff 100%);
    position: relative;
}

.ai-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.ai-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

.ai-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.ai-header p {
    opacity: 0.85;
    font-size: 0.95rem;
}

.ai-body {
    padding: 2rem;
}

.ai-input-area {
    margin-bottom: 1.5rem;
}

.ai-input-area textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: var(--transition);
    color: var(--text-color);
}

.ai-input-area textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.ai-input-area textarea::placeholder {
    color: var(--text-light);
}

.ai-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.ai-example-tag {
    background: var(--bg-light);
    color: var(--text-color);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.ai-example-tag:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.ai-submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ai-submit-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.ai-submit-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.ai-disclaimer {
    text-align: center;
    color: var(--text-light);
    font-size: 0.82rem;
    margin-top: 1rem;
    padding: 0.8rem;
    background: #fff8e1;
    border-radius: var(--radius-sm);
    border: 1px solid #ffe082;
}

.ai-result {
    margin-top: 1.5rem;
    display: none;
}

.ai-result.active {
    display: block;
}

.ai-result-content {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.ai-result-content h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.ai-result-content p,
.ai-result-content li {
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.ai-loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.ai-loading.active {
    display: block;
}

.ai-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   Service Areas Grid
   ========================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.service-card {
    background: var(--white);
    border-radius: 14px;
    padding: 1.4rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(26,54,93,0.12);
    border-color: rgba(26,54,93,0.15);
    color: var(--text-color);
}

.service-icon {
    font-size: 2.2rem;
    margin-bottom: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(26,54,93,0.06), rgba(201,162,39,0.08));
    transition: all 0.4s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 6px 16px rgba(26,54,93,0.2);
    filter: saturate(1.2);
}

.service-card:hover .service-icon::after {
    font-size: 2.2rem;
    filter: brightness(10);
}

/* Stagger animation for service cards */
.services-grid .service-card:nth-child(1) { animation-delay: 0s; }
.services-grid .service-card:nth-child(2) { animation-delay: 0.03s; }
.services-grid .service-card:nth-child(3) { animation-delay: 0.06s; }
.services-grid .service-card:nth-child(4) { animation-delay: 0.09s; }
.services-grid .service-card:nth-child(5) { animation-delay: 0.12s; }
.services-grid .service-card:nth-child(6) { animation-delay: 0.15s; }
.services-grid .service-card:nth-child(7) { animation-delay: 0.18s; }
.services-grid .service-card:nth-child(8) { animation-delay: 0.21s; }
.services-grid .service-card:nth-child(9) { animation-delay: 0.24s; }
.services-grid .service-card:nth-child(10) { animation-delay: 0.27s; }
.services-grid .service-card:nth-child(11) { animation-delay: 0.3s; }
.services-grid .service-card:nth-child(12) { animation-delay: 0.33s; }
.services-grid .service-card:nth-child(13) { animation-delay: 0.36s; }
.services-grid .service-card:nth-child(14) { animation-delay: 0.39s; }
.services-grid .service-card:nth-child(15) { animation-delay: 0.42s; }

.service-card h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.service-card p {
    font-size: 0.78rem;
    color: var(--text-light);
    line-height: 1.5;
}

.service-card .service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.6rem;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.82rem;
}

/* ==========================================
   Cities Section
   ========================================== */
.cities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.city-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-color);
}

.city-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(26, 54, 93, 0.1);
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(26,54,93,0.03), rgba(201,162,39,0.04));
    color: var(--text-color);
}

.city-flag {
    font-size: 2.2rem;
    flex-shrink: 0;
}

.city-info h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.city-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==========================================
   Lawyers Section
   ========================================== */
.lawyers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.lawyer-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

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

.lawyer-avatar {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--white);
}

.lawyer-info {
    padding: 1.5rem;
}

.lawyer-info h3 {
    font-size: 1.15rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.lawyer-tag {
    display: inline-block;
    background: rgba(26, 54, 93, 0.08);
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.78rem;
    margin-right: 0.3rem;
    margin-bottom: 0.3rem;
}

.lawyer-location {
    color: var(--text-light);
    font-size: 0.88rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.lawyer-contact {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.lawyer-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ==========================================
   Testimonials
   ========================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem 2rem 2rem 2.3rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-color);
    position: relative;
    transition: all 0.3s ease;
}

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

.testimonial-card::before {
    content: '\201C';
    font-size: 5rem;
    color: var(--accent-color);
    opacity: 0.15;
    position: absolute;
    top: -0.2rem;
    left: 1.2rem;
    line-height: 1;
    font-family: Georgia, serif;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.testimonial-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
}

.testimonial-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.testimonial-role {
    font-size: 0.82rem;
    color: var(--text-light);
}

.stars {
    color: var(--accent-color);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

/* ==========================================
   CTA Section
   ========================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    text-align: center;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(201,162,39,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(201,162,39,0.06) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Ccircle cx='20' cy='20' r='1.5'/%3E%3C/g%3E%3C/svg%3E");
    animation: ctaPatternDrift 20s linear infinite;
}

@keyframes ctaPatternDrift {
    0% { background-position: 0% 0%, 100% 100%, 0 0; }
    100% { background-position: 100% 100%, 0% 0%, 40px 40px; }
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--white);
    position: relative;
    z-index: 1;
}

.cta-section p {
    font-size: 1.1rem;
    opacity: 0.85;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}

/* ==========================================
   Page Header (for subpages)
   ========================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

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

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

.breadcrumb span {
    color: rgba(255,255,255,0.5);
}

/* ==========================================
   Content Sections (subpages)
   ========================================== */
.content-section {
    padding: 4rem 0;
}

.content-section h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.content-section h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-section ul {
    margin-bottom: 1.5rem;
}

.content-section ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.7;
}

.content-section ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 700;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.content-sidebar {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    position: sticky;
    top: 100px;
}

.content-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.content-sidebar ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.content-sidebar ul li:last-child {
    border-bottom: none;
}

.content-sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.content-sidebar ul li a:hover {
    color: var(--primary-color);
}

/* ==========================================
   Lawyer Join Section
   ========================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.pricing-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
    transition: var(--transition);
    position: relative;
}

.pricing-card.featured {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.pricing-card.featured::before {
    content: '\63A8\8350';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: var(--white);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

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

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.pricing-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 1rem 0;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-light);
}

.pricing-features {
    text-align: left;
    margin: 1.5rem 0;
}

.pricing-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.92rem;
    color: var(--text-color);
}

.pricing-features li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: 700;
}

/* ==========================================
   Contact Form
   ========================================== */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.92rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    color: var(--text-color);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ==========================================
   Stats Section
   ========================================== */
.stats-section {
    background: rgba(26, 54, 93, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--white);
    padding: 3rem 0;
    position: relative;
    z-index: 2;
    margin-top: -2.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
}

.stat-item p {
    font-size: 0.95rem;
    opacity: 0.85;
}

/* ==========================================
   Blog Preview
   ========================================== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-color);
    display: block;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--text-color);
}

.blog-card-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card-body h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card-body p {
    font-size: 0.88rem;
    color: var(--text-light);
    line-height: 1.6;
}

.blog-card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.8rem;
}

/* ==========================================
   Footer
   ========================================== */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 0;
    border-top: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color)) 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--accent-color);
    padding-left: 4px;
}

.footer-keywords {
    font-size: 0;
    color: transparent;
    line-height: 0;
    overflow: hidden;
    height: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-partner {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-partner a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-partner a:hover {
    color: var(--white);
}

/* ==========================================
   Scroll-triggered Fade-in Animations
   ========================================== */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Button Micro-animations
   ========================================== */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* ==========================================
   Alternating Section Background Gradients
   ========================================== */
.bg-light {
    background: linear-gradient(180deg, #f7fafc 0%, #edf2f7 100%);
}

.bg-warm {
    background: linear-gradient(180deg, #fffbf0 0%, #fff8e6 100%);
}

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

    .cities-grid,
    .lawyers-grid,
    .testimonials-grid,
    .pricing-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .content-sidebar {
        position: static;
    }

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

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

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
    }

    nav ul.active {
        display: flex;
    }

    nav a {
        padding: 0.8rem 1rem;
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        padding: 3.5rem 0 5rem;
    }

    .hero-float {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }

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

    .hero .description {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    section {
        padding: 3rem 0;
    }

    .section-header h2 {
        font-size: 1.7rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .services-grid .service-card {
        padding: 1rem 0.8rem;
    }

    .cities-grid,
    .lawyers-grid,
    .testimonials-grid,
    .pricing-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

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

    .page-header h1 {
        font-size: 1.8rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-features {
        flex-direction: column;
        align-items: center;
    }

    .ai-examples {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .ad-banners-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}
