/* Custom styles beyond Tailwind */

/* Smooth scroll offset for fixed nav */
html {
    scroll-padding-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fefdf8;
}
::-webkit-scrollbar-thumb {
    background: #065f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Selection color */
::selection {
    background: #065f46;
    color: #fefdf8;
}

/* Mobile menu transitions */
#mobile-menu {
    animation: menuSlideIn 0.3s ease-out forwards;
}
#mobile-menu.hidden {
    animation: menuSlideOut 0.2s ease-in forwards;
}
@keyframes menuSlideIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes menuSlideOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Mobile link transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#mobile-menu:not(.hidden) .mobile-link {
    opacity: 1;
    transform: translateY(0);
}
#mobile-menu:not(.hidden) .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu:not(.hidden) .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu:not(.hidden) .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu:not(.hidden) .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu:not(.hidden) .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}

/* Service card hover glow */
.group:hover .bg-emerald-800,
.group:hover .bg-emerald-600,
.group:hover .bg-emerald-700,
.group:hover .bg-emerald-500,
.group:hover .bg-emerald-900,
.group:hover .bg-emerald-400 {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
