:root {
    --primary-teal: #4B6F7D;
    --dark-teal: #405962;
    --earth-brown: #865D3D;
    --bg-color: #F9F9F9;
    --text-color: #333;
    --white: #fff;
    --gold: #D4AF37;
}

/* Video Text Overlay */
.video-overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    /* Above video, below cover if cover is z-9999 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    /* Let clicks pass through if needed */
    transform: translateZ(0);
    /* Force GPU layer to fix scrolling/overlay lag */
}

.video-text {
    margin: 5px 0;
    text-align: center;
    /* Parent doesn't hide anymore, children do */
}

/* Keyframes for smooth GPU text reveal */
/* Keyframes for smooth GPU text reveal */
@keyframes smoothFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Individual Word Animation - REMOVED for performance */
/* Now animating the whole line at once */

/* When parent has .visible, animate the element itself */
.video-text.visible {
    animation: smoothFadeInUp 1s ease-out forwards;
    opacity: 1;
}

.video-text.hidden {
    opacity: 0;
}

#video-text-1 {
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: -10px;
    /* Pull closer to name */
}

#video-text-2 {
    font-family: 'Great Vibes', cursive;
    font-size: 4rem;
    /* Large calligraphy */
    font-weight: 400;
    margin: 10px 0;
    color: #1a4d4d;
    /* Dark teal/greenish from image */
    text-shadow: none;
    /* Looks clean in image */
}

.date-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 1rem;
    letter-spacing: 2px;
    margin-bottom: 30px;
    color: #1a4d4d;
    font-weight: 600;
}

.btn-save-date {
    background-color: #5d8aa8;
    /* Muted blue/teal */
    color: #fff;
    padding: 10px 30px;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.video-text.visible {
    opacity: 1;
}

.video-text.hidden {
    opacity: 0;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Quicksand', sans-serif;
    background-color: #111;
    /* Dark background for desktop view */
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Mobile Wrapper */
.mobile-wrapper {
    width: 100%;
    max-width: 480px;
    /* Mobile width constraint */
    height: 100dvh;
    /* Full viewport height */
    position: relative;
    overflow: hidden;
    /* Hide scroll initially */
    background: var(--bg-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    /* Hide Scrollbar */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.mobile-wrapper::-webkit-scrollbar {
    display: none;
}

/* Global scrollbar hide if needed, but let's stick to wrapper first since that's where overflow is handled */
html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

.mobile-wrapper.scrollable {
    overflow-y: auto;
    /* Enable scroll after video */
}

h1,
h2,
h3 {
    color: var(--dark-teal);
}

h1 {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
}

h2 {
    font-family: 'Great Vibes', cursive;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--earth-brown);
}

/* Cover Overlay */
.cover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/gallery-1.jpg') no-repeat center center/cover;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    transition: transform 0.8s ease-in-out;
}

.cover-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.cover-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.cover-content h1 {
    font-size: 4rem;
    color: var(--white);
    margin: 10px 0;
}

.guest-name {
    font-size: 1.2rem;
    margin: 10px 0 20px;
    font-weight: bold;
}

.btn-open {
    background-color: var(--primary-teal);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-open:hover {
    background-color: var(--dark-teal);
}

/* Music Control */
.music-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    /* changed to left usually, or right */
    right: 20px;
    z-index: 999;
    background: var(--white);
    border: 2px solid var(--primary-teal);
    color: var(--primary-teal);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    /* overridden by hidden class initially */
    justify-content: center;
    align-items: center;
    animation: spin 3s linear infinite;
}

.music-btn.hidden {
    display: none;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Helper Classes */
.hidden {
    display: none;
    /* simple hidden implementation */
}

/* Note: main-content uses .hidden initially, but we might want just display none */
#main-content.hidden {
    display: none;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 60px;
    position: relative;
    z-index: 2;
    background-color: #f4f4f4;
    background-image:
        linear-gradient(rgba(244, 244, 244, 0.8), rgba(244, 244, 244, 0.8)),
        repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.02) 0px, rgba(0, 0, 0, 0.02) 1px, transparent 1px, transparent 2px),
        repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.02) 0px, rgba(0, 0, 0, 0.02) 1px, transparent 1px, transparent 2px);
    background-size: cover, 4px 4px, 4px 4px;
}

/* Content Body Wrapper */
#content-body {
    position: relative;
    margin-top: 100vh;
    /* Push content below the full-screen video overlay */
    background: #fff;
    /* Ensure it covers the video as you scroll up */
    z-index: 10;
}

/* Video Background */
.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Update backgrounds to be semi-transparent or transparent to show video if needed, 
   but for these sections, we'll use a fixed image with a white overlay for a premium look */
.couple-section,
.event-section,
.story-section,
.gallery-section,
.gift-section,
.rsvp-section {
    position: relative;
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
        url('../images/gallery-1.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    text-align: center;
    padding: 60px 20px;
    z-index: 1;
}

.hero-section {
    background: rgba(240, 240, 240, 0.6);
    /* Semi-transparent */
}

/* Responsive Container */

/* Update cards to be semi-transparent white */
.card,
.bank-card,
.comment-item,
.rsvp-form form {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

/* Event Grid */
/* Event Grid */
/* Adding Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.couple-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    /* Reduced gap slightly for vertical stack */
    margin-top: 40px;
}

.groom,
.bride {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.divider {
    font-family: 'Great Vibes', cursive;
    font-size: 3rem;
    color: var(--gold);
    line-height: 1;
}

.img-frame {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px;
    border: 5px solid var(--primary-teal);
    display: flex;
    /* Ensure img centers if needed */
    justify-content: center;
    align-items: center;
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.social-btn {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-teal);
    text-decoration: none;
}

/* Countdown */
#countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.time-box {
    background: var(--primary-teal);
    color: var(--white);
    padding: 10px;
    border-radius: 8px;
    min-width: 70px;
}

.time-box span {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Event Grid */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--earth-brown);
}

.btn-map {
    display: inline-block;
    margin-top: 15px;
    background: var(--earth-brown);
    color: var(--white);
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Gallery - Carousel */
.carousel-container {
    position: relative;
    max-width: 100%;
    margin: 20px auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 350px;
    /* Controlled height for mobile */
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    padding: 0 10px;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    border: none;
    color: var(--primary-teal);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
}

.carousel-btn:hover {
    background: var(--primary-teal);
    color: var(--white);
}

@media (max-width: 480px) {
    .carousel-slide {
        height: 300px;
    }
}


/* Gift */
.bank-card {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    margin: 20px auto;
    max-width: 400px;
    border: 1px solid #eee;
}

.bank-logo {
    height: 30px;
    margin-bottom: 15px;
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--primary-teal);
    color: var(--primary-teal);
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

/* RSVP Form */
.rsvp-form form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 100%;
    /* Ensure full width on mobile */
    box-sizing: border-box;
    /* Fix padding issue */
    font-family: inherit;
}

.btn-submit {
    background: #28a745;
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s, transform 0.2s;
}

.btn-submit:hover {
    background: #218838;
    transform: translateY(-1px);
}

.comments-container {
    margin-top: 30px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.comment-name {
    font-weight: bold;
    color: var(--dark-teal);
}

.comment-badge {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.badge-hadir {
    background: #e6fffa;
    color: #319795;
}

.badge-tidak {
    background: #fff5f5;
    color: #e53e3e;
}

/* Love Story Section - inherit background from global section style */
.story-section {
    position: relative;
    padding: 60px 20px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-teal);
    left: 20px;
    margin-left: -1px;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding-left: 50px;
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: 20px;
    top: 0;
    width: 16px;
    height: 16px;
    background: var(--white);
    border: 3px solid var(--primary-teal);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
    transition: all 0.3s ease;
}

.timeline-item.fade-in-up .timeline-dot {
    background: var(--primary-teal);
    box-shadow: 0 0 0 4px rgba(75, 111, 125, 0.2);
}

.timeline-content {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-teal);
}

.timeline-year {
    font-weight: bold;
    color: var(--primary-teal);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.1rem;
    margin: 0 0 10px;
    color: var(--dark-teal);
}

.timeline-content p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

/* Ornaments */
.ornament-corner {
    position: absolute;
    width: 80px;
    height: 80px;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 2;
    pointer-events: none;
    opacity: 0.8;
}

.ornament-tl {
    top: 10px;
    left: 10px;
    background-image: url('../images/floral_corner.png');
}

.ornament-tr {
    top: 10px;
    right: 10px;
    background-image: url('../images/floral_corner.png');
    transform: rotate(90deg);
}

.ornament-bl {
    bottom: 10px;
    left: 10px;
    background-image: url('../images/floral_corner.png');
    transform: rotate(-90deg);
}

.ornament-br {
    bottom: 10px;
    right: 10px;
    background-image: url('../images/floral_corner.png');
    transform: rotate(180deg);
}

.ornament-divider {
    display: block;
    margin: 20px auto;
    width: 200px;
    height: auto;
    opacity: 0.9;
}

@media (max-width: 480px) {
    .ornament-corner {
        width: 60px;
        height: 60px;
    }
}

/* Animations Keyframes */
/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: var(--white);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.4s ease-out;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-modal:hover {
    color: #333;
}

.gift-button-container {
    margin-top: 20px;
}

.modal h3 {
    margin-bottom: 10px;
    color: var(--primary-teal);
}

.modal p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.modal h4 {
    margin-bottom: 15px;
    color: var(--primary-teal);
    font-size: 1.1rem;
}

.modal .rsvp-form input,
.modal .rsvp-form select,
.modal .rsvp-form textarea {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
}

/* Force opacity 1 if no intersection observer used yet, but better to just let it run once loaded or simple */
.fade-in-up {
    opacity: 1;
    /* For simplicty in MVP without complex intersection observer, or add JS listener */
    animation: none;
    /* Disable default run, let JS handle it or keep it simple */
}

/* Let's make it simple: elements visible by default for now unless we add scroll reveal */