/* Virtual Legal Assistant Services - Mobile-First Responsive Stylesheet */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e3a5f;
    --secondary-blue: #2c5282;
    --accent-purple: #667eea;
    --accent-violet: #764ba2;
    --text-primary: #333;
    --text-secondary: #666;
    --text-light: #a0aec0;
    --bg-light: #f8f9fa;
    --bg-lighter: #f0f4f8;
    --white: #ffffff;
    --success-green: #48bb78;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* Mobile-First Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography - Mobile First */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
}

h1 { 
    font-size: 1.75rem; 
    margin-bottom: 1rem;
}
h2 { 
    font-size: 1.5rem; 
    margin-bottom: 0.875rem;
}
h3 { 
    font-size: 1.25rem; 
    margin-bottom: 0.75rem;
}
h4 { 
    font-size: 1.1rem; 
    margin-bottom: 0.625rem;
}

p {
    margin-bottom: 1rem;
}

/* Mobile Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: var(--white);
    padding: 0.75rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

header.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-lg);
}

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

.logo {
    font-size: 1.25rem;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.logo::before {
    content: "⚖️";
    margin-right: 8px;
    font-size: 1.5rem;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    box-shadow: var(--shadow-md);
}

nav.active {
    display: block;
}

nav ul {
    list-style: none;
    padding: 1rem 0;
}

nav li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

nav a {
    color: var(--white);
    text-decoration: none;
    display: block;
    padding: 0.75rem 1rem;
    transition: background 0.3s;
    font-weight: 500;
}

nav a:hover, nav a.active {
    background: rgba(255,255,255,0.1);
}

/* Mobile Hero Section */
.hero, .contact-hero {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-violet) 100%);
    color: var(--white);
    padding: 80px 15px 40px;
    margin-top: 50px;
    text-align: center;
    min-height: auto;
}

.hero-content {
    max-width: 100%;
}

.hero h1 {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem 0.5rem;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Mobile Buttons */
.cta-button {
    display: inline-block;
    padding: 12px 25px;
    background: var(--white);
    color: var(--accent-purple);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.cta-button.secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    margin-left: 0;
}

.cta-button.secondary:hover {
    background: var(--white);
    color: var(--accent-purple);
}

/* Mobile Content Sections */
.main-content {
    padding: 40px 0;
    background: var(--bg-light);
}

.section {
    padding: 30px 0;
}

.intro-section {
    text-align: center;
    margin-bottom: 30px;
}

.intro-section h2 {
    color: var(--secondary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.intro-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Mobile Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--accent-purple);
}

.feature-card h3 {
    color: var(--secondary-blue);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Mobile Services */
.services-detailed {
    background: var(--white);
    padding: 30px 15px;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.service-category {
    margin-bottom: 30px;
}

.service-category h3 {
    color: var(--secondary-blue);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-purple);
    padding-bottom: 8px;
    font-size: 1.25rem;
}

.service-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 15px;
}

.service-item {
    padding: 10px;
    background: var(--bg-lighter);
    border-radius: 5px;
    border-left: 3px solid var(--accent-purple);
    font-size: 0.95rem;
}

/* Mobile Process Timeline */
.process-timeline {
    position: relative;
    max-width: 100%;
    margin: 30px 0;
    padding-left: 40px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-purple);
}

.process-step {
    margin-bottom: 40px;
    position: relative;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--accent-purple);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1rem;
    position: absolute;
    left: -41px;
    top: 0;
}

.step-content {
    background: var(--white);
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.step-content h4 {
    color: var(--secondary-blue);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

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

/* Mobile FAQ Section */
.faq-section {
    padding: 40px 0;
    background: linear-gradient(135deg, var(--bg-lighter) 0%, var(--white) 100%);
}

.faq-container {
    max-width: 100%;
}

.faq-intro {
    text-align: center;
    margin-bottom: 30px;
}

.faq-category {
    background: var(--white);
    border-radius: 10px;
    padding: 20px 15px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
}

.faq-category h3 {
    color: var(--accent-purple);
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 15px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    padding: 12px;
    background: var(--bg-lighter);
    border-radius: 8px;
}

.faq-question h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    flex: 1;
    padding-right: 10px;
}

.faq-toggle {
    font-size: 1.25rem;
    color: var(--accent-purple);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.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: 1000px;
    padding: 15px 12px 0;
}

.faq-answer p, .faq-answer ul, .faq-answer ol {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer ul, .faq-answer ol {
    margin-left: 20px;
    margin-top: 10px;
}

.faq-answer li {
    margin-bottom: 8px;
}

/* Mobile Contact Form Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 0;
}

.contact-form-section, .contact-info-section {
    background: var(--white);
    padding: 25px 15px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

/* Contact Form Styles */
.contact-form {
    margin: 20px 0;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #e53e3e;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.info-card {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-purple);
}

.benefit-list {
    list-style: none;
    padding: 0;
}

.benefit-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: start;
    font-size: 0.95rem;
}

.benefit-list li::before {
    content: "✓";
    color: #48bb78;
    font-weight: bold;
    font-size: 1.1rem;
    margin-right: 10px;
}

.urgency-banner {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-violet) 100%);
    color: var(--white);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
}

.trust-indicators {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 30px 0;
}

.trust-item {
    text-align: center;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.trust-item .icon {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.trust-item .label {
    font-weight: bold;
    color: var(--secondary-blue);
    font-size: 0.9rem;
}

/* Mobile Coverage */
.coverage {
    background: var(--white);
    padding: 30px 15px;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.coverage-content {
    columns: 1;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Mobile Testimonials */
.testimonials {
    padding: 40px 0;
    background: var(--bg-light);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.testimonial-text {
    margin-bottom: 20px;
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 0.9rem;
}

.author-info h5 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.author-info .title {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Mobile Footer */
footer {
    background: var(--primary-blue);
    color: var(--white);
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.footer-column h3 {
    margin-bottom: 15px;
    color: var(--white);
    font-size: 1.2rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

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

.contact-info p {
    color: var(--text-light);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
}

.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

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

.animated {
    animation: fadeInUp 0.6s ease;
}

/* Skip to Content Link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* Tablet Styles (min-width: 768px) */
@media (min-width: 768px) {
    .container {
        max-width: 750px;
        padding: 0 20px;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    nav {
        display: block !important;
        position: static;
        width: auto;
        background: none;
        box-shadow: none;
    }
    
    nav ul {
        display: flex;
        gap: 1.5rem;
        padding: 0;
    }
    
    nav li {
        border: none;
    }
    
    nav a {
        padding: 5px 10px;
        position: relative;
    }
    
    nav a::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background: var(--white);
        transition: width 0.3s;
    }
    
    nav a:hover::after {
        width: 100%;
    }
    
    nav a:hover {
        background: none;
    }
    
    .hero, .contact-hero {
        padding: 100px 20px 60px;
        margin-top: 60px;
    }
    
    .hero h1 {
        font-size: 2.25rem;
    }
    
    .hero .tagline {
        font-size: 1.15rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .cta-button {
        width: auto;
        display: inline-block;
        margin-right: 1rem;
        margin-bottom: 0;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .service-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-timeline {
        max-width: 600px;
        margin: 50px auto;
    }
    
    .coverage-content {
        columns: 2;
    }
    
    .trust-indicators {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .checkbox-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }
    
    .social-links {
        justify-content: flex-start;
    }
}

/* Desktop Styles (min-width: 992px) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }
    
    nav ul {
        gap: 2rem;
    }
    
    .hero, .contact-hero {
        padding: 120px 40px 80px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .tagline {
        font-size: 1.3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
    
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .contact-form-section, .contact-info-section {
        padding: 35px;
    }
    
    .service-list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .process-timeline {
        max-width: 800px;
    }
    
    .process-timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .process-step {
        display: flex;
        align-items: center;
        padding-left: 0;
    }
    
    .process-step:nth-child(even) {
        flex-direction: row-reverse;
    }
    
    .step-number {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .step-content {
        flex: 1;
        max-width: 45%;
    }
    
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .checkbox-group {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop Styles (min-width: 1200px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
    
    h1 { font-size: clamp(2rem, 5vw, 3rem); }
    h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
    h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
    h4 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
    
    .hero .tagline {
        font-size: 1.4rem;
    }
    
    .contact-form-section, .contact-info-section {
        padding: 40px;
    }
    
    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .coverage-content {
        columns: 3;
    }
}

/* Print Styles */
@media print {
    header, footer, .mobile-menu-toggle, .cta-button {
        display: none;
    }
    
    .hero {
        background: none;
        color: var(--text-primary);
    }
    
    .faq-answer {
        max-height: none !important;
        display: block !important;
    }
}

/* Accessibility Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* Visually Hidden Helper */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.error {
    border-color: #e53e3e !important;
    background-color: #fed7d7;
}

.error-message {
    color: #e53e3e;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

/* Success States */
.success {
    border-color: var(--success-green) !important;
    background-color: #c6f6d5;
}

.success-message {
    color: var(--success-green);
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}