@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #1D2C37;
    color: #fff;
    line-height: 1.6;
    text-align: center;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    background-color: rgba(29, 44, 55, 0.38);
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1200px;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

nav a {
    margin-left: 1rem;
    text-decoration: none;
    color: #fff;
    font-family: Helvetica, sans-serif;
    font-size: 1.25rem;
    transition: color 0.3s;
}

nav a:hover {
    color: #FF6F61;
}

.col-md-12 {
    width: 100%;
    position: relative;
}

.col-md-6 {
    width: 50%;
    float: left;
}

.col-md-3 {
    width: 25%;
    float: left;
}

.mandalla img {
    width: 50%;
    max-width: 400px;
    height: auto;
    animation: rotateBg 70s linear infinite;
    display: block;
    margin: 0 auto;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bartext img {
    width: 100%;
    max-width: 600px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 1);
}

.bartext {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.bigleaf img,
.bigleaf2 img,
.names img,
.ndbg img,
.bar img,
.bar2 img,
.bride img,
.txt img,
.gtext img,
.groom img {
    width: 100%;
    height: auto;
    display: block;
}

.bigleaf img {
    transform: scaleX(-1);
}

.ndbg {
    margin-top: 6rem;
}

.countdown-container2 {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    padding: 1rem;
    border-radius: 10px;
}

#countdown2 {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#countdown2 div {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem;
    min-width: 100px;
    font-size: 1.2rem;
}

#countdown2 span:first-child {
    font-size: 1.8rem;
    font-weight: bold;
}

#countdown2 span {
    display: block;
}

section::after {
    content: "";
    display: table;
    clear: both;
}

section {
    position: relative;
    overflow: hidden;
}

.bar {
    margin-top: 0.5rem;
}

.txt {
    margin-top: 1rem;
}

.bar2 {
    margin-top: 2rem;
}

.gtext {
    margin-top: 5rem;
}

.green {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
}

.green img {
    width: 33vw;
    max-width: 140px;
    min-width: 50px;
    transform: scaleX(-1);
}

.greens2 {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 10;
}

.greens2 img {
    width: 33vw;
    max-width: 140px;
    min-width: 50px;
}

.green-bottom-left {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 10;
}

.green-bottom-left img {
    width: 33vw;
    max-width: 140px;
    min-width: 50px;
    transform: scaleX(-1);
}

.wedding-logo {
    position: relative;
    width: 40%;
    max-width: 300px;
    margin: 2rem auto;
    z-index: 5;
}

.button-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 50%;
    max-width: 300px;
    margin-left: auto;
    padding: 2rem 0;
    z-index: 5;
}

.wedding-button {
    width: 100%;
    padding: 1rem;
    font-size: 1.25rem;
    background-color: #e7854c !important;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.wedding-button:hover {
    background-color: #d56b3c !important;
    color: #fff !important;
}

.details {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 2rem;
    z-index: 5;
}

.details-text {
    font-family: 'Lora', serif;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

.details-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.comm-button {
    padding: 1.5rem 3rem;
    font-size: 1.5rem;
    background-color: #e7854c !important;
    color: #fff !important;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.call-button:hover {
    background-color: #d56b3c !important;
    color: #fff !important;
}

.whatsapp-button:hover {
    background-color: #20B358 !important;
    color: #fff !important;
}

.communication-buttons {
    position: relative;
    background-color: #1D2C37;
    background-image: url('../images/bg3.png');
    background-size: cover;
    background-position: center;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 400px;
    z-index: 0;
}

.communication-buttons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-content {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1D2C37;
    padding: 10px;
    border-radius: 5px;
    width: 330px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.close-btn {
    float: right;
    font-size: 40px;
    cursor: pointer;
}

#notesForm label {
    display: block;
    margin-bottom: -25px;
    font-weight: bold;
}

#notesForm input,
#notesForm textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
}

#notesForm button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 129px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

#notesForm button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#notesForm button:hover:not(:disabled) {
    background-color: #45a049;
    transform: scale(1.05);
}

#notesForm button:active:not(:disabled) {
    background-color: #3e8e41;
    transform: scale(0.95);
}

#formMessage p {
    margin: 10px 0;
    font-size: 14px;
}

.bigleaf3 img {
    width: 100%;
    height: auto;
    display: block;
    transform: scaleX(-1);
}

.slideshow-wrapper {
    max-width: 970px;
    margin: 40px auto;
    position: relative;
}

.fixed-frame {
    width: 100%;
    max-width: 970px;
    height: 650px;
    margin: auto;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    position: relative;
}

.slide {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.caption {
    color: #fff;
    font-size: 1em;
    padding: 10px;
    background: rgba(0,0,0,0.4);
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    border-radius: 0 0 10px 10px;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 16px;
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    background: rgba(0,0,0,0.3);
    user-select: none;
    z-index: 2;
    transition: background 0.3s;
}

.prev { left: 0; border-radius: 0 3px 3px 0; }
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover { background: rgba(0,0,0,0.6); }

.slideshow-dots {
    text-align: center;
    margin-top: 12px;
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 4px;
    background-color: #bbbbbb44;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s;
}

.active, .dot:hover {
    background-color: #0c141a;
}

.letter-image {
    position: relative;
    width: 420px;
    height: 315px;
    margin: 40px auto;
}

.animated-mail {
    position: absolute;
    height: 263px;
    width: 420px;
    transition: transform 0.5s ease;
    will-change: transform;
}

.animated-mail .body {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 175px 420px;
    border-color: transparent transparent #e7854c transparent;
    z-index: 2;
}

.animated-mail .top-fold {
    position: absolute;
    top: 88px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 88px 210px 0 210px;
    transform-origin: 50% 0%;
    transition: transform 0.5s ease, z-index 0.25s ease;
    border-color: #d56b3c transparent transparent transparent;
    z-index: 2;
}

.animated-mail .back-fold {
    position: absolute;
    bottom: 0;
    width: 420px;
    height: 175px;
    background: #d56b3c;
    z-index: 0;
}

.animated-mail .left-fold {
    position: absolute;
    bottom: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 88px 0 88px 210px;
    border-color: transparent transparent transparent #f4a261;
    z-index: 2;
}

.animated-mail .letter {
    left: 30px;
    bottom: 20px;
    position: absolute;
    width: 360px;
    height: 108px;
    background: #FFF5E6;
    z-index: 1;
    overflow: hidden;
    transition: height 0.5s ease-in-out;
    font-family: 'Lora', serif;
    padding: 18px;
    will-change: height;
}

.animated-mail .letter .letter-border {
    height: 14px;
    width: 100%;
    background: repeating-linear-gradient(
        -45deg,
        #e7854c,
        #e7854c 8px,
        transparent 8px,
        transparent 18px
    );
}

.animated-mail .letter .letter-title {
    margin-top: 14px;
    margin-left: 5px;
    font-size: 32px;
    font-weight: 700;
    color: #333;
    font-family: 'Lora', serif;
    opacity: 0;
    transition: opacity 0.3s ease-in-out 0.2s;
    line-height: 1.2; /* Added for better spacing */
}

.animated-mail .letter .letter-context {
    margin-top: 8px;
    margin-left: 5px;
    font-size: 26px; /* Increased from 24px */
    color: #555;
    max-width: 90%;
    word-wrap: break-word;
    font-family: 'Lora', serif;
    opacity: 0;
    transition: opacity 0.3s ease-in-out 0.2s;
    line-height: 1.4; /* Added for better spacing */
}

.animated-mail .letter .letter-stamp {
    margin-top: 36px;
    margin-left: 270px;
    border-radius: 100%;
    height: 58px;
    width: 58px;
    background: #e7854c;
    opacity: 0.3;
}

.animated-mail .letter-note {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-family: 'Lora', serif;
    font-size: 20px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 14px;
    border-radius: 5px;
    z-index: 3;
}

.shadow {
    position: absolute;
    bottom: -14px;
    left: 50%;
    width: 490px;
    height: 42px;
    transition: width 0.5s ease;
    transform: translateX(-50%);
    border-radius: 100%;
    background: radial-gradient(
        rgba(0, 0, 0, 0.5),
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0)
    );
    z-index: -1;
}

.open .animated-mail {
    transform: translateY(70px);
}

.open .animated-mail .top-fold {
    transform: rotateX(180deg);
    z-index: 0;
}

.open .animated-mail .letter {
    height: 340px;
}

.open .animated-mail .letter .letter-title,
.open .animated-mail .letter .letter-context {
    opacity: 1;
}

.closing-letter .animated-mail .letter {
    height: 108px;
    transition: height 0.5s ease-in-out;
}

.closing-fold .animated-mail .top-fold {
    transform: rotateX(0deg);
    z-index: 2;
    transition: transform 0.5s ease, z-index 0.25s ease;
}

.closing-fold .animated-mail {
    transform: translateY(0);
    transition: transform 0.5s ease 0.25s;
}

.closing-fold .shadow {
    width: 490px;
    transition: width 0.5s ease 0.25s;
}


.event-schedule.glass-bg {
    max-width: 420px;
    margin: 40px auto 30px auto;
    padding: 32px 28px 24px 28px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #e0e0e0;
    text-align: center;
}

.event-schedule h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    margin-bottom: 12px;
    color: #b48a78;
    letter-spacing: 1px;
}

.event-schedule p {
    font-size: 1.1rem;
    margin-bottom: 18px;
    color: #dfdfdf;
}

.schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.schedule-list li {
    font-size: 1.5rem;
    margin: 12px 0;
    padding: 10px 0;
    border-bottom: 1px solid rgba(180, 138, 120, 0.13);
}

.schedule-list li:last-child {
    border-bottom: none;
}

.schedule-list strong {
    color: #b48a78;
    font-weight: 600;
}

@media (max-width: 768px) {
    .communication-buttons {
        flex-direction: column;
        padding: 1rem;
        min-height: auto;
    }
    .wedding-logo {
        width: 60%;
        max-width: 250px;
        margin-bottom: 1rem;
    }
    .button-group {
        width: 80%;
        margin: 1rem auto;
    }
    .wedding-button {
        font-size: 1rem;
        padding: 0.75rem;
    }
    .details {
        margin-top: 1rem;
    }
    .details-text {
        font-size: 1.25rem;
    }
    .comm-button {
        font-size: 1.25rem;
        padding: 1rem 2rem;
    }
    .green img,
    .greens2 img,
    .green-bottom-left img {
        width: 33vw;
        max-width: 140px;
        min-width: 50px;
    }
    .slideshow-wrapper {
        max-width: 700px;
        margin: 40px auto;
    }
    .fixed-frame {
        max-width: 600px;
        height: 350px;
    }
    .bigleaf3 img {
        display: none;
    }
    .letter-image {
        width: 350px;
        height: 263px;
    }
    .animated-mail {
        width: 350px;
        height: 219px;
    }
    .animated-mail .body {
        border-width: 0 0 146px 350px;
    }
    .animated-mail .top-fold {
        top: 73px;
        border-width: 73px 175px 0 175px;
    }
    .animated-mail .back-fold {
        width: 350px;
        height: 146px;
    }
    .animated-mail .left-fold {
        border-width: 73px 0 73px 175px;
    }
    .animated-mail .letter {
        width: 300px;
        left: 25px;
        bottom: 16px;
        height: 90px;
        padding: 15px;
        transition: height 0.5s ease-in-out;
    }
    .animated-mail .letter .letter-border {
        height: 12px;
    }
    .animated-mail .letter .letter-title {
        font-size: 28px;
        margin-top: 12px;
        opacity: 0;
        transition: opacity 0.3s ease-in-out 0.2s;
        line-height: 1.2;
    }
    .animated-mail .letter .letter-context {
        font-size: 22px; /* Increased from 20px */
        margin-top: 6px;
        opacity: 0;
        transition: opacity 0.3s ease-in-out 0.2s;
        line-height: 1.4;
    }
    .animated-mail .letter .letter-stamp {
        margin-left: 225px;
        height: 48px;
        width: 48px;
        margin-top: 30px;
    }
    .animated-mail .letter-note {
        font-size: 18px;
        padding: 4px 12px;
    }
    .open .animated-mail .letter {
        height: 280px;
    }
    .open .animated-mail {
        transform: translateY(58px);
    }
    .open .animated-mail .letter .letter-title,
    .open .animated-mail .letter .letter-context {
        opacity: 1;
    }
    .shadow {
        width: 408px;
    }
    .open .shadow {
        width: 263px;
    }
}

@media (max-width: 576px) {
    header {
        width: 100%;
        padding: 0.25rem;
    }
    .logo img {
        width: 40px;
        height: 40px;
    }
    nav a {
        font-size: 1rem;
        margin-left: 0.5rem;
    }
    .mandalla img {
        width: 80%;
    }
    .bartext img {
        transform: scale(1.8);
    }
    .ndbg {
        margin-top: 3rem;
    }
    .countdown-container2 {
        padding: 0.5rem;
    }
    #countdown2 {
        gap: 0.5rem;
    }
    #countdown2 div {
        min-width: 80px;
        font-size: 1rem;
        padding: 0.5rem;
    }
    #countdown2 span:first-child {
        font-size: 1.5rem;
    }
    .bar {
        margin-top: 0.25rem;
    }
    .gtext {
        margin-top: 1rem;
    }
    .communication-buttons {
        padding: 0.5rem;
    }
    .wedding-logo {
        width: 73%;
        max-width: 277px;
    }
    .button-group {
        width: 90%;
        gap: 0.5rem;
    }
    .wedding-button {
        font-size: 0.999rem;
        padding: 1rem;
    }
    .details-text {
        font-size: 1rem;
    }
    .comm-button {
        font-size: 1rem;
        padding: 0.9rem 3.5rem;
    }
    .green img,
    .greens2 img,
    .green-bottom-left img {
        width: 33vw;
        max-width: 140px;
        min-width: 50px;
    }
    .green {
        top: 1rem;
        left: 0rem;
    }
    .greens2 {
        bottom: 1rem;
        right: 0rem;
    }
    .green-bottom-left {
        bottom: 1rem;
        left: 0rem;
    }
    .details-buttons {
        z-index: 100;
    }
    .slideshow-wrapper {
        max-width: 700px;
        margin: 40px auto;
    }
    .fixed-frame {
        max-width: 600px;
        height: 350px;
    }
    .bigleaf3 img {
        display: none;
    }
    .letter-image {
        width: 280px;
        height: 210px;
    }
    .animated-mail {
        width: 280px;
        height: 175px;
        transition: transform 0.6s ease;
        will-change: transform;
    }
    .animated-mail .body {
        border-width: 0 0 117px 280px;
    }
    .animated-mail .top-fold {
        top: 58px;
        border-width: 58px 140px 0 140px;
        transition: transform 0.6s ease, z-index 0.25s ease;
    }
    .animated-mail .back-fold {
        width: 280px;
        height: 117px;
    }
    .animated-mail .left-fold {
        border-width: 58px 0 58px 140px;
    }
    .animated-mail .letter {
        width: 240px;
        left: 20px;
        bottom: 12px;
        height: 72px;
        padding: 12px;
        transition: height 0.6s ease-in-out;
        will-change: height;
    }
    .animated-mail .letter .letter-border {
        height: 10px;
    }
    .animated-mail .letter .letter-title {
        font-size: 24px;
        margin-top: 10px;
        opacity: 0;
        transition: opacity 0.3s ease-in-out 0.2s;
        line-height: 1.2;
    }
    .animated-mail .letter .letter-context {
        font-size: 20px; /* Increased from 18px */
        margin-top: 4px;
        opacity: 0;
        transition: opacity 0.3s ease-in-out 0.2s;
        line-height: 1.4;
    }
    .animated-mail .letter .letter-stamp {
        margin-left: 180px;
        height: 40px;
        width: 40px;
        margin-top: 25px;
    }
    .animated-mail .letter-note {
        font-size: 12px;
        padding: 3px 10px;
    }
    .open .animated-mail .letter {
        height: 240px;
    }
    .open .animated-mail {
        transform: translateY(47px);
    }
    .open .animated-mail .letter .letter-title,
    .open .animated-mail .letter .letter-context {
        opacity: 1;
    }
    .shadow {
        width: 326px;
        transition: width 0.6s ease;
    }
    .open .shadow {
        width: 210px;
    }
    .closing-letter .animated-mail .letter {
        height: 72px;
        transition: height 0.6s ease-in-out;
    }
    .closing-fold .animated-mail .top-fold {
        transform: rotateX(0deg);
        z-index: 2;
        transition: transform 0.6s ease, z-index 0.25s ease;
    }
    .closing-fold .animated-mail {
        transform: translateY(0);
        transition: transform 0.6s ease 0.3s;
    }
    .closing-fold .shadow {
        width: 326px;
        transition: width 0.6s ease 0.3s;
    }
    

    .event-schedule.glass-bg {
        max-width: 98vw;
        padding: 18px 8vw 14px 8vw;
    }
    .event-schedule h2 {
        font-size: 1.3rem;
    }
    .schedule-list li {
        font-size: 0.98rem;
    }

}