* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
}

h2 {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-style: normal;
    font-size: 4rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

h2.visible {
    opacity: 1;
    transform: translateY(0);
}


h3 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 700;
    font-style: normal;
}

section {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    align-content: center;

}

section > div {
    max-width: 1200px;
}


.hero {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: end;
    align-items: center;
    align-content: center;
    background: url("./images/hero.jpg") no-repeat center center/cover;
    overflow: hidden;
    z-index: 1;
    color: #ffffff;
    padding-bottom: 6rem;


}



.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: -1; /* places it behind the content */
}

.hero-title {
    font-family: "Cormorant Garamond", serif;
    font-weight: 400;
    font-style: normal;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
}

.hero-title > span {
    font-family: "Great Vibes", cursive;
    font-weight: 400;
    font-style: normal;
    font-size: 7rem;
}

.hero-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem
}

.vl {
    border-left: 2px solid #ffffff;
    height: 100%;
    left: 50%;
    margin-left: -3px;
    top: 0;
}

#our-story {
    background: #f6f4f0;
    overflow: hidden;
}

.section-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    align-items: center;
    height: 100%;
    padding: 5rem 2rem;
}

.section-content > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    font-size: 1.2rem;

}


.polaroid {
    opacity: 0;
    transform: translateX(0);
    transition: transform 1s ease, opacity 1s ease;
    padding: 10px 10px 30px 10px;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    height: auto;
}


/* Initial animation setup */
.polaroid-left {
    transform: translateX(-100px);
}

.polaroid-right {
    transform: translateX(100px);
}

/* When in view: activate animation */
.polaroid.animate-left {
    opacity: 1;
    transform: translateX(0) rotate(-3deg);
}

.polaroid.animate-right {
    opacity: 1;
    transform: translateX(0) rotate(3deg);
    transition-delay: 0.2s; /* delay for right image */
}

.section-content > div > img {
    width: 100%;
    object-fit: cover;
}

/* SCHEDULE SECTION */

#schedule {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.5) 100%), url("images/black-bg.png"), center top no-repeat;
    background-size: cover;
    color: #f6f4f0;
}

.schedule-content {
    height: 100%;
}


.schedule-item {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;

}

.schedule-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.3) 100%);
    z-index: -1; /* places it behind the content */
}

.schedule-item:nth-child(1) {
    background: url("./images/schedule-item-1.JPG") no-repeat center center/cover;
}

.schedule-item:nth-child(2) {
    background: url("./images/schedule-item-2.JPG") no-repeat center center/cover;
}

.schedule-item:nth-child(3) {
    background: url("./images/schedule-item-3.JPG") no-repeat center center/cover;
}

#schedule .section-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.schedule-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3rem;
    height: 100%;
}

.schedule-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.schedule-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.schedule-item > h3 {
    font-size: 2rem;
}


/*-----------------*/
/*RSVP SECTION */
#rsvp {
    position: relative;
    z-index: 1;
    background: url("images/rsvp-hero.JPG") no-repeat center center/cover;
    color: #f6f4f0;

}

#rsvp::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000000;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.5) 100%);
    z-index: -1; /* places it behind the content */
}

#rsvp-info {
    flex-direction: column;
    text-align: center;
}

.rsvp-button {
    text-decoration: none;
    background: #63979f;
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 10px;
    transition: transform 0.3s ease, background 0.3s ease;

}

.rsvp-button:hover {
    background: #7aa6ad;

}

.loader {
    margin: auto;
    width: 100px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    text-align: center;
}

.loader::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background-color: white;
    animation: loading 1.5s linear infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    50% {
        left: 0%;
    }
    100% {
        left: 100%;
    }
}


#map .section-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}


.countdown {
    font-family: "Cormorant Garamond", serif;
    font-weight: 400;
    font-style: normal;
    text-align: center;
    font-size: 1.2rem;
    color: #fff;
    border-radius: 5px;
}

.time {
    font-weight: bold;
}

#gallery .section-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.gallery-grid {
    display: grid!important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    grid-auto-rows: 300px;
    gap: 10px;
    padding: 20px;
    width: 100%;
    align-items: normal!important;
    justify-content: normal!important;
}

.item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.item.visible {
    opacity: 1;
    transform: translateY(0);
}

.item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.item:hover img {
    transform: scale(1.05);
}

.item.tall {
    grid-row: span 2;
}

.item.wide {
    grid-column: span 2;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

.modal-content {
    display: block;
    margin: 20% auto;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
    animation: zoomIn 0.3s;
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    section {
        height: auto;
    }

    section > div {
        max-width: 600px;
    }

    .section-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    #schedule {
        background-size: contain;
    }

    .schedule-grid {
        display: flex !important;
        flex-direction: column !important;
    }

    .schedule-item {
        height: 500px;
        width: 100%;
        background-position: top center;
    }

    .gallery-grid {
        display: flex!important;
        width: 100%;
        align-items: normal!important;
        justify-content: normal!important;
    }


}