/* ============================================================
   FONT
   ============================================================ */
@font-face {
    font-family: 'Dungeon';
    src: url('../assets/fonts/dungeon.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ============================================================
   VARIABLES
   ============================================================ */
:root {
    --green-dark:   #2c4a2c;
    --green-mid:    #4a7a4a;
    --green-light:  #6b8e5a;
    --gold:         #b8943e;
    --gold-light:   #d4b062;
    --gold-pale:    #ecddb8;
    --cream:        #faf7f2;
    --cream-mid:    #f2ebe0;
    --cream-dark:   #e8dece;
    --bg-base:      #F7F2E5;
    --white:        #ffffff;
    --text:         #3a3a3a;
    --text-light:   #6b6b6b;
    --border:       #d4c4a8;
    --shadow:       rgba(44, 74, 44, 0.10);
    --font-title:   'Dungeon', 'Georgia', serif;
    --font-body:    'Georgia', 'Times New Roman', serif;
    --radius:       14px;
    --radius-sm:    8px;
    --max-w:        800px;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: var(--green-light); text-decoration: none; transition: color .25s; }
a:hover { color: var(--gold); }
ul   { list-style: none; padding: 0; }
strong { color: var(--green-dark); }

/* ============================================================
   BASE BODY
   ============================================================ */
body {
    font-family: var(--font-body);
    color: var(--text);
    line-height: 1.75;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow-x: hidden;
    position: relative;
    background: #F7F2E5;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    text-align: center;
    padding: 30px 20px 50px;
    color: var(--text-light);
    font-size: .85rem;
}
.footer-heart { font-size: 1.4rem; color: var(--gold); margin-top: 4px; }


/* ============================================================
   HOME PAGE
   ============================================================ */
.page-home {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

.home-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 20px 24px;
    gap: 26px;
}

/* Hero */
.home-hero { text-align: center; }

.home-title {
    font-family: var(--font-title);
    font-size: clamp(2.8rem, 8vw, 5.4rem);
    color: var(--green-dark);
    letter-spacing: 3px;
    line-height: 1.1;
}
.home-amp { color: var(--gold); }

.home-date {
    font-family: var(--font-title);
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    color: var(--gold);
    letter-spacing: 4px;
    margin-top: 8px;
}
.home-location {
    font-size: clamp(.85rem, 2vw, 1rem);
    color: var(--text);
    font-style: italic;
    margin-top: 4px;
    opacity: .82;
}

/* Countdown */
.home-countdown {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(250, 247, 242, 0.80);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(212, 176, 98, .55);
    border-radius: var(--radius);
    padding: 14px 26px;
    box-shadow: 0 4px 24px var(--shadow);
}
.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 56px;
}
.countdown-num {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    color: var(--green-dark);
    line-height: 1;
}
.countdown-lbl {
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--green-light);
    margin-top: 4px;
}
.countdown-sep {
    font-family: var(--font-title);
    font-size: clamp(1.4rem, 4vw, 2rem);
    color: var(--gold-light);
    line-height: 1;
    margin-bottom: 14px;
    align-self: flex-start;
}

/* Nav icons — transparent, sits directly on the CSS background */
.home-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    max-width: 680px;
    width: 100%;
}
.home-nav-item {
    display: block;
    width: 156px;
    flex-shrink: 0;
    transition: transform .3s ease, filter .3s ease;
    border-radius: var(--radius-sm);
}
.home-nav-item img {
    width: 100%;
    border-radius: var(--radius-sm);
    filter: drop-shadow(0 3px 8px rgba(0,0,0,.16));
}
.home-nav-item:hover {
    transform: translateY(-6px) scale(1.04);
}
.home-nav-item:hover img {
    filter: drop-shadow(0 8px 20px rgba(0,0,0,.24));
}


/* ============================================================
   SECTION PAGES — shared layout
   ============================================================ */
.page-section {
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* Sticky top bar */
.page-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 22px;
    background: rgba(250, 247, 242, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 14px var(--shadow);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--green-dark);
    font-family: var(--font-title);
    font-size: .9rem;
    letter-spacing: .5px;
    padding: 6px 14px;
    border-radius: 30px;
    border: 1.5px solid var(--green-light);
    white-space: nowrap;
    transition: background .2s, color .2s;
}
.back-btn:hover {
    background: var(--green-dark);
    color: var(--cream);
    border-color: var(--green-dark);
}
.back-arrow { font-size: 1.1rem; }

.page-header-titles {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.ph-names {
    font-family: var(--font-title);
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--green-dark);
    letter-spacing: 1.5px;
    line-height: 1.1;
}
.ph-amp { color: var(--gold); }
.ph-date {
    font-size: .68rem;
    letter-spacing: 2.5px;
    color: var(--text-light);
    margin-top: 1px;
}
.ph-spacer { width: 96px; } /* mirrors back-btn for centering */

.page-main { padding-bottom: 20px; }

/* ---- Section wrap (outer container) ---- */
.section-wrap {
    max-width: var(--max-w);
    margin: 28px auto 0;
    padding: 0 16px 30px;
}

/* ---- Section header: image + title ---- */
.section-header {
    margin-bottom: 0;
    /* image and title together form the top of the card */
}

/* The hero image at the top of the content card */
.section-hero-img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Section title — always present */
.section-title {
    font-family: var(--font-title);
    font-size: clamp(1.7rem, 4.5vw, 2.4rem);
    color: var(--green-dark);
    text-align: center;
    letter-spacing: 1.5px;
    padding: 28px 20px 0;
    line-height: 1.2;
}

/* The glassmorphism content card */
.section-body {
    background: rgba(250, 247, 242, 0.90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 36px var(--shadow);
    overflow: hidden; /* clips hero image to rounded corners */
}

/* When section has a hero image: square top corners on body */
.section-body.has-hero {
    border-radius: 0 0 var(--radius) var(--radius);
}

/* Body inner padding (everything below the title) */
.section-body-inner {
    padding: 24px 42px 38px;
}

/* ---- Content blocks ---- */
.content-block { margin-bottom: 38px; }
.content-block:last-child { margin-bottom: 0; }
.content-block p { margin-bottom: 14px; }
.content-block p:last-child { margin-bottom: 0; }

.content-block + .content-block {
    padding-top: 34px;
    border-top: 1px solid var(--border);
}

.block-title {
    font-family: var(--font-title);
    font-size: 1.45rem;
    color: var(--green-dark);
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
}
.block-title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 48px; height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}


/* ============================================================
   ABOUT US
   ============================================================ */
.story-highlight {
    font-family: var(--font-title);
    font-size: 1.65rem;
    text-align: center;
    color: var(--green-dark);
    padding: 18px 0;
    border-top: 1px solid var(--gold-pale);
    border-bottom: 1px solid var(--gold-pale);
    margin: 22px 0 !important;
}


/* ============================================================
   WEDDING DAY — Maps card
   ============================================================ */
.maps-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    padding: 18px 20px;
    background: var(--cream-mid);
    border: 1.5px solid rgba(212,176,98,.55);
    border-radius: var(--radius);
    box-shadow: 0 3px 14px var(--shadow);
    flex-wrap: wrap;
}
.maps-card-pin { color: var(--gold); flex-shrink: 0; }
.maps-card-info { flex: 1; min-width: 160px; }
.maps-card-name {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--green-dark);
    margin-bottom: 2px !important;
}
.maps-card-addr {
    font-size: .88rem;
    color: var(--text);
    margin-bottom: 2px !important;
}
.maps-card-region {
    font-size: .8rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0 !important;
}
.maps-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: var(--green-dark);
    color: var(--cream) !important;
    border-radius: 30px;
    font-family: var(--font-title);
    font-size: .88rem;
    letter-spacing: .5px;
    white-space: nowrap;
    transition: background .25s, transform .2s;
    flex-shrink: 0;
}
.maps-card-btn:hover { background: var(--green-light); transform: translateY(-2px); }


/* ============================================================
   WEDDING DAY — Timeline
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 100px;
    margin: 10px 0 20px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 83px; top: 12px; bottom: 12px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold-light), var(--green-light), var(--gold-light));
}
.timeline-item {
    position: relative;
    padding: 0 0 26px 26px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-time {
    position: absolute;
    left: -100px; top: 2px;
    width: 78px;
    text-align: right;
    font-family: var(--font-title);
    font-size: .98rem;
    color: var(--gold);
    letter-spacing: 1px;
}
.timeline-dot {
    position: absolute;
    left: -11px; top: 6px;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--gold);
    border: 2.5px solid var(--cream);
    box-shadow: 0 0 0 2px rgba(184,148,62,.4);
}
.timeline-content h3 {
    font-family: var(--font-title);
    font-size: 1.05rem;
    color: var(--green-dark);
    margin-bottom: 3px;
}
.timeline-content p {
    font-size: .88rem;
    color: var(--text-light);
    margin-bottom: 0 !important;
}
.timeline-note {
    font-size: .82rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 8px !important;
}


/* ============================================================
   WEDDING DAY — Weather 3-day
   ============================================================ */
.weather-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 22px;
}
.weather-card {
    background: var(--cream-mid);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 12px;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow);
    transition: transform .25s;
}
.weather-card:hover { transform: translateY(-3px); }
.weather-loading {
    grid-column: 1/-1;
    color: var(--text-light);
    font-style: italic;
    padding: 28px;
    text-align: center;
}
.wc-day {
    font-family: var(--font-title);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--green-light);
    margin-bottom: 6px;
}
.wc-icon { font-size: 2.2rem; margin: 4px 0; }
.wc-desc { font-size: .78rem; color: var(--text-light); font-style: italic; margin: 4px 0 8px; min-height: 2.2em; }
.wc-temps { display: flex; justify-content: center; gap: 8px; margin-bottom: 6px; }
.wc-max { font-family: var(--font-title); font-size: 1.15rem; color: var(--gold); }
.wc-min { font-family: var(--font-title); font-size: 1.15rem; color: var(--green-light); }
.wc-divider { color: var(--border); align-self: center; }
.wc-wind { font-size: .75rem; color: var(--text-light); display: flex; align-items: center; justify-content: center; gap: 4px; }


/* ============================================================
   TRAVEL
   ============================================================ */
.travel-note {
    background: rgba(107,142,90,.08);
    border-left: 3px solid var(--green-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 12px 16px;
    margin: 14px 0;
    font-size: .92rem;
}
.travel-note strong { display: block; margin-bottom: 4px; }

.coming-soon-block { text-align: center; padding: 30px 20px; }

/* Mappe parcheggi */
.parking-map { margin-top: 18px; }
.parking-map-title {
    font-family: var(--font-title);
    font-size: 1rem;
    color: var(--green-dark);
    letter-spacing: .5px;
    margin-bottom: 8px;
}
.parking-map img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    border: 1.5px solid rgba(212,176,98,.55);
    box-shadow: 0 3px 14px var(--shadow);
    cursor: zoom-in;
}
.parking-map-hint {
    font-size: .8rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    margin-top: 6px !important;
}


/* ============================================================
   RSVP
   ============================================================ */
.rsvp-list { margin: 12px 0 16px; }
.rsvp-list li {
    padding: 8px 0 8px 26px;
    position: relative;
    border-bottom: 1px dotted var(--border);
}
.rsvp-list li:last-child { border-bottom: none; }
.rsvp-list li::before { content: '✓'; position: absolute; left: 0; color: var(--green-light); }

.rsvp-deadline {
    font-family: var(--font-title);
    font-size: 1.3rem;
    color: var(--gold);
    text-align: center;
    padding: 14px;
    background: rgba(184,148,62,.08);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(212,176,98,.4);
    margin: 16px 0 !important;
}

/* Form */
.form-row { margin-bottom: 18px; }
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group label {
    display: block;
    font-size: .88rem;
    font-weight: bold;
    color: var(--green-dark);
    margin-bottom: 6px;
}
.req { color: var(--gold); }

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    display: block;
    width: 100%;
    padding: 11px 14px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: .95rem;
    color: var(--text);
    transition: border-color .25s, box-shadow .25s;
    resize: none;           /* static — non ridimensionabile */
    appearance: none;
    -webkit-appearance: none;
}
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b8e5a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
}
.form-group textarea { height: 88px; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green-light);
    box-shadow: 0 0 0 3px rgba(107,142,90,.14);
}

/* ── Multi-person name list ── */
@keyframes nameIn {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.names-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    animation: nameIn .2s ease both;
}

.name-row input[type="text"] {
    flex: 1;
}

/* Cerchio × coerente con lo stile faq-icon */
.btn-remove-name {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(212,176,98,.5);
    background: var(--cream-mid);
    color: var(--text-light);
    font-size: .95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .25s, color .25s, background .25s;
    padding: 0;
    line-height: 1;
}
.btn-remove-name:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212,176,98,.10);
}

/* Pillola "+ Aggiungi" coerente con back-btn e maps-card-btn */
.btn-add-person {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 18px 7px 7px;
    background: none;
    border: 1.5px solid var(--green-light);
    border-radius: 30px;
    color: var(--green-dark);
    font-family: var(--font-title);
    font-size: .88rem;
    letter-spacing: .3px;
    cursor: pointer;
    transition: background .25s, border-color .25s, color .25s, transform .2s;
}
.btn-add-person .add-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--green-dark);
    color: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    transition: background .25s;
}
.btn-add-person:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--cream);
    transform: translateY(-1px);
}
.btn-add-person:hover .add-icon {
    background: rgba(255,255,255,.2);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 40px;
    background: var(--green-dark);
    color: var(--cream);
    border: none;
    border-radius: 30px;
    font-family: var(--font-title);
    font-size: 1.05rem;
    letter-spacing: .8px;
    cursor: pointer;
    transition: background .25s, transform .2s;
    box-shadow: 0 3px 14px var(--shadow);
}
.btn-primary:hover { background: var(--green-light); transform: translateY(-2px); }
.btn-primary:disabled { background: var(--border); cursor: not-allowed; transform: none; }

.form-feedback {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: .95rem;
    text-align: center;
}
.form-feedback.success { background: rgba(107,142,90,.12); border: 1px solid var(--green-light); color: var(--green-dark); }
.form-feedback.error   { background: rgba(180,50,50,.08);  border: 1px solid #c87070; color: #8b2020; }


/* ============================================================
   PHOTO GALLERY
   ============================================================ */
.hashtag { font-family: var(--font-title); color: var(--gold); font-size: 1.15em; }
.note-text { color: var(--text-light); font-style: italic; }

.gallery-bullet-list { margin: 10px 0 14px; }
.gallery-bullet-list li {
    padding: 6px 0 6px 22px;
    position: relative;
    font-size: .93rem;
    border-bottom: 1px dotted var(--border);
}
.gallery-bullet-list li:last-child { border-bottom: none; }
.gallery-bullet-list li::before { content: '–'; position: absolute; left: 0; color: var(--green-light); }

.qr-block { text-align: center; }
.qr-code {
    display: block;
    margin: 20px auto 16px;
    width: 190px;
    padding: 12px;
    background: #fff;
    border: 1.5px solid rgba(212,176,98,.55);
    border-radius: var(--radius);
    box-shadow: 0 3px 14px var(--shadow);
    transition: transform .2s;
}
.qr-code:hover { transform: translateY(-2px); }
.qr-code img { display: block; width: 100%; height: auto; }

.qr-bullet-list { text-align: left; max-width: 460px; margin: 20px auto 0; }
.qr-caption { font-size: .82rem; color: var(--text-light); font-style: italic; margin-top: 8px !important; }

.gallery-coming { color: var(--text-light); font-style: italic; text-align: center; margin-bottom: 14px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.gallery-item { border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 2px 10px var(--shadow); transition: transform .3s; cursor: pointer; }
.gallery-item:hover { transform: scale(1.03); }
.gallery-item img { width: 100%; height: 200px; object-fit: cover; }

.hashtag-banner {
    text-align: center;
    font-family: var(--font-title);
    font-size: 2rem;
    color: var(--gold);
    opacity: .5;
    letter-spacing: 2px;
    margin-top: 28px;
}


/* ============================================================
   FAQ
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--cream-mid);
}
.faq-q {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: .98rem;
    font-weight: bold;
    color: var(--green-dark);
    text-align: left;
    cursor: pointer;
    transition: background .2s;
}
.faq-q:hover { background: rgba(107,142,90,.06); }
.faq-icon {
    flex-shrink: 0;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 1.5px solid rgba(212,176,98,.6);
    position: relative;
    transition: transform .3s, background .2s;
}
.faq-icon::before,
.faq-icon::after {
    content: '';
    position: absolute;
    background: var(--gold);
    border-radius: 2px;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    transition: opacity .3s;
}
.faq-icon::before { width: 10px; height: 2px; }
.faq-icon::after  { width: 2px; height: 10px; }
.faq-q[aria-expanded="true"] .faq-icon { background: var(--gold-pale); transform: rotate(45deg); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .3s ease;
    padding: 0 18px;
}
.faq-a.open { max-height: 700px; padding: 4px 18px 18px; }
.faq-a p { margin-bottom: 10px; font-size: .93rem; }
.faq-a p:last-child { margin-bottom: 0; }
.faq-a ul { padding-left: 18px; list-style: disc; }
.faq-a ul li { margin-bottom: 6px; font-size: .93rem; }


/* ============================================================
   GIFT
   ============================================================ */
.gift-intro { text-align: center; }
.gift-intro p { max-width: 540px; margin-left: auto; margin-right: auto; }

.iban-card {
    margin-top: 28px;
    padding: 30px 26px;
    background: linear-gradient(135deg, var(--cream), rgba(236,221,184,.5));
    border: 2px solid rgba(212,176,98,.6);
    border-radius: var(--radius);
    text-align: center;
    box-shadow: 0 4px 22px var(--shadow);
}
.iban-names {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--green-dark);
    margin-bottom: 12px !important;
}
.iban-number {
    font-family: 'Courier New', monospace;
    font-size: 1.12rem;
    letter-spacing: 2px;
    color: var(--text);
    word-break: break-all;
    background: rgba(255,255,255,.65);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px !important;
}
.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    background: var(--green-dark);
    color: var(--cream);
    border: none;
    border-radius: 30px;
    font-family: var(--font-title);
    font-size: .93rem;
    cursor: pointer;
    transition: background .25s, transform .2s;
}
.btn-copy:hover { background: var(--green-light); transform: translateY(-2px); }
.btn-copy.copied { background: var(--green-light); }


/* ============================================================
   MOBILE FAB — back button (bottom-right, thumb-friendly)
   ============================================================ */
.mobile-fab-back { display: none; }

@media (max-width: 600px) {
    body.page-section .mobile-fab-back {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 22px;
        right: 18px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: var(--green-dark);
        color: var(--cream) !important;
        font-size: 1.5rem;
        line-height: 1;
        box-shadow: 0 4px 18px rgba(44,74,44,.40);
        border: 2px solid rgba(212,176,98,.45);
        z-index: 200;
        text-decoration: none;
        transition: background .2s, transform .2s, box-shadow .2s;
        -webkit-tap-highlight-color: transparent;
    }
    body.page-section .mobile-fab-back:active {
        background: var(--green-light);
        transform: scale(.93);
        box-shadow: 0 2px 8px rgba(44,74,44,.25);
    }
}


/* ============================================================
   RSVP SUCCESS OVERLAY
   ============================================================ */
.rsvp-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(44, 74, 44, 0.50);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease;
}
.rsvp-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.rsvp-overlay-card {
    background: var(--cream);
    border: 2px solid var(--gold-light);
    border-radius: var(--radius);
    padding: 44px 40px 34px;
    text-align: center;
    max-width: 340px;
    width: 88%;
    box-shadow: 0 12px 56px rgba(44,74,44,.30);
    transform: scale(.90);
    transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.rsvp-overlay.visible .rsvp-overlay-card {
    transform: scale(1);
}

/* Cerchio con spunta CSS */
.rsvp-overlay-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--green-mid), var(--green-dark));
    margin: 0 auto 20px;
    box-shadow: 0 4px 20px rgba(44,74,44,.28);
    position: relative;
}
.rsvp-overlay-icon::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 26px;
    height: 14px;
    border-left: 3px solid var(--cream);
    border-bottom: 3px solid var(--cream);
    transform: translate(-50%, -60%) rotate(-45deg);
}

.rsvp-overlay-msg {
    font-family: var(--font-title);
    font-size: 1.15rem;
    color: var(--green-dark);
    line-height: 1.55;
    margin: 0 0 22px;
}

/* Barra progresso auto-chiusura */
.rsvp-overlay-bar {
    height: 3px;
    border-radius: 2px;
    background: var(--gold-pale);
    overflow: hidden;
}
.rsvp-overlay-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--green-light), var(--gold-light));
    border-radius: 2px;
}
.rsvp-overlay.visible .rsvp-overlay-bar::after {
    animation: overlayCountdown 2.8s linear forwards;
}
@keyframes overlayCountdown {
    from { width: 100%; }
    to   { width: 0%; }
}

/* Errore — shake */
@keyframes shakeX {
    0%,100% { transform: translateX(0); }
    20%     { transform: translateX(-7px); }
    40%     { transform: translateX( 7px); }
    60%     { transform: translateX(-4px); }
    80%     { transform: translateX( 4px); }
}
.form-feedback.error.shake { animation: shakeX .38s ease; }


/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,.9);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; border-radius: var(--radius-sm); }
.lightbox-x {
    position: absolute;
    top: 18px; right: 26px;
    font-size: 2.2rem;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    opacity: .8;
    transition: opacity .2s;
}
.lightbox-x:hover { opacity: 1; }


/* ============================================================
   RESPONSIVE — TABLET  (≤ 860px)
   ============================================================ */
@media (max-width: 860px) {
    .section-body-inner { padding: 22px 28px 30px; }
    .weather-grid { gap: 10px; }
    .ph-spacer { width: 78px; }
    .home-nav-item { width: 140px; }
}

/* ============================================================
   RESPONSIVE — MOBILE  (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {

    /* Homepage */
    .home-wrapper { padding: 30px 16px 16px; gap: 18px; }
    .home-nav { gap: 12px; }
    .home-nav-item { width: 118px; }
    .home-countdown { padding: 12px 14px; gap: 4px; }
    .countdown-item { min-width: 44px; }
    .countdown-num { font-size: 1.65rem; }
    .countdown-sep { font-size: 1.3rem; margin-bottom: 10px; }
    .countdown-lbl { font-size: .54rem; }

    /* Page header */
    .page-header { padding: 8px 12px; }
    .back-label { display: none; }
    .back-btn { padding: 6px 10px; font-size: .82rem; }
    .ph-names { font-size: 1.05rem; }
    .ph-spacer { width: 42px; }

    /* Section */
    .section-wrap { margin: 14px auto; padding: 0 10px 20px; }
    .section-hero-img { max-height: 200px; }
    .section-title { font-size: 1.5rem; padding: 18px 14px 0; }
    .section-body-inner { padding: 18px 16px 24px; }
    .block-title { font-size: 1.2rem; }
    .story-highlight { font-size: 1.25rem; }

    /* Timeline */
    .timeline { padding-left: 72px; }
    .timeline::before { left: 58px; }
    .timeline-time { left: -72px; width: 56px; font-size: .82rem; }

    /* Weather */
    .weather-grid { grid-template-columns: 1fr; gap: 10px; }

    /* Maps card */
    .maps-card { flex-direction: column; gap: 12px; text-align: center; }
    .maps-card-btn { width: 100%; justify-content: center; }

    /* Form */
    .form-row-2col { grid-template-columns: 1fr; }

    /* Gallery */
    .gallery-grid { grid-template-columns: 1fr; }

    /* IBAN */
    .iban-number { font-size: .92rem; letter-spacing: 1px; }
    .iban-card { padding: 22px 16px; }
}

/* ============================================================
   RESPONSIVE — SMALL (≤ 380px)
   ============================================================ */
@media (max-width: 380px) {
    .home-nav-item { width: 100px; }
    .home-title { font-size: 2.4rem; }
    .home-nav { gap: 10px; }
}
