/* Custom styles for Shirley Middleton Tax Service */

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

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

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

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

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

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

.animate-slide-up-delay {
    animation: slideUpDelay 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUpDelay2 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(161, 29, 67, 0.1);
}

.nav-scrolled .nav-text {
    color: #a11d43 !important;
}

.nav-scrolled .nav-subtext {
    color: #dc446e !important;
}

.nav-scrolled .nav-link {
    color: #a11d43 !important;
}

/* Mobile menu transition */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding: 1rem 0;
}

/* Mobile link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #a11d43;
    transition: width 0.3s ease;
}

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

/* Service card hover glow */
.group:hover .w-14 {
    transform: scale(1.05);
}

/* Button ripple effect */
button, a {
    position: relative;
    overflow: hidden;
}

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

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

::-webkit-scrollbar-thumb {
    background: #f5a5b8;
    border-radius: 5px;
}

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

/* Selection color */
::selection {
    background: #fce7eb;
    color: #6c1a3a;
}

/* Focus visible styles */
:focus-visible {
    outline: 3px solid #f5a5b8;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #fff5f7 inset !important;
    -webkit-text-fill-color: #1f2937 !important;
}

/* Print styles */
@media print {
    nav, #contact-form, button {
        display: none;
    }
    
    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;
    }
}
