/* Stimmate di San Francesco - Scuola dell'Infanzia Styles */

* {
    font-family: 'Fredoka', sans-serif;
}

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

.bounce-float:nth-child(2) {
    animation-delay: -1s;
}

.bounce-float:nth-child(3) {
    animation-delay: -2s;
}

.bounce-float:nth-child(4) {
    animation-delay: -3s;
}

@keyframes bounceFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg) scale(1); }
    25% { transform: translateY(-30px) rotate(5deg) scale(1.1); }
    50% { transform: translateY(-15px) rotate(-3deg) scale(1.05); }
    75% { transform: translateY(-25px) rotate(2deg) scale(1.08); }
}

.wiggle-hover {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wiggle-hover:hover {
    transform: translateY(-12px) scale(1.08) rotate(2deg);
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: translateY(-12px) scale(1.08) rotate(2deg); }
    25% { transform: translateY(-12px) scale(1.08) rotate(-2deg); }
    75% { transform: translateY(-12px) scale(1.08) rotate(1deg); }
}

.rainbow-bg {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #feca57, #ff9ff3, #54a0ff);
    background-size: 400% 400%;
    animation: rainbowShift 8s ease infinite;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-red {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #96ceb4 0%, #85c1a3 100%);
}

.gradient-yellow {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.gradient-purple {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gradient-orange {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.gradient-pink {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
}

.gradient-cyan {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.gradient-teal {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.card-bounce {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-bounce:hover {
    transform: translateY(-20px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
}

.nav-icon {
    transition: all 0.3s ease;
}

.nav-icon:hover {
    transform: scale(1.2) rotate(10deg);
}

.text-shadow-fun {
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1);
}

.big-shadow {
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
    from { box-shadow: 0 0 20px rgba(255, 107, 107, 0.4); }
    to { box-shadow: 0 0 40px rgba(255, 107, 107, 0.8); }
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 12px;
    z-index: 1000;
    padding: 8px 0;
    border: 2px solid #f0f0f0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: #374151;
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 2px 8px;
}

.dropdown-content a:hover {
    background-color: #f3f4f6;
    transform: translateX(8px);
    color: #ff6b6b;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
}

.mobile-menu.active {
    display: block;
}

/* Navigation height compensation */
body {
    padding-top: 0;
}

/* Ensure proper spacing for fixed nav */
.section {
    scroll-margin-top: 120px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .desktop-menu {
        display: none;
    }
    
    /* Mobile specific adjustments */
    .section {
        padding-top: 140px !important;
        scroll-margin-top: 140px;
    }
    
    /* Reduce font sizes on mobile */
    h1 {
        font-size: 2.5rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    /* Better mobile navigation */
    nav {
        padding: 8px 0;
    }
    
    .mobile-menu {
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .section {
        padding-top: 160px !important;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Even smaller screens */
    h1 {
        font-size: 2rem !important;
    }
    
    .card-bounce {
        margin-bottom: 16px;
    }
}

/* Section visibility */
.section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.section.active {
    display: block;
    opacity: 1;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Span con a capo automatico */
.span-break {
    display: inline-block;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
}

/* Immagini responsive nel footer */
.footer-logo {
    max-width: 100%;
    height: auto;
}

@media (max-width: 768px) {
    .footer-logo {
        max-width: 50%;
        margin: 0 auto;
    }
}