/* Hero Section Title Styling - Ensure all hero titles are white and bold */
.hero-content h1,
section[id="home"] h1,
section:first-of-type h1 {
    color: white !important;
    font-weight: bold !important;
}

.hero-content h1 span,
section[id="home"] h1 span,
section:first-of-type h1 span {
    color: white !important;
}

/* Custom Styles for Benjamin Taylor Law Firm */

/* Enhanced Color Scheme - Blue and Red Focus */
:root {
    --law-blue-primary: #1e3a8a;
    --law-blue-light: #3b82f6;
    --law-blue-dark: #1e40af;
    --law-red-primary: #dc2626;
    --law-red-light: #ef4444;
    --law-red-dark: #b91c1c;
    --law-gray: #374151;
    --law-light-gray: #f3f4f6;
    --law-dark: #111827;
    --ssl-green: #10b981;
    --ssl-green-dark: #059669;
    --cookie-blue: #2563eb;
    --cookie-red: #dc2626;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Body styles */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--law-gray);
}

/* Container styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* SSL Security Badge */
#ssl-badge {
    background: linear-gradient(135deg, var(--ssl-green), var(--ssl-green-dark));
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#ssl-badge:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

#ssl-badge .animate-pulse {
    animation: ssl-pulse 2s ease-in-out infinite;
}

@keyframes ssl-pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Enhanced Cookie Banner */
#cookie-banner {
    background: linear-gradient(135deg, var(--cookie-blue), #1d4ed8);
    border-top: 4px solid var(--cookie-red);
    box-shadow: 0 -4px 20px rgba(37, 99, 235, 0.3);
    backdrop-filter: blur(10px);
}

#cookie-banner .fas.fa-cookie-bite {
    animation: cookie-bounce 2s ease-in-out infinite;
}

@keyframes cookie-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

#cookie-banner button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

#cookie-banner button::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 ease;
}

#cookie-banner button:hover::before {
    left: 100%;
}

#cookie-banner button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Custom Color Classes */
.bg-law-blue {
    background-color: var(--law-blue-primary);
}

.text-law-blue {
    color: var(--law-blue-primary);
}

.border-law-blue {
    border-color: var(--law-blue-primary);
}

.bg-law-red {
    background-color: var(--law-red-primary);
}

.text-law-red {
    color: var(--law-red-primary);
}

.border-law-red {
    border-color: var(--law-red-primary);
}

/* Practice Cards */
.practice-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.practice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::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 ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Navigation */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--law-red-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--law-red-primary);
}

/* Form Inputs */
.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: var(--law-red-primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Testimonial Cards */
.testimonial-card {
    background: linear-gradient(135deg, var(--law-blue-primary), var(--law-dark));
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Stats */
.stat-number {
    font-weight: bold;
    transition: all 0.3s ease;
}

.stat-number::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--law-red-primary);
    transition: width 0.3s ease;
}

.stat-number:hover::after {
    width: 100%;
}

.stat-number:hover {
    transform: scale(1.1);
}

/* Attorney Portrait */
.attorney-portrait {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.attorney-portrait::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 ease;
}

.attorney-portrait:hover::before {
    left: 100%;
}

.attorney-portrait:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Scroll to Top Button */
#scroll-to-top {
    transition: all 0.3s ease;
}

#scroll-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

#scroll-to-top.show {
    transform: translateY(0);
    opacity: 1;
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInFromLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInFromRight 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.6s ease-out;
}

/* Loading Spinner */
.loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--law-red-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--law-blue-primary), var(--law-red-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--law-red-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .practice-card:hover {
        transform: translateY(-2px);
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-content .flex {
        flex-direction: column;
        align-items: center;
    }
}

/* Button Styles */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::after,
.btn-secondary::after {
    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 ease;
}

.btn-primary:hover::after,
.btn-secondary:hover::after {
    left: 100%;
}

/* Section Transitions */
section {
    transition: all 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
}

/* Practice Card Images */
.practice-card img {
    transition: transform 0.3s ease;
}

.practice-card:hover img {
    transform: scale(1.1);
}

/* Scroll Indicator */
.scroll-indicator {
    transition: all 0.3s ease;
}

.scroll-indicator:hover {
    transform: translateY(-5px);
    color: var(--law-red-primary);
}

/* Form Error Styling */
.form-input.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.field-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Mobile Optimizations */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Print Styles */
@media print {
    .btn-primary,
    .btn-secondary,
    #scroll-to-top,
    #ssl-badge,
    #cookie-banner {
        display: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .practice-card {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
}

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

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .testimonial-card {
        background: linear-gradient(135deg, #1f2937, #111827);
    }
}

/* Additional fixes for display issues */
* {
    box-sizing: border-box;
}

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

/* Ensure proper z-index stacking */
nav {
    z-index: 1000;
}

#scroll-to-top {
    z-index: 999;
}

#ssl-badge {
    z-index: 998;
}

#cookie-banner {
    z-index: 1001;
}

/* Fix for mobile menu */
#mobile-menu {
    z-index: 999;
}

/* Ensure proper text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Fix for hero section */
#home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure proper button styling */
.btn-primary,
.btn-secondary {
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    border: none;
    outline: none;
}

/* Fix for practice cards */
.practice-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Ensure proper form styling */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

/* Fix for testimonials */
.testimonial-card {
    color: white;
}

/* Ensure proper navigation */
.nav-link {
    text-decoration: none;
    display: inline-block;
}

/* Fix for mobile responsiveness */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
}

