/* Custom styles for Dania Home & Office Interiors */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAFAF6;
}
::-webkit-scrollbar-thumb {
    background: #9ebf96;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #74a06e;
}

/* Service card hover animations */
.service-card {
    will-change: transform, box-shadow;
}

/* Portfolio item transitions */
.portfolio-item {
    will-change: transform, box-shadow;
}

/* Testimonial card transitions */
.testimonial-card {
    will-change: transform, box-shadow;
}

/* Floating stat card animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(2deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes float-reverse {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50% { transform: translateY(-6px) rotate(-1deg); }
}

@keyframes float-alt {
    0%, 100% { transform: translateY(0px) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50% { transform: translateY(-5px) rotate(-1deg); }
}

.floating-card-1 { animation: float 4s ease-in-out infinite; }
.floating-card-2 { animation: float-reverse 5s ease-in-out infinite; }
.floating-card-3 { animation: float-alt 4.5s ease-in-out infinite; }
.floating-card-4 { animation: float-slow 6s ease-in-out infinite; }

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 250, 246, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    .reveal.revealed {
        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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #74a06e;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduce motion for accessibility */
@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;
    }
    .floating-card-1, .floating-card-2, .floating-card-3, .floating-card-4 {
        animation: none;
    }
}

/* Mobile menu active state */
.mobile-link {
    position: relative;
}
.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #335232;
    transition: width 0.2s ease;
}
.mobile-link:hover::after {
    width: 100%;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(84, 131, 80, 0.15);
}

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