/* Custom styles for John F. Hodges Law Firm */

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

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

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #3d3d5c;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #FF6B6B;
}

/* Selection color */
::selection {
    background: rgba(255, 107, 107, 0.3);
    color: #fff;
}

/* Geometric decorative shapes */
.geometric-shape {
    position: absolute;
    pointer-events: none;
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #FF6B6B 0%, #FFA8A8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation classes */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

.rotate-slow {
    animation: rotate-slow 20s linear infinite;
}

/* Intersection Observer animations */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays */
.reveal-on-scroll.delay-1 { transition-delay: 0.1s; }
.reveal-on-scroll.delay-2 { transition-delay: 0.2s; }
.reveal-on-scroll.delay-3 { transition-delay: 0.3s; }
.reveal-on-scroll.delay-4 { transition-delay: 0.4s; }
.reveal-on-scroll.delay-5 { transition-delay: 0.5s; }
.reveal-on-scroll.delay-6 { transition-delay: 0.6s; }

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #FF6B6B;
    outline-offset: 2px;
}

/* Navbar scroll state */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
}

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

/* Hamburger animation */
#mobile-menu-btn.active #menu-line-1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active #menu-line-2 {
    opacity: 0;
}

#mobile-menu-btn.active #menu-line-3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Hero section parallax-like effect */
.hero-bg-element {
    will-change: transform;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 200px;
    height: 200px;
}

/* Service card hover glow */
.service-card:hover {
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.1);
}

/* Testimonial section pattern */
.quote-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
                      radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

/* Back to top button animation */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:not(.visible) {
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    transform: translateY(10px);
}

#back-to-top.visible {
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-bg-element {
        display: none;
    }
}

/* Print styles */
@media print {
    nav, #back-to-top, button {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .bg-charcoal-900, .bg-charcoal-800 {
        background: white !important;
    }
    
    .text-white, .text-gray-300, .text-gray-400 {
        color: black !important;
    }
}
