/* Custom CSS for San Pietro Vernotico Portal */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Animazioni e transizioni personalizzate */
.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #D4AF37, #003366);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero section styles */
.hero-gradient {
    background: linear-gradient(135deg, 
        rgba(0, 51, 102, 0.9) 0%, 
        rgba(212, 175, 55, 0.8) 50%, 
        rgba(114, 47, 55, 0.7) 100%);
}

/* Card animations */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 51, 102, 0.15);
}

/* Weather widget styles */
#weather-widget {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
}

#weather-widget:hover {
    transform: scale(1.02);
}

/* Sezione Meteo e Mare */
.meteo-mare-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
}

.meteo-mare-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="waves" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M0,50 Q25,30 50,50 T100,50" stroke="%23D4AF37" stroke-width="0.5" fill="none" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23waves)"/></svg>');
    opacity: 0.1;
}

/* Weather card styles */
.weather-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
}

.mare-card {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    position: relative;
    overflow: hidden;
}

.mare-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Button styles */
.btn-primary {
    background: linear-gradient(135deg, #003366 0%, #004080 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 51, 102, 0.3);
}

/* Footer styles */
.footer-gradient {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-gradient {
        background: linear-gradient(135deg, 
            rgba(0, 51, 102, 0.95) 0%, 
            rgba(212, 175, 55, 0.85) 50%, 
            rgba(114, 47, 55, 0.75) 100%);
    }
}

/* Loading animations */
.loading-spinner {
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top: 3px solid #D4AF37;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #003366, #D4AF37);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #004080, #B8941F);
}

/* Focus styles for accessibility */
.nav-link:focus,
.mobile-nav-link:focus,
.btn-primary:focus {
    outline: 2px solid #D4AF37;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .fixed,
    #weather-widget {
        display: none !important;
    }
}
