/* ================================================
   BEFORE ATTORNEY - Main Stylesheet
   ================================================ */

/* CSS Variables */
:root {
    --primary-color: #1a365d;
    --primary-dark: #142847;
    --primary-light: #2d4a7c;
    --secondary-color: #3182ce;
    --accent-color: #48bb78;
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50px;
    --transition: all 0.3s ease;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    cursor: pointer;
    font-family: inherit;
}

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

/* ================================================
   BUTTONS
   ================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

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

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

.btn-secondary {
    background: var(--bg-light);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

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

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

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

.btn-outline-white {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

/* ================================================
   NAVIGATION
   ================================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 1.6rem;
}

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

.nav-links a {
    font-weight: 500;
    color: var(--text-medium);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-phone {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--accent-color);
    color: white !important;
    border-radius: var(--radius-full);
    font-weight: 600;
}

.nav-phone:hover {
    background: #38a169;
    color: white;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-dark);
    transition: var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 20px;
    box-shadow: var(--shadow-md);
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.mobile-menu a {
    padding: 12px;
    font-weight: 500;
    color: var(--text-medium);
    border-radius: var(--radius-sm);
}

.mobile-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.mobile-phone {
    background: var(--accent-color);
    color: white !important;
    text-align: center;
    border-radius: var(--radius-full);
}

/* ================================================
   HERO SECTION
   ================================================ */

.hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-medium);
    margin-bottom: 30px;
}

.trust-badges {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    font-size: 0.9rem;
    font-weight: 500;
}

.badge-icon {
    color: var(--accent-color);
    font-weight: bold;
}

.cta-options {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.cta-chat, .cta-phone {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cta-subtext {
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: center;
}

.cta-divider {
    color: var(--text-light);
    font-size: 0.9rem;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-xl);
    max-width: 400px;
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.hero-card-content p {
    font-style: italic;
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.7;
}

.hero-card-author {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-weight: 600;
    color: var(--text-dark);
}

.author-location {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ================================================
   STATS SECTION
   ================================================ */

.stats {
    padding: 60px 0;
    background: var(--primary-color);
}

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

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
}

/* ================================================
   HOW IT WORKS SECTION
   ================================================ */

.how-it-works {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

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

.section-header p {
    font-size: 1.2rem;
    color: var(--text-medium);
}

.steps-grid {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 30px;
}

.step {
    flex: 1;
    max-width: 300px;
    text-align: center;
    padding: 30px;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.step-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.step h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.step p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--border-color);
    padding-top: 60px;
}

/* ================================================
   PRACTICE AREAS SECTION
   ================================================ */

.practice-areas {
    padding: 100px 0;
    background: var(--bg-light);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.area-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.area-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.area-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.area-card p {
    font-size: 0.9rem;
    color: var(--text-medium);
    line-height: 1.6;
}

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

.areas-cta p {
    font-size: 1.1rem;
    color: var(--text-medium);
    margin-bottom: 20px;
}

/* ================================================
   WHY US SECTION
   ================================================ */

.why-us {
    padding: 100px 0;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.why-card {
    text-align: center;
    padding: 30px 20px;
}

.why-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.why-card h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.why-card p {
    color: var(--text-medium);
    font-size: 0.95rem;
}

/* ================================================
   TESTIMONIALS SECTION
   ================================================ */

.testimonials {
    padding: 100px 0;
    background: var(--bg-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: white;
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stars {
    color: #f6ad55;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.testimonial-card p {
    color: var(--text-medium);
    font-style: italic;
    margin-bottom: 25px;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.testimonial-author .author-name {
    font-weight: 600;
    color: var(--text-dark);
}

.testimonial-author .author-location {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ================================================
   FAQ SECTION
   ================================================ */

.faq {
    padding: 100px 0;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    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 p {
    padding-bottom: 25px;
    color: var(--text-medium);
    line-height: 1.7;
}

/* ================================================
   FINAL CTA SECTION
   ================================================ */

.final-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    text-align: center;
}

.final-cta h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
}

.final-cta p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.final-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* ================================================
   FOOTER
   ================================================ */

.footer {
    padding: 80px 0 30px;
    background: #0d1b2a;
    color: rgba(255,255,255,0.8);
}

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

.footer-brand .logo {
    color: white;
    margin-bottom: 15px;
}

.footer-brand p {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links h4,
.footer-contact h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
}

.footer-links a,
.footer-contact a {
    display: block;
    padding: 8px 0;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: white;
}

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

.footer-bottom p {
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.footer-disclaimer {
    font-size: 0.8rem !important;
    color: rgba(255,255,255,0.5) !important;
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ================================================
   CHAT WIDGET
   ================================================ */

.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    max-height: calc(100vh - 150px);
}

.chat-widget.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.chat-header-info h3 {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.chat-header-info p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.chat-status .status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-color);
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition);
}

.chat-close:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-height: 300px;
    max-height: 400px;
    background: var(--bg-light);
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.message.assistant .message-content {
    background: white;
    color: var(--text-dark);
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.message.user .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-typing {
    display: none;
    padding: 0 20px 15px;
    background: var(--bg-light);
}

.chat-typing.active {
    display: flex;
    gap: 4px;
    align-items: center;
}

.chat-typing span {
    width: 8px;
    height: 8px;
    background: var(--text-light);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.chat-typing span:nth-child(1) { animation-delay: -0.32s; }
.chat-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.chat-input-form {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid var(--border-color);
    gap: 10px;
}

.chat-input-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.chat-input-form input:focus {
    border-color: var(--primary-color);
}

.chat-input-form button {
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.chat-input-form button:hover {
    background: var(--primary-dark);
}

.chat-input-form button:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.chat-disclaimer {
    padding: 10px 15px;
    background: var(--bg-light);
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.chat-disclaimer a {
    color: var(--primary-color);
}

/* Chat Toggle Button */
.chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition);
    z-index: 9998;
}

.chat-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.chat-toggle.hidden {
    display: none;
}

.chat-toggle-icon {
    font-size: 1.3rem;
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero-image {
        order: -1;
    }

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

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

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

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

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

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

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

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

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .cta-options {
        flex-direction: column;
        align-items: stretch;
    }

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

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

    .stat-number {
        font-size: 2rem;
    }

    .steps-grid {
        flex-direction: column;
    }

    .step-arrow {
        display: none;
    }

    .step {
        max-width: 100%;
    }

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

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

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

    .final-cta h2 {
        font-size: 1.8rem;
    }

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

    .chat-widget {
        right: 10px;
        bottom: 80px;
        width: calc(100vw - 20px);
    }

    .chat-toggle {
        right: 10px;
        bottom: 10px;
    }

    .chat-toggle-text {
        display: none;
    }
}

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

    .trust-badges {
        justify-content: center;
    }

    .badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }

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

    .chat-messages {
        min-height: 250px;
    }
}

/* ================================================
   UTILITY CLASSES
   ================================================ */

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

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
