@font-face {
    font-family: 'Fz Aghita';
    src: url('/fonts/FzAghita.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --bg: #fff;
    --text: #333;
    --red: #a81c1c;
    --red-dark: #6e1010;
    --gold: #d4af37;
    --gold-dark: #b5952f;
    --gold-light: #e6c867;
    
    --font-heading: 'Fz Aghita', 'Playfair Display', serif;
    --font-cursive: 'Fz Aghita', serif;
    --font-body: 'Lora', 'Playfair Display', serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: #fdfaf6;
    background-image: url("data:image/svg+xml,%3Csvg width='52' height='26' viewBox='0 0 52 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.08'%3E%3Cpath d='M10 10c0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6h2c0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4 3.314 0 6 2.686 6 6 0 2.21 1.79 4 4 4v2c-3.314 0-6-2.686-6-6 0-2.21-1.79-4-4-4-3.314 0-6-2.686-6-6zm25.464-1.95l8.486 8.486-1.414 1.414-8.486-8.486 1.414-1.414z' /%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   COVER PAGE (TRANG BÌA)
========================================= */
:root {
    --gold: #f0d497;
    --gold-dark: #d2b679;
    --red-dark: #4a1212;
    --red-gradient: linear-gradient(to bottom right, #4a1212, #3a0e0e, #2a0808);
}

.cover-page {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: transparent; /* background handled by doors */
    pointer-events: none; /* let clicks pass through to button, we'll restore pointer-events on the doors and button */
}
.cover-page * { pointer-events: auto; }

.door {
    position: absolute;
    top: 0;
    width: 50vw;
    height: 100vh;
    background: var(--red-gradient);
    z-index: 0;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}
.door-left {
    left: 0;
}
.door-right {
    right: 0;
}

/* Animations */
@keyframes ambient-rise {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    10% { opacity: 0.8; }
    50% { transform: translateY(-50vh) translateX(var(--sway)) scale(1.1); }
    90% { opacity: 0.8; }
    100% { transform: translateY(-100vh) translateX(0) scale(1); opacity: 0; }
}

.happiness-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.hy-char {
    position: absolute; bottom: -30px;
    --sway: 15px;
    animation: ambient-rise 10s ease-in-out infinite;
}

.cover-main-wrapper {
    position: relative; z-index: 10;
    width: 310px;
}
@media (min-width: 640px) { .cover-main-wrapper { width: 340px; } }
@media (min-width: 768px) { .cover-main-wrapper { width: 520px; } }
@media (min-width: 1024px) { .cover-main-wrapper { width: 600px; } }

@keyframes seal-pulse {
    0% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 4px 20px rgba(240, 212, 151, 0.5), inset 0 2px 4px rgba(255,255,255,0.3); }
    50% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 4px 30px rgba(240, 212, 151, 0.8), inset 0 2px 4px rgba(255,255,255,0.3); }
    100% { transform: translate(-50%, -50%) scale(1); box-shadow: 0 4px 20px rgba(240, 212, 151, 0.5), inset 0 2px 4px rgba(255,255,255,0.3); }
}
.seal-container {
    position: absolute; top: 50px; left: 50%;
    width: 56px; height: 56px; transform: translate(-50%, -50%);
    background: radial-gradient(circle at 30% 30%, var(--gold), var(--gold-dark));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    z-index: 30; animation: seal-pulse 2s ease-in-out infinite;
}
.seal-inner {
    width: 32px; height: 32px;
    background-color: var(--red-dark); opacity: 0.9;
    -webkit-mask-image: url('https://chungdoi.com/images/themes/songlong-red/chinese_happiness.webp');
    -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center;
}

.cover-card {
    position: relative; border-radius: 8px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.45), 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 40px rgba(240, 212, 151, 0.15);
}
.cover-card-bg {
    position: absolute; inset: 0; border-radius: 8px; overflow: hidden;
    background: #a31d16; border: 1px solid rgba(240, 212, 151, 0.15);
}
.cover-card-bg img { position: absolute; pointer-events: none; }
@keyframes slowFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.dragon-left { width: 180px; top: -20px; left: -40px; opacity: 0.35; transform: scaleX(-1) rotate(-15deg); mix-blend-mode: screen; transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1); }
.dragon-right { width: 190px; bottom: -20px; right: -40px; opacity: 0.35; transform: rotate(-10deg); mix-blend-mode: screen; transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1); }
.cloud-small { width: 50px; top: 12px; right: 12px; opacity: 0.4; animation: slowFloat 4s ease-in-out infinite; }
.cloud-big { width: 50px; bottom: 12px; left: 12px; opacity: 0.4; transform: scaleX(-1); animation: slowFloat 6s ease-in-out infinite 1s; }
.wave-bottom { width: 50px; bottom: 8px; left: 50%; transform: translateX(-50%); opacity: 0.2; }
@media (min-width: 768px) {
    .dragon-left { width: 300px; top: -80px; left: -100px; opacity: 0.6; }
    .dragon-right { width: 300px; bottom: -80px; right: -110px; opacity: 0.6; }
    .cloud-small, .cloud-big, .wave-bottom { width: 70px; }
}

.cover-card-content {
    position: relative; z-index: 10; text-align: center;
    padding: 112px 24px 56px 24px;
}
@media (min-width: 768px) { .cover-card-content { padding: 96px 24px 32px 24px; } }

.cover-title-names {
    color: var(--gold);
    font-family: 'Playfair Display', serif; font-size: 1.875rem; line-height: 1.2;
    display: flex; flex-direction: column; align-items: center; margin-bottom: 8px;
}
@media (min-width: 640px) { .cover-title-names { font-size: 2.25rem; } }
.cover-name-text { display: block; width: 100%; text-align: center; font-weight: normal; }
.cover-and { font-size: 1.125rem; margin-top: 10px; margin-bottom: 10px; }
@media (min-width: 640px) { .cover-and { font-size: 1.25rem; } }

.cover-divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 8px; }
.line-left, .line-right { height: 1px; width: 40px; }
.line-left { background: linear-gradient(to left, transparent, var(--gold)); }
.line-right { background: linear-gradient(to right, transparent, var(--gold)); }
.floral-icon { color: var(--gold); opacity: 0.7; font-size: 0.875rem; }

.cover-date-display {
    color: rgba(240, 212, 151, 0.85); font-family: 'Lora', 'Inter', serif; font-size: 18px; margin-bottom: 20px;
}
.cover-invitation-text { margin-bottom: 24px; }
.invite-p { color: rgba(240, 212, 151, 0.85); font-family: 'Lora', 'Inter', serif; font-size: 16px; font-weight: 300; margin-bottom: 8px; }
.guest-name-box {
    background-color: rgba(0, 0, 0, 0.15); display: inline-block;
    padding: 10px 20px; border-radius: 12px; margin-bottom: 8px;
}
#guest-name-display { color: var(--gold); font-family: 'Lora', 'Inter', serif; font-size: 1.125rem; font-weight: 600; }
@media (min-width: 640px) { #guest-name-display { font-size: 1.25rem; font-weight: 500; } }

@keyframes shine {
    0% { transform: translateX(-100px) skewX(-15deg); }
    20% { transform: translateX(200px) skewX(-15deg); }
    100% { transform: translateX(200px) skewX(-15deg); }
}
.btn-open-lux {
    background-color: var(--gold); color: var(--red-dark);
    box-shadow: 0 4px 14px rgba(240, 212, 151, 0.35); font-family: 'Lora', 'Inter', serif;
    position: relative; padding: 10px 32px; font-size: 1.125rem; font-weight: 600;
    border-radius: 9999px; display: flex; align-items: center; justify-content: center;
    margin: 0 auto; overflow: hidden; border: none; cursor: pointer; transition: transform 0.3s;
}
.btn-open-lux:hover { transform: translateY(-2px); }
.btn-shine {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shine 3s ease-in-out infinite;
    position: absolute; top: 0; left: 0; height: 100%; width: 32px; pointer-events: none;
}

/* =========================================
   MAIN CONTENT
========================================= */
.main-content {
    transition: all 0.8s ease;
    background: radial-gradient(circle at top center, #c31d1d 0%, #8b0000 60%, #5c0000 100%);
    position: relative;
    overflow: hidden;
}
.main-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/floral-pattern.png');
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}
.section { position: relative; z-index: 1; }

.section {
    padding: 60px 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--gold-light);
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.decor-line {
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 0 auto 30px auto;
    border-radius: 2px;
}

/* HERO */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
}

@keyframes kenburns {
}
.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    animation: kenburns 25s ease-in-out infinite alternate;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.hero-box {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #fff;
    padding: 40px 20px;
    border: 2px solid rgba(212, 175, 55, 0.6);
    border-radius: 12px;
    background: rgba(139, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    max-width: 90%;
    width: 600px;
}

#sparkles-container {
    position: absolute; top:0; left:0; width:100%; height:100%;
    pointer-events: none; z-index: 2; overflow: hidden;
}
.petal {
    position: absolute;
    background: #ff4d4d;
    border-radius: 15px 0 15px 0;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    opacity: 0;
    animation: fall linear forwards;
    z-index: 5;
    pointer-events: none;
}
.petal::after {
    content: '';
    position: absolute;
    top: 20%; left: 20%; right: 20%; bottom: 20%;
    background: rgba(255, 215, 0, 0.4);
    border-radius: 5px;
}
@keyframes fall {
    0% { transform: translateY(-50px) rotate(0deg) rotateX(0deg) scale(0); opacity: 0; }
    10% { opacity: 0.9; transform: translateY(10vh) rotate(45deg) rotateX(45deg) scale(1.2); }
    80% { opacity: 0.8; transform: translateY(80vh) rotate(180deg) rotateX(180deg) scale(0.9); }
    100% { transform: translateY(110vh) rotate(360deg) rotateX(360deg) scale(0); opacity: 0; }
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 10px rgba(212, 175, 55, 0.3), 0 0 20px rgba(212, 175, 55, 0.1); transform: scale(1); }
    100% { text-shadow: 0 0 20px rgba(212, 175, 55, 0.8), 0 0 40px rgba(212, 175, 55, 0.5); transform: scale(1.02); }
}
.wedding-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 15px;
    animation: titleGlow 2.5s ease-in-out infinite alternate;
}

.hero-quote {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 20px;
}

.hero-message {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* COUPLE / INVITATION */
.couple-grid {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 20px;
    margin-top: 40px;
}

.couple-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--red);
}

.couple-card .btn-map {
    margin-top: auto !important;
}

.couple-img-wrap {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    padding: 3px;
    overflow: hidden;
}

.couple-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.couple-role {
    font-size: 0.9rem;
    color: var(--red);
    margin-bottom: 5px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.couple-name {
    color: var(--red-dark);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.couple-parents {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.8;
}

.couple-divider {
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.heart-icon {
    font-size: 2rem;
    color: var(--gold);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0px var(--gold)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 8px var(--gold)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0px var(--gold)); }
}

@media (max-width: 600px) {
    .couple-grid {
        flex-direction: column;
    }
    .couple-divider {
        padding: 10px 0;
        margin: 0 auto;
    }
}

/* COUNTDOWN */
.countdown-section {
    background: var(--red-dark);
    color: white;
}

.countdown-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.cd-item {
    background: #eae2d6;
    border: 2px solid var(--gold);
    border-radius: 10px;
    width: 80px;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.cd-item::before, .cd-item::after {
    content: '';
    position: absolute;
    top: -8px;
    width: 8px;
    height: 16px;
    background: linear-gradient(to bottom, #d4af37, #8a6c1c);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.cd-item::before { left: 20%; }
.cd-item::after { right: 20%; }

.cd-num {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--red);
    border-bottom: 2px dashed rgba(139,0,0,0.2);
    width: 100%;
    text-align: center;
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.cd-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #444;
    letter-spacing: 1px;
    margin-top: 5px;
}
/* CALENDAR */
.calendar-card {
    background: #fdfaf6 url('https://chungdoi.com/images/themes/songlong-red/dragon-bg.png') no-repeat center center;
    background-size: cover;
    border-radius: 12px;
    padding: 40px 20px;
    margin-top: 50px;
    text-align: center;
    color: var(--red-dark);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border: 2px solid var(--gold);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    overflow: hidden;
}
.cal-top-time { font-family: var(--font-heading); font-size: 2.2rem; font-weight: bold; margin-bottom: 25px; color: var(--red); }
.cal-date-row { display: flex; align-items: center; justify-content: center; gap: 15px; margin-bottom: 15px; }
.cal-date-row span { font-size: 1.1rem; text-transform: uppercase; font-weight: 500; color: #555; }
.cal-date-huge { font-family: var(--font-heading); font-size: 3.5rem; color: var(--red); line-height: 1; border-left: 1px solid #ccc; border-right: 1px solid #ccc; padding: 0 20px; }
.cal-year { font-size: 1.5rem; margin-bottom: 10px; font-weight: 500; color: #555; }
.cal-lunar { font-size: 1rem; color: #777; margin-bottom: 20px; font-style: italic; }
.cal-event-time { font-size: 0.9rem; text-transform: uppercase; margin-bottom: 30px; letter-spacing: 1px; color: #555; }
.cal-event-time strong { font-family: var(--font-heading); font-size: 1.8rem; color: var(--red); display: block; margin-top: 5px; }

.cal-grid-wrap {
    border: 1px solid rgba(139, 0, 0, 0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.6);
    padding: 20px 10px;
    margin-bottom: 25px;
}
.cal-month-title { font-weight: bold; font-size: 1.1rem; margin-bottom: 15px; color: var(--red); }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px 5px;
    text-align: center;
    font-size: 0.95rem;
    color: #444;
}
.cal-header {
    font-weight: 600;
    color: var(--red);
    border-bottom: 1px solid rgba(139, 0, 0, 0.2);
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}
.cal-day {
    padding: 5px 0;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 35px;
}
.cal-day.active {
    color: #fff;
    font-weight: bold;
}
.cal-add-btn {
    display: inline-block;
    color: var(--red);
    text-decoration: none;
    border-bottom: 1px solid var(--red);
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s;
    padding-bottom: 2px;
}
.cal-add-btn:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* EVENTS */
.events-wrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.event-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--red);
    text-align: center;
}

.event-icon {
    font-size: 2.5rem;
    color: var(--red);
    margin-bottom: 15px;
}

.event-type {
    font-family: var(--font-heading);
    color: var(--red-dark);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.event-detail {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: #555;
}

.event-detail i {
    color: var(--red);
    width: 20px;
}

.btn-map {
    display: inline-block;
    padding: 10px 25px;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.btn-map:hover {
    background: var(--gold-dark);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}
.btn-map::after, .btn-gold::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: rgba(255,255,255,0.3);
    transform: rotate(45deg);
    transition: all 0.5s;
}
.btn-map:hover::after, .btn-gold:hover::after {
    left: 120%;
}

.btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    font-family: var(--font-body);
    position: relative;
    overflow: hidden;
}
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.6);
}

/* STORY */
.story-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    text-align: center;
    border: 2px solid var(--gold);
    color: #444;
}
.story-box img {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 20px;
}
.story-box h3 {
    font-family: var(--font-heading);
    color: var(--red-dark);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.story-box p {
    margin-bottom: 15px;
    text-align: justify;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease;
}
.story-section.visible .story-box p:nth-of-type(1) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.story-section.visible .story-box p:nth-of-type(2) { transition-delay: 0.8s; opacity: 1; transform: translateY(0); }
.story-section.visible .story-box p:nth-of-type(3) { transition-delay: 1.4s; opacity: 1; transform: translateY(0); }
.story-section.visible .story-box p:nth-of-type(4) { transition-delay: 2.0s; opacity: 1; transform: translateY(0); }
.story-section.visible .story-box p:nth-of-type(5) { transition-delay: 2.6s; opacity: 1; transform: translateY(0); }

/* ALBUM SWIPER */
.gallery-swiper {
    width: 100%;
    padding-top: 30px;
    padding-bottom: 50px;
}
.swiper-slide {
    background-position: center;
    background-size: cover;
    width: 300px;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 3px solid var(--gold);
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.5s ease, filter 0.5s ease;
    filter: blur(3px);
}
.swiper-slide-active {
    opacity: 1;
    filter: blur(0);
}
.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.swiper-pagination-bullet {
    background: var(--red) !important;
}
.swiper-button-next, .swiper-button-prev {
    color: var(--gold) !important;
    background: rgba(255,255,255,0.8);
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 1.2rem !important;
    font-weight: bold;
}
@media (max-width: 768px) {
    .swiper-slide {
        width: 240px;
        height: 340px;
    }
}

/* BANKING */
.banking-section {
    background: var(--red-dark);
    color: white;
}
.banking-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    flex-wrap: wrap;
}
.banking-card {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--red);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    color: #333;
}
.banking-card h3 {
    color: var(--red);
    font-family: 'Great Vibes', cursive;
    font-size: 2.2rem;
    margin-bottom: 15px;
}
.qr-img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin: 0 auto 15px;
    border: 2px solid var(--red);
    padding: 5px;
    border-radius: 8px;
    background: #fff;
}
.heart-icon {
    font-size: 1.5rem;
    color: var(--red);
    background: #eae2d6;
    padding: 10px;
    border-radius: 50%;
}
.bank-info {
    font-size: 0.95rem;
    text-align: left;
    margin-top: auto;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    color: #444; /* Fix invisible text on light background */
}
.bank-info div { margin-bottom: 5px; }

/* RSVP */
.rsvp-section {
    background: transparent;
}
.rsvp-form {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border: 2px solid var(--gold);
}
.rsvp-form input, .rsvp-form select, .rsvp-form textarea,
.gb-form input, .gb-form textarea {
    width: 100%; padding: 12px 15px; margin-bottom: 15px; border: 1px solid #ddd;
    border-radius: 8px; font-family: 'Playfair Display', serif; font-size: 1.05rem;
    background: #faf8f5;
}
.rsvp-form input:focus, .rsvp-form select:focus, .rsvp-form textarea:focus,
.gb-form input:focus, .gb-form textarea:focus {
    outline: none; border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}
.btn-block { width: 100%; justify-content: center; }

/* DRESS CODE */
.color-circle {
    width: 40px; height: 40px; border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border: 2px solid white;
}

.cursive-name {
    font-family: var(--font-heading);
}

/* SỔ LƯU BÚT */
.guestbook-wrap { max-width: 600px; margin: 0 auto; }
.gb-form {
    display: flex; flex-direction: column; gap: 0px; margin-bottom: 30px;
    background: #fff;
    color: var(--text);
    padding: 20px 0;
    border-radius: 12px;
    border: 2px solid var(--gold);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}
.gb-list { display: flex; flex-direction: column; gap: 15px; }
.gb-item {
    background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--red); text-align: left; color: var(--text); border-top: 1px solid #eee; border-right: 1px solid #eee; border-bottom: 1px solid #eee;
}
.gb-header { display: flex; justify-content: space-between; margin-bottom: 8px; align-items: center; }
.gb-name { font-weight: 700; color: var(--red); font-family: 'Playfair Display', serif; font-size: 1.1rem; }
.gb-date { font-size: 0.85rem; color: #888; }
.gb-content { color: #444; font-size: 1.05rem; line-height: 1.6; font-style: italic; }
.couple-address { font-size: 0.95rem; color: #666; margin-top: 10px; font-style: italic; text-align: center; }


/* MUSIC & ANIMATIONS */
.floating-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}
.music-toggle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.rotating {
    animation: rotate 4s linear infinite;
}
@keyframes rotate {
    100% { transform: rotate(360deg); }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.footer {
    text-align: center;
    padding: 20px;
    background: var(--dark);
    color: #aaa;
    font-size: 0.85rem;
}

/* =========================================
   GRAND PREMIUM BOX (HIỆU ỨNG HOÀNH TRÁNG)
========================================= */
/* Base setup */
.couple-card, .event-card, .form-wrap, .story-box, .banking-card, .cover-card {
    position: relative;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(139, 0, 0, 0.2);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    background: transparent;
    border: none;
    z-index: 1;
    overflow: hidden; /* For rotating glow */
}

/* Hover effects (excluding cover-card which isn't hovered) */
.couple-card:hover, .event-card:hover, .form-wrap:hover, .story-box:hover, .banking-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(139, 0, 0, 0.3), 0 0 30px rgba(212, 175, 55, 0.2);
}

/* The Rotating Gold Border */
.couple-card::before, .event-card::before, .form-wrap::before, .story-box::before, .banking-card::before, .cover-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(transparent, rgba(212, 175, 55, 0.9), transparent 30%);
    animation: rotateGlow 4s linear infinite;
    z-index: -2;
    pointer-events: none;
}
@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Inner card with Corners and Texture */
.couple-card::after, .event-card::after, .form-wrap::after, .story-box::after, .banking-card::after {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 9px;
    z-index: -1;
    background: 
        linear-gradient(var(--gold), var(--gold)) top left / 30px 3px no-repeat,
        linear-gradient(var(--gold), var(--gold)) top left / 3px 30px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom right / 30px 3px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom right / 3px 30px no-repeat,
        radial-gradient(rgba(212, 175, 55, 0.25) 1px, transparent 1px) center / 15px 15px,
        #fff9f2;
}

/* Ensure contents sit above the background */
.couple-card > *, .event-card > *, .form-wrap > *, .story-box > *, .banking-card > * {
    position: relative;
    z-index: 10;
}

/* Special handling for cover-card-bg to act as the inner card */
.cover-card-bg {
    position: absolute;
    inset: 3px;
    border-radius: 9px;
    z-index: -1;
    background-color: #a31d16;
    background-image: 
        linear-gradient(var(--gold), var(--gold)) top left / 30px 3px no-repeat,
        linear-gradient(var(--gold), var(--gold)) top left / 3px 30px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom right / 30px 3px no-repeat,
        linear-gradient(var(--gold), var(--gold)) bottom right / 3px 30px no-repeat,
        radial-gradient(rgba(240, 212, 151, 0.15) 1px, transparent 1px) center / 15px 15px;
    border: none;
    overflow: hidden;
}

/* =========================================
   LIGHTBOX ALBUM GALLERY
========================================= */
.gallery-item {
    cursor: zoom-in;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--gold);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}

.lightbox {
    display: none;
    position: fixed; z-index: 100000;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
    justify-content: center; align-items: center;
}
.lb-content {
    max-width: 90vw; max-height: 90vh;
    border-radius: 8px;
    border: 3px solid var(--gold);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
    animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    object-fit: contain;
}
@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.lb-close {
    position: absolute; top: 20px; right: 30px;
    color: #fff; font-size: 50px; font-weight: 300; cursor: pointer;
    transition: color 0.3s, transform 0.3s;
    line-height: 1;
}
.lb-close:hover { color: var(--gold); transform: scale(1.2) rotate(90deg); }

.lb-prev, .lb-next {
    cursor: pointer; position: absolute; top: 50%; width: auto;
    padding: 20px; margin-top: -30px;
    color: rgba(255,255,255,0.7); font-weight: bold; font-size: 35px;
    transition: 0.3s; user-select: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { color: #fff; background: var(--gold); box-shadow: 0 0 20px rgba(212, 175, 55, 0.6); }

/* =========================================
   THEME EFFECTS & PARTICLES
========================================= */
#particles-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: 1; overflow: hidden;
}
.firefly {
    position: absolute;
    width: 6px; height: 6px;
    background: var(--gold-light);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(227, 166, 82, 0.8);
    opacity: 0;
    animation: floatUp 15s linear infinite;
}
@keyframes floatUp {
    0% { transform: translateY(100vh) translateX(0) scale(0.5); opacity: 0; }
    10% { opacity: 0.8; }
    50% { transform: translateY(50vh) translateX(30px) scale(1); }
    90% { opacity: 0.8; }
    100% { transform: translateY(-10vh) translateX(-30px) scale(0.5); opacity: 0; }
}

/* ENVELOPE OPEN ANIMATION */
.envelope-flip {
    animation: envFlip 0.8s cubic-bezier(0.455, 0.030, 0.515, 0.955) forwards;
}
@keyframes envFlip {
    0% { transform: scale(1) rotateY(0deg); opacity: 1; }
    50% { transform: scale(1.1) rotateY(90deg); opacity: 0.5; }
    100% { transform: scale(1) rotateY(90deg); opacity: 0; display: none; }
}
.envelope-content-show {
    animation: contentReveal 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes contentReveal {
    0% { transform: scale(0.8) translateY(30px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* MUSIC BUTTON */
.music-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: var(--gold);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s, transform 0.3s;
    font-size: 1.2rem;
}
.music-toggle.visible {
    opacity: 1;
    pointer-events: auto;
}
.music-toggle:hover {
    transform: scale(1.1);
}
.music-toggle.spinning i {
    animation: spinMusic 3s linear infinite;
}
@keyframes spinMusic {
    100% { transform: rotate(360deg); }
}
.music-toggle.paused i {
    animation: none;
    position: relative;
}
.music-toggle.paused::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: #fff;
    transform: rotate(-45deg);
}

/* EMOJI PICKER */
.emoji-picker .emo {
    font-size: 1.5rem;
    cursor: pointer;
    margin: 5px;
    display: inline-block;
    transition: transform 0.2s;
}
.emoji-picker .emo:hover {
    transform: scale(1.3);
}

@keyframes heartbeat {
    0% { transform: translate(-50%, -50%) scale(1); }
    15% { transform: translate(-50%, -50%) scale(1.3); }
    30% { transform: translate(-50%, -50%) scale(1); }
    45% { transform: translate(-50%, -50%) scale(1.3); }
    60% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}
.heartbeat {
    animation: heartbeat 1.5s infinite;
}

/* slide-in left for groom */
.couple-card:first-child {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}
.couple-section.visible .couple-card:first-child {
    opacity: 1;
    transform: translateX(0);
}

/* slide-in right for bride */
.couple-card:last-child {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}
.couple-section.visible .couple-card:last-child {
    opacity: 1;
    transform: translateX(0);
}
.couple-divider {
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.6s ease 0.2s;
}
.couple-section.visible .couple-divider {
    opacity: 1;
    transform: scale(1);
}
