/* Colori del logo Mare d'Inverno */
:root {
    --color-cream: #E8D5C4;
    --color-ocean-dark: #1A3D4D;
    --color-ocean-medium: #2B5A6D;
    --color-ocean-light: #5B8A9A;
    --color-wave: #7BA5B3;
    --color-white: #FFFFFF;
    --color-text-dark: #1A3D4D;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-white);
    color: var(--color-text-dark);
    line-height: 1.8;
    font-size: 16px;
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--color-white);
}

.wave-animation {
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-ocean-dark);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-screen p {
    margin-top: 20px;
    color: var(--color-ocean-dark);
    font-size: 1rem;
    font-weight: 400;
}

/* Header Minimalista */
header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-cream);
    position: sticky;
    top: 0;
    z-index: 2000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.logohome {
    width: 150px;
    height: 150px;
}

.site-title {
    color: var(--color-ocean-dark);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

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

nav a {
    color: var(--color-ocean-dark);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s ease;
    position: relative;
}

nav a:hover {
    color: var(--color-wave);
}

nav a.active {
    color: var(--color-ocean-dark);
    font-weight: 500;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-ocean-dark);
}

/* Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 61, 77, 0.5);
    z-index: 1500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2001;
    width: 30px;
    height: 24px;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--color-ocean-dark);
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Container principale */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    min-height: calc(100vh - 200px);
}

/* Sezioni */
section {
    margin-bottom: 4rem;
}

/* Hero Video Section */
.hero-video {
    position: relative;
    width: 100vw;
    height: 100vh;
    margin-left: calc(-50vw + 50%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4rem;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 61, 77, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--color-white);
    padding: 2rem;
    max-width: 800px;
    margin-top:100px;
}

.hero-content .logohome {
    width: 150px;
    height: 150px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.hero-content h1 {
    color: var(--color-white);
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
}

.hero-content p {
    color: var(--color-white);
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

h1 {
    color: var(--color-ocean-dark);
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

h2 {
    color: var(--color-ocean-dark);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 3rem 0 1.5rem 0;
    letter-spacing: -0.5px;
}

h3 {
    color: var(--color-ocean-dark);
    font-size: 1.3rem;
    font-weight: 500;
    margin: 2rem 0 1rem 0;
}

p {
    margin-bottom: 1rem;
    color: var(--color-ocean-medium);
}

/* Cards statistiche minimaliste */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
        margin: 3rem 0;
    }

    .stat-card {
        background: var(--color-white);
        border: 1px solid var(--color-cream);
        padding: 2.5rem 1.5rem;
        text-align: center;
        transition: border-color 0.2s ease;
    }

        .stat-card:hover {
            border-color: var(--color-wave);
        }

    .stat-number {
        font-size: 2.5rem;
        font-weight: 600;
        display: block;
        color: var(--color-ocean-dark);
        margin-bottom: 0.5rem;
        letter-spacing: -1px;
    }

    .stat-label {
        font-size: 0.9rem;
        color: var(--color-ocean-medium);
        font-weight: 400;
    }
    /* Griglia benefici */
    .benefits-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        margin: 3rem 0;
    }

    .benefit-card {
        background: var(--color-white);
        border: 1px solid var(--color-cream);
        padding: 2rem;
        transition: border-color 0.2s ease;
    }

        .benefit-card:hover {
            border-color: var(--color-ocean-light);
        }

        .benefit-card h3 {
            color: var(--color-ocean-dark);
            margin-top: 0;
            font-size: 1.2rem;
        }

        .benefit-card p {
            font-size: 0.95rem;
            line-height: 1.7;
        }
    /* Pulsanti minimalisti */
    .btn {
        display: inline-block;
        padding: 0.875rem 2rem;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s ease;
        border: 2px solid var(--color-ocean-dark);
        cursor: pointer;
        font-size: 0.95rem;
        background: var(--color-white);
        color: var(--color-ocean-dark);
    }

        .btn:hover {
            background: var(--color-ocean-dark);
            color: var(--color-white);
        }

    .btn-primary {
        background: var(--color-ocean-dark);
        color: var(--color-white);
        border-color: var(--color-ocean-dark);
    }

        .btn-primary:hover {
            background: var(--color-ocean-medium);
            border-color: var(--color-ocean-medium);
        }

    .btn-secondary {
        background: var(--color-white);
        color: var(--color-ocean-dark);
        border: 2px solid var(--color-ocean-dark);
    }

        .btn-secondary:hover {
            background: var(--color-cream);
            border-color: var(--color-ocean-dark);
        }
    /* Form minimalisti */
    .form-group {
        margin-bottom: 1.5rem;
    }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            color: var(--color-ocean-dark);
            font-weight: 500;
            font-size: 0.95rem;
        }

        .form-group input,
        .form-group textarea,
        .form-group select {
            width: 100%;
            padding: 0.875rem;
            border: 1px solid var(--color-cream);
            font-size: 0.95rem;
            font-family: var(--font-main);
            transition: border-color 0.2s ease;
            background: var(--color-white);
            color: var(--color-ocean-dark);
        }

            .form-group input:focus,
            .form-group textarea:focus,
            .form-group select:focus {
                outline: none;
                border-color: var(--color-ocean-dark);
            }

        .form-group textarea {
            resize: vertical;
            min-height: 120px;
            line-height: 1.6;
        }
    /* Immagini */
    .hero-image {
        width: 100%;
        height: 400px;
        object-fit: cover;
        margin-bottom: 2rem;
    }

    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
        margin: 2rem 0;
    }

        .gallery-grid img {
            width: 100%;
            height: 250px;
            object-fit: cover;
            transition: opacity 0.2s ease;
            cursor: pointer;
        }

            .gallery-grid img:hover {
                opacity: 0.85;
            }
    /* Footer minimalista */
    footer {
        background: var(--color-white);
        border-top: 1px solid var(--color-cream);
        color: var(--color-ocean-medium);
        padding: 3rem 2rem;
        text-align: center;
        margin-top: 6rem;
    }

    .footer-content p {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    footer a {
        color: var(--color-ocean-dark);
        text-decoration: none;
        border-bottom: 1px solid transparent;
        transition: border-color 0.2s ease;
    }

        footer a:hover {
            border-bottom-color: var(--color-ocean-dark);
        }
    /* Liste */
    ul {
        list-style-position: inside;
        margin: 1rem 0;
    }

        ul li {
            margin-bottom: 0.5rem;
            color: var(--color-ocean-medium);
        }
    /* Errore 404 */
    .not-found {
        text-align: center;
        padding: 4rem 2rem;
    }

        .not-found h1 {
            font-size: 4rem;
            color: var(--color-ocean-dark);
        }
    /* Errore Blazor */
    #blazor-error-ui {
        background: var(--color-ocean-dark);
        color: var(--color-white);
        padding: 1rem;
        position: fixed;
        bottom: 0;
        width: 100%;
        z-index: 1000;
        display: none;
    }

        #blazor-error-ui .dismiss {
            cursor: pointer;
            position: absolute;
            right: 1rem;
            top: 0.5rem;
        }
    /* Responsive */
    @media (max-width: 768px) {
        .header-content {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
        }

        .hamburger {
            display: flex;
        }

        nav {
            position: fixed;
            top: 0;
            right: -100%;
            width: 75%;
            max-width: 300px;
            height: 100vh;
            background: var(--color-white);
            box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
            transition: right 0.3s ease;
            z-index: 2000;
            padding-top: 80px;
            overflow-y: auto;
        }

        nav.active {
            right: 0;
        }

        nav ul {
            flex-direction: column;
            gap: 0;
            width: 100%;
            padding: 0;
        }

        nav li {
            border-bottom: 1px solid var(--color-cream);
        }

        nav a {
            display: block;
            padding: 1.25rem 2rem;
            width: 100%;
        }

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

        .main-container {
            padding: 2rem 1.5rem;
        }

        .site-title {
            font-size: 1.3rem;
        }

        h1 {
            font-size: 2rem;
        }

        h2 {
            font-size: 1.5rem;
        }

        .stats-grid,
        .benefits-grid {
            grid-template-columns: 1fr;
            gap: 1.5rem;
        }

        .hero-image {
            height: 250px;
        }

        .stat-number {
            font-size: 2rem;
        }

        .hero-video {
            height: 60vh;
            min-height: 400px;
        }

        .hero-content h1 {
            font-size: 2.5rem;
        }

        .hero-content p {
            font-size: 1.1rem;
        }

        .hero-content .logohome {
            width: 100px;
            height: 100px;
        }

        .hero-content {
            margin-top: 200px;
        }
    }
    /* Animazioni minimal */
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .fade-in {
        animation: fadeIn 0.4s ease-out;
    }
    /* Validazione form */
    .validation-message {
        color: var(--color-ocean-dark);
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }
    /* Divider minimal */
    hr {
        border: none;
        border-top: 1px solid var(--color-cream);
        margin: 3rem 0;
    }
    /* Tabelle */
    table {
        width: 100%;
        border-collapse: collapse;
        margin: 2rem 0;
    }

    th, td {
        text-align: left;
        padding: 1rem;
        border-bottom: 1px solid var(--color-cream);
    }

    th {
        font-weight: 600;
        color: var(--color-ocean-dark);
    }

    td {
        color: var(--color-ocean-medium);
    }
