/* Custom styles for R & A Tree Service */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #14b8a6;
    color: white;
}

/* Navbar styles */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
}

#navbar.scrolled .text-slate-900 {
    color: #0f172a !important;
}

#navbar.scrolled a:not(.bg-teal-600) {
    color: #475569 !important;
}

#navbar.scrolled a:not(.bg-teal-600):hover {
    color: #0d9488 !important;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeDown 0.3s ease forwards;
}

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

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

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

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

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

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

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

/* Service cards */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* Hero decorations */
.hero-decor {
    animation: float 8s ease-in-out infinite;
}

.hero-decor:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 10s;
}

.hero-decor:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 12s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(20px, -20px) scale(1.05);
    }
    66% {
        transform: translate(-10px, 15px) scale(0.95);
    }
}

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

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

/* Print styles */
@media print {
    nav, .reveal, #mobile-menu, .hero-decor {
        display: none !important;
    }
    
    body {
        color: #000;
        background: white;
    }
}
