/* Custom styles for Precision Fence LLC */

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

/* Navbar scroll state */
.nav-fixed {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.nav-fixed.scrolled {
    background: rgba(254, 253, 248, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.1);
}

/* Nav link underline animation */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #059669;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 60%;
}

.nav-link {
    position: relative;
}

/* Hero floating cards */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: -3s;
}

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

/* Floating particles */
.float-slow {
    animation: floatParticle 8s ease-in-out infinite;
}

.float-medium {
    animation: floatParticle 5s ease-in-out infinite;
}

.float-fast {
    animation: floatParticle 3s ease-in-out infinite;
}

@keyframes floatParticle {
    0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; }
    50% { transform: translateY(-20px) scale(1.2); opacity: 0.8; }
}

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

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

/* Gallery items */
.gallery-item {
    overflow: hidden;
}

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.4s ease, background 0.4s ease, border-color 0.4s ease;
}

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

/* Back to top button */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.back-to-top:not(.visible) {
    transform: translateY(20px);
}

/* Mobile menu */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

.mobile-nav-link {
    transition: all 0.2s ease;
}

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

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

/* Staggered fade-in */
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }
.fade-in-delay-5 { transition-delay: 0.5s; }

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* Selection color */
::selection {
    background: #d1fadf;
    color: #064e3b;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Print styles */
@media print {
    .nav-fixed, .back-to-top, .floating-card {
        display: none !important;
    }
}
