/* ===== Custom Styles for Ecovillaggio Partenio ===== */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Header shadow on scroll */
.header-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}



/* Area cards hover effect */
.area-card:hover i {
    transform: scale(1.1);
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
    border-color: #468a43 !important;
    box-shadow: 0 0 0 3px rgba(70, 138, 67, 0.15) !important;
}

/* Input error state */
.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: #89bf86;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #468a43;
}

/* Loading skeleton animation */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* Accessibility: visible focus for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #468a43;
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

/* Print styles */
@media print {
    header, footer, #mobile-menu-btn, .fixed {
        position: static !important;
    }
    body {
        color: #000;
    }
    a {
        text-decoration: underline;
    }
}

/* Lazy load images fade in */
img {
    transition: opacity 0.3s ease;
}

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

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

/* Responsive typography adjustments */
@media (max-width: 640px) {
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.75rem !important; }
    .text-lg { font-size: 1rem !important; }
}

