/* Phoenix Physical Therapy - Custom Styles */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

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

/* Selection Color */
::selection {
    background: #f4a6b8;
    color: #3d071c;
}

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

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

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

/* Reveal Animations - Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 1;
        animation: fadeInUp 0.8s ease-out forwards;
    }
    
    .reveal-left {
        opacity: 1;
        animation: fadeInLeft 0.8s ease-out forwards;
    }
    
    .reveal-right {
        opacity: 1;
        animation: fadeInRight 0.8s ease-out forwards;
    }
    
    .reveal-up:nth-child(1) { animation-delay: 0.1s; }
    .reveal-up:nth-child(2) { animation-delay: 0.2s; }
    .reveal-up:nth-child(3) { animation-delay: 0.3s; }
    
    .reveal-left:nth-child(1) { animation-delay: 0.1s; }
    .reveal-right:nth-child(1) { animation-delay: 0.1s; }
}

/* Hide animations for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        animation: none;
    }
}

/* Mobile Menu */
#mobile-menu {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mobile-link {
    transition: all 0.3s ease;
}

.mobile-link:hover {
    color: #f4a6b8;
}

/* Navigation Active State */
.nav-link.active {
    color: #a11542;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    border-color: #a11542 !important;
    box-shadow: 0 0 0 3px rgba(161, 21, 66, 0.1);
}

/* Button Hover Effects */
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(61, 7, 28, 0.2);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Image Hover Effects */
.group:hover .group-hover\:rotate-12 {
    transform: rotate(12deg);
}

/* Link Underline Animation */
a {
    position: relative;
    text-decoration: none;
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: #f4a6b8;
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* Remove underline from buttons */
button::after,
a[href^="#"]::after {
    display: none;
}

/* Smooth Transitions */
.transition-all {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Print Styles */
@media print {
    nav,
    footer,
    #contact-form {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .bg-burgundy-950 {
        background: #3d071c !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    .bg-burgundy-950 {
        background: ButtonFace;
    }
    
    .text-burgundy-800 {
        color: ButtonText;
    }
}

/* 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;
    }
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid #a11542;
    outline-offset: 2px;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .group:hover .group-hover\:bg-burgundy-950 {
        background-color: inherit;
    }
    
    .group:hover .group-hover\:text-white {
        color: inherit;
    }
}
