/* =========================================
   1. VARIABLE & RESET STYLE
   ========================================= */
:root {
    --maroon-dark: #4a0404;
    --maroon-bright: #800000;
    --sunflower-yellow: #ffc107;
    --sunflower-hover: #e6af06;
    --off-white: #fff9ed;
    --text-dark: #333333;
    --text-light: #f4f4f4;
}

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

html, body {
    height: 100%;
    min-height: -webkit-fill-available;
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background-color: var(--off-white);
    overflow-x: hidden;
}

/* LOCK SCROLL UTAMA SEBELUM UNDANGAN DIBUKA */
body.locked {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* CONTAINER UTAMA SETELAH TOMBOL DIKLIK */
.content-hidden {
    display: none;
    opacity: 0;
}

/* Layout Split Screen Desktop */
.content-show {
    display: grid !important;
    grid-template-columns: 1fr 450px;
    animation: fadeInContent 0.8s ease-out forwards;
}

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

/* Struktur Halaman Full per Section */
.section-full {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    position: relative;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}


/* =========================================
   2. HERO / COVER SECTION
   ========================================= */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    min-height: -webkit-fill-available;
    width: 100%;
    display: flex;
    align-items: flex-end; 
    justify-content: center; 
    color: var(--text-light);
    overflow: hidden;
    z-index: 999;
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: heroSlideshow 15s infinite ease-in-out;

    transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1), 
                width 1s cubic-bezier(0.65, 0, 0.35, 1), 
                opacity 1s ease;
}

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

.hero-content { 
    z-index: 5; 
    text-align: center; 
    width: 100%;
    max-width: 600px;
    padding: 0 20px 80px 20px; 
    transition: opacity 0.4s ease;
}

.guest-card {
    padding: 25px 20px;
    border: 1px solid rgba(255, 193, 7, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.guest-card p {
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.guest-card h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--sunflower-yellow);
    margin-bottom: 20px;
}

@media (min-width: 769px) {
    .hero-fade-out {
        width: calc(100% - 450px);
        transform: translateX(0);
        pointer-events: none;
    }
    .hero-fade-out .hero-content {
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .hero-fade-out {
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
    }
}


/* =========================================
   3. BUTTONS GLOBAL
   ========================================= */
.btn-open-invitation {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: var(--sunflower-yellow);
    color: var(--maroon-dark);
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    animation: pulse-yellow 2s infinite;
    transition: 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-open-invitation:hover {
    background-color: #fff;
    transform: scale(1.05);
}

.btn-main {
    background-color: var(--sunflower-yellow);
    color: var(--maroon-dark);
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: bold;
    display: inline-block;
    text-decoration: none;
}


/* =========================================
   4. LAYOUT UNDANGAN (SISI KIRI & SISI KANAN)
   ========================================= */

/* SISI KIRI (DESKTOP SLIDESHOW) */
.main-left-slideshow {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 40px;
    color: var(--text-light);
    
    animation: heroSlideshow 15s infinite ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 2;
}

.desktop-bride-groom {
    z-index: 5;
    text-align: left !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: center;
    gap: 10px;
}

.desktop-date {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 3px;
    color: var(--sunflower-yellow);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.desktop-logo-container {
    width: 220px !important; 
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5px 0 !important;
}

.desktop-logo {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
}

.desktop-wedding-text {
    font-family: 'Great Vibes', cursive;
    font-size: 2rem;
    color: var(--sunflower-yellow);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    margin: 0;
}

/* SISI KANAN (KONTEN SCROLLING) */
.main-right-content {
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    scroll-behavior: smooth;
    background-color: var(--off-white);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: y mandatory;
}

.main-right-content::-webkit-scrollbar {
    display: none;
    width: 0 !important;
}


/* =========================================
   5. DETAIL KONTEN PANEL KANAN per SECTION
   ========================================= */

/* SECTION 1: WELCOME SCREEN KANAN */
.welcome-right {
    background-image: url('photo/home.webp'); 
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-light);
    text-align: center;
    padding: 0 !important;
}

.welcome-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.65));
    z-index: 1;
}

.welcome-inner-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 70px;
}

.welcome-sub {
    font-size: 0.75rem; letter-spacing: 5px; color: var(--text-light);
    font-weight: 400; margin-bottom: 6px; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.welcome-title {
    font-family: 'Montserrat', sans-serif; font-size: 2.4rem; font-weight: 600;
    color: var(--text-light); margin-bottom: 8px; text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.9);
}

.welcome-date {
    font-size: 0.85rem; color: var(--text-light); letter-spacing: 1px;
    font-weight: 300; margin-bottom: 35px; text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.scroll-down-indicator { display: flex; flex-direction: column; align-items: center; gap: 4px; opacity: 0.85; animation: bounceScroll 2s infinite; }
.scroll-text { font-size: 0.65rem; letter-spacing: 1.5px; text-transform: uppercase; }
.scroll-arrow { font-size: 0.85rem; font-weight: bold; }


/* SECTION 2: DOA & SLOKA */
.doa-section {
    background-color: var(--off-white);
    padding: 80px 25px;
    overflow: hidden;
}

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

.sloka-box {
    text-align: center;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(-50px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.doa-divider {
    width: 0px;
    height: 2px;
    background-color: var(--sunflower-yellow);
    margin: 30px auto;
    border-radius: 5px;
    transition: width 0.6s ease-out;
}

.salam-pengantar {
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.doa-section.active .sloka-box {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.doa-section.active .doa-divider {
    width: 60px;
    transition-delay: 0.4s;
}

.doa-section.active .salam-pengantar {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.sloka-sanskerta {
    font-style: italic;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--maroon-dark);
    margin-bottom: 8px;
}

.sloka-sumber {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--sunflower-hover);
    margin-bottom: 15px;
}

.sloka-arti {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #555555;
    font-weight: 300;
}

.salam-pengantar h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    color: var(--maroon-bright) !important;
    margin-bottom: 15px;
}

.salam-pengantar p {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-dark);
    font-weight: 400;
}


/* =========================================
   SECTION 3 & 4: PROFIL MEMPELAI
   ========================================= */

.mempelai-wrapper {
    position: relative;
    width: 100%;
    background-image: url('photo/mempelai-bg.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.mempelai-section {
    position: relative !important;
    overflow: hidden !important;
    z-index: 1 !important;
    background: transparent !important;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.mempelai-bg-overlay {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.45); 
    z-index: 0;
}

.mempelai-section.pria .mempelai-bg-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
}

.mempelai-section.wanita .mempelai-bg-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
}

.mempelai-page-container {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 2;
}

.mempelai-card-full {
    position: relative;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* WADAH FOTO 3D */
.mempelai-img-wrapper {
    perspective: 1000px;
    width: 200px;
    height: 280px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.mempelai-flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateY(180deg);
}

.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 130px 130px 40px 40px;
    border: 5px solid #ffffff;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.flip-front {
    transform: rotateY(0deg);
    z-index: 2;
}

.mempelai-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center; 
}

.flip-back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.flip-back-pria {
    background: linear-gradient(135deg, var(--maroon-dark), #5a0505);
}

.flip-back-wanita {
    background: linear-gradient(135deg, var(--maroon-dark), #690404);
}

.toilet-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sunflower-yellow);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    user-select: none;
}

.toilet-icon svg {
    width: 100%;
    height: 100%;
}

/* KOTAK INFO MEMPELAI */
.mempelai-info { 
    position: relative;
    width: 90%; 
    max-width: 360px;
    container-type: inline-size;
    
    background: rgba(74, 4, 4, 0.78) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px 15px; 
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 193, 7, 0.2); 
    
    margin-top: -30px; 
    z-index: 10; 

    opacity: 0;
    transform: translateY(40px);
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1), opacity 1s ease;
}

.mempelai-info h3 { 
    font-size: clamp(0.95rem, 5.5cqw, 1.35rem) !important; 
    color: var(--sunflower-yellow) !important; 
    font-weight: 600; 
    margin-bottom: 8px; 
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); 
    line-height: 1.25;
    word-break: break-word;
}

.mempelai-parents { 
    font-size: clamp(0.7rem, 3.8cqw, 0.88rem) !important; 
    color: #ffffff !important; 
    line-height: 1.35; 
    font-weight: 300; 
    margin-bottom: 12px; 
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); 
}

.mempelai-parents strong { 
    color: #ffffff !important; 
}

.btn-instagram {
    display: inline-block; 
    font-size: clamp(0.68rem, 3.5cqw, 0.82rem) !important; 
    color: #ffffff !important; 
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px); 
    text-decoration: none; 
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px; 
    border-radius: 25px; 
    font-weight: 500; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 8px; 
}

.btn-instagram:hover { 
    background-color: var(--sunflower-yellow); 
    color: var(--maroon-dark) !important; 
    border-color: var(--sunflower-yellow);
    transform: translateY(-2px); 
}

.mempelai-address {
    font-size: clamp(0.65rem, 3.5cqw, 0.82rem) !important;
    color: #ffffff !important;
    line-height: 1.35;
    font-weight: 300;
    margin-top: 2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* TRIGGER ANIMASI MEMPELAI */
.mempelai-section.active .mempelai-flip-card {
    transform: rotateY(0deg);
}

.mempelai-section.active .mempelai-info {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}


/* =========================================
   6. DETAIL ACARA & ANIMASI MASUK SCROLL
   ========================================= */
.acara-section { 
    position: relative; 
    overflow: hidden; 
    z-index: 1; 
    color: #ffffff; 

    background-image: url('photo/resepsi.webp');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

.acara-bg-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.65); 
    z-index: -1; 
}

.acara-page-container {
    max-width: 400px; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    height: 100%; 
    text-align: center; 
    padding: 0 15px;
}

.acara-main-title { 
    font-family: 'Montserrat', sans-serif; 
    font-size: 1.8rem; 
    font-weight: 400; 
    letter-spacing: 6px; 
    text-transform: uppercase; 
    color: #ffffff; 
    margin-bottom: 20px; 
    
    opacity: 0;
    transform: translateY(-30px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.acara-opening-text { 
    font-size: 0.82rem; 
    line-height: 1.6; 
    font-weight: 300; 
    color: rgba(255, 255, 255, 0.9); 
    margin-bottom: 25px; 
    
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.acara-glass-card {
    width: 100%; 
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15); 
    border-radius: 18px; 
    padding: 20px; 
    margin-bottom: 30px; 
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.25);
    
    opacity: 0;
    transform: scale(0.92) translateY(30px);
    transition: transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.9s ease;
}

.countdown-container { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 100%; 
    margin-bottom: 25px; 
    
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.acara-closing-text { 
    font-size: 0.82rem; 
    line-height: 1.6; 
    font-weight: 300; 
    color: rgba(255, 255, 255, 0.9); 
    
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.acara-action-buttons { 
    display: flex; 
    gap: 15px; 
    width: 100%; 
    justify-content: center; 
    
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.acara-section.active .acara-main-title { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.acara-section.active .acara-opening-text { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.acara-section.active .acara-glass-card { opacity: 1; transform: scale(1) translateY(0); transition-delay: 0.4s; }
.acara-section.active .countdown-container { opacity: 1; transform: translateY(0); transition-delay: 0.55s; }
.acara-section.active .acara-closing-text { opacity: 1; transform: translateY(0); transition-delay: 0.65s; }
.acara-section.active .acara-action-buttons { opacity: 1; transform: translateY(0); transition-delay: 0.75s; }

.acara-date-badge { 
    background-color: #fff4dd; 
    padding: 12px 10px; 
    border-radius: 12px; 
    margin-bottom: 18px; 
}

.acara-date-badge h3 { 
    font-size: 1.25rem; 
    font-weight: 600; 
    color: #4a0404; 
    letter-spacing: 1px; 
}

.acara-time { 
    font-size: 1rem; 
    font-weight: 500; 
    color: #ffffff; 
    margin-bottom: 12px; 
}

.acara-location { 
    font-size: 0.85rem; 
    line-height: 1.6; 
    font-weight: 300; 
    color: rgba(255, 255, 255, 0.85); 
}

.countdown-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    flex: 1; 
}

.countdown-number { 
    font-size: 2rem; 
    font-weight: 400; 
    color: #ffffff; 
    line-height: 1; 
    margin-bottom: 4px; 
}

.countdown-label { 
    font-size: 0.72rem; 
    font-weight: 300; 
    color: rgba(255, 255, 255, 0.75); 
}

.countdown-divider { 
    width: 1px; 
    height: 35px; 
    background-color: rgba(255, 255, 255, 0.4); 
    margin: 0 5px; 
}

.btn-acara-action {
    flex: 1; 
    max-width: 160px; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px;
    border: 1px solid #ffffff; 
    background: transparent; 
    color: #ffffff; 
    padding: 10px 15px;
    border-radius: 8px; 
    font-size: 0.82rem; 
    font-weight: 500; 
    text-decoration: none; 
    transition: 0.3s ease;
}

.btn-acara-action:hover { 
    background-color: #ffffff; 
    color: #000000; 
}


/* =========================================
   7. GALERI PORTRAIT GRID & 3D FLIP
   ========================================= */
.gallery-section { 
    position: relative; 
    overflow: hidden; 
    z-index: 1; 
}

.gallery-bg-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.65); 
    z-index: -1; 
}

.gallery-page-container {
    max-width: 450px; 
    width: 100%; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column;
    align-items: center; 
    justify-content: center; 
    height: 100%; 
    padding: 20px 15px; 
}

.gallery-main-title {
    font-family: 'Great Vibes', cursive; 
    font-size: 3.2rem; 
    color: #ffffff;
    margin-top: 0; 
    margin-bottom: 15px; 
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    text-align: center; 
    width: 100%;
    
    opacity: 0;
    transform: translateY(-20px);
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.gallery-section.active .gallery-main-title {
    opacity: 1;
    transform: translateY(0);
}

.gallery-scroll-box-wide {
    width: 100%; 
    height: 65vh; 
    height: 65dvh; 
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px; 
    padding: 12px; 
    overflow-y: auto; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

.gallery-scroll-box-wide::-webkit-scrollbar { 
    display: none; 
    width: 0 !important; 
}

.gallery-grid-portrait { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
    width: 100%;
}

.gallery-item-portrait { 
    width: 100%;
    aspect-ratio: 3 / 4; 
    perspective: 1000px; 
    border-radius: 10px;
    position: relative;
}

.gallery-flip-card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    transform: rotateX(180deg); /* Posisi awal tertutup */
}

.gallery-flip-front, .gallery-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 10px;
    border: 3px solid #ffffff;
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    overflow: hidden;
}

.gallery-flip-front {
    transform: rotateX(0deg);
    z-index: 2;
}

.gallery-flip-front img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center; 
    display: block; 
}

.gallery-flip-back {
    transform: rotateX(180deg);
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(74, 4, 4, 0.4));
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.8rem;
}

/* Class trigger saat terdeteksi scroll oleh JavaScript */
.gallery-flip-card.flipped {
    transform: rotateX(0deg);
}

.gallery-flip-card.flipped:hover {
    transform: scale(1.04) translateY(-3px);
}

/* =========================================
   7.2 VIDEO (PERBAIKAN ANIMASI ENTRANCE & ICON X)
   ========================================= */

.video-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    align-items: center; 
}

/* Base Style Card Video */
.video-thumb-card {
    position: relative;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
    will-change: transform, opacity;
}

/* State Awal 3D: Video 1 (Kiri) & Video 2 (Kanan) */
.video-thumb-card:nth-child(1) {
    transform: translateX(-60px) rotateY(-15deg);
}

.video-thumb-card:nth-child(2) {
    transform: translateX(60px) rotateY(15deg);
}

/* State Aktif saat Section Muncul (Scroll) */
.gallery-section.active .video-thumb-card {
    opacity: 1;
    transform: translateX(0) rotateY(0deg);
}

.gallery-section.active .video-thumb-card:nth-child(1) {
    transition-delay: 0.2s;
}

.gallery-section.active .video-thumb-card:nth-child(2) {
    transition-delay: 0.4s;
}

.video-thumb-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.video-thumb-card:hover .video-thumb-img {
    transform: scale(1.03);
}

.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    color: rgba(255, 255, 255, 0.85);
    pointer-events: none;
    transition: transform 0.2s ease;
}

.video-thumb-card:hover .play-btn-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    color: #ffffff;
}

/* Modal Popup Video GDrive & Isolasi Tombol Close */
.video-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

/* Tombol X Hanya Muncul Jika Modal Aktif */
.video-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ffffff;
    font-size: 38px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100001;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.video-modal .close-modal:hover {
    opacity: 1;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gdrive-top-blocker {
    position: absolute;
    top: 0;
    right: 0;
    width: 70px;  
    height: 60px; 
    background: transparent;
    z-index: 10;  
    pointer-events: auto; 
}

.modal-content iframe {
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* =========================================
   8. KADO DIGITAL (GIFT) & POP-UP CARD
   ========================================= */
.gift-section { 
    position: relative; 
    overflow: hidden; 
    z-index: 1; 
    color: var(--text-dark);
    background-color: var(--off-white); 
    perspective: 1200px;
}

.gift-bg-overlay { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: transparent; 
    z-index: -1; 
}

.gift-page-container {
    max-width: 400px; 
    margin: 0 auto; 
    display: flex; 
    flex-direction: column; 
    align-items: center;
    justify-content: center; 
    height: 100%; 
    text-align: center; 
    padding: 0 15px;
}

.gift-main-title { 
    font-family: 'Montserrat', sans-serif; 
    font-size: 1.8rem; 
    font-weight: 600; 
    letter-spacing: 6px; 
    text-transform: uppercase; 
    color: var(--maroon-dark); 
    margin-bottom: 15px; 
    
    opacity: 0;
    transform: translateY(-25px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.gift-opening-text {
    font-size: 0.82rem; 
    line-height: 1.6; 
    font-weight: 400; 
    color: var(--text-dark); 
    margin-bottom: 30px;
    padding: 0 10px;
    
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.gift-glass-card {
    width: 100%; 
    background: linear-gradient(135deg, #003366 0%, #0056b3 100%);
    backdrop-filter: blur(15px); 
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2); 
    border-radius: 20px; 
    padding: 25px; 
    text-align: left;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    
    opacity: 0;
    transform: translateZ(-150px) rotateX(25deg) translateY(40px);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s ease;
}

.gift-section.active .gift-main-title { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.gift-section.active .gift-opening-text { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.gift-section.active .gift-glass-card { opacity: 1; transform: translateZ(0) rotateX(0deg) translateY(0); transition-delay: 0.45s; }

.card-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 30px; }
.bank-name { font-size: 1.5rem; font-weight: 600; letter-spacing: 2px; color: #ffffff; line-height: 1; }
.bank-sub { font-size: 0.55rem; letter-spacing: 1px; color: rgba(255, 255, 255, 0.7); margin-top: 3px; }
.label-text { font-size: 0.65rem; letter-spacing: 2px; color: rgba(255, 255, 255, 0.6); margin-bottom: 5px; }
.account-number-wrapper { display: flex; align-items: center; justify-content: space-between; }
.account-number { font-size: 1.4rem; font-weight: 600; letter-spacing: 3px; color: var(--sunflower-yellow); }

.btn-copy { background: transparent; border: none; color: rgba(255, 255, 255, 0.8); cursor: pointer; padding: 5px; transition: 0.2s ease; }
.btn-copy:hover { color: #ffffff; transform: scale(1.1); }
.card-divider-line { height: 1px; background: linear-gradient(90deg, rgba(255,255,255,0.2), rgba(255,255,255,0.02)); margin: 20px 0; }
.holder-name { font-size: 0.95rem; font-weight: 400; letter-spacing: 1px; color: #ffffff; text-transform: uppercase; }

.toast-alert { 
    position: absolute; 
    bottom: -50px; 
    left: 0; 
    width: 100%; 
    background: var(--sunflower-yellow); 
    color: #000000; 
    text-align: center; 
    padding: 8px 0; 
    font-size: 0.75rem; 
    font-weight: 600; 
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.toast-alert.show { bottom: 0; }


/* =========================================
   9. RSVP KEHADIRAN
   ========================================= */
.rsvp-section {
    position: relative;
    overflow: hidden;
    z-index: 1;
    color: #ffffff;
    background-image: url('photo/rsvp.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.rsvp-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: -1;
}

.rsvp-page-container {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 0 15px;
}

.rsvp-main-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 400;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 12px;
    
    opacity: 0;
    transform: translateY(-20px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.rsvp-sub-text {
    font-size: 0.82rem;
    line-height: 1.6;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 25px;
    padding: 0 10px;
    
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.8s ease;
}

.rsvp-counter-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    margin-bottom: 25px;
}

.counter-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 12px 5px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.8s ease;
}

.rsvp-glass-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.9s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.9s ease;
}

.rsvp-section.active .rsvp-main-title { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.rsvp-section.active .rsvp-sub-text { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.rsvp-section.active .counter-box:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.rsvp-section.active .counter-box:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
.rsvp-section.active .counter-box:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
.rsvp-section.active .rsvp-glass-card { opacity: 1; transform: scale(1) translateY(0); transition-delay: 0.75s; }

.counter-number { font-size: 1.6rem; font-weight: 600; color: var(--sunflower-yellow); margin-bottom: 2px; }
.counter-label { font-size: 0.72rem; font-weight: 300; color: rgba(255, 255, 255, 0.75); }
.rsvp-options-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.rsvp-option-item { position: relative; width: 100%; }

.rsvp-option-item input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.rsvp-custom-label {
    display: block; width: 100%; padding: 12px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px; font-size: 0.85rem; font-weight: 400; color: #ffffff;
    cursor: pointer; transition: all 0.3s ease; text-align: center;
}

.rsvp-custom-label:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.3); }
.rsvp-option-item input[type="radio"]:checked + .rsvp-custom-label {
    background: #ffffff; color: #000000; font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2); border-color: #ffffff;
}

.rsvp-action-row { display: flex; gap: 15px; }
.btn-rsvp-reset, .btn-rsvp-submit { flex: 1; padding: 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: 0.3s ease; }
.btn-rsvp-reset { background: transparent; border: 1px solid rgba(255, 255, 255, 0.4); color: rgba(255, 255, 255, 0.8); }
.btn-rsvp-reset:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.btn-rsvp-submit { background: var(--sunflower-yellow); border: 1px solid var(--sunflower-yellow); color: #000000; font-weight: 600; }
.btn-rsvp-submit:hover { background: var(--sunflower-hover); border-color: var(--sunflower-hover); }


/* =========================================
   10. CLOSING FOOTER
   ========================================= */
.closing-footer-section { 
    position: relative; 
    overflow: hidden; 
    z-index: 1; 
    background-image: url('photo/close.webp'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    display: flex; 
    align-items: flex-end; 
    justify-content: center; 
}

.closing-bg-overlay { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.85) 100%); 
    z-index: -1; 
}

.closing-page-container { width: 100%; max-width: 400px; margin: 0 auto; padding-bottom: 40px; text-align: center; z-index: 2; }
.closing-content-bottom { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.closing-logo-container { width: 250px; display: inline-flex; align-items: center; justify-content: center; color: #ffffff; opacity: 0.9; transition: transform 0.3s ease; }
.closing-logo-container:hover { transform: scale(1.1); }
.closing-copyright-text { font-family: 'Montserrat', sans-serif; font-size: 0.72rem; font-weight: 400; color: rgba(255, 255, 255, 0.7); letter-spacing: 1px; line-height: 1.6; }
.closing-copyright-text strong { color: #ffffff; font-weight: 600; }

/* =========================================
   MUSIC FLOATING BUTTON STYLE
   ========================================= */
.music-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--sunflower-yellow);
    color: var(--maroon-dark);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    background-color: var(--sunflower-hover);
}

.music-btn svg {
    width: 22px;
    height: 22px;
}

/* Menjaga animasi berputar perlahan saat lagu diputar (opsional) */
.music-btn.playing {
    animation: pulse-music 2s infinite;
}

@keyframes pulse-music {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

/* Penyesuaian khusus tampilan Handphone */
@media (max-width: 920px) {
    .music-btn {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}

/* =========================================
   11. ANIMASI & RESPONSIVE HP (MEDIA QUERIES)
   ========================================= */
@keyframes bounceScroll {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

@keyframes heroSlideshow {
    0%, 25% { background-image: linear-gradient(rgba(74, 4, 4, 0.4), rgba(74, 4, 4, 0.4)), url('photo/cover1.webp'); }
    33%, 58% { background-image: linear-gradient(rgba(74, 4, 4, 0.4), rgba(74, 4, 4, 0.4)), url('photo/cover2.webp'); }
    66%, 91% { background-image: linear-gradient(rgba(74, 4, 4, 0.4), rgba(74, 4, 4, 0.4)), url('photo/cover3.webp'); }
    100% { background-image: linear-gradient(rgba(74, 4, 4, 0.4), rgba(74, 4, 4, 0.4)), url('photo/cover4.webp'); }
}

@keyframes pulse-yellow {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

/* DESKTOP BACKGROUND PARALLAX (> 920px) */
@media (min-width: 921px) {
    .mempelai-wrapper {
        background-attachment: local;
    }
}

/* TAMPILAN HANDPHONE (<= 920px) */
@media (max-width: 920px) {
    .hero {
        animation: none !important; 
        background-image: linear-gradient(rgba(74, 4, 4, 0.4), rgba(74, 4, 4, 0.4)), url('photo/cover1.webp') !important; 
    }

    html, body {
        scroll-snap-type: none !important; 
        scroll-behavior: smooth;
        overflow-x: hidden;
        height: 100%;
    }
    
    body.locked {
        height: 100vh !important;
        height: 100dvh !important;
        overflow: hidden !important;
    }
    
    .hero-fade-out {
        width: calc(100% - 450px) !important;
        transform: translateX(0) !important;
        opacity: 0.3; 
        z-index: 10;
        pointer-events: none;
    }
    
    .hero-fade-out .hero-content {
        opacity: 0 !important;
        transition: opacity 0.4s ease;
    }

    .content-show { display: block !important; }
    .main-left-slideshow { display: none !important; }
    
    .main-right-content { 
        height: 100vh !important; 
        height: 100dvh !important; 
        overflow-y: scroll !important; 
        -webkit-overflow-scrolling: touch; 
        scroll-snap-type: y mandatory !important; 
        box-shadow: none; 
    }
    
    .welcome-inner-content { 
        height: 100vh; 
        height: 100dvh; 
        padding-bottom: 60px; 
    }
    
    .hero-content { padding: 0 15px 60px 15px; } 
    .guest-card { padding: 20px 15px; }
    
    .doa-section,
    .acara-section, 
    .gallery-section, 
    .gift-section, 
    .rsvp-section, 
    .closing-footer-section {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        padding: 40px 15px !important; 
        overflow: hidden; 
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
    }

    /* KONTINUITAS BACKGROUND MOBILE */
    .mempelai-wrapper {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    .mempelai-section {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 100vh !important;
        padding: 40px 15px !important; 
        overflow: hidden; 
        scroll-snap-align: center !important;
        scroll-snap-stop: always !important;
    }

    .mempelai-img-wrapper {
        width: 190px; 
        height: 260px;
    }

    .gallery-scroll-box-wide {
        height: 70vh !important;
        overflow-y: auto !important;
    }

    .acara-section,
    .rsvp-section,
    .closing-footer-section {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }
}

/* =========================================
   12. LIGHTBOX / FULLSCREEN PHOTO MODAL
   ========================================= */
.image-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Gambar Fullscreen Ukuran Asli / Proporsional */
.image-modal-content {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain; /* Menjaga rasio asli foto tanpa terpotong */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    animation: zoomInModal 0.3s ease-out;
}

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

/* Cursor pointer untuk foto galeri yang bisa diklik */
.gallery-flip-front img {
    cursor: pointer;
}

/* Tombol Navigasi Kiri & Kanan */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    font-size: 2rem;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 50%;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: background 0.3s ease, transform 0.2s ease;
    user-select: none;
    z-index: 1000000;
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

@media (max-width: 768px) {
    .prev-btn { left: 10px; }
    .next-btn { right: 10px; }
    .modal-nav {
        font-size: 1.5rem;
        padding: 8px 14px;
    }
}

.gallery-flip-front {
    background-color: #e0e0e0; /* Warna placeholder sebelum gambar muncul */
    overflow: hidden;
}

.gallery-flip-front img {
    transition: opacity 0.3s ease;
}