/* Custom styles for Tolley's Carpets & Window Coverings */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #ecfdf5;
}
::-webkit-scrollbar-thumb {
    background: #6ee7b7;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* Floating card animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-delayed 3.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

.floating-card-3 {
    animation: float 4.5s ease-in-out infinite;
    animation-delay: 1s;
}

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

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

/* Scroll reveal animations (below fold only) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Staggered reveal delays */
.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 glass effect */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(5, 150, 105, 0.08);
}

/* 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;
    }
    .reveal.hidden-reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu transitions */
#mobileMenu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

/* Custom select styling */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

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

/* Button press effect */
button:active, a:active {
    transform: scale(0.98) !important;
}

/* Print styles */
@media print {
    nav, #backToTop, .floating-card, .floating-card-2, .floating-card-3 {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
