:root {
    --primary-color: hsl(208, 43%, 44%);
    --secondary-color: #f8f6f2;
    --highlight-color: hsl(208, 43%, 70%);
    --text-color: #333;
    --white: #fff;
}

body {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 20px;
    margin: 0;
    padding: 0;
    background: var(--secondary-color);
    color: var(--text-color);
}

h1, h2, h3 {
    font-family: 'Caudex', serif;
}

section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--secondary-color);
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--highlight-color);
    z-index: 101;
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    transition: max-height 0.3s ease;
}
.nav-menu li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.2s;
}
.nav-menu li a:hover {
    color: var(--highlight-color);
}
.hero {
    background: url('assets/img/hero.jpg') center/cover no-repeat;
    min-height: 60vh;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: end;
    @media screen and (max-width: 1300px) {
        justify-content: start;
    }
    align-items: center;
    text-align: center;
    color: var(--secondary-color);
    padding: 0 2rem 6rem 2rem;
    overflow: hidden;
    text-shadow: 2px 2px 7px black;
}
.hero-content {
    position: relative;
    z-index: 3;
}
.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.5rem;
}

.quote > div {
    max-width: 70vw;
}

.event {
    color: var(--secondary-color);
    background-color: var(--primary-color);
    min-height: 20vh;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 5rem;
}
.event > span {
    text-align: center;
}
.event > span > h2 {
    margin-top: 0;
}

.info {
    margin-top: -5rem;
    padding-bottom: 2rem;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    grid-column-gap: 2rem;
    grid-row-gap: 2rem;
    @media screen and (max-width: 700px) {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        grid-column-gap: 0;
    }
}
.info .info-ricevimento {
    grid-area: 1 / 2 / 2 / 3;
    @media screen and (max-width: 700px) {
        grid-area: 2 / 1 / 3 / 3;
    }
}
.info .info-cerimonio {
    grid-area: 1 / 1 / 2 / 2;
    @media screen and (max-width: 700px) {
        grid-area: 1 / 1 / 2 / 2;
    }
}

.info > div {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.info img {
    max-width: 30vw;
    @media screen and (max-width: 700px) {
        max-width: 70vw;
    }
}

.parcheggi {
    color: var(--secondary-color);
    background-color: var(--primary-color);
    text-align: center;
    min-height: 20vh;
    padding: 
    0.5rem 0 2rem 0;
}


.parcheggi > div {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.parcheggi .info-parcheggi {
    text-align: justify;
    grid-area: 2 / 1 / 3 / 3;
    @media screen and (max-width: 700px) {
        grid-area: 3 / 1 / 4 / 2;
    }
    max-width: min(80vw, 600px);
}

.parcheggi .map {
    color: var(--secondary-color);
    background-color: var(--primary-color);
    margin-top: 2rem;
    max-width: min(60vw, 40rem);
    @media screen and (max-width: 700px) {
        max-width: 80vw;
    }
    aspect-ratio: 4/3;
    border: none;
}

.gallery {
    text-align: center;
    min-height: 20vh;
    padding: 0.5rem 0 2rem 0;
}

@media screen and (max-width: 700px) {
    .gallery {
        padding: 0.5rem 0 0 0;
    }
    
}

.gallery > p {
    max-width: 80vw;
}

.rsvp {
    color: var(--secondary-color);
    background-color: var(--primary-color);
    text-align: center;
    padding: 0.5rem 0 2rem 0;
}

.rsvp form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}
.rsvp input, .rsvp textarea {
    padding: 0.75rem;
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    font-size: 1rem;
}
.rsvp button {
    background: var(--highlight-color);
    color: var(--secondary-color);
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1.2rem;
    font-weight: 400;
}
.rsvp button:hover {
    background: var(--highlight-color);
}

.regalo {
    text-align: center;
    min-height: 20vh;
    padding: 0.5rem 0 2rem 0;
}

.slideshow {
    position: relative;
    width: 100%;
    max-width: min(80vw, 1000px);
    margin: 0 auto;
    aspect-ratio: 4/3;
    background: transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* stack image and caption vertically */
    align-items: center;
    justify-content: center;
}
@media screen and (max-width: 700px) {
    .slideshow {
        max-width: 100%; /* adjust for smaller screens */
    }
    
}
.slideshow-images {
    width: 100%;
    height: 100%;
    position: relative;
}
.slideshow-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}
.slideshow-img.active {
    opacity: 1;
    pointer-events: auto;
}
.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(40, 40, 40, 0.4);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 2;
    border-radius: 50%;
    transition: background 0.2s;
}
.slideshow-prev:hover,
.slideshow-next:hover {
    background: rgba(40, 40, 40, 0.7);
}
.slideshow-prev {
    left: 10px;
}
.slideshow-next {
    right: 10px;
}
.slideshow-caption {
    position: static;
    width: 100%;
    text-align: center;
    color: #222;
    font-size: 1.1rem;
    padding: 0.5em 1em;
    border-radius: 8px;
    margin: 1em 0 0 0;
    z-index: 3;
    pointer-events: none;
}

.info-table td {
    vertical-align: middle;
}
.info-table .info-icon {
    width: 2.5em;
    text-align: center;
}
.info-table .info-icon img {
    max-width: 2em;
    max-height: 2em;
    vertical-align: middle;
}
.info-table .info-label {
    font-weight: bold;
    color: var(--primary-color);
    width: 7em;
}
.info-table .info-value a {
    color: var(--primary-color);
    text-decoration: underline;
}
.info-table .info-value {
    color: var(--text-color);
}
@media (max-width: 700px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        margin-top: 0.5rem;
    }
    .nav-menu.open {
        max-height: 500px;
        overflow: visible;
        padding-top: 0.2rem;
    }
    .menu-toggle {
        display: block;
        position: absolute;
        right: 2rem;
        top: 0.7rem;
    }
}

#regalo > p {
    max-width: 80vw;
    margin: 0 auto;
}

.gift-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}
.gift-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.gift-card, .gift-card .gift-title, .gift-card .gift-price {
    transition: all 0.3s ease-in-out;
}
.gift-card:hover {
    transform: scale(1.05);
    background-color: var(--primary-color);
    color: var(--secondary-color);
}
.gift-card:hover .gift-title {
    color: var(--secondary-color);
}
.gift-card:hover .gift-price {
    color: var(--secondary-color);
}
.gift-image-container {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    cursor: pointer;
}
.gift-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.2s;
}
.gift-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    font-size: 1.05em;
    text-align: center;
    padding: 1em;
    transition: opacity 0.2s;
    pointer-events: none;
    border-radius: 0;
}
.gift-image-container:hover .gift-overlay,
.gift-image-container:focus-within .gift-overlay {
    opacity: 1;
    pointer-events: auto;
}
.gift-title {
    font-weight: bold;
    font-size: 1.1em;
    margin: 1em 0 0.3em 0;
    color: var(--primary-color);
    text-align: center;
}
.gift-price {
    color: var(--text-color);
    font-size: 1em;
    margin-bottom: 1em;
    text-align: center;
}

.images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.images img {
    width: 20vw;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: #fff;
    display: block;
}

@media (max-width: 700px) {
    .images {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    .images img {
        width: 60vw;
        aspect-ratio: 16/9;
    }
}
