/* Legal AI Experts - Custom Styles */

/* CSS Variables for consistent theming */
:root {
    --legal-blue: #1e3a8a;
    --legal-gold: #f59e0b;
    --legal-dark: #1f2937;
    --legal-light: #f8fafc;
    --transition-smooth: all 0.3s ease;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Global Styles */
* {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--legal-dark);
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Hero Section Enhancements */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--legal-blue) 0%, #3b82f6 50%, #1e40af 100%);
}

.hero-section::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 1000 1000"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

/* Service Cards */
.service-card {
    transition: var(--transition-smooth);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
}

/* Testimonial Cards */
.testimonial-card {
    transition: var(--transition-smooth);
    position: relative;
}

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

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--legal-blue);
    opacity: 0.3;
    font-family: serif;
}

/* Mobile Menu Animations */
.mobile-menu {
    transition: var(--transition-smooth);
    max-height: 0;
    overflow: hidden;
}

.mobile-menu.active {
    max-height: 300px;
}

/* Form Enhancements */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--legal-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Button Hover Effects */
.btn-primary {
    background: var(--legal-blue);
    color: white;
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background: var(--legal-gold);
    color: var(--legal-dark);
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.loading {
    position: relative;
}

.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(--legal-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--legal-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .hero-section {
        min-height: 90vh;
        padding-top: 2rem;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .testimonial-card::before {
        font-size: 3rem;
        top: -5px;
        left: 15px;
    }
}

@media (max-width: 640px) {
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    .hero-section,
    footer,
    #contact {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --legal-blue: #000080;
        --legal-gold: #ffa500;
        --legal-dark: #000000;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
}

/* Dark Mode Support (for future implementation) */
@media (prefers-color-scheme: dark) {
    :root {
        --legal-light: #1f2937;
        --legal-dark: #f9fafb;
    }
}

/* Focus Indicators for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--legal-gold);
    outline-offset: 2px;
}

/* Skip Link for Screen Readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--legal-blue);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Enhanced Visual Hierarchy */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--legal-blue), var(--legal-gold));
    border-radius: 2px;
}

/* Interactive Elements */
.interactive-card {
    position: relative;
    overflow: hidden;
}

.interactive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.interactive-card:hover::before {
    left: 100%;
}

/* Success/Error States */
.form-success {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.form-error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.success-message {
    color: #10b981;
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}

.error-message {
    color: #ef4444;
    background-color: #fef2f2;
    border: 1px solid #ef4444;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
}