/* Custom styles for McGovern Mechanical Co. */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #020617;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Selection color */
::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #f1f5f9;
}

/* Hero parallax effect */
#hero {
    scroll-behavior: smooth;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(2, 6, 23, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Service card hover effects */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.1);
}

/* Testimonial card hover */
.testimonial-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(20, 184, 166, 0.08);
}

/* Gradient text animation */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Fade in animations for scroll reveal */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .fade-in-left,
    .fade-in-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile link hover effect */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #14b8a6, #2dd4bf);
    transition: width 0.3s ease;
}
.mobile-link:hover::after {
    width: 100%;
}

/* Back to top button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}
#back-to-top.show {
    opacity: 1;
    visibility: visible;
}
#back-to-top.hide {
    opacity: 0;
    visibility: hidden;
}

/* Select dropdown styling */
select option {
    background: #1e293b;
    color: #f1f5f9;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* Button press effect */
button, a {
    -webkit-tap-highlight-color: transparent;
}
