﻿body {
    background: radial-gradient(circle at top, rgba(255,255,255,0.75) 0%, rgba(255,255,255,0) 35%), linear-gradient(180deg, #f8f5f1 0%, #f4efea 100%);
    color: #3c2f29;
    font-family: "Cormorant Garamond", serif;
}

/* HERO */
.header-hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/images/01sposi.jpg');
    background-size: cover;
    background-position: center center;
    transform: scale(1.08);
    animation: heroZoom 8s ease-out forwards;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(28, 22, 19, 0.18) 0%, rgba(28, 22, 19, 0.34) 100%), radial-gradient(circle at center, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 55%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem 1rem 4.5rem;
}

.hero-names {
    font-family: "Great Vibes", cursive;
    font-size: clamp(4.4rem, 9vw, 8rem);
    line-height: 1.05;
    color: #fff;
    text-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

.hero-date {
    margin-top: 0.9rem;
    font-size: clamp(1.4rem, 3vw, 4rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

.hero-subtitle {
    margin-top: 0.7rem;
    font-size: clamp(0.9rem, 1.4vw, 1.5rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.78);
    text-shadow: 0 4px 14px rgba(0,0,0,0.16);
}

.logo-hero {
    display: block;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    filter: drop-shadow(0 10px 28px rgba(0,0,0,0.22));
}

.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    z-index: 2;
    width: 34px;
    height: 54px;
    border: 1px solid rgba(255,255,255,0.45);
    border-radius: 999px;
    text-decoration: none;
}

    .hero-scroll span {
        position: absolute;
        left: 50%;
        top: 10px;
        width: 4px;
        height: 10px;
        margin-left: -2px;
        border-radius: 999px;
        background: rgba(255,255,255,0.85);
        animation: scrollDot 1.8s ease-in-out infinite;
    }

/* ANIMAZIONI */
.fade-hero {
    opacity: 0;
    transform: translateY(22px);
    animation: fadeHero 1s ease forwards;
}

.delay-1 {
    animation-delay: 0.25s;
}

.delay-2 {
    animation-delay: 0.5s;
}

.delay-3 {
    animation-delay: 0.8s;
}

.delay-4 {
    animation-delay: 1s;
}

@keyframes fadeHero {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroZoom {
    to {
        transform: scale(1);
    }
}

@keyframes scrollDot {
    0% {
        opacity: 0;
        transform: translate(-50%, 0);
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(-50%, 16px);
    }
}

.sezione-save-date {
    align-items: stretch;
}

.save-date-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stack-foto-horizontal {
    display: flex;
    gap: 1rem;
    height: 100%;
}

.stack-foto-item {
    flex: 1;
    overflow: hidden;
    border-radius: 1rem;
}

.foto-stack {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.countdown-finished {
    display: inline-block;
    padding: 1.2rem 2rem;
    margin-top: 1rem;
    font-size: 1.6rem;
    font-weight: 500;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(135deg, #b88e7d, #a97662);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(169, 118, 98, 0.25);
    letter-spacing: 0.05em;
    width:100%;
}

.sezione2,
.sezione4,
.sezione6 {
    padding-top: 16px;
    padding-bottom: 16px;
}

    .sezione2 .row,
    .sezione4 .row,
    .sezione6 .row {
        --bs-gutter-y: 16px;
    }

@media (min-width: 768px) {
    .sezione2,
    .sezione4,
    .sezione6 {
        padding-top: 40px;
        padding-bottom: 40px;
    }

        .sezione2 .row,
        .sezione4 .row,
        .sezione6 .row {
            --bs-gutter-y: 24px;
        }
}

/* MOBILE */
@media (max-width: 991.98px) {
    .sezione-save-date > div {
        display: block;
    }

    .stack-foto {
        height: auto;
    }

    .stack-foto-top,
    .stack-foto-bottom {
        flex: none;
        min-height: 220px;
    }
}

/* CARD E TESTI */
.card-matrimonio {
    background: #fcfbf9;
    width: 100%;
    border: 1px solid rgba(212, 197, 187, 0.45);
}

    .card-matrimonio .card-body {
        padding: 1.5rem;
    }

@media (min-width: 768px) {
    .card-matrimonio .card-body {
        padding: 1.75rem;
    }
}

.small-title {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    color: #ab7f6a;
    text-transform: uppercase;
}

.titolo-data {
    line-height: 1;
    color: #3a2b25;
}

.testo-sezione {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #5a4841;
}

/* IMMAGINI CARD */
.img-card-top {
    height: 320px;
    object-fit: cover;
    display: block;
}

/* COUNTDOWN */
.countdown-wrapper {
    margin-top: auto;
    padding-top: 0.5rem;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(70px, 1fr));
    gap: 14px;
    max-width: 420px;
}

.count-item {
    background: #f3ede8;
    border: 1px solid #eadfd7;
    border-radius: 1rem;
    padding: 1rem 0.5rem;
    text-align: center;
}

.count-value {
    display: block;
    min-width: 2.5ch;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    color: #3f312c;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.count-label {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9b7868;
    line-height: 1.1;
}

/* IBAN */
.iban-box {
    background: #f3ede8;
    border: 1px solid #e4d8cf;
    border-radius: 1rem;
    padding: 1.25rem;
}

.iban-text {
    font-size: 1.2rem;
    word-break: break-word;
    color: #3b2f2a;
}

/* BOTTONI */
.btn-matrimonio {
    background-color: #a97662;
    border-color: #a97662;
    color: #fff;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
}

    .btn-matrimonio:hover {
        background-color: #936553;
        border-color: #936553;
        color: #fff;
    }

.btn-outline-matrimonio {
    border: 1px solid #b88e7d;
    color: #a97662;
    border-radius: 999px;
    padding: 0.75rem 1.5rem;
    background: transparent;
}

    .btn-outline-matrimonio:hover {
        background: #efe5df;
        color: #8f624f;
        border-color: #8f624f;
    }

/* FORM */
.form-control-matrimonio {
    border-radius: 1rem;
    border: 1px solid #dccfc6;
    padding: 0.85rem 1rem;
    font-size: 1rem;
}

    .form-control-matrimonio:focus {
        border-color: #b88e7d;
        box-shadow: 0 0 0 0.2rem rgba(169, 118, 98, 0.15);
    }

#formMessage {
    color: #7b5c4d;
    font-size: 1.05rem;
}

/* RESPONSIVE */
@media (max-width: 991.98px) {
    .header-hero {
        min-height: 62vh;
    }

    .logo-hero {
        max-width: 360px;
    }

    .sezione-save-date .col-lg-7,
    .sezione-save-date .col-lg-5 {
        display: block;
    }

    .stack-foto {
        height: auto;
    }

    .stack-foto-item {
        min-height: 260px;
    }

    .foto-stack {
        height: 260px;
    }

    .img-card-top {
        height: auto;
    }

    .testo-sezione {
        font-size: 1.1rem;
    }

    .titolo-data {
        line-height: 1.1;
    }
}

@media (max-width: 767.98px) {
    .header-hero {
        min-height: 54vh;
    }

    .logo-hero {
        max-width: 280px;
    }

    .hero-names {
        font-size: clamp(2.8rem, 12vw, 4rem);
    }

    .hero-date {
        font-size: 1.1rem;
        letter-spacing: 0.14em;
    }

    .hero-subtitle {
        font-size: 0.78rem;
        letter-spacing: 0.14em;
    }

    .hero-scroll {
        width: 30px;
        height: 48px;
        bottom: 16px;
    }
}

@media (max-width: 575.98px) {
    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .count-value {
        font-size: 1.8rem;
    }

    .stack-foto-item,
    .foto-stack {
        min-height: 220px;
        height: 220px;
    }
}

.global-message-bar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    z-index: 9999;
    background: #ffffff;
    color: #a97662;
    padding: 18px 28px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    width: auto;
    max-width: 95%;
    min-width: 320px;
    font-size: 1.1rem;
    font-weight: 500;
}

    /* visibile */
    .global-message-bar.show {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    /* errore */
    .global-message-bar.error {
        color: #c0392b;
    }

/* TESTO */
#globalMessageText {
    flex: 1;
}

/* X grande */
.global-message-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: inherit;
    line-height: 1;
    padding: 0 6px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

    .global-message-close:hover {
        opacity: 1;
        transform: scale(1.2);
    }