/* ========================================= */
/* 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; }
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                             */
/* ========================================= */
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 (Home Page) */
.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; 
}

/* White Nav (On Scroll) */
.nav-white { 
    background-color: #FFFBF7; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
}

/* Button Styles */
.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 { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn.outline:hover { background: var(--primary); color: white; }
.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 Fields */
.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. HERO SECTION                           */
/* ========================================= */
.hero {
    height: 100vh; width: 100%; margin: 0; border-radius: 0; 
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start; 
    padding-top: 10vh; 
    text-align: center; color: white; position: relative; 
    background-size: cover; background-position: bottom 90%;
}
/* CHANGED: Switched to JPG and increased overlay slightly (0.2) to mask grain */
.hero-bg-home { 
    background-image: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('images/hero.jpg'); 
}

.hero h1 { 
    font-size: 5rem; 
    margin: 0 0 10px; 
    color: var(--gold-darker); 
    text-shadow: 0 2px 20px rgba(0,0,0,0.2); 
    line-height: 1.1;
}
.date { 
    font-size: 1.5rem; 
    margin-top: 5px; 
    color: var(--gold-darker); 
    font-weight: 600; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.2); 
}

/* RSVP Header */
.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.jpg'); 
    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;
}

/* ========================================= */
/* 4. ITINERARY & STAY                       */
/* ========================================= */
.section { padding: 80px 20px; max-width: 900px; margin: 0 auto; }
.section-title { text-align: center; font-size: 2.5rem; color: var(--text-dark); margin-bottom: 5px; }

.dark-mango-section {
    padding: 60px 20px; background-color: #4A3B32; 
    background-image: linear-gradient(rgba(74, 59, 50, 0.9), rgba(74, 59, 50, 0.9)), url('images/img1.png');
    background-repeat: repeat; background-size: 400px auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border-top: 4px solid var(--primary); color: #FFF8E7; text-align: center;
}
.rsvp-cta-text { font-family: 'Playfair Display', serif; font-size: 2.2rem; margin-bottom: 30px; }

/* Dividers & Date Headers */
.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; }
.date-header-row { display: flex; align-items: center; justify-content: center; margin: 50px 0 30px; position: relative; }
.date-pill { background-color: var(--primary); color: white; padding: 8px 30px; border-radius: 50px; font-family: 'Playfair Display', serif; font-size: 1.2rem; z-index: 2; box-shadow: 0 4px 10px rgba(197, 90, 55, 0.2); }
.date-line { position: absolute; width: 100%; height: 1px; background-color: #E0D0C0; top: 50%; z-index: 1; }

/* Itinerary Cards */
.itinerary-card {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 35px; margin-bottom: 25px;
    display: flex; gap: 30px; 
    align-items: center; 
    box-shadow: 0 10px 30px rgba(197, 90, 55, 0.08); transition: transform 0.2s;
}
.itinerary-card:hover { transform: translateY(-3px); }
.card-img-col { flex-shrink: 0; }
.custom-icon-png { width: 90px; height: 90px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.08)); }
.card-details { flex-grow: 1; }
.card-details h3 { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: #333; margin-bottom: 15px; }
.info-grid { display: grid; gap: 12px; }
.meta-row { display: flex; align-items: center; gap: 12px; color: #555; font-size: 1rem; }
.icon-circle { width: 28px; height: 28px; background-color: var(--gold-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-size: 0.85rem; flex-shrink: 0; }

.links-row { display: flex; gap: 20px; margin-top: 8px; margin-left: 0; }
.action-link { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; color: var(--primary); text-decoration: none; display: flex; align-items: center; gap: 6px; border-bottom: 1px dashed var(--primary); padding-bottom: 2px; }

/* Stay Box & Details */
.stay-box { 
    background-color: #FFFBF7; border: 1px solid var(--border-color); border-radius: 20px; 
    padding: 60px 30px 40px; 
    text-align: center; box-shadow: 0 10px 30px rgba(197, 90, 55, 0.08); 
    position: relative; z-index: 1;
}
.stay-locations-wrapper { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }
.stay-col { flex: 1; min-width: 250px; max-width: 300px; }
.stay-col h4 { color: var(--primary); font-size: 1.6rem; margin-bottom: 15px; font-family: 'Playfair Display', serif; }

.sep-mini { display: flex; align-items: center; justify-content: center; margin: 10px auto; width: 60%; opacity: 0.5; }
.sep-mini::before, .sep-mini::after { content: ''; height: 1px; background-color: var(--primary); flex-grow: 1; }
.sep-icon { color: var(--primary); font-size: 0.8rem; margin: 0 8px; }

.stay-phone { display: flex; align-items: center; justify-content: center; gap: 8px; color: #555; font-weight: 600; margin: 5px 0; }
.stay-map-link { 
    display: inline-block; margin-top: 5px; 
    font-size: 0.85rem; text-transform: uppercase; font-weight: 700; 
    color: var(--gold-accent); text-decoration: none; letter-spacing: 1px; 
}

/* ========================================= */
/* 5. RSVP FORMS & CARDS                     */
/* ========================================= */
.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); }

/* UPDATED: "Which Events" Label Flex Layout */
.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; }

/* UPDATED: Event Option Card Layout for Mobile Safety */
.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; }

/* UPDATED: Content Area - Wraps text properly on mobile */
.card-content { 
    flex: 1; 
    min-width: 0; /* Forces text wrapping in flex container */
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    text-align: left; 
    padding-right: 10px; /* Space between text and checkbox */
}
.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; }

/* UPDATED: Checkbox Area - Prevents shrinking */
.check-container { 
    flex-shrink: 0; 
    display: flex; 
    justify-content: flex-end; 
    align-items: center; 
    margin-left: auto; /* Pushes to right */
}
.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; }

/* UPDATED: Select All Button - No Float */
.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 */
@media (max-width: 600px) {
    .section { padding: 50px 20px; }
    
    .hero { 
        padding-top: 8vh; 
        height: 100vh; 
        justify-content: flex-start; 
    } 
    
    /* MODIFIED: Reduced font size to 2.2rem to fit on one line on mobile */
    .hero h1 { font-size: 2.1rem; }

    .date {
        font-size: 1.4rem; /* Adjust this number (default is 1.5rem) */
    }
    
    .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; }

    .itinerary-card { flex-direction: column; text-align: center; gap: 20px; padding: 25px 15px; align-items: center; }
    
    .links-row, .meta-row { 
        justify-content: center; 
        margin-left: 0; 
    }
    
    .custom-icon-png { width: 70px; height: 70px; }
    .date-line { display: none; } 
    .stay-locations-wrapper { flex-direction: column; align-items: center; }
    .stay-col { width: 100%; }
    
    .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; }
    /* Checkbox margin is handled by auto margin now, but we can ensure safety */
    .check-container { margin-left: 10px; }
}