:root {
    --primary-blue: #003399;
    --secondary-blue: #0044cc;
    --gold: #D4AF37;
    --gold-light: #FFD700;
    --white: #ffffff;
    --text-color: #ffffff;
    --bg-gradient: linear-gradient(135deg, #001a4d 0%, #003399 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: #001a4d;
    font-family: 'Kantumruy Pro', sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    perspective: 2000px; /* Enable 3D space */
}

/* 3D Scene Container */
.scene {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    perspective: 2200px;
    overflow: hidden;
}

.invitation-container {
    width: 100%;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 215, 0, 0.12), transparent 25%),
        linear-gradient(145deg, #001036 0%, #00256f 52%, #00091e 100%);
    position: relative; /* Defines the height of the scene based on its content */
    z-index: 1;
    padding: 40px 20px;
    padding-top: 80px; 
    overflow: hidden;
}

.invitation-container::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 215, 0, 0.24);
    box-shadow:
        inset 0 0 0 8px rgba(255, 255, 255, 0.02),
        inset 0 0 65px rgba(255, 215, 0, 0.1);
    pointer-events: none;
    z-index: 0;
}

header {
    display: none;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    margin-bottom: 30px;
}

.close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.language-toggle {
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.lang-option {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.lang-option.active {
    opacity: 1;
    font-weight: bold;
    color: var(--gold-light);
}

.divider {
    opacity: 0.3;
}

/* Logo Section */
.logo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.main-logo {
    width: 92.69px;
    height: 98.02px;
}

.logo-text-img {
    width: 107.9px;
    height: 49.88px;
    margin-top: 3px;
}

.anniversary-logo {
    width: 93.29px;
    height: 86.52px;
}

.divider-img {
    height: 80px;
    width: auto;
    opacity: 0.8;
}

/* Greeting */
.greeting {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.greeting h2 {
    font-family: 'Moul', serif;
    font-size: 1.5rem;
    font-weight: normal;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Invitee Card */
.invitee-card {
    position: relative;
    margin-bottom: 50px;
    z-index: 1;
}

.card-inner {
    background: url('assets/image/Card.png') no-repeat center center;
    background-size: 100% 100%;
    padding: 30px 20px;
    text-align: center;
    color: var(--primary-blue);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 160px;
    justify-content: center;
}

.invitee-name {
    font-family: 'Moul', serif;
    font-size: 1.8rem;
    font-weight: normal;
}

.invitee-title {
    font-size: 1rem;
    color: var(--gold);
    font-weight: bold;
}

/* Body Content */
.invitation-body {
    text-align: center;
    margin-bottom: 50px;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.intro {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.highlight {
    color: var(--gold-light);
    font-weight: bold;
}

.event-title,
.event-subtitle {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.date-location {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.kh-date-long {
    font-size: 0.95rem;
    opacity: 0.8;
}

.kh-date-short {
    font-size: 1.2rem;
}

.location {
    font-size: 1.2rem;
    margin-top: 5px;
}

/* Agenda Section */
.agenda-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.agenda-title {
    font-family: 'Moul', serif;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--gold-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.agenda-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.agenda-list li {
    display: flex;
    gap: 10px;
    font-size: 0.85rem;
    line-height: 1.5;
}

.time {
    font-weight: bold;
    color: var(--gold-light);
    white-space: nowrap;
    min-width: 90px;
}

.activity {
    opacity: 0.9;
}

/* Invitation Cover Styling - Page Flip Reveal */
.invitation-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Matches the exact height of the invitation container */
    background:
        radial-gradient(circle at 50% 18%, rgba(255, 215, 0, 0.12), transparent 25%),
        linear-gradient(145deg, #001036 0%, #00256f 52%, #00091e 100%);
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed from center to top */
    transform-origin: left center;
    transition: filter 0.35s ease, box-shadow 0.35s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden; /* Hides the back when flipped */
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
    cursor: pointer;
    overflow: hidden;
    will-change: transform, opacity, filter;
}

.invitation-cover::before,
.invitation-cover::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.invitation-cover::before {
    inset: 0;
    background:
        linear-gradient(100deg, rgba(255, 255, 255, 0.34), transparent 18%, transparent 72%, rgba(0, 0, 0, 0.34)),
        linear-gradient(90deg, rgba(255, 215, 0, 0.32), transparent 7%, transparent 92%, rgba(255, 215, 0, 0.16));
    opacity: 0;
    transform: translateX(-38%) skewX(-10deg);
    z-index: 5;
    mix-blend-mode: screen;
}

.invitation-cover::after {
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.42), transparent 10%, transparent 88%, rgba(255, 255, 255, 0.18)),
        linear-gradient(145deg, #00091e 0%, #00256f 52%, #001036 100%);
    opacity: 0;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    z-index: 1;
    box-shadow: inset 18px 0 35px rgba(0, 0, 0, 0.42);
}

.invitation-cover:hover {
    filter: brightness(1.08);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.78), 0 0 42px rgba(255, 215, 0, 0.16);
}

.invitation-cover.opened {
    animation: pageFlipToSecond 1.45s cubic-bezier(0.76, 0, 0.24, 1) forwards;
    pointer-events: none; /* Allows interacting with the content underneath */
}

.invitation-cover.opened::before {
    animation: pageFlipShine 1.15s ease-out forwards;
}

.invitation-cover.opened::after {
    animation: pageBackReveal 0.7s 0.3s ease forwards;
}

.invitation-cover.opened .cover-content {
    animation: pageOneContentTurn 0.95s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.invitation-cover.closing {
    animation: pageFlipBackToFirst 1.15s cubic-bezier(0.76, 0, 0.24, 1) forwards;
    pointer-events: auto;
}

.invitation-cover.closing::before {
    animation: pageFlipShineBack 0.85s ease-out forwards;
}

.invitation-cover.closing::after {
    animation: pageBackHide 0.55s ease forwards;
}

.invitation-cover.closing .cover-content {
    animation: pageOneContentReturn 0.82s 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.letter-open .invitation-container {
    animation: invitationReveal 1.05s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cover-content {
    width: 100%;
    height: 100vh; /* Force content to center within the first screen */
    max-width: 900px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center vertically within the 100vh window */
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

.cover-logos {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cover-logo {
    height: 103px;
    width: auto;
}

.vsk-text-cover {
    height: 70px;
    /* Slightly smaller for text */
}

.cover-divider {
    height: 86px;
    opacity: 0.8;
}

.page-logos {
    justify-content: center;
    margin: 0 auto 34px;
}

.page-logos .cover-logo {
    height: 82px;
}

.page-logos .vsk-text-cover {
    height: 56px;
}

.page-logos .cover-divider {
    height: 68px;
}

.cover-titles {
    margin: 40px 0;
}

.ceremony-title {
    font-family: 'Moul', serif;
    font-size: 3rem;
    color: var(--gold-light);
    margin-bottom: 10px;
}

.ceremony-subtitle {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 40px;
    opacity: 0.9;
}

.invitation-label {
    font-family: 'Moul', serif;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.invitation-label .eng {
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 1.2rem;
    margin-top: -5px;
    opacity: 0.8;
}

.invitee-placeholder {
    width: 100%;
    max-width: 400px;
    margin: 20px 0;
}

.invitee-placeholder .card-inner {
    min-height: 150px;
    padding: 25px 20px;
}

.cover-bottom-pattern {
    display: none;
}

.scroll-hint {
    margin-top: 20px;
    opacity: 0.6;
    animation: swipeLeftPrompt 2.2s ease-in-out infinite;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    font-size: 0.78rem;
}

.scroll-hint span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid rgba(255, 215, 0, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.12);
    backdrop-filter: blur(8px);
}

.scroll-hint span::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-light);
    box-shadow: 0 0 14px var(--gold-light);
}

.arrow-left {
    width: 32px;
    height: 18px;
    margin: 12px auto 0;
    position: relative;
    animation: swipeLeftArrow 2.2s ease-in-out infinite;
}

.arrow-left::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 5px;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 999px;
}

.arrow-left::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 4px;
    width: 10px;
    height: 10px;
    border-left: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(45deg);
}

@keyframes swipeLeftPrompt {

    0%,
    100% {
        transform: translateX(0);
        opacity: 0.68;
    }

    50% {
        transform: translateX(-14px);
        opacity: 1;
    }
}

@keyframes swipeLeftArrow {
    0%,
    100% {
        opacity: 0.42;
        transform: translateX(10px);
    }

    50% {
        opacity: 1;
        transform: translateX(-12px);
    }
}

@keyframes pageFlipShine {
    0% {
        opacity: 0;
        transform: translateX(-45%) skewX(-10deg);
    }

    24%,
    62% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateX(46%) skewX(-10deg);
    }
}

@keyframes pageBackReveal {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 0.75;
    }
}

@keyframes pageOneContentTurn {
    0% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg) scale(1);
        filter: blur(0);
    }

    58% {
        opacity: 0.62;
        transform: translateX(-22px) rotateY(-42deg) scale(0.985);
        filter: blur(1px);
    }

    100% {
        opacity: 0;
        transform: translateX(-60px) rotateY(-88deg) scale(0.96);
        filter: blur(4px);
    }
}

@keyframes pageFlipToSecond {
    0% {
        opacity: 1;
        transform: rotateY(0deg) translateX(0) scale(1);
        box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
    }

    36% {
        opacity: 1;
        transform: rotateY(-54deg) translateX(-8px) scale(1.01);
        box-shadow: 42px 24px 70px rgba(0, 0, 0, 0.54);
    }

    72% {
        opacity: 0.86;
        transform: rotateY(-128deg) translateX(-24px) scale(0.995);
        box-shadow: 70px 20px 80px rgba(0, 0, 0, 0.36);
    }

    100% {
        opacity: 0;
        transform: rotateY(-178deg) translateX(-40px) scale(0.98);
        box-shadow: 80px 18px 70px rgba(0, 0, 0, 0);
    }
}

@keyframes pageFlipBackToFirst {
    0% {
        opacity: 0;
        transform: rotateY(-178deg) translateX(-40px) scale(0.98);
        box-shadow: 80px 18px 70px rgba(0, 0, 0, 0);
    }

    34% {
        opacity: 0.86;
        transform: rotateY(-122deg) translateX(-24px) scale(0.995);
        box-shadow: 70px 20px 80px rgba(0, 0, 0, 0.36);
    }

    72% {
        opacity: 1;
        transform: rotateY(-42deg) translateX(-8px) scale(1.01);
        box-shadow: 42px 24px 70px rgba(0, 0, 0, 0.54);
    }

    100% {
        opacity: 1;
        transform: rotateY(0deg) translateX(0) scale(1);
        box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65);
    }
}

@keyframes pageFlipShineBack {
    0% {
        opacity: 0;
        transform: translateX(46%) skewX(-10deg);
    }

    25%,
    68% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateX(-45%) skewX(-10deg);
    }
}

@keyframes pageBackHide {
    0% {
        opacity: 0.75;
    }

    100% {
        opacity: 0;
    }
}

@keyframes pageOneContentReturn {
    0% {
        opacity: 0;
        transform: translateX(-60px) rotateY(-88deg) scale(0.96);
        filter: blur(4px);
    }

    100% {
        opacity: 1;
        transform: translateX(0) rotateY(0deg) scale(1);
        filter: blur(0);
    }
}

@keyframes invitationReveal {
    0% {
        opacity: 0.45;
        transform: translateY(38px) scale(0.965);
        filter: blur(10px) brightness(0.85);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0) brightness(1);
    }
}

/* Bilingual Card Styling (Page 2) */
.bilingual-card {
    width: 100%;
    padding: 20px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.card-top,
.card-bottom {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.card-bottom {
    padding: 26px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
        rgba(24, 74, 168, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.34);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 18px 42px rgba(0, 10, 40, 0.22);
    backdrop-filter: blur(16px);
}

.card-bottom > * {
    position: relative;
    z-index: 1;
}

.card-title {
    font-family: 'Moul', serif;
    font-size: 2rem;
    color: var(--gold-light);
    margin-bottom: 20px;
}

.card-title-en {
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 1.5rem;
    color: var(--gold-light);
    margin: 30px 0 15px;
    font-weight: 700;
}

.invitation-text-kh p,
.invitation-text-en p {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 10px;
    opacity: 0.9;
}

.highlight,
.highlight-en {
    color: var(--white);
    font-weight: 700;
    font-size: 1.1rem !important;
    opacity: 1 !important;
}

.card-divider {
    width: 100%;
    max-width: 600px;
    margin: 40px 0;
    display: flex;
    justify-content: center;
}

.card-divider img {
    width: auto;
    height: 50px;
    opacity: 0.8;
}

.agenda-title-main {
    font-family: 'Moul', serif;
    font-size: 1.5rem;
    color: var(--gold-light);
    margin-bottom: 20px;
}

.agenda-title-main-en {
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 1.2rem;
    color: var(--gold-light);
    margin: 30px 0 20px;
    font-weight: 700;
}

.agenda-title-main,
.agenda-title-main-en {
    width: 100%;
    min-width: 0;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-left: auto;
    margin-right: auto;
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 255, 255, 0.06)),
        rgba(0, 26, 77, 0.34);
    border: 1px solid rgba(255, 215, 0, 0.42);
    border-radius: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 10px 28px rgba(0, 10, 40, 0.18);
    backdrop-filter: blur(10px);
    text-align: left;
}

.agenda-title-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex: 0 0 28px;
}

.agenda-list-container {
    text-align: left;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.agenda-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.agenda-item .time {
    color: var(--gold-light);
    font-weight: 700;
}

.location-card {
    width: min(100%, 620px);
    min-height: 254px;
    margin: 38px auto 0;
    padding: 26px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.035)),
        rgba(24, 74, 168, 0.18);
    border: 1px solid rgba(255, 215, 0, 0.34);
    border-radius: 18px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 18px 42px rgba(0, 10, 40, 0.22);
    backdrop-filter: blur(16px);
}

.location-heading,
.location-name,
.location-link {
    position: relative;
    z-index: 1;
}

.location-heading {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--gold-light);
    font-family: 'Moul', serif;
    font-size: 1.5rem;
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 255, 255, 0.06)),
        rgba(0, 26, 77, 0.34);
    border: 1px solid rgba(255, 215, 0, 0.42);
    border-radius: 12px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 10px 28px rgba(0, 10, 40, 0.18);
    backdrop-filter: blur(10px);
    text-align: center;
}

.pin-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.location-name {
    width: 100%;
    margin: 24px 0 22px;
    color: var(--white);
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    text-shadow: none;
}

.location-link {
    align-self: center;
    min-width: 188px;
    min-height: 46px;
    padding: 10px 14px 10px 22px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffcf57;
    border: 2px solid rgba(255, 255, 255, 0.86);
    border-radius: 12px;
    color: var(--primary-blue);
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.location-link:hover,
.location-link:focus-visible {
    background: var(--gold-light);
    box-shadow: 0 8px 24px rgba(255, 207, 87, 0.34);
    transform: translateY(-2px);
}

.location-icon {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.letter-actions {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.close-letter-btn {
    background: transparent;
    border: 2px solid var(--gold-light);
    color: var(--gold-light);
    font-family: 'Kantumruy Pro', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 30px;
    margin-top: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-letter-btn:hover {
    background: var(--gold-light);
    color: var(--primary-blue);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-section,
.greeting,
.invitee-card,
.invitation-body,
.agenda-section {
    animation: fadeInUp 0.8s ease forwards;
}

.greeting {
    animation-delay: 0.2s;
}

.invitee-card {
    animation-delay: 0.4s;
}

.invitation-body {
    animation-delay: 0.6s;
}

.agenda-section {
    animation-delay: 0.8s;
}

/* Desktop Responsiveness */
@media (min-width: 900px) {
    body {
        align-items: center;
        background: radial-gradient(circle at center, #002b80 0%, #000d26 100%);
        padding: 40px;
    }

    .invitation-container {
        max-width: 900px;
        min-height: auto;
        border-radius: 28px;
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
        overflow: hidden;
        padding: 42px;
    }

    .bilingual-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        text-align: center;
    }

    .page-logos {
        margin-bottom: 28px;
    }

    .page-logos .cover-logo {
        height: 66px;
    }

    .page-logos .vsk-text-cover {
        height: 44px;
    }

    .page-logos .cover-divider {
        height: 56px;
    }

    .card-top,
    .card-bottom {
        width: 100%;
        max-width: 800px;
        margin: 0;
    }

    .card-top {
        grid-row: auto;
    }

    .card-bottom {
        grid-column: auto;
        grid-row: auto;
        margin-top: 34px;
        padding: 22px;
        border-radius: 16px;
    }

    .card-title {
        font-size: 1.72rem;
        margin-bottom: 16px;
        text-align: center;
    }

    .card-title-en {
        font-size: 1.2rem;
        margin: 20px 0 12px;
        text-align: center;
    }

    .invitation-text-kh p,
    .invitation-text-en p {
        font-size: 0.9rem;
        line-height: 1.65;
        margin-bottom: 8px;
        text-align: center;
    }

    .highlight,
    .highlight-en {
        font-size: 0.98rem !important;
    }

    .card-divider {
        display: flex;
        margin: 34px 0 0;
    }

    .agenda-title-main {
        font-size: 1.25rem;
        margin-bottom: 14px;
        text-align: center;
    }

    .agenda-title-main-en {
        font-size: 1rem;
        margin: 22px 0 14px;
        text-align: center;
    }

    .agenda-list-container {
        gap: 9px;
    }

    .agenda-item {
        grid-template-columns: 86px 1fr;
        gap: 12px;
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .location-card {
        grid-column: auto;
        grid-row: auto;
        width: 100%;
        max-width: 800px;
        min-height: 184px;
        margin-top: 28px;
        padding: 18px 24px 16px;
        border-radius: 16px;
    }

    .location-heading {
        gap: 10px;
        font-size: 1.25rem;
    }

    .pin-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .location-name {
        margin: 18px 0 18px;
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .location-link {
        min-width: 178px;
        min-height: 44px;
        padding: 9px 13px 9px 20px;
        gap: 18px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    .location-icon {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }

    .close-letter-btn {
        display: block;
        margin: 28px auto 0;
    }

    .letter-actions {
        grid-column: auto;
        grid-row: auto;
        max-width: 800px;
    }

    .main-layout {
        display: grid;
        grid-template-columns: 1fr 1.3fr;
        gap: 60px;
        align-items: center;
    }

    .layout-left {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
    }

    .logo-section {
        margin-bottom: 30px;
    }

    .invitation-body {
        text-align: left;
        margin-bottom: 30px;
    }

    .date-location {
        align-items: flex-start;
    }

    .agenda-section {
        margin-bottom: 0;
    }
}

@media (max-width: 899px) {
    .main-layout {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 380px) {
    .invitee-name {
        font-size: 1.5rem;
    }

    .kh-date-short,
    .location {
        font-size: 1rem;
    }

    .time {
        min-width: 80px;
    }
}

/* Mobile Responsiveness for Cover */
@media (max-width: 600px) {
    .cover-logos {
        gap: 10px;
    }
    
    .cover-logo {
        height: 60px;
    }
    
    .vsk-text-cover {
        height: 40px;
    }
    
    .cover-divider {
        height: 50px;
    }
    
    .ceremony-title {
        font-size: 2rem;
    }
    
    .ceremony-subtitle {
        font-size: 0.9rem;
    }
    
    .invitation-label p {
        font-size: 1.2rem;
    }
    
    .invitee-placeholder .card-inner {
        min-height: 120px;
        padding: 15px 10px;
    }
    
    .invitee-name {
        font-size: 1.2rem;
    }
    
    .invitee-title {
        font-size: 0.9rem;
    }

    .card-bottom {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .location-card {
        min-height: 206px;
        padding: 20px 22px 18px;
        border-radius: 14px;
    }

    .location-heading {
        gap: 10px;
        font-size: 1.15rem;
    }

    .pin-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
    }

    .location-name {
        margin: 18px 0 20px;
        font-size: 0.9rem;
    }

    .location-link {
        width: auto;
        min-width: 0;
        min-height: 44px;
        padding: 9px 13px 9px 20px;
        font-size: 0.9rem;
    }

    .location-icon {
        width: 22px;
        height: 22px;
        flex-basis: 22px;
    }
}
