:root {
    --img-width: 20vw;
    --half-img-width: 10vw;
    --envelope-width: 40vw;
    --move-down: calc(var(--img-width) * 0.75);
    --move-up: calc(var(--img-width) * -0.5);
}

html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Original envelope styles */
#hero-section {
    width: 100%;
    min-height: 120vh; /* Increased to provide space for the animation */
    background-color: #fff;
    background-size: cover;
    position: relative;
    background-position: center;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Changed to center the envelope vertically */
    align-items: center;
    padding-top: 0; /* Removed padding-top to center the envelope */
}

.invitation {
    position: absolute;
    width: var(--img-width);
    transform: rotate(-90deg);
    animation: slideup 3s 2s forwards;
}

.envelope {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: var(--envelope-width);
    height: var(--img-width);
    margin-bottom: 10vh; /* Reduced bottom margin */
}

.envelope-front {
    position: absolute;
    z-index: 1;
    width: 0;
    height: 0;
    bottom: 0;
    border-left: var(--img-width) solid #5e845e;
    border-right: var(--img-width) solid #5e845e;
    border-bottom: var(--half-img-width) solid #5e845e;
    border-top: var(--half-img-width) solid transparent;
    animation: slidedown 3s 2s forwards;
}

input#envelope-flap {
    display: none;
}

.envelope-flap,
.envelope-back {
    position: absolute;
    top: 0;
    width: 0;
    height: 0;
    border-left: var(--img-width) solid transparent;
    border-right: var(--img-width) solid transparent;
    border-top: var(--half-img-width) solid #5e845e;
}

.envelope-flap {
    z-index: 1;
    animation: openflap 2s forwards, slidedownflap 3s 2s forwards;
}

.envelope-back {
    animation: slidedown 3s 2s forwards;
}

#envelope-flap:checked + .envelope-flap {
    transform: rotateX(180deg);
}

#envelope-flap:checked ~ .invitation {
    z-index: 7;
}

#envelope-flap:checked ~ .invitation {
    z-index: 4;
    transform: translateY(-60px);
}

.stamp {
    position: absolute;
    width: 5vw;
    height: 5vw;
    z-index: 3;
    animation: slidedown 3s 2s forwards;
}

@keyframes slideup {
    0% {
        transform: rotate(-90deg);
    }
    50% {
        transform: translateY(var(--move-up)) rotate(-90deg);
    }
    100% {
        transform: translateY(var(--move-up)) rotate(0deg) scale(1.5);
    }
}

@keyframes slidedown {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(var(--move-down));
    }
}

@keyframes openflap {
    0% {
        transform: rotateX(0deg);
        transform-origin: top;
        z-index: 1;
    }
    100% {
        transform: rotateX(180deg);
        transform-origin: top;
        z-index: 0;
    }
}

@keyframes slidedownflap {
    0% {
        transform: translateY(0) rotateX(180deg);
    }
    100% {
        transform: translateY(var(--move-down)) rotateX(180deg);
    }
}

.to-address {
    position: absolute;
    z-index: 5;
    font-size: 1.5vw;
    color: white;
    bottom: 2vw;
    text-align: center;
    font-weight: bold;
    width: 100%;
    animation: slidedown 3s 2s forwards;
}

.to-address a {
    display: inline-block;
    margin-top: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #276d57;
    padding: 8px 15px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.to-address a:hover {
    background-color: white;
}

/* RSVP Section */
#rsvp-section {
    background-color: #f0f5eb;
    padding: 60px 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.container {
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
}

h2 {
    color: #276d57;
    margin-bottom: 20px;
    text-align: center;
}

.divider {
    width: 80px;
    height: 3px;
    background-color: #5e845e;
    margin: 0 auto 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #276d57;
    outline: none;
    box-shadow: 0 0 0 3px rgba(155, 123, 85, 0.3);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn {
    display: inline-block;
    background-color: #276d57;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #5e845e;
}

.text-center {
    text-align: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    :root {
        --img-width: 30vw;
        --half-img-width: 15vw;
        --envelope-width: 60vw;
    }

    .to-address {
        font-size: 3vw;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    :root {
        --img-width: 40vw;
        --half-img-width: 20vw;
        --envelope-width: 80vw;
    }

    .to-address {
        font-size: 4vw;
    }
}

/* ---------- NAVIGATION ---------- */
#content-section {
    background: var(--primary);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: var(--primary);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 0 10px;
}

.bottom-navbar ul {
    list-style: none;
    display: flex;
    width: 100%;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    margin: 0;
}

.bottom-navbar li {
    flex: 1;
    text-align: center;
}

.bottom-navbar a {
    text-decoration: none;
    color: var(--bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: color 0.3s ease;
     padding: 15px 0;
    width: 100%;
}

.bottom-navbar a:hover {
    color: var(--light-text);
}

.bottom-navbar i {
    font-size: 24px;
}

/* event card */
.event-card {
    background-color: var(--bg-white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    padding: 35px;
    margin-bottom: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(236, 174, 177, 0.2);
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent1));
}

.event-card i {
    font-size: 35px;
    color: var(--primary);
    margin-bottom: 20px;
    background: rgba(236, 174, 177, 0.1);
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    display: inline-block;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.event-card i {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: 20px;
}



.event-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.event-card h2.text-center {
    margin-top: 20px;
}

.event-card i.fas.fa-fw {
    font-size: 20px;
    margin-top: 14px;
    margin-right: 8px;
    vertical-align: middle;
}

/* ---------- FOOTER ---------- */
footer {
    background-color: var(--bg-white);
    color: var(--dark-text);
    text-align: center;
    padding: 20px 0;
    position: relative;
    width: 100%;
    margin-bottom: 80px; 
    z-index: 998;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

#footer a {
    display: inline-block;
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 5px;
}

#footer p {
    margin: 5px 0;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 0;
    color: var(--primary);
}

#footer a:last-child {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    font-weight: bold;
    color: var(--primary);
} 
