/* Reset e stili base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', cursive;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Hero */
.hero {
    min-height: 200px;
    max-height: 200px;
    background: linear-gradient(135deg, #ff6b6b 0%, #4ecdc4 25%, #45b7d1 50%, #96ceb4 75%, #ffecd2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    position: relative;
}

  .hero-logo {
    margin: 50px auto 0;
  }

.school-logo {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    animation: bounce 2s infinite;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.rainbow-text {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffd93d, #ff8cc8);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbow 3s ease-in-out infinite;
}

.school-name {
    color: white;
    font-size: 2.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: white;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

/* Elementi fluttuanti */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-star, .floating-heart, .floating-book, .floating-palette {
    position: absolute;
    font-size: 2rem;
    opacity: 0.7;
    animation: float 6s ease-in-out infinite;
}

.floating-star {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-heart {
    top: 30%;
    right: 15%;
    animation-delay: 1.5s;
}

.floating-book {
    bottom: 30%;
    left: 0.5%;
    animation-delay: 3s;
}

.floating-palette {
    bottom: 20%;
    right: 10%;
    animation-delay: 4.5s;
}

/* Divisore ondulato */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

/* Contenuto principale */
.main-content {
    background: white;
    position: relative;
}

/* Sezioni */
.intro-section {
    padding: 4rem 0;
    background: #ffffff;
    color: rgb(41, 40, 40);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-title i {
    background: white;
    color: #ff6b6b;
    padding: 0.5rem;
    border-radius: 50%;
    font-size: 1.5rem;
}

.intro-text {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Sezione gallerie */
.galleries-section {
    padding: 0;
    background: linear-gradient(180deg, #ffffff 0%, #fed6e3 100%);
}

.galleries-section .section-title {
    color: #333;
}

.galleries-section .section-title i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Card delle gallerie */
.gallery-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.card-header {
    padding: 1.5rem;
    text-align: center;
    color: white;
    position: relative;
}

.card-header i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.card-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Temi colorati per le card */
.theatre .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.orientation .card-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.civic .card-header {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.performance .card-header {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.animals .card-header {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

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

.parents .card-header {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
}

.argo .card-header {
    background: linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%);
}

.awareness .card-header {
    background: linear-gradient(135deg, #fdbb2d 0%, #22c1c3 100%);
}

/* Nuove gallerie aggiunte per Open Day 2025 */
.technology .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.celebrity .card-header {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

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

.environmental .card-header {
    background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
}

.musical .card-header {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.inclusion .card-header {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.educational .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.valentine .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.art .card-header {
    background: linear-gradient(135deg, #fa709a 0%, #ff9a9e 100%);
}

.card-content {
    padding: 1.5rem;
}

.card-content p {
    margin-bottom: 1.5rem;
    color: #666;
    line-height: 1.6;
}

/* Preview delle immagini */
.media-preview {
    margin-bottom: 1.5rem;
}

.preview-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.preview-images img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.preview-images img:hover {
    transform: scale(1.1);
}

.media-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #888;
    flex-wrap: wrap;
}

.media-count i {
    color: #ff6b6b;
}

/* Pulsante visualizza galleria */
.view-gallery-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.view-gallery-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Sezione informazioni scuola */
.school-info {
    padding: 4rem 0;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
}

.info-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
}

.info-card h2 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.info-card h2 i {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
}

.info-card p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    background: white;
    border-radius: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 20px;
    top:15px;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    font-weight: bold;
}

.close:hover {
    color: #333;
}

.gallery-modal-header h2 {
   line-height: 2.2rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.school-info-footer h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.footer-links p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animazioni */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .school-name {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .galleries-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .floating-star, .floating-heart, .floating-book, .floating-palette {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {

    .hero-logo {
    width: 100vw;
    height: auto;
    margin: 0 auto;
    display: block;
    margin-top: 20px; /* Aggiungi un margine superiore di 20 pixel */ 
    }

    .hero {
        min-height: 45vh;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .school-name {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .card-content, .info-card {
        padding: 1.5rem;
    }
}

/* Utilità */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}