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

:root {
    --primary-green: #5CB85C;
    --primary-green-dark: #4a9e4a;
    --primary-green-light: #e8f5e9;
    --accent-amber: #F5A623;
    --accent-amber-dark: #d4901e;
    --text-dark: #2c2c2c;
    --text-gray: #5a6a72;
    --bg-light: #f8f9fa;
    --bubble-blue: rgba(173, 216, 230, 0.15);
    --bubble-green: rgba(144, 238, 144, 0.10);
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 12px 40px rgba(92, 184, 92, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Sfondo con bolle decorative */
.bg-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    filter: blur(60px);
}

.bubble {
    position: absolute;
    border-radius: 50%;
}

.bubble-1 {
    width: 400px;
    height: 400px;
    background: var(--bubble-blue);
    top: -100px;
    left: -100px;
}

.bubble-2 {
    width: 300px;
    height: 300px;
    background: var(--bubble-green);
    top: 200px;
    right: -100px;
}

.bubble-3 {
    width: 500px;
    height: 500px;
    background: var(--bubble-blue);
    bottom: -200px;
    left: 30%;
}

.bubble-4 {
    width: 250px;
    height: 250px;
    background: var(--bubble-green);
    top: 50%;
    left: -50px;
}

.bubble-5 {
    width: 350px;
    height: 350px;
    background: var(--bubble-blue);
    top: 30%;
    right: -150px;
}

/* Header e navigazione */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

nav a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s ease, background 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    position: relative;
}

nav a:hover {
    color: var(--primary-green);
    background: var(--primary-green-light);
}

nav a.active {
    color: var(--primary-green);
    font-weight: 600;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--primary-green);
    border-radius: 1px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Menu mobile */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: heroFadeIn 0.8s ease-out;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(180deg, rgba(232, 245, 233, 0.3) 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-logo {
    max-width: 350px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-family: 'Fredoka', 'Segoe Script', cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-description {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 700px;
    line-height: 2;
    font-style: normal;
}

/* Page header (per pagine interne) */
.page-header {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, rgba(144, 238, 144, 0.08), rgba(173, 216, 230, 0.08));
}

.page-header h1 {
    font-family: 'Fredoka', 'Segoe Script', cursive;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.page-header .subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Sezioni */
section {
    padding: 4rem 2rem;
}

.section-title {
    font-family: 'Fredoka', 'Segoe Script', cursive;
    font-size: 2.2rem;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 3rem;
    font-weight: 500;
}

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card h3 {
    font-family: 'Fredoka', 'Segoe Script', cursive;
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

.card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Card per struttura organizzativa */
.org-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

.org-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.org-card h3 {
    margin-bottom: 1rem;
}

/* Spazi/Sale cards */
.space-card {
    display: flex;
    flex-direction: column;
}

.space-card img {
    height: 250px;
}

/* Sezione struttura */
.structure-section {
    background: var(--bg-light);
}

.structure-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.structure-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* Sezione progetto/metodo */
.method-section {
    background: var(--white);
}

.method-content {
    max-width: 900px;
    margin: 0 auto;
}

.method-content h3 {
    font-family: 'Fredoka', 'Segoe Script', cursive;
    font-size: 1.8rem;
    color: var(--primary-green);
    margin: 2rem 0 1rem;
    font-weight: 500;
}

.method-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.method-content ul {
    margin: 1rem 0 1rem 2rem;
}

.method-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Sezione cucina */
.kitchen-section {
    background: var(--bg-light);
}

.kitchen-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.kitchen-content img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.kitchen-text p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* Slideshow/Carousel - Crossfade */
.slideshow-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.slideshow-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 10;
}

.slideshow-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-container img.active {
    opacity: 1;
}

/* Pulsante download */
.download-section {
    text-align: center;
    padding: 3rem 2rem;
}

.btn {
    display: inline-block;
    background: var(--primary-green);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 14px rgba(92, 184, 92, 0.3);
}

.btn:hover {
    background: var(--primary-green-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 184, 92, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(92, 184, 92, 0.3);
}

/* Pagina Moduli */
.modules-list {
    max-width: 600px;
    margin: 0 auto;
}

.module-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.module-item span {
    font-size: 1rem;
    color: var(--text-dark);
}

.module-item .btn {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

/* Footer */
footer {
    background: var(--bg-light);
    padding: 4rem 2rem 3rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.footer-map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.footer-map iframe {
    width: 100%;
    height: 300px;
    border: none;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer-contact h3 {
    font-family: 'Fredoka', 'Segoe Script', cursive;
    font-size: 1.8rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item img {
    width: 30px;
    height: 30px;
}

.contact-item a {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-green-dark);
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    margin-top: 2.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-gray);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin-bottom: 0.5rem;
}

.footer-bottom a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--primary-green-dark);
}

/* Bilinguismo section */
.bilingual-section {
    background: var(--white);
}

.bilingual-content {
    max-width: 900px;
    margin: 0 auto;
}

.bilingual-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.bilingual-slideshow {
    max-width: 600px;
    margin: 2rem auto;
}

/* Quote styling */
blockquote {
    font-style: italic;
    border-left: 4px solid var(--primary-green);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    color: var(--text-gray);
    background: var(--primary-green-light);
}

/* Parco section */
.park-section {
    background: var(--bg-light);
}

.park-content {
    max-width: 900px;
    margin: 0 auto;
}

.park-content p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.park-content ul {
    margin: 1rem 0 1rem 2rem;
}

.park-content li {
    margin-bottom: 0.5rem;
}

/* Scroll Animations */
.animate-ready {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .animate-ready {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero {
        animation: none;
    }

    .slideshow-container img {
        transition: none;
    }

    nav a.active::after {
        animation: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        gap: 0;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        padding: 0.25rem 0;
    }

    nav a {
        display: block;
        padding: 0.75rem 1rem;
    }

    .hero {
        padding: 3rem 1.5rem;
        min-height: 70vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-logo {
        max-width: 250px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .kitchen-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .slideshow-container {
        aspect-ratio: 4 / 3;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .page-header {
        padding: 3rem 1.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    section {
        padding: 3rem 1.5rem;
    }

    footer {
        padding: 3rem 1.5rem 2rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    .module-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
