/* Custom styles for Sunny Side Estates */

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

/* Floating animation for stat cards */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

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

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

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

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

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

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

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

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

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

/* Mobile menu link styles */
.mobile-link {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.mobile-link:hover {
    background: #ecfdf5;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Geometric shape animations */
@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive typography adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
    
    h2 {
        font-size: clamp(2rem, 6vw, 3rem);
    }
}

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

/* Print styles */
@media print {
    .animate-float,
    .animate-float-delayed {
        animation: none;
    }
    
    header {
        position: static;
    }
}
