/* --- Variables & Reset --- */
:root {
    --primary-color: #d4af37; /* Gold */
    --secondary-color: #f3f4f6; /* Off-white */
    --bg-color: #111827; /* Dark Navy/Black */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    
    --font-heading: 'Cormorant Garamond', serif;
    --font-accent: 'Great Vibes', cursive;
    --font-body: 'Montserrat', sans-serif;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.hidden { display: none !important; }
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.section-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.great-vibes {
    font-family: var(--font-accent);
    color: var(--primary-color);
    font-weight: normal;
}

.floral-bg {
    background-image: url('assets/floral.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

.floral-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(17, 24, 39, 0.9); /* Dark overlay */
    z-index: -1;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.btn-primary:hover {
    background-color: #b8905b;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.btn-floating {
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.floating-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
}

/* --- Cover Screen --- */
.cover-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    background-image: url('assets/dark_bg.jpg');
    background-size: cover;
    background-position: center;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease, visibility 1s ease;
}

.cover-screen::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Dark overlay for text readability */
}

.cover-content {
    position: relative;
    text-align: center;
    color: white;
    z-index: 2;
    padding: 20px;
    animation: fadeUp 1.5s ease;
}

.cover-subtitle {
    font-family: var(--font-body);
    font-weight: 300;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-size: 1rem;
}

.cover-title {
    font-family: var(--font-accent);
    font-size: 4rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.cover-date {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 3px;
    margin-bottom: 40px;
}

.guest-info {
    margin-bottom: 30px;
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.3);
}

.guest-info p { font-size: 0.9rem; }
.guest-info h3 { font-size: 1.5rem; margin: 5px 0; font-family: var(--font-heading); }
.guest-info .guest-apology { font-size: 0.7rem; font-style: italic; opacity: 0.8; }

/* --- Hero Section --- */
.hero-section {
    height: 100vh;
    background-color: var(--bg-color); /* Fallback */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center 30%; /* Focus on faces/upper body */
    opacity: 0;
    animation: fadeSlide 20s infinite;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 5s; }
.hero-slide:nth-child(3) { animation-delay: 10s; }
.hero-slide:nth-child(4) { animation-delay: 15s; }

@keyframes fadeSlide {
    0% { opacity: 0; transform: scale(1); }
    10% { opacity: 1; transform: scale(1.02); }
    25% { opacity: 1; transform: scale(1.05); }
    35% { opacity: 0; transform: scale(1.07); }
    100% { opacity: 0; transform: scale(1); }
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0.4), rgba(17, 24, 39, 1));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.hero-content .subtitle {
    font-family: var(--font-heading);
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.hero-content .title {
    font-size: 4.5rem;
    margin-bottom: 10px;
}

.hero-content .date {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-main);
    letter-spacing: 2px;
}

/* --- Quotes Section --- */
.quotes-section {
    padding: 60px 20px;
}
.ornament-img {
    width: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.quote-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-main);
    margin-bottom: 15px;
}
.quote-source {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* --- Couple Section --- */
.couple-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

/* --- Elegant Text-Only Couple Section --- */
.couple-section .container {
    position: relative;
    z-index: 1;
}

.arabic-text {
    font-family: var(--font-heading); /* Or a specific arabic font if available */
    color: var(--primary-color);
    letter-spacing: 1px;
}

.couple-elegant-layout {
    display: flex;
    flex-direction: column;
    gap: 0px;
    align-items: stretch;
    max-width: 600px;
    margin: 20px auto 0;
    padding: 10px;
}

.couple-text-box {
    padding: 20px;
}

.groom-side {
    text-align: left;
    border-left: 3px solid var(--primary-color);
    padding-left: 20px;
}

.bride-side {
    text-align: right;
    border-right: 3px solid var(--primary-color);
    padding-right: 20px;
    align-self: flex-end;
}

.couple-name-elegant {
    font-family: var(--font-accent);
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1.2;
}

.couple-parents-elegant {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.ampersand-elegant h2 {
    font-family: var(--font-accent);
    font-size: 3rem;
    color: var(--primary-color);
    margin: -10px 0; /* pulls the names closer together vertically */
}

@media(min-width: 768px) {
    .couple-name-elegant {
        font-size: 3.5rem;
    }
    .couple-parents-elegant {
        font-size: 1rem;
    }
    .groom-side, .bride-side {
        width: 60%;
    }
}

/* --- Event Section --- */
.countdown {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.countdown-item {
    background: #1f2937;
    padding: 15px;
    border-radius: 10px;
    min-width: 70px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.countdown-item span {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary-color);
    line-height: 1;
}

.countdown-item p {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 5px;
}

.event-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

@media(min-width: 768px) {
    .event-cards { flex-direction: row; }
}

.event-card {
    background: #1f2937;
    padding: 30px;
    border-radius: 15px;
    flex: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.event-card h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--primary-color);
    padding-bottom: 10px;
}

.event-detail {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    text-align: left;
}

.event-detail i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 3px;
}

.event-detail p { font-size: 0.9rem; color: var(--text-muted); }



/* --- Gallery Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 30px;
}

.gallery-img {
    width: 100%;
    height: 350px; /* diperbesar dari 250px agar foto strip (portrait) tidak terlalu terpotong */
    object-fit: cover;
    object-position: center; /* default fallback, sebelumnya 'top' yang menyebabkan wajah/badan terpotong */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.gallery-img:hover { transform: scale(1.03); }

/* --- Gallery Position Modifiers ---
   Tambahkan salah satu class ini di elemen <img> jika posisi orang
   di foto tersebut tidak pas dengan object-position: center default.
   Contoh: <img class="gallery-img pos-low" src="..."> 
*/
.pos-top    { object-position: center 15%; }
.pos-mid    { object-position: center 50%; }
.pos-low    { object-position: center 70%; }
.pos-bottom { object-position: center bottom; }

/* --- Gift Section --- */
.gift-section {
    padding: 60px 20px;
}
.gift-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}
@media(min-width: 768px) {
    .gift-cards { flex-direction: row; }
}
.gift-card {
    background: #1f2937;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    flex: 1;
}
.gift-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.gift-card h3 {
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.gift-card .account-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main);
    letter-spacing: 2px;
}
.gift-card .account-name {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.gift-card .address-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}
.btn-copy {
    cursor: pointer;
    background-color: var(--bg-color);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
}
.btn-copy:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* --- RSVP Section --- */
.rsvp-form {
    background: #1f2937;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 500px;
    margin: 0 auto 40px;
}

.form-group { margin-bottom: 15px; }

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.messages-container {
    max-width: 600px;
    margin: 0 auto;
    max-height: 400px;
    overflow-y: auto;
    text-align: left;
    padding-right: 10px;
}

.message-card {
    background: #1f2937;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-left: 3px solid var(--primary-color);
}

.message-card h4 { font-size: 1rem; color: var(--text-main); margin-bottom: 5px; }
.message-card .attendance-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: var(--bg-color);
    color: var(--primary-color);
    margin-bottom: 8px;
}
.message-card p { font-size: 0.9rem; color: var(--text-muted); }

/* --- Footer --- */
.footer {
    background: #111827;
    padding: 40px 20px;
    text-align: center;
}
.footer h2 { font-size: 2.5rem; margin-bottom: 5px; }
.footer p { font-size: 0.9rem; letter-spacing: 2px; }
.footer .credit { font-size: 0.75rem; color: #999; margin-top: 20px; letter-spacing: 0; }

/* --- Animations --- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}