:root {
    color-scheme: light;
    --bg: #fdf9f3;
    --text: #2d2a32;
    --accent: #6f8f78;
    --accent-light: #9fba9a;
    --accent-soft: #dbe6d8;
    --card-bg: #ffffff;
    --card-shadow: rgba(45, 42, 50, 0.08);
    --section-gap: clamp(2rem, 4vw, 3.5rem);
    font-size: 16px;
}

* {
    box-sizing: border-box;
}
.header{
         background-image: url("../img/header.jpg") !important; 
         background-size: 60%;
         background-position: left top;
         background-repeat: no-repeat;
         height: 350px;
         margin-top: -8px;
         margin-left: -14px;
}


html {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    /* background-image: url("../uploads/background.jpeg") !important; */
    background-color: white;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    line-height: 1.6;
    height: 100vh;
}


/* Splash / landing page */
.splash-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background-image: var(--header-image);
    background-position: left top;
    background-repeat: no-repeat;
    background-size: cover;
    /* background: radial-gradient(1200px 800px at 20% 20%, rgba(179, 217, 142, 0.9), transparent 60%),
        radial-gradient(1000px 700px at 80% 60%, rgba(160, 184, 153, 0.55), transparent 55%),
        var(--bg); */
}

.splash-logo {
    text-decoration: none;
    color: inherit;
    display: grid;
    gap: 0.9rem;
    justify-items: center;
    padding: clamp(2.5rem, 7vw, 4.25rem);
    border-radius: 2rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 60px rgba(45, 42, 50, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
    min-width: min(92vw, 420px);
    margin-top: 140px;
}

.splash-logo:hover,
.splash-logo:focus {
    transform: translateY(-4px);
    box-shadow: 0 22px 70px rgba(45, 42, 50, 0.18);
}

.splash-ring {
    width: clamp(136px, 28vw, 180px);
    height: clamp(136px, 28vw, 180px);
    border-radius: 999px;
    border: 10px solid transparent;
    background: linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, var(--accent), var(--accent-light)) border-box;
}

.splash-initials {
    font-family: "Imperial Script", cursive;
    font-size: clamp(4.2rem, 13vw, 7.2rem);
    letter-spacing: 0.22rem;
    font-weight: 600;
    margin-top: -0.35rem;
    font-weight: normal!important;
}

.splash-initials .amp {
    font-size: 0.52em;
    vertical-align: middle;
    letter-spacing: 0;
    margin: 0 0.25rem;
    color: var(--accent);
}

.splash-hint {
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(45, 42, 50, 0.75);
}

.hero {
    /* margin-top : 130px; */
    /* background: linear-gradient(135deg, rgba(125, 203, 147, 0.45), rgba(219, 230, 216, 0.9)), url("https://images.unsplash.com/photo-1520854221050-0f4caff449fb?auto=format&fit=crop&w=1200&q=60") center/cover; */
    color: #000000;
    text-align: center;
    /* padding: clamp(3rem, 8vw, 5rem) 1rem 1.5rem; */
    position: relative;
}

@media (max-width: 600px) {
    .hero {
        padding: 2.5rem 1rem 1.25rem;
    }
    .header{
         background-image: url("../img/header.jpg") !important; 
         background-size: cover;
         background-position: center;
         background-repeat: no-repeat;
         height: 130px;
         margin-top: -8px;
         margin-left: -14px;
    }
    

}

@media (min-width: 500px) and (max-width: 700px) {
    .header {
            background-image: url("../img/header.jpg") !important; 
            background-size: cover;
            background-position: center top;
            background-repeat: no-repeat;
            height: 200px;
            margin-top: -8px;
            margin-left: -14px; 
    }}

    @media (min-width: 700px) and (max-width: 1600px) {
    .header {
            background-image: url("../img/header.jpg") !important; 
            background-size: 72%;
            background-position: center top;
            background-repeat: no-repeat;
            margin-top: -8px;
            margin-left: -14px; 
    }}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    /* background: rgba(0, 0, 0, 0.15); */
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-title {
    margin: 0;
    font-size: clamp(3.5rem, 12vw, 10rem);
    letter-spacing: 0.2rem;
    font-weight: normal!important;
    margin-left: -40px;
    font-family: "Imperial Script", cursive;
    /* text-transform: uppercase; */
}

@media (max-width: 600px){
    .hero-title{    
    margin-left: -34px;
    font-family: "Imperial Script", cursive;
    font-size: 49px;
}
}
.hero-date {
    margin: 1.3rem 0 7px;
    font-size: 34px;
    /* font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; */
    text-align: center;
}

@media (max-width: 600px){
    .hero-date{
        font-size: 20px;
    }
}

.testo-regali{
    font-size: 20px;
}

@media (max-width: 600px){
    .testo-regali{
        font-size: 14px;   
}
}
/* Calendar */
.calendar-container {
    display: flex;
    justify-content: center;
    padding: 2.25rem 1rem 0;
    margin-top: -2.25rem;
    position: relative;
    z-index: 2;
}
@media (max-width: 600px){
    .calendar-container{
            padding: 2.25rem 2rem 0;
    }
}
.calendar {
    width: min(524px, 100%);
    max-width: 524px;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 55px rgba(45, 42, 50, 0.14);
    overflow: hidden;
    border: 1px solid rgba(45, 42, 50, 0.08);
}

@media (max-width: 600px) {
    .calendar {
        width: 100%;
        border-radius: 1rem;
    }
}

.calendar-header {
    padding: 0.9rem 1.25rem;
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, rgba(111, 143, 120, 0.95), rgba(219, 230, 216, 0.95));
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 1rem;
}

.calendar-day-name {
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: rgba(45, 42, 50, 0.72);
    padding: 0.25rem 0;
}

.calendar-day {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    border-radius: 1rem;
    background: rgba(45, 42, 50, 0.04);
    color: rgba(45, 42, 50, 0.9);
    font-weight: 700;
    user-select: none;
    transition: transform 0.15s ease, background 0.15s ease;
}

.calendar-day:hover {
    transform: translateY(-1px);
    background: rgba(111, 143, 120, 0.12);
}

.calendar-day.highlighted {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: #fff;
    box-shadow: 0 12px 30px rgba(111, 143, 120, 0.35);
}

.mt-10{
    margin-top: 10px;
}

.time{
    font-family: Georgia, "Times New Roman", serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 1rem 0.5rem;
    position: relative;
}

.time p {
    margin: 0;
}

.time a {
    display: inline-flex;
    align-items: center;
}

.time img {
    width: 34px;
    height: 34px;
}
.nav {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a:focus {
    background: rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* Mobile Navigation */
.mobile-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1rem clamp(1rem, 4vw, 2rem);
    /* background: var(--accent-soft); */
    border-top: 1px solid rgba(111, 143, 120, 0.3);
    border-bottom: 1px solid rgba(111, 143, 120, 0.3);
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.6);
    transition: background 0.2s ease, transform 0.2s ease;
    border: 1px solid transparent;
}

.nav-link:hover,
.nav-link:focus {
    background: rgba(111, 143, 120, 0.22);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.nav-link.active {
    background: var(--accent);
    color: white;
    font-weight: 700;
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .mobile-nav {
        gap: 0.4rem;
        padding: 0.75rem 0.5rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
}

@media (max-width: 480px) {
    .mobile-nav {
        gap: 0.3rem;
        padding: 0.5rem 0.25rem;
    }
    
    .nav-link {
        font-size: 0.7rem;
        padding: 0.35rem 0.5rem;
    }
}

.content {
    margin: 0 auto;
    padding: clamp(2rem, 0vw, 4rem) clamp(1rem, 6vw, 4rem);
    max-width: 1100px;
}

@media (max-width: 600px) {
    .content {
        padding: 1.5rem 1rem;
    }
}

.intro {
    text-align: center;
    margin-bottom: var(--section-gap);
    font-size: 24px;
}

.intro-tab {
    margin-bottom: var(--section-gap);
    font-size: 24px;
}


@media (max-width: 600px) {
    .intro {
        margin-bottom: 1.5rem;
    }
    
    .intro p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    .intro-tab {
    margin-bottom: var(--section-gap);
    font-size: 16px;
}
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .sections-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Home icon tiles */
.icon-tile {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    background: var(--card-bg);
    box-shadow: 0 10px 30px var(--card-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-tile:hover,
.icon-tile:focus {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(45, 42, 50, 0.16);
}

.icon-tile__icon {
    width: 78px;
    height: 78px;
    display: block;
}

.icon-tile__label {
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
}

@media (max-width: 768px) {
    .icon-tile {
        padding: 1.25rem 1rem;
        gap: 0.5rem;
    }
    
    .icon-tile__icon {
        width: 56px;
        height: 56px;
    }
    
    .icon-tile__label {
        font-size: 0.85rem;
        letter-spacing: 0.02em;
    }
}

@media (max-width: 480px) {
    .icon-tile {
        padding: 1rem 0.75rem;
    }
    
    .icon-tile__icon {
        width: 48px;
        height: 48px;
    }
    
    .icon-tile__label {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}

.section-card {
    display: block;
    padding: 2rem 1.5rem;
    border-radius: 1.25rem;
    background: var(--card-bg);
    box-shadow: 0 10px 30px var(--card-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.section-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.section-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 0.9rem;
    display: block;
}

.section-card p {
    margin: 0;
}

.section-card:hover,
.section-card:focus {
    transform: translateY(-6px);
    box-shadow: 0 16px 36px rgba(45, 42, 50, 0.16);
}

.alert {
    margin: 1rem 0;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
}

.alert.success {
    background: #dff5ea;
    color: #1f6f49;
}

.alert.error {
    background: #fdecea;
    color: #b02a1c;
}

.alert.info {
    background: #e7f3ff;
    color: #114a75;
}

.section h2 {
    margin-top: 0;
    font-size: 2rem;
}

@media (max-width: 600px){
    .section h2 {
    margin-top: 0;
    font-size: 20px;
}
}

.cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cards.two-cols {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px var(--card-shadow);
}

.card h3 {
    margin-top: 0;
}

.iban-copy-wrapper {
    display: grid;
    gap: 0.65rem;
    margin-top: 1rem;
}

.copy-iban-btn {
    margin-top: 0;
    min-height: 44px;
    min-width: 180px;
}

.iban-feedback {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1f6f49;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.iban-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.iban-feedback.is-error {
    color: #b02a1c;
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover,
.btn:focus {
    background: var(--accent-light);
    color: var(--text);
}

@media (max-width: 600px) {
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
    }
}

.upload-form {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 1rem;
    background: var(--card-bg);
    box-shadow: 0 10px 30px var(--card-shadow);
}

.upload-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

@media (max-width: 600px){
    .upload-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
}

.upload-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* Modern, accessible file input */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem;
    border: 1px solid rgba(45, 42, 50, 0.08);
}

.file-input-wrapper input[type="file"] {
    /* keep the input in the DOM for accessibility and form submission but hide the browser UI */
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* visible custom button */
.file-btn {
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.08s ease;
}

.file-btn:hover,
.file-btn:focus {
    background: var(--accent-light);
    color: var(--text);
    transform: translateY(-1px);
}

.file-name {
    flex: 1 1 auto;
    min-width: 0;
    color: #6b6b73;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 0.5rem;
    cursor: text;
}

/* focus styles */
.file-input-wrapper input[type="file"]:focus-visible,
.file-input-wrapper input[type="file"]::file-selector-button:focus-visible,
.file-name:focus-visible {
    outline: 2px solid rgba(111, 143, 120, 0.35);
    outline-offset: 3px;
}

.upload-controls input[type="file"] {
    padding: 0.65rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(45, 42, 50, 0.2);
    background: #fff;
    cursor: pointer;
}

body.upload-blocked {
    overflow: hidden;
}

.upload-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(45, 42, 50, 0.55);
    z-index: 1200;
    padding: 1rem;
    pointer-events: all;
}

.upload-overlay.open {
    display: flex;
}

.upload-overlay-card {
    width: min(92vw, 380px);
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 20px 45px rgba(45, 42, 50, 0.25);
    padding: 1.25rem 1.1rem;
    text-align: center;
}

.upload-spinner {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.7rem;
    border-radius: 50%;
    border: 4px solid rgba(212, 143, 122, 0.24);
    border-top-color: var(--accent);
    animation: upload-spin 0.9s linear infinite;
}

@keyframes upload-spin {
    to {
        transform: rotate(360deg);
    }
}

.upload-overlay-title {
    margin: 0;
    font-weight: 700;
}

.upload-overlay-percent {
    margin: 0.35rem 0 0.8rem;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--accent);
}

.upload-progress {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(45, 42, 50, 0.1);
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    transition: width 0.2s ease;
}

.map-container {
    margin-top: 2.5rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--card-shadow);
}

.map-container iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
}

.gallery {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 600px){
    .gallery{
        display: grid;
        gap: 1.5rem;
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.gallery-item {
    background: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 10px 30px var(--card-shadow);
    overflow: hidden;
}

.gallery-item {
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    cursor: zoom-in;
}

.gallery-item p {
    margin: 0;
    padding: 1rem;
}

.gallery.uploads .gallery-item {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery.uploads .gallery-item img {
    height: auto;
}

.media-pagination {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.media-pagination .btn {
    margin-top: 0;
}

.media-pagination-status {
    font-weight: 700;
    color: rgba(45, 42, 50, 0.82);
}

.media-pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
}

.media-page-link {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    border: 1px solid rgba(111, 143, 120, 0.45);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.media-page-link:hover,
.media-page-link:focus {
    background: rgba(111, 143, 120, 0.12);
}

.media-page-link.is-active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.uploaded-video {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #000;
}

.media-download-link {
    margin: 0;
    padding: 0.8rem 1rem 1rem;
}

.media-download-link a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.media-download-link a:hover,
.media-download-link a:focus {
    text-decoration: underline;
}

/* Download overlay shown on hover over each uploaded image */
.download-overlay {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    box-shadow: 0 8px 20px rgba(45, 42, 50, 0.12);
    text-decoration: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    z-index: 2;
}

.gallery-item:hover .download-overlay,
.gallery-item:focus-within .download-overlay {
    opacity: 1;
    transform: none;
}

.download-overlay svg {
    display: block;
    color: var(--accent);
}

/* Lightbox download control */
.lightbox-download {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.6rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    text-decoration: none;
    border: none;
}

.lightbox-download svg {
    color: #fff;
}

/* Utility: visually hidden (accessible) */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 1.5rem;
    z-index: 1000;
}

.lightbox.open {
    display: flex;
}

.lightbox-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: min(90vw, 900px);
    width: min(90vw, 900px);
    max-height: 90vh;
    border-radius: 0.75rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    touch-action: none;
    cursor: zoom-in;
}

.lightbox-stage.is-zoomed {
    cursor: grab;
}

.lightbox-stage.dragging {
    cursor: grabbing;
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: auto;
    transform-origin: center center;
    transition: transform 0.12s ease-out;
    pointer-events: none;
}

.lightbox-tools {
    position: absolute;
    top: clamp(0.75rem, 3vw, 1.5rem);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 1003;
}

.lightbox-zoom {
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.4rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-zoom:hover,
.lightbox-zoom:focus {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}

.lightbox-zoom:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    font-size: 2rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 1002;
}

.lightbox-nav:hover,
.lightbox-nav:focus {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev {
    left: clamp(1rem, 4vw, 3.5rem);
}

.lightbox-next {
    right: clamp(1rem, 4vw, 3.5rem);
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: #fff;
    background: transparent;
    border: none;
    cursor: pointer;
    line-height: 1;
    z-index: 1003;
}

.lightbox-close:focus {
    outline: 2px solid #fff;
    outline-offset: 4px;
}

body.lightbox-open {
    overflow: hidden;
}

.cta {
    margin-top: 2rem;
    text-align: center;
    font-size: 20px;
}

@media (max-width: 600px){
    .cta {
        margin-top: 1.5rem;
        font-size: 10px;
    }
}

.timeline {
    display: grid;
    gap: 1.5rem;
    border-left: 4px solid var(--accent);
    padding-left: 1.5rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.timeline-year {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
    padding-top: 0.3rem;
}

.footer {
    text-align: center;
    padding: 2rem 1rem;
    background-image: url("../img/footer.jpg") !important; 
    background-size: 50%;
    background-position: right bottom;
    background-repeat: no-repeat;
    padding: 145px;
    margin-bottom: -8px;
    margin-left: -14px;

}

@media (max-width: 600px){
    .footer {
    padding: 2rem 1rem;
    background-image: url("../img/footer.jpg") !important; 
    background-size: cover;
    padding: 65px;
    margin-bottom: -8px;
    margin-left: -14px;

    }
    .media-footer{
        position: fixed;
        bottom: 0;
        background-size: cover;
        width: 100%;
    }
}

@media (min-width: 500px) and (max-width: 700px){
    .footer {
    padding: 2rem 1rem;
    background-image: url("../img/footer.jpg") !important; 
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    height: 200px;
    margin-bottom: -8px;
    margin-left: -14px;

    }}

    @media (min-width: 700px) and (max-width: 1600px) {
    .footer {
    padding: 2rem 1rem;
    background-image: url("../img/footer.jpg") !important; 
    background-size: 57%;
    background-position: center bottom;
    background-repeat: no-repeat;
    height: 285px;
    margin-bottom: -8px;
    margin-left: -14px;

    }}

/* Stili per la conferma partecipazione */
.confirmation-section {
    margin-bottom: var(--section-gap);
}

.confirmation-card {
    background: var(--card-bg);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 10px 30px var(--card-shadow);
    text-align: center;
}

.confirmation-card h2 {
    margin-top: 0;
    color: var(--accent);
}

@media (max-width: 600px) {
    .confirmation-card {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }
    
    .confirmation-card h2 {
        font-size: 1.5rem;
    }
    
    .confirmation-card p {
        font-size: 0.95rem;
    }
}

.confirmation-form {
    margin-top: 2rem;
    text-align: left;
}

.participant-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: 0.75rem;
    align-items: end;
}
.participant-row_all {
    background: var(--bg);
    border-radius: 0.75rem;
    height: 240px;
}
.allergie{
    margin-left: 17px;
    margin-right: 14px;
}



.participant-row:first-child {
    grid-template-columns: 1fr 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.form-input {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 2px solid rgba(45, 42, 50, 0.15);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #bdcfc1;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    margin-right: 0.5rem;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-tertiary {
    background: transparent;
    color: var(--text);
    border: 2px solid rgba(45, 42, 50, 0.2);
}

.btn-tertiary:hover {
    background: rgba(45, 42, 50, 0.05);
}

.btn-remove {
    background: #dc3545;
    color: #fff;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.btn-remove:hover {
    background: #c82333;
}

@media (max-width: 600px) {
    .splash-logo {
        padding: 2rem 0.5rem;
        border-radius: 1.5rem;
        min-width: min(92vw, 340px);
        position: relative;
        margin-top: 80px;
        
    }

    .splash-ring {
        width: 128px;
        height: 128px;
        border-width: 8px;
    }

    .splash-initials {
        font-size: 53px;
        font-family: "Imperial Script", cursive;

    }

    .nav {
        gap: 0.5rem;
    }
    .section-card {
        padding: 1.5rem 1.25rem;
    }
    .upload-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .upload-controls input[type="file"] {
        width: 100%;
    }

    .file-input-wrapper {
        width: 100%;
    }
    .upload-controls .btn {
        width: 100%;
    }
    .timeline {
        border-left: none;
        padding-left: 0;
    }
    .timeline-item {
        grid-template-columns: 1fr;
    }
    .timeline-year {
        padding-top: 0;
    }
    .participant-row {
        grid-template-columns: 1fr;
    }
    .participant-row:first-child {
        grid-template-columns: 1fr;
    }

    .upload-overlay-card {
        width: min(94vw, 340px);
        padding: 1rem;
    }

    .upload-overlay-title {
        font-size: 0.98rem;
    }

    .upload-overlay-percent {
        font-size: 1rem;
    }
}
