/* CatastrophicInjury.org Main Styles */
/* Professional, clean design for law firm directory */

/* Custom CSS Variables */
:root {
    --primary-red: #dc2626;
    --primary-red-dark: #b91c1c;
    --primary-red-light: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

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

p {
    margin-bottom: 1rem;
    color: var(--gray-700);
}

/* Utility Classes */
.line-clamp-5 {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Navigation */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
}

nav a {
    transition: all 0.2s ease;
}

nav a:hover {
    color: var(--primary-red);
    transform: translateY(-1px);
}
/* ===== Hover-Reveal Buttons ===== */
.hover-button {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hover-container:hover .hover-button {
    opacity: 1;
    pointer-events: auto;
}

/* ===== CSV Upload Hover Area ===== */
.csv-upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.csv-upload-area:hover {
    border-color: #888;
    background-color: #f9f9f9;
}

.csv-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.csv-upload-area:hover .csv-controls {
    opacity: 1;
    pointer-events: auto;
}


/* Hero Section with Image */
#hero-section {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), 
                url("../assets/hero-law-background.png") no-repeat center center/cover;
}

#hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* dark overlay to keep white text readable */
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

#hero-section .relative {
    position: relative;
    z-index: 50;
    color: white;
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    width: 100%;
    padding: 0 2rem;
}

#hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

#hero-section p {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    line-height: 1.4;
    margin-bottom: 2rem;
}


/* Buttons */
.btn-primary {
    background-color: var(--primary-red);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

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

.btn-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: var(--gray-300);
    transform: translateY(-1px);
}

/* Cards */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--primary-red-light);
}

/* Form Elements */
input, select, textarea {
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
    background-color: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Search Section */
#search-section .bg-gray-100 {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
}

/* Statistics Section */
.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
}

.stat-label {
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

/* Practice Area Tags */
.practice-tag {
    display: inline-block;
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--primary-red);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0.125rem;
    transition: all 0.2s ease;
}

.practice-tag:hover {
    background-color: var(--primary-red);
    color: white;
    transform: scale(1.05);
}

/* Loading States */
.loading-spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary-red);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Footer */
footer {
    background: var(--gray-900);
    color: var(--gray-300);
    border-top: 1px solid var(--gray-800);
}

footer a {
    color: var(--gray-300);
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-red-light);
}

/* Admin Dashboard Styles */
.admin-card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.admin-card:hover {
    box-shadow: var(--shadow-lg);
}

.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.upload-zone:hover {
    border-color: var(--primary-red);
    background-color: rgba(220, 38, 38, 0.02);
}

.upload-zone.dragover {
    border-color: var(--primary-red);
    background-color: rgba(220, 38, 38, 0.05);
}

/* Modal Styles */
.modal {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    max-height: 90vh;
    overflow-y: auto;
}

/* Table Styles */
.admin-table {
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th {
    background-color: var(--gray-50);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    color: var(--gray-600);
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
}

.admin-table tr:hover {
    background-color: var(--gray-50);
}

/* Status Indicators */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-green { background-color: #10b981; }
.status-yellow { background-color: #f59e0b; }
.status-red { background-color: #ef4444; }

/* Responsive Design */
@media (max-width: 768px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    #hero-section h1 {
        font-size: 2.5rem;
    }
    
    #hero-section p {
        font-size: 1.25rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav, footer, .btn-primary, .btn-secondary {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Utility Classes for Spacing */
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }


/* Logo Container - INSIDE hero section */
#logo-container {
    position: absolute;
    top: -30px; /* Move UP significantly */
    left: 20px;
    z-index: 2;
    display: flex;
    align-items: center;
    text-decoration: none;
}

#logo-container img {
    height: 150px !important; /* Larger size */
    width: auto !important;
    display: block;
    object-fit: contain;
    transition: transform 0.2s ease;
    opacity: 1 !important;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.8)) 
            brightness(1.2) 
            contrast(1.3)
            saturate(1.4); /* More saturation for strength */
}

#logo-container:hover img {
    transform: scale(1.15);
    filter: drop-shadow(0 8px 16px rgba(0,0,0,1)) 
            brightness(1.3) 
            contrast(1.4)
            saturate(1.6);
}

/* Responsive logo size */
@media (max-width: 768px) {
    #logo-container {
        top: -15px; /* Less push up on mobile */
    }
    #logo-container img {
        height: 100px !important;
    }
}


/* Hero Background Animation */
.hero-bg {
    background: linear-gradient(-45deg, #1f2937, #374151, #1f2937, #4b5563);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

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

/* Contact Button Hover Effect */
.contact-lawyer-btn:hover {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.3);
}

/* Filter Section */
.filter-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
}

/* Results Counter */
.results-counter {
    background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
    border-left: 4px solid var(--primary-red);
}

/* Load More Button */
.load-more-btn {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px dashed #d1d5db;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    border-color: var(--primary-red);
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: var(--primary-red);
}

/* State and City Dropdown Styling */
select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Practice Area Dropdown Specific Styling */
#practice-filter {
    background-color: white;
    border-color: var(--gray-300);
}

#practice-filter:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Mobile Hero Adjustments */
@media (max-width: 768px) {
    #hero-section {
        min-height: 400px;
        padding: 3rem 0;
    }
    
    #hero-section h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    #hero-section p {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
}

/* Search Section Improvements */
#search-section {
    padding: 4rem 0;
}

#search-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#search-section p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Filter Grid Layout */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Results Section */
.results-section {
    margin-top: 2rem;
}

/* Card Grid Improvements */
#lawyer-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Card Styling Improvements */
.lawyer-card {
    background: white;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.lawyer-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--primary-red-light);
}

/* Practice Area Tags in Cards */
.practice-area-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.practice-area-tag {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary-red);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.practice-area-tag:hover {
    background: var(--primary-red);
    color: white;
    transform: scale(1.05);
}

/* Contact Button Styling */
.contact-button {
    background: var(--primary-red);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.contact-button:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* View Profile Button */
.view-profile-button {
    background: var(--gray-200);
    color: var(--gray-700);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.view-profile-button:hover {
    background: var(--gray-300);
    transform: translateY(-1px);
}

/* Statistics Section Improvements */
.stats-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-50) 100%);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-red);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray-600);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.875rem;
}

/* Footer Improvements */
footer {
    background: var(--gray-900);
    color: var(--gray-300);
    border-top: 1px solid var(--gray-800);
    padding: 3rem 0 2rem;
}

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

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--gray-400);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.footer-links {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-red-light);
}

/* Responsive Design Improvements */
@media (max-width: 1024px) {
    #lawyer-cards {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    #lawyer-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        border-width: 0.5px;
    }
    
    .practice-area-tag {
        border-radius: 9999px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #162035;
        --gray-100: #1f2937;
        --gray-200: #374151;
        --gray-300: #4b5563;
        --gray-400: #6b7280;
        --gray-500: #9ca3af;
        --gray-600: #d1d5db;
        --gray-700: #e5e7eb;
        --gray-800: #f3f4f6;
        --gray-900: #f9fafb;
    }
    
    body {
        background-color: var(--gray-50);
        color: var(--gray-800);
    }
    
    .card {
        background-color: var(--gray-100);
        border-color: var(--gray-300);
    }
    
    nav {
        background-color: rgba(17, 24, 39, 0.95);
    }
    /* Legal Chatbot Styles */
#legal-chatbot { font-family: 'Inter', sans-serif; }
#chat-window { 
    box-shadow: 0 10px 40px rgba(0,0,0,0.1); 
    border: 1px solid #e5e7eb;
}
.quick-question { 
    transition: all 0.2s ease; 
    cursor: pointer;
}


}





}


/* Contact Button Styling */
.contact-button {
    background: var(--primary-red);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
