/* ========================================= */
/* 1. CONFIGURATION & RESET (ROYAL HERITAGE) */
/* ========================================= */
:root {
    --bg-color: #2A0808;      /* Deep Regal Maroon */
    --card-bg: #1A0505;       /* Darker Maroon */
    --primary: #D4AF37;       /* Antique Gold */
    --primary-dark: #997A3D;  /* Burnished Gold */
    --text-dark: #FDF5E6;     /* Ivory for headings */
    --text-light: #D3C4A3;    /* Beige for body text */
    --border-color: rgba(212, 175, 55, 0.3); 
    --radius: 12px;           
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent;}
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(26, 5, 5, 0.3), rgba(17, 3, 3, 0.5)), url('../images/img1.webp');
    background-repeat: repeat;
    background-blend-mode: normal;
    background-size: 350px;
    color: var(--text-light);
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    display: flex; flex-direction: column; min-height: 100vh; 
}

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--text-dark); font-weight: 700; }
.text-center { text-align: center; }

/* ========================================= */
/* 2. NAVIGATION & FORMS                     */
/* ========================================= */
nav {
    position: sticky; top: 0; z-index: 1000; text-align: center;
    background: var(--bg-color); padding: 1rem; 
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.4s ease-in-out;
}
nav a {
    margin: 0 15px; text-decoration: none; color: var(--primary);
    font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 2px;
}
nav.nav-hidden { transform: translateY(-100%); }

.transparent-nav { position: fixed; top: 0; left: 0; width: 100%; background-color: transparent; display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; z-index: 1000; transition: transform 0.4s ease, background-color 0.4s ease; border: none; }
.nav-white { background-color: rgba(26, 5, 5, 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border-color); }

.btn {
    display: inline-block; padding: 12px 28px; text-decoration: none; border-radius: 4px;
    font-family: 'Playfair Display', serif; font-weight: 700; cursor: pointer; 
    transition: all 0.4s ease; text-align: center; font-size: 0.95rem;
    letter-spacing: 1px; border: 1px solid var(--primary); text-transform: uppercase;
}
.btn.primary { background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #1A0505; box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15); }
.btn.primary:hover { box-shadow: 0 6px 25px rgba(212, 175, 55, 0.3); transform: translateY(-2px); filter: brightness(1.1); }
.btn.outline-cancel { background: transparent; color: var(--text-light); border: 1px solid var(--text-light); }
.btn.outline-cancel:hover { background: rgba(255,255,255,0.05); color: #FFF; border-color: #FFF; }
.full-width { width: 100%; margin-top: 10px; }

.input-styled {
    width: 100%; padding: 14px 16px; background: rgba(0, 0, 0, 0.2); 
    border: 1px solid var(--border-color); border-radius: 4px;
    font-size: 1rem; color: var(--text-dark); transition: border 0.3s;
}
.input-styled::placeholder { color: rgba(211, 196, 163, 0.5); }
.input-styled:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 10px rgba(212,175,55,0.2); background: rgba(0,0,0,0.4); }

select.input-styled option { background: var(--card-bg); color: var(--text-dark); }
.phone-wrapper { display: flex; gap: 0; }
.code-select { width: auto; min-width: 100px; flex: 0 0 auto; border-right: none; border-radius: 4px 0 0 4px; padding-right: 5px; }
.phone-input { flex-grow: 1; border-radius: 0 4px 4px 0; }

/* ========================================= */
/* 3. RSVP HEADER & FORMS                    */
/* ========================================= */
.rsvp-header { 
    height: 100vh; display: flex; align-items: flex-start; justify-content: center; text-align: center; 
    padding-top: 12vh; position: relative; background-color: var(--bg-color); 
    background-image: linear-gradient(to bottom, rgba(42,8,8,0.4), rgba(26,5,5,0.95)), url('../images/rsvp.webp'); 
    background-size: cover; background-position: center; 
}
.header-content { position: relative; z-index: 2; color: var(--text-dark); }
.header-content h1 { font-size: 4rem; color: var(--primary); margin-bottom: 0; letter-spacing: 15px; font-weight: 700; text-shadow: 0 4px 15px rgba(0,0,0,0.8); }

.main-container { max-width: 700px; margin: -28vh auto 60px; padding: 0 20px; position: relative; z-index: 10; width: 100%; }
.form-card, #summaryCard { background: var(--card-bg); padding: 50px 40px; border-radius: var(--radius); box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 10px 40px rgba(0,0,0,0.6); border: 1px solid var(--border-color); }

.rsvp-intro { text-align: center; margin-bottom: 20px; }
.rsvp-welcome-text { font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--primary); margin-bottom: 15px; font-weight: 700; }
.form-heading { text-align: center; font-size: 1.8rem; margin-bottom: 30px; color: var(--text-dark); }

.custom-divider { display: flex; align-items: center; justify-content: center; margin: 20px auto 40px; width: 100%; max-width: 300px; }
.custom-divider::before, .custom-divider::after { content: ''; height: 1px; background: linear-gradient(to right, transparent, var(--primary), transparent); opacity: 0.6; flex-grow: 1; }
.divider-icon-center { color: var(--primary); font-size: 1.2rem; margin: 0 15px; opacity: 0.8; filter: drop-shadow(0 0 5px rgba(212,175,55,0.5)); }

.event-selection-label { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; width: 100%; color: var(--text-dark); }
.checkbox-group { display: flex; flex-direction: column; gap: 15px; margin-top: 15px; }

.event-option-card {
    display: flex; flex-direction: row; align-items: center; justify-content: space-between;
    background: rgba(0, 0, 0, 0.2); padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); cursor: pointer; transition: all 0.3s ease; min-height: 90px;
}
.event-option-card:hover { border-color: var(--primary); box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 4px 15px rgba(212,175,55,0.1); }

.card-icon-container { flex: 0 0 90px; display: flex; justify-content: center; align-items: center; margin-right: 20px; filter: drop-shadow(0 0 8px rgba(212,175,55,0.2)); }
.event-svg-small { width: 75px; height: 75px; object-fit: contain; transform: scale(1.6); }

.card-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; padding-right: 10px; }
.evt-title { font-size: 1.1rem; font-weight: bold; color: var(--text-dark); margin-bottom: 0; line-height: 1.2; }
.evt-date { font-size: 0.85rem; color: var(--text-light); display: flex; align-items: center; gap: 6px; }
.evt-loc { font-size: 0.75rem; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }

.check-container { flex-shrink: 0; display: flex; justify-content: flex-end; align-items: center; margin-left: auto; }
.check-icon { width: 28px; height: 28px; border: 2px solid var(--border-color); border-radius: 50%; background: transparent; display: flex; align-items: center; justify-content: center; color: transparent; transition: all 0.3s; }
.event-option-card input { display: none; }
.event-option-card:has(input:checked) { border-color: var(--primary); background: rgba(212, 175, 55, 0.05); }
.event-option-card input:checked ~ .check-container .check-icon { background: var(--primary); border-color: var(--primary); color: #1A0505; text-shadow: none; }

.select-all-btn { font-size: 0.85rem; color: var(--primary); cursor: pointer; font-weight: bold; display: flex; align-items: center; gap: 5px; text-transform: uppercase; letter-spacing: 1px; }
.select-all-circle { width: 14px; height: 14px; border: 1px solid var(--primary); border-radius: 50%; display: inline-block; transition: 0.3s; }
.select-all-circle.active { background: var(--primary); box-shadow: 0 0 8px rgba(212,175,55,0.5); }

/* Summary Screen */
.summary-icon { width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); color: #1A0505; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; margin: 0 auto 20px; box-shadow: 0 0 20px rgba(212,175,55,0.3); }
.detail-row { margin-bottom: 20px; display: flex; flex-direction: column; justify-content: center; gap: 5px; }
.detail-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-light); font-weight: 600; }
.detail-value { font-size: 1.4rem; font-family: 'Playfair Display', serif; color: var(--primary); font-weight: 700; }
.highlight-text { color: var(--primary); font-weight: 700; }

.events-pill-container { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 5px; }
.event-pill { background-color: rgba(212,175,55,0.1); border: 1px solid var(--border-color); color: var(--primary); padding: 6px 16px; border-radius: 4px; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.reset-container { margin-top: 25px; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.reset-link { background: none; border: none; color: var(--text-light); font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; transition: color 0.3s; }
.reset-link:hover { color: #FFF; }

footer { background-color: #110303; color: var(--text-light); padding: 40px 20px; text-align: center; border-top: 1px solid var(--border-color); width: 100%; position: relative; z-index: 5; font-family: 'Playfair Display', serif; letter-spacing: 1px; }

/* Popups */
.popup-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 9999; align-items: center; justify-content: center; }
.popup-content { background: var(--card-bg); padding: 40px 30px; border-radius: var(--radius); width: 90%; max-width: 400px; text-align: center; animation: popUp 0.4s; border: 1px solid var(--primary); box-shadow: inset 0 0 20px rgba(0,0,0,0.8), 0 0 30px rgba(212,175,55,0.1); }
.popup-icon { width: 70px; height: 70px; background: rgba(212,175,55,0.1); border: 1px solid var(--primary); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin: 0 auto 20px; }
@keyframes popUp { from {transform: scale(0.9); opacity: 0;} to {transform: scale(1); opacity: 1;} }
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.appear { opacity: 1; transform: translateY(0); }

/* Dynamic Sub-guest Inputs */
.guest-sub-card { background: rgba(0,0,0,0.2); padding: 20px; border-radius: 8px; border: 1px solid var(--border-color); margin-top: 15px; }

/* Responsive Adjustments (RSVP specific) */
@media (max-width: 600px) {
    .transparent-nav .btn { padding: 8px 12px; font-size: 0.75rem; }
    .rsvp-header { height: 65vh; padding-top: 15vh; }
    .main-container { margin-top: -15vh; padding: 0 15px; }
    .form-card, #summaryCard { padding: 40px 25px; }
    .header-content h1 { font-size: 2.5rem; letter-spacing: 10px; }
    .event-option-card { padding: 15px; gap: 10px; }
    
    .card-icon-container { flex: 0 0 70px; margin-right: 15px; }
    .event-svg-small { width: 60px; height: 60px; transform: scale(1.6); }
    
    .evt-title { font-size: 1rem; }
    .check-container { margin-left: 10px; }
    .btn:active { transform: scale(0.97); }
}

.date-time-row { margin-top: 25px; display: flex; gap: 15px; flex-direction: row; }
.fa-calendar-alt { color: var(--primary) !important; }
@media (max-width: 600px) { .date-time-row { flex-direction: column; } }

/* ========================================= */
/* MICRO-INTERACTIONS & UI POLISH            */
/* ========================================= */

/* 1. Golden Dust Parallax */
.gold-dust-container { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; pointer-events: none; overflow: hidden; }
.dust-particle { position: absolute; background: var(--primary); border-radius: 50%; opacity: 0; box-shadow: 0 0 4px var(--primary); animation: floatUp linear infinite; }
@keyframes floatUp { 0% { transform: translateY(110vh); opacity: 0; } 10% { opacity: 0.6; } 90% { opacity: 0.6; } 100% { transform: translateY(-10vh); opacity: 0; } }

/* 5. 3D Card Tilt (Prevents sharp corners on the glare overlay) */
.js-tilt-glare { border-radius: var(--radius); }

/* 6. Gold Flash for RSVP Selection */
@keyframes goldFlash { 
    0% { box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 0 0px transparent; border-color: var(--border-color); } 
    50% { box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 0 25px var(--primary); border-color: var(--primary); } 
    100% { box-shadow: inset 0 0 10px rgba(0,0,0,0.5), 0 4px 15px rgba(212,175,55,0.1); border-color: var(--primary); } 
}
@keyframes iconBounce { 0% { transform: scale(1); } 50% { transform: scale(1.4); } 100% { transform: scale(1); } }
.event-option-card.flash { animation: goldFlash 0.5s ease-out forwards; }
.event-option-card.flash .check-icon { animation: iconBounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

/* 8. Haptic Ripple Effect (Strictly for buttons to protect layouts) */
.ripple { position: absolute; border-radius: 50%; transform: scale(0); animation: ripple-anim 600ms linear; background: rgba(212, 175, 55, 0.3); pointer-events: none; z-index: 99; }
@keyframes ripple-anim { to { transform: scale(4); opacity: 0; } }
.btn, .date-pill { position: relative; overflow: hidden; }