/* Custom styles for Hand Land Surveying Co. */

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

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

::-webkit-scrollbar-track {
    background: #102a43;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #61bdb6;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

@keyframes scroll-line {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
}

.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

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

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Navbar scroll effect */
nav.scrolled {
    background: rgba(10, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

nav.scrolled .nav-link {
    color: rgba(186, 227, 225, 0.9);
}

nav.scrolled .nav-link:hover {
    color: #61bdb6;
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.open .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.3s; }

/* Mobile menu button animation */
.menu-btn-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.menu-btn-active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Service cards hover */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(63, 175, 166, 0.03), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

/* Process steps */
.process-step {
    position: relative;
}

.process-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    right: -1.5rem;
    width: 3rem;
    height: 2px;
    background: linear-gradient(to right, #9dd8d0, transparent);
}

@media (max-width: 767px) {
    .process-step:not(:last-child)::after {
        display: none;
    }
}

/* Hero text gradient */
h1 span.text-mint-400 {
    background: linear-gradient(135deg, #61bdb6, #9dd8d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Testimonial cards */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #3fafa6, #61bdb6);
    transition: width 0.4s ease;
}

.testimonial-card:hover::after {
    width: 100%;
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #3fafa6;
    box-shadow: 0 0 0 3px rgba(63, 175, 166, 0.1);
}

/* Button hover glow */
button[type="submit"]:hover {
    box-shadow: 0 8px 30px rgba(16, 42, 67, 0.3);
    transform: translateY(-1px);
}

/* Image hover zoom */
.service-card img,
#about img {
    transition: transform 0.6s ease;
}

.service-card:hover img,
#about:hover img {
    transform: scale(1.05);
}

/* Selection color */
::selection {
    background: rgba(63, 175, 166, 0.3);
    color: #102a43;
}

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