/* ========================================= */
/* 1. CONFIGURATION & RESET                  */
/* ========================================= */
:root {
    --bg-color: #FFFBF7;      
    --card-bg: #FFFBF7;       
    --primary: #C55A37;       
    --primary-dark: #8F3E22;
    --gold-accent: #CD853F;
    --gold-darker: #9E6B3F; 
    --text-dark: #4A4A4A;     
    --text-light: #666666;    
    --border-color: #E6DCCA;
    --radius: 16px;           
}

* { 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(255, 251, 247, 0.93), rgba(255, 251, 247, 0.93)), url('../images/img1.png');
    background-repeat: repeat;
    background-size: 400px auto; 
    color: var(--text-dark);
    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: #2c2c2c; font-weight: 700; }
.text-center { text-align: center; }

/* ========================================= */
/* 2. NAVIGATION & FORMS                     */
/* ========================================= */
nav {
    position: sticky; top: 0; z-index: 1000; text-align: center;
    background: #FFFBF7; padding: 1rem; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); 
    transition: transform 0.3s ease-in-out;
}
nav a {
    margin: 0 15px; text-decoration: none; color: var(--text-dark);
    font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1.5px;
}
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.3s ease, background-color 0.3s ease;
    border: none; 
    box-shadow: none; 
}

.nav-white { 
    background-color: #FFFBF7; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
}

.btn {
    display: inline-block; padding: 12px 28px; 
    text-decoration: none; border-radius: 50px;
    font-family: 'Lato', sans-serif; font-weight: 600; cursor: pointer; 
    transition: all 0.3s ease; text-align: center; font-size: 0.9rem;
    letter-spacing: 0.5px; border: 2px solid transparent;
}
.btn.primary { background: var(--primary); color: white; border-color: var(--primary); box-shadow: 0 4px 15px rgba(197, 90, 55, 0.3); }
.btn.primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn.outline-cancel { background: white; color: #C55A37; border: 2px solid #C55A37; }
.btn.outline-cancel:hover { background: #FFF0E8; }
.full-width { width: 100%; margin-top: 10px; }

.input-styled {
    width: 100%; padding: 14px 16px; background: #FFFFFF; 
    border: 1px solid var(--border-color); border-radius: 8px;
    font-size: 1rem; color: #333; transition: border 0.3s;
}
.input-styled:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.phone-wrapper { display: flex; gap: 0; }
.code-select { width: auto; min-width: 100px; flex: 0 0 auto; border-right: none; border-radius: 8px 0 0 8px; padding-right: 5px; }
.phone-input { flex-grow: 1; border-radius: 0 8px 8px 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: #2C2C2C; 
    background-image: url('../images/rsvp.webp'); 
    background-size: cover; 
    background-position: bottom; 
}
.header-content { position: relative; z-index: 2; color: #FFF8E7; }
.header-content h1 { font-size: 4rem; color: var(--gold-darker); margin-bottom: 0; letter-spacing: 15px; font-weight: 700; }

.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: 0 10px 30px rgba(197, 90, 55, 0.08); 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-color: var(--primary); opacity: 0.4; flex-grow: 1; }
.divider-icon-center { color: var(--primary); font-size: 1.2rem; margin: 0 15px; opacity: 0.8; }

.event-selection-label { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; font-size: 1.1rem; width: 100%; }
.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: #FFFFFF; padding: 20px; border-radius: 12px; border: 1px solid var(--border-color); cursor: pointer; transition: all 0.2s ease; min-height: 90px;
}
.event-option-card:hover { transform: translateY(-2px); border-color: var(--primary); box-shadow: 0 4px 12px rgba(197, 90, 55, 0.15); }
.card-icon-container { flex: 0 0 70px; display: flex; justify-content: center; align-items: center; margin-right: 15px; }
.event-svg-small { width: 55px; height: 55px; object-fit: contain; }

.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: #333; margin-bottom: 0; line-height: 1.2; }
.evt-date { font-size: 0.85rem; color: #666; 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 #ddd; border-radius: 50%; background: #FFF; display: flex; align-items: center; justify-content: center; color: transparent; transition: all 0.2s; }
.event-option-card input { display: none; }
.event-option-card:has(input:checked) { border-color: var(--primary); background: #FFFAF8; }
.event-option-card input:checked ~ .check-container .check-icon { background: var(--primary); border-color: var(--primary); color: white; }

.select-all-btn { font-size: 0.85rem; color: var(--primary); cursor: pointer; font-weight: bold; display: flex; align-items: center; gap: 5px; }
.select-all-circle { width: 14px; height: 14px; border: 1px solid var(--primary); border-radius: 50%; display: inline-block; }
.select-all-circle.active { background: var(--primary); }

.summary-icon { width: 80px; height: 80px; background-color: #FFF0E8; color: #C55A37; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; margin: 0 auto 20px; }
.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: #999; font-weight: 600; }
.detail-value { font-size: 1.4rem; font-family: 'Playfair Display', serif; color: #C55A37; font-weight: 700; }
.highlight-text { color: #C55A37; font-weight: 700; }

.events-pill-container { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 5px; }
.event-pill { background-color: #EADBC8; color: #5C4033; padding: 6px 16px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.reset-container { margin-top: 25px; border-top: 1px dashed #DDD; padding-top: 20px; }
.reset-link { background: none; border: none; color: #999; font-size: 0.9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }

footer { background-color: #221B17; color: #888; padding: 40px 20px; text-align: center; border-top: 1px solid #333; width: 100%; position: relative; z-index: 5; }

.popup-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 9999; align-items: center; justify-content: center; }
.popup-content { background: var(--bg-color); padding: 40px 30px; border-radius: 20px; width: 90%; max-width: 400px; text-align: center; animation: popUp 0.4s; border: 2px solid var(--primary-light); }
.popup-icon { width: 70px; height: 70px; background: var(--primary-light); 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); }
.guest-sub-card { background: #FFFFFF; padding: 20px; border-radius: 12px; 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; background-position: center 80%; padding-top: 15vh; }
    .main-container { margin-top: -15vh; }
    .header-content h1 { font-size: 2.5rem; letter-spacing: 10px; }
    .event-option-card { padding: 15px; gap: 10px; }
    .card-icon-container { flex: 0 0 50px; margin-right: 10px; }
    .event-svg-small { width: 40px; height: 40px; }
    .evt-title { font-size: 1rem; }
    .check-container { margin-left: 10px; }
}

/* ========================================= */
/* 4. DATE/TIME ROW (Moved from HTML)        */
/* ========================================= */
.date-time-row {
    margin-top: 25px; 
    display: flex; 
    gap: 15px; 
    flex-direction: row; 
}

@media (max-width: 600px) {
    .date-time-row {
        flex-direction: column;
    }
}