/* Custom styles and animations */

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

/* Custom selection color */
::selection {
    background: #2de2b6;
    color: #0a2540;
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(10, 37, 64, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

nav.scrolled .menu-line {
    background: white;
}

/* Mobile menu animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

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

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

/* Mobile menu button active state */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(0.2rem, 0.2rem);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(0.1rem, -0.1rem);
    width: 1.25rem;
}

/* Service card hover */
.service-card {
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Area card hover */
.area-card {
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.area-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(10, 37, 64, 0.2);
}

/* Testimonial card hover */
.testimonial-card {
    transform: translateY(0);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

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

/* Fade-in animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger children */
.fade-in-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }
.fade-in-stagger.visible > *:nth-child(7) { transition-delay: 0.35s; }
.fade-in-stagger.visible > *:nth-child(8) { transition-delay: 0.4s; }

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

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

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

/* Pulse dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

/* Form focus styles */
input:focus,
select:focus,
textarea:focus {
    border-color: #2de2b6 !important;
    box-shadow: 0 0 0 3px rgba(45, 226, 182, 0.15) !important;
}

/* Subtle pattern overlay for sections */
.bg-pattern {
    background-image: radial-gradient(circle, rgba(45, 226, 182, 0.05) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #hero h1 {
        font-size: 2.75rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .area-card .h-64 {
        height: 200px;
    }
}

@media (max-width: 480px) {
    #hero h1 {
        font-size: 2.25rem;
    }

    nav .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
