/* Custom Styles for John L Taylor Law Office */

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

/* Navigation Transitions */
#navbar {
    transition: all 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(123, 63, 123, 0.1);
}

#navbar.scrolled .nav-text {
    color: #7B3F7B;
}

#navbar.scrolled .nav-subtext {
    color: #a34fa3;
}

#navbar.scrolled .nav-link {
    color: #7B3F7B;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Staggered Animation Delays */
.scroll-animate:nth-child(1) { transition-delay: 0.1s; }
.scroll-animate:nth-child(2) { transition-delay: 0.2s; }
.scroll-animate:nth-child(3) { transition-delay: 0.3s; }
.scroll-animate:nth-child(4) { transition-delay: 0.4s; }
.scroll-animate:nth-child(5) { transition-delay: 0.5s; }
.scroll-animate:nth-child(6) { transition-delay: 0.6s; }

/* Mobile Menu */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.2);
}

/* Button Hover Effects */
button[type="submit"],
a[href="#contact"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before,
a[href="#contact"]::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;
}

button[type="submit"]:hover::before,
a[href="#contact"]:hover::before {
    left: 100%;
}

/* Hero Image Parallax */
#hero {
    perspective: 1000px;
}

#hero img {
    will-change: transform;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #7B3F7B, #D4A843);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #5c2d5c, #c7912e);
}

/* Selection Color */
::selection {
    background: #D4A843;
    color: #3d1d3d;
}

/* Mobile Menu Active State */
.mobile-menu-link {
    position: relative;
}

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #D4A843;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mobile-menu-link:hover::after {
    width: 80%;
}

/* Service Card Image Hover */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

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

/* Pulse Animation for Badge */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 168, 67, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(212, 168, 67, 0);
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
}

/* Print Styles */
@media print {
    nav,
    #contact,
    button,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
