/* Custom styles for Field Surveying Company */

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

/* Custom selection color */
::selection {
    background-color: rgba(150, 28, 65, 0.15);
    color: #7c1a39;
}

/* Service card hover effects */
.service-card {
    transition: background-color 0.4s ease;
}

.service-card:hover {
    background-color: #fef6f7;
}

.service-card:hover svg {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

.service-card svg {
    transition: transform 0.4s ease;
}

/* Navbar scroll effect */
nav.scrolled {
    background-color: rgba(250, 248, 246, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(150, 28, 65, 0.08);
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-link:nth-child(3) { transition-delay: 0.15s; }

/* Menu line animations */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 6;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Subtle image hover */
section img {
    transition: transform 0.6s ease, opacity 0.6s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card,
    .service-card svg,
    section img,
    a,
    button {
        transition: none;
    }
}

/* Fade-in animation for scroll sections */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* At rest, ensure content is visible for accessibility */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        /* JS will add .visible class */
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #f3a5b8;
    border-radius: 3px;
}

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