/* Custom styles for RC Coastal Well and Pump */

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

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

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

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

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

/* Selection color */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #faf5ff;
}

/* Service card hover effect */
.service-card {
    transform: translateY(0);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(251, 191, 36, 0.2);
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(27, 3, 54, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu transitions */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

#mobile-menu.hidden {
    animation: slideUp 0.2s ease forwards;
}

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

/* Back to top button */
#back-to-top.visible {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

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

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

/* Geometric shape animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    50% {
        transform: translateY(-20px) rotate(45deg);
    }
}

@keyframes float-alt {
    0%, 100% {
        transform: translateY(0) rotate(12deg);
    }
    50% {
        transform: translateY(-15px) rotate(12deg);
    }
}

/* Ensure all text is readable */
@media (max-width: 640px) {
    .font-display.text-4xl {
        font-size: 2.25rem;
        line-height: 1.1;
    }
}
