/* Separator for invitation ayat layout */
.invitation-separator {
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-color), transparent, var(--accent-color));
    margin: 0 18px;
    border-radius: 2px;
    min-height: 320px;
    align-self: stretch;
    opacity: 0.35;
}
@media (max-width: 1500px) {
    .invitation-separator {
        width: 80vw;
        min-height: 2px;
        height: 2px;
        margin: 18px 0;
        background: linear-gradient(to right, var(--accent-color), transparent, var(--accent-color));
    }
}
/* Ayat text layout for invitation section */
.invitation-ayat-layout {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 8vw; /* Significantly increased gap to push boxes outward */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1600px;
    position: relative;
    padding: 30px 20px;
}
.invitation-ayat-layout::before {
    content: "";
    position: absolute;
    top: 60%;
    left: 50%;
    width: 60%; /* Narrowed width to move wayang figures inward */
    height: 100%;
    transform: translate(-50%, -50%);
    background: url('assets/way.png') no-repeat center/contain;
    opacity: 0.85;
    filter: brightness(1.2) contrast(1.1) drop-shadow(0 0 8px rgba(0,0,0,0.3));
    z-index: 1;
    pointer-events: none;
}
.invitation-ayat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 320px;
    min-width: 200px;
    max-width: 350px;
    background: rgba(176, 96, 113, 0.35);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 25px 20px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-body);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    margin: 0;
    text-align: center;
    z-index: 2;
}
.ayat-text {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.7;
    margin: 0 0 0 0;
    font-family: var(--font-body);
}
.ornament-ayat {
    width: 70px;
    height: 30px;
    margin: 0 auto 10px auto;
    background: url('assets/ornament.png') no-repeat center/contain;
    opacity: 0.7;
}
.invitation-main-content {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
}
@media (max-width: 1500px) {
    .invitation-ayat-layout {
        flex-direction: column;
        gap: 18px;
        align-items: center;
        background: none; /* Disable wayang background on mobile */
    }
    .invitation-ayat-layout::before {
        display: none; /* Completely hide wayang pseudo-element on mobile */
    }
    .invitation-ayat {
        width: 90vw;
        max-width: 98vw;
        margin: 0 auto;
    }
    .invitation-main-content {
        padding: 0 0;
    }
}
/* Custom Variables for Pink Theme */
:root {
    --primary-color: #B06071;
    /* Darker Pink Background */
    --nav-bg: #B06071;
    /* Navbar Background */
    --accent-color: #E5A0AD;
    /* Light Pink Accents/Writing */
    --accent-hover: #f5b0bd;
    --text-main: #ffffff;
    --text-muted: #fce8eb;
    --glass-bg: rgba(176, 96, 113, 0.7);
    /* Matching #B06071 */
    --glass-border: rgba(229, 160, 173, 0.3);
    /* Matching #E5A0AD */
    --font-heading: 'Cinzel', serif;
    /* Classic, elegant serif for headers */
    --font-body: 'Inter', sans-serif;
    --font-script: 'Playfair Display', serif;
    /* For names and special text */
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome, Safari and Opera */
*::-webkit-scrollbar {
    display: none;
}

body {
    background-color: var(--primary-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow: hidden;
    /* NO MAIN SCROLLING */
    position: relative;
    height: 100vh;
}

/* Parallax Background Layer */
.bg-parallax {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: url('assets/mega_bg.png');
    background-size: cover;
    background-position: center;
    z-index: -2;
}

.bg-parallax::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(176, 96, 113, 0.5) 0%, rgba(176, 96, 113, 0.9) 100%);
    z-index: -1;
}

/* --- Top Navigation Bar --- */
.top-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
    background: var(--nav-bg);
    border-bottom: 2px solid var(--accent-color);
    padding: 0 40px;
    z-index: 1000;
    position: relative; /* Base for absolute logo positioning */
}

.nav-logo {
    position: absolute;
    left: 40px;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.nav-btn {
    background: var(--accent-color);
    color: var(--nav-bg);
    border: none;
    padding: 8px 25px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--accent-hover);
}

.page-nav-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    width: 100%;
}

/* --- Main Layout for SPA --- */
.main-container {
    height: calc(100vh - 70px);
    width: 100%;
    position: relative;
}

/* Page Sections */

.page-section {
    display: none !important;
    height: 100%;
    width: 100%;
    overflow-y: auto;
    padding: 40px 20px;
    animation: fadeIn 0.4s ease-in-out;
}

.page-section.active {
    display: flex !important;
    flex-direction: column;
    align-items: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Typography */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2::after {
    content: '〰〰〰';
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--accent-color);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    letter-spacing: -2px;
}

/* Hero Section */

#hero.page-section,
#hero.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    min-height: 500px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    gap: 0.5rem;
    padding: 40px 0 0 0;
}
#hero .subtitle,
#hero .names,
#hero .date,
#hero .hero-btn,
#hero .ornament {
    text-align: center;
    align-self: center;
    margin-left: auto;
    margin-right: auto;
}

#hero .ornament {
    display: block;
    width: 60px;
    height: 20px;
    margin: 0.5rem auto;
    background: url('assets/ornament.png') no-repeat center/contain;
    opacity: 0.7;
}
#hero .names {
    font-family: var(--font-script);
    font-size: 5rem;
    font-style: italic;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--accent-color);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

#hero .names span {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-style: normal;
    opacity: 0.8;
}

#hero .date {
    font-size: 1.4rem;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 30px;
    font-weight: 500;
}

/* General Button */
.hero-btn {
    display: inline-block;
    padding: 12px 35px;
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
    border-radius: 0px;
    /* Squared off like the reference image */
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--nav-bg);
}

.hero-btn:hover {
    background: var(--accent-color);
    color: var(--nav-bg);
}

/* Glassmorphism Sections (Cards) */
.glass-card {
    max-width: 900px;
    margin: 0 auto;
    padding: 50px 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid var(--glass-border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    display: none !important;
}

#invitation.glass-card {
    max-width: 1500px;
}

.glass-card.active {
    display: block !important;
    margin-top: 20px;
    margin-bottom: 40px;
}

/* Corner Ornaments */
.glass-card::before,
.glass-card::after {
    content: '';
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-color);
}

.glass-card::before {
    top: 15px;
    left: 15px;
    border-right: none;
    border-bottom: none;
}

.glass-card::after {
    bottom: 15px;
    right: 15px;
    border-left: none;
    border-top: none;
}

/* The Letter */
.bismillah-text {
    font-family: var(--font-script);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 30px;
}

.letter-content {
    font-size: 1.1rem;
    text-align: center;
}

.couple-details {
    margin: 40px 0;
}

.bride-name,
.groom-name {
    font-family: var(--font-script);
    font-size: 2.5rem;
    margin: 10px 0;
    text-transform: none;
    letter-spacing: normal;
}

.bride-name::after,
.groom-name::after {
    display: none;
}

.parents {
    font-size: 1rem;
    color: var(--text-muted);
}

.ampersand {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
    margin: 20px 0;
}

/* Details Section */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: center;
    margin-top: 40px;
}

.detail-item {
    border: 1px solid var(--glass-border);
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.detail-item h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.icon-ring,
.icon-party {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.event-day {
    font-size: 1.2rem;
    color: var(--accent-color);
    letter-spacing: 2px;
}

.event-date {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-color);
    font-family: var(--font-heading);
    margin: 10px 0;
}

.event-time {
    font-weight: 500;
    margin-bottom: 20px;
}

hr {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, transparent, var(--accent-color), transparent);
    margin: 20px 0;
}

.closing-prayer {
    text-align: center;
    margin-top: 50px;
    font-style: italic;
}

.keluarga-besar {
    font-style: normal;
    color: var(--accent-color);
    line-height: 1.8;
}

/* Turut Mengundang Section */
.mengundang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.mengundang-col h3 {
    font-size: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.mengundang-col ol {
    list-style-type: decimal;
    padding-left: 20px;
    color: var(--text-muted);
}

.mengundang-col li {
    margin-bottom: 8px;
}

.mengundang-col li span {
    color: var(--accent-color);
    font-size: 0.9em;
    margin-left: 10px;
}

/* RSVP Form */
.rsvp-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--accent-color);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-color);
}

option {
    background: var(--primary-color);
    color: var(--text-main);
}

.submit-btn {
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 15px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
}

.submit-btn:hover {
    background: var(--accent-hover);
}

.hidden {
    display: none !important;
}

#form-success {
    text-align: center;
    padding: 30px;
    font-size: 1.2rem;
    color: var(--accent-color);
}

/* --- Particles Overlay --- */
#particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.particle {
    position: absolute;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0;
    animation: float-up 15s infinite linear;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.6;
    }

    90% {
        opacity: 0.6;
    }

    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 1500px) {
    .top-nav {
        flex-direction: column;
        height: auto;
        padding: 20px 15px;
        gap: 20px;
    }

    .nav-logo {
        position: static; /* Remove absolute positioning on mobile */
        margin-bottom: 5px;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap; /* Allow links to wrap on very small screens */
        gap: 15px 20px;
    }

    .main-container {
        height: calc(100vh - 120px);
    }

    .hero-section .names {
        font-size: 4rem;
    }

    .hero-section .names span {
        font-size: 2rem;
    }

    .glass-card {
        padding: 40px 0 80px 0; /* Symmetrical padding for perfect centering */
        margin: 0;
        height: 100%;
        width: 100%;
        position: relative;
    }

    .details-grid,
    .mengundang-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .detail-item,
    .mengundang-col {
        text-align: center;
    }

    .mengundang-col h3 {
        text-align: center;
    }

    .mengundang-col ol {
        list-style-type: none;
        padding: 0;
    }

    .wayang-img {
        display: none;
    }
}