* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
    color: #333;
}

body.no-scroll {
    overflow: hidden;
}

.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
    transition: transform 0.1s ease;
    cursor: pointer;
}

.container-contact {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.content-section#contatti h1 {
    color: #3A5A40;
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.05);
}

.sottotitolo-contact {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 40px;
}

.section-block-contact {
    background-color: #e8f5e9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.section-block-contact h2 {
    color: #4a7c59;
    font-size: 1.8em;
    margin-bottom: 20px;
    text-align: center;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 1.05em;
    color: #555;
    text-align: left;
}

.contact-info-item i {
    color: #3A5A40;
    margin-right: 15px;
    font-size: 1.5em;
    margin-top: 2px;
}

.contact-info-item a {
    color: #3A5A40;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info-item a:hover {
    color: #2c5530;
}

.social-links {
    padding-top: 0;
    border-top: none;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.social-icons a {
    font-size: 3.5em;
    color: #3A5A40;
    transition: color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    padding: 5px;
}

.social-icons a:hover {
    color: #2c5530;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    #formContainer.open {
        max-height: 3000px;
        padding: 0 1rem;
    }

    .ospitalita-form {
        padding: 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-input,
    .form-select,
    .form-textarea {
        padding: 0.75rem 0.875rem;
        font-size: 0.95rem;
    }

    .form-submit {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem;
        margin: 1.5rem auto 0;
    }
    .container {
        margin: 20px auto;
        padding: 20px;
    }

    .content-section#contatti h1 {
        font-size: 2.2em;
    }

    .sottotitolo {
        font-size: 1em;
        margin-bottom: 30px;
    }

    .section-block {
        padding: 20px;
        margin-bottom: 20px;
    }

    .section-block-contact h2 {
        font-size: 1.5em;
    }

    .social-icons a {
        font-size: 2.8em;
        margin: 0 10px;
    }
}

#box {
    background-color: #3A5A40;
    border-radius: 20px;
    box-shadow: 15px 15px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
}

#box .testo {
    flex: 1;
    min-width: 300px;
    text-align: left;
    color: white;
}

#box .valori {
    flex: 1;
    min-width: 300px;
}

.background {
    position: absolute;
    inset: 0;
    background-image: url('../images/foto_sfondo_nuovo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.overlay-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(88, 129, 87, 0.75) 0%,
        rgba(88, 129, 87, 0.5) 20%,
        rgba(218, 215, 205, 0.4) 60%,
        rgba(218, 215, 205, 0.6) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2;
}

.content {
    position: relative;
    z-index: 3;
    text-align: center;
    top: 40%;
    color: #001f1f;
    font-size: 2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.titoloPrincipale {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-size: 4rem;
    font-style: normal;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s ease-out 0.5s forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contenitore-descrizione {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100vh;
    padding-bottom: 16rem;
}

.descrizione {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    color: #001f1f;
    width: calc(100% - 4rem);
    max-width: 600px;
    min-width: 280px;
    text-align: center;
    z-index: 3;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.5s forwards;
    word-wrap: break-word;
    hyphens: auto;
}

.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 1rem;
    z-index: 10;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background-color 0.3s ease, backdrop-filter 0.3s ease;
    cursor: auto;
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
}

.header-container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-group img {
    height: 50px;
    width: auto;
}

.logo {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    color: #001f1f;
}

.nav-container {
    position: relative;
}

.nav-links {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 1.2rem;
    gap: 1.5rem;
}

.nav-links a {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    text-decoration: none;
    color: #001f1f;
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-links a:hover {
    color: #3A5A40;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 11;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #001f1f;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 0;
    background: #A3B18A;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mobile-nav.active {
    width: 300px;
}

.mobile-nav a {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    text-decoration: none;
    color: #001f1f;
    margin: 1rem 0;
    padding: 1rem 2rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(50px);
}

.mobile-nav.active a {
    animation: slideInRight 0.5s ease-out forwards;
}

.mobile-nav.active a:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-nav.active a:nth-child(2) {
    animation-delay: 0.2s;
}

.mobile-nav.active a:nth-child(3) {
    animation-delay: 0.3s;
}

.mobile-nav.active a:nth-child(4) {
    animation-delay: 0.4s;
}

.mobile-nav.active a:nth-child(5) {
    animation-delay: 0.5s;
}

.mobile-nav.active a:nth-child(6) {
    animation-delay: 0.6s;
}

.mobile-nav.active a:nth-child(7) {
    animation-delay: 0.7s;
}

.mobile-nav a:hover {
    background: rgba(58, 90, 64, 0.1);
    transform: translateX(0) scale(1.05);
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.content-section {
    min-height: 100vh;
    padding: 3rem 2rem 3rem 2rem;
    background: #588157;
    position: relative;
}

.content-section:nth-child(odd) {
    background: #A3B18A;
    color: #001f1f;
}

.content-section:nth-child(odd) .section-title,
.content-section:nth-child(odd) .section-text,
.content-section:nth-child(odd) h3 {
    color: #001f1f;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 2rem;
}

.valori-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.valore-card {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    background: rgba(255, 255, 255, 0.8);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.valore-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(58, 90, 64, 0.1), transparent);
    transition: left 0.6s ease;
}

.valore-card:hover {
    border-color: #3A5A40;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.valore-card:hover::before {
    left: 100%;
}

.valore-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.valore-nome {
    font-size: 1.3rem;
    color: #3A5A40;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.valore-desc {
    font-size: 1rem;
    color: #588157;
    line-height: 1.6;
}

.section-title {
    font-size: 100px;
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    margin-bottom: 2rem;
    color: white;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.section-text {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    color: white;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.2s;
}

.content-section.visible .section-title,
.content-section.visible .section-text,
.content-section.visible .unita-interattiva-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0c04f6 0%, #f01c06 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(100px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #0c04f6 0%, #f01c06 100%);
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

.back-to-top::before {
    content: '↑';
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    color: white;
    font-size: 24px;
    animation: bounceArrow 2s infinite;
}

@keyframes bounceArrow {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
    animation: floatParticle 6s ease-in-out infinite;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    color: #001f1f;
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    font-style: normal;
    animation: pulseIndicator 2s infinite;
}

.scroll-indicator::after {
    content: '↓';
    display: block;
    font-size: 2rem;
    text-align: center;
    margin-top: 0.5rem;
    animation: bounceArrow 2s infinite .5s;
}

@keyframes pulseIndicator {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.main-footer-bottom {
    padding: 2rem;
    background-color: #3A5A40;
    color: #e0e0e0;
    text-align: center;
    font-family: "Quicksand", sans-serif;
    font-size: 0.9rem;
    line-height: 1.6;
}

.main-footer-bottom p {
    margin-bottom: 0.5rem;
}

.main-footer-bottom p:last-child {
    margin-bottom: 0;
}

a,
button {
    cursor: pointer;
}

.map-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.map-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.map-overlay {
    position: absolute;
    top: 20px;
    left: 900px;
    right: 20px;
    background: #527853;
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 15px;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.map-title {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    color: white;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.map-address {
    font-family: "Patrick Hand SC", cursive;
    font-weight: 400;
    color: #DAD7CD;
    font-size: 1rem;
    line-height: 1.4;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
    filter: sepia(0.2) saturate(0.8) hue-rotate(10deg);
    transition: filter 0.3s ease;
}

.map-container:hover iframe {
    filter: sepia(0) saturate(1) hue-rotate(0deg);
}

.address-highlight {
    background: rgba(218, 215, 205, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    font-weight: 600;
    color: #DAD7CD;
}

#ospitalita-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    margin-top: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid rgba(58, 90, 64, 0.2);
    overflow: hidden;
}

.ospitalita-toggle {
    cursor: pointer;
    margin-bottom: 2rem;
}

.toggle-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    font-size: 1.5rem;
    color: #3A5A40;
}

.ospitalita-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

#formContainer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0;
}

#formContainer.open {
    max-height: 1500px;
    opacity: 1;
}

.form-title {
    font-family: "Patrick Hand SC", cursive;
    font-size: 2.5rem;
    color: #3A5A40;
    text-align: center;
    margin-bottom: 2rem;
    margin-top: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-subtitle {
    font-family: "Patrick Hand SC", cursive;
    font-size: 1.2rem;
    color: #3A5A40;
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-label {
    display: block;
    font-family: "Patrick Hand SC", cursive;
    font-weight: 600;
    font-size: 1.1rem;
    color: #3A5A40;
    margin-bottom: 0.5rem;
    position: relative;
}

.form-label.required::after {
    content: ' *';
    color: #e74c3c;
    font-weight: bold;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #A3B18A;
    border-radius: 10px;
    font-family: "Quicksand", sans-serif;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #3A5A40;
    box-shadow: 0 0 0 3px rgba(58, 90, 64, 0.1);
    background: white;
    transform: translateY(-1px);
}

.form-input:invalid,
.form-select:invalid,
.form-textarea:invalid {
    border-color: #e74c3c;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: "Patrick Hand SC", cursive;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23588157' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 3rem;
    appearance: none;
}

.form-submit {
    background: linear-gradient(135deg, #3A5A40 0%, #588157 100%);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-family: "Patrick Hand SC", cursive;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(58, 90, 64, 0.3);
    display: block;
    margin: 2.5rem auto 0;
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(58, 90, 64, 0.4);
    background: linear-gradient(135deg, #527853 0%, #6b936b 100%);
}

.form-submit:active {
    transform: translateY(-1px);
}

.form-note {
    font-family: "Patrick Hand SC", cursive;
    font-size: 0.95rem;
    color: #588157;
    text-align: center;
    margin-top: 1.5rem;
    font-style: italic;
}

.required-note {
    font-family: "Patrick Hand SC", cursive;
    font-size: 0.9rem;
    color: #e74c3c;
    text-align: center;
    margin-bottom: 2rem;
}

.iscrizione-form {
    background: rgba(255, 255, 255, 0.9);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    margin-top: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    border: 2px solid rgba(58, 90, 64, 0.2);
    overflow: hidden;
}

.section-content-fullwidth {
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding-top: 2rem;
}

.unita-interattiva-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1.5rem;
    margin-top: 3rem;
    min-height: 450px;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.unita-card-interattiva {
    position: relative;
    flex: 1;
    min-width: 120px;
    height: 420px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    overflow: hidden;
    color: #001f1f;
    transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.unita-visible-content {
    padding: 2rem 1rem;
    text-align: center;
    transition: opacity 0.4s ease, transform 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.unita-titolo-card {
    font-family: "Patrick Hand SC", cursive;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.unita-eta {
    font-family: "Quicksand", sans-serif;
    font-size: 1.1rem;
    color: #3A5A40;
    font-weight: 600;
}

.unita-hover-content {
    position: absolute;
    inset: 0;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    flex-direction: column;
}

.unita-descrizione-card {
    padding: 1rem 0 0;
    text-align: center;
}

.unita-descrizione-card h4 {
    font-family: "Patrick Hand SC", cursive;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.unita-descrizione-card p {
    font-family: "Quicksand", sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
}

.unita-interattiva-wrapper.is-active-child .unita-card-interattiva:not(.is-active) {
    flex: 0 1 120px;
}

.unita-card-interattiva.is-active {
    flex: 10 1 600px;
}

.unita-card-interattiva.is-active .unita-visible-content {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9);
}

.unita-card-interattiva.is-active .unita-hover-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.unita-slideshow {
    position: relative;
    width: 100%;
    height: 60%;
    border-radius: 10px;
    overflow: hidden;
    background-color: #333;
}

.unita-slideshow img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.unita-slideshow img.slide-active {
    opacity: 1;
}


@media (max-width: 992px) {

    .unita-interattiva-wrapper {
        flex-direction: column;
        align-items: center;
        min-height: unset;
        gap: 1rem;
    }

    .unita-card-interattiva,
    .unita-interattiva-wrapper.is-active-child .unita-card-interattiva:not(.is-active),
    .unita-card-interattiva.is-active {
        flex: 1;
        width: 100%;
        max-width: 500px;
        min-width: unset;
        height: 150px;
        transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .unita-card-interattiva .unita-hover-content {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding: 0 1.5rem 1.5rem 1.5rem;
    }

    .unita-card-interattiva .unita-visible-content {
        height: 150px;
        justify-content: center;
    }

    .unita-card-interattiva.is-active {
        height: 550px;
    }

    .unita-card-interattiva.is-active .unita-visible-content {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .unita-slideshow {
        height: 250px;
    }
}


@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .content {
        font-size: 1.5rem;
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.4rem;
    }

    .logo-group img {
        height: 40px;
    }

    .mobile-nav.active {
        width: 280px;
    }

    .descrizione {
        font-size: 0.9rem;
        bottom: 8rem;
        padding: 0.6rem 1.2rem;
        width: calc(100% - 3rem);
    }

    .section-title {
        font-size: 2.2rem;
        text-align: center;
    }

    .section-text {
        font-size: 1rem;
    }

    .back-to-top {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }

    .back-to-top::before {
        font-size: 20px;
    }

    #box {
        flex-direction: column;
    }

    #box .testo,
    #box .valori {
        min-width: 100%;
    }

    .content-section {
        padding: 2rem 1rem;
    }

    .ospitalita-form,
    .iscrizione-form {
        padding: 2rem;
        margin-top: 2rem;
    }

    .form-title {
        font-size: 2rem;
    }

    .form-subtitle {
        font-size: 1.1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-submit {
        padding: 0.875rem 2rem;
        font-size: 1.1rem;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .main-header {
        padding: 0.8rem 1rem;
    }

    .logo-group img {
        height: 35px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .content {
        font-size: 1.2rem;
    }

    .mobile-nav.active {
        width: 100vw;
    }

    .contenitore-descrizione {
        padding-bottom: 20rem;
    }

    .descrizione {
        font-size: 0.8rem;
        bottom: 6rem;
        padding: 0.5rem 1rem;
        width: calc(100% - 2rem);
    }

    .content-section {
        padding: 5rem 1rem 2rem 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .section-text {
        font-size: 0.9rem;
    }

    #ospitalita-form {
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.8rem;
    }
    #formContainer.open {
        max-height: 3500px;
    }

    .ospitalita-form {
        padding: 1rem;
    }

    .form-title {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }

    .form-subtitle {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .form-label {
        font-size: 1rem;
    }
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.popup-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#news-popup .popup-content {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#news-popup.is-active .popup-content {
    transform: scale(1);
    opacity: 1;
}


#news-popup .popup-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    transition: color 0.2s ease;
}

#news-popup .popup-close-btn:hover {
    color: #e74c3c;
}

#news-popup .popup-button {
    display: inline-block;
    background-color: #A3B18A;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 20px;
    transition: background-color 0.2s ease;
}

#news-popup .popup-button:hover {
    background-color: #8B9A7B;
}

.secret-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3A5A40;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-align: center;
    z-index: 1000;
    font-family: 'Quicksand', sans-serif;
    color: white;
    max-width: 320px;
    width: 90%;
    border: 2px solid #A3B18A;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.secret-popup .secret-popup-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}
.secret-popup .popup-image {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-top: -45px;
    margin-bottom: 10px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.3));
}
.secret-popup .popup-message {
    font-family: 'Patrick Hand SC', cursive;
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 10px;
    color: #DAD7CD;
}
.secret-popup .popup-button {
    background: #A3B18A;
    color: #3A5A40;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-weight: bold;
    font-size: 1.0rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.secret-popup .popup-button:hover {
    background: #588157;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}
.secret-popup .secret-popup-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #588157;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border: 2px solid #DAD7CD;
}
.secret-popup .secret-popup-close:hover {
    background: #A3B18A;
    color: #3A5A40;
}

@keyframes popup-enter-animation {
    from {
        opacity: 0;
        transform: translateX(100%);
        visibility: hidden;
    }
    to {
        opacity: 1;
        transform: translateX(0);
        visibility: visible;
    }
}

@keyframes popup-exit-animation {
    from {
        opacity: 1;
        transform: translateX(0);
        visibility: visible;
    }
    to {
        opacity: 0;
        transform: translateX(100%);
        visibility: hidden;
    }
}

.secret-popup.is-entering {
    animation: popup-enter-animation 0.5s ease-out forwards;
    pointer-events: auto;
}
.secret-popup.is-exiting {
    animation: popup-exit-animation 0.5s ease-in forwards;
    pointer-events: none;
}

.secret-popup.is-active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .secret-popup {
        padding: 20px;
        max-width: 280px;
        bottom: 15px;
        right: 15px;
    }
    .secret-popup .popup-image {
        width: 70px;
        height: 70px;
        margin-top: -35px;
    }
    .secret-popup .popup-message {
        font-size: 1rem;
    }
    .secret-popup .popup-button {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .secret-popup .secret-popup-close {
        width: 24px;
        height: 24px;
        font-size: 1.2rem;
        top: -8px;
        right: -8px;
    }
}
