/*
 * =========================================================
 * CUSTOM STYLES FOR THE BIRTHDAY APP (v3.3 - Side-by-Side RSVP)
 * =========================================================
 */

/* --- 1. Global Setup & Variables --- */
:root {
    --bg-color: #111111;
    --surface-color: #1a1a1a;
    --primary-color: #DAA520; /* A classier, richer gold */
    --text-color: #cccccc;
    --text-color-dark: #333;
    --heading-color: #ffffff;
    --font-serif: "Cormorant Garamond", serif;
    --font-sans: "Inter", sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    font-weight: 300;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 5rem 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 700;
    color: var(--heading-color);
    margin-top: 0;
}

h2 {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: 1px;
    color: var(--heading-color);
}

h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
}

p { margin-bottom: 1.5rem; }

.cta-button {
    background: var(--primary-color);
    color: #111;
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-family: var(--font-sans);
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #fff;
    color: #111;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* --- 2. Hero Section --- */
.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(to top, rgba(17,17,17,1), rgba(0, 0, 0, 0.4));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: #fff;
}

.hero-content h1 {
    font-size: 6rem;
    font-family: var(--font-serif);
    margin-bottom: 0.5rem;
    color: #fff;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.scroll-down {
    position: absolute;
    z-index: 3;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}
.scroll-down a {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid #fff;
    border-radius: 20px;
    position: relative;
}
.scroll-down span {
    display: block;
    width: 4px;
    height: 8px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    top: 10px;
    transform: translateX(-50%);
    animation: scroll-anim 2s infinite;
}

@keyframes scroll-anim {
    0% { top: 10px; opacity: 1; }
    100% { top: 20px; opacity: 0; }
}


/* --- 3. Details Section --- */
.details-section {
    background-color: var(--bg-color);
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    text-align: center;
    margin-bottom: 4rem;
    font-family: var(--font-sans);
}

.countdown-timer div {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: 12px;
    min-width: 120px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.countdown-timer span {
    display: block;
    font-size: 3rem;
    font-weight: 600;
    color: var(--primary-color);
}

.countdown-timer p {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-color);
    margin: 0;
    letter-spacing: 1px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: center;
}

.detail-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.detail-item .detail-icon {
    width: 30px;
    height: 30px;
    fill: var(--primary-color);
    flex-shrink: 0;
}

.detail-item h3 {
    font-size: 0;
    line-height: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.detail-item p {
    font-size: 1rem;
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 0.25rem;
}


/* --- 4. RSVP & Photo Sections --- */
.rsvp-section {
    background-color: var(--surface-color);
}

.photo-section {
    background-color: var(--bg-color);
}

.photo-section .container > p {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 2rem;
    margin-top: -2rem;
}

#photo-upload-wrapper h3 {
    text-align: center;
    font-size: 1.2rem;
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}
#photo-upload-wrapper h3 span {
    color: var(--primary-color);
    font-weight: 600;
}


.rsvp-form {
    max-width: 650px;
    margin: 0 auto;
    background: var(--bg-color);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid #333;
    position: relative; /* Needed for results box */
}

.form-group {
    margin-bottom: 1.5rem;
}

/* === NEW RULE ADDED === */
.form-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem; /* Re-add margin that form-group had */
}
/* === END NEW RULE === */


.rsvp-form label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #fff;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="email"],
.rsvp-form select {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-family: var(--font-sans);
    background: #111;
    border: none;
    color: var(--text-color);
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.rsvp-form input[type="text"]:focus,
.rsvp-form input[type="email"]:focus,
.rsvp-form select:focus {
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
    outline: none;
}

/* Custom Radio Buttons (Flexbox v2.5) */
.radio-group .radio-item {
    display: block;
    position: relative;
    margin-bottom: 1rem;
}
.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 0; 
    color: var(--text-color);
}
.radio-group input[type="radio"] {
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}
.custom-radio {
    display: inline-block;
    width: 20px; 
    height: 20px;
    border: 2px solid #555;
    border-radius: 50%;
    background-color: transparent;
    transition: all 0.3s ease;
    margin-right: 15px;
    position: relative;
    flex-shrink: 0;
}
.custom-radio::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px; 
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    transition: all 0.3s ease;
}
.radio-group input[type="radio"]:checked + label .custom-radio {
    border-color: var(--primary-color);
}
.radio-group input[type="radio"]:checked + label .custom-radio::after {
    transform: translate(-50%, -50%) scale(1);
}
.radio-group input[type="radio"]:focus + label .custom-radio {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(218, 165, 32, 0.3);
}


/* --- 4a. Name Search --- */
#rsvp-search-results,
#photo-search-results {
    background: var(--surface-color);
    border: 1px solid #444;
    border-top: none;
    position: absolute;
    left: 3rem;
    right: 3rem;
    top: 135px; /* Adjust this to sit right below your input */
    z-index: 10;
    max-height: 200px;
    overflow-y: auto;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}
.search-result-item {
    padding: 12px 15px;
    cursor: pointer;
    font-weight: 400;
    color: var(--text-color);
}
.search-result-item:not(:last-child) {
    border-bottom: 1px solid #333;
}
.search-result-item:hover {
    background-color: var(--primary-color);
    color: #111;
}
.search-result-item.no-match {
    cursor: default;
    color: #888;
    background: transparent !important;
}


/* --- 4b. Photo Upload Custom Button --- */
.file-upload-label {
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 14px 20px;
    background: #333;
    border: 1px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.file-upload-label:hover {
    background: #444;
    border-color: var(--primary-color);
}
input[type="file"] { display: none; }

/* --- 4c. Form Messages --- */
.form-message {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 8px;
    display: none;
}
.form-message.loading { background-color: #333; color: #fff; display: block; }
.form-message.success { background-color: #28a745; color: #fff; display: block; }
.form-message.error { background-color: #dc3545; color: #fff; display: block; }


/* --- 5. Footer --- */
.footer {
    text-align: center;
    padding: 3rem;
    background: #000;
    color: #777;
    font-size: 0.9rem;
}

/* --- 6. Responsive Design --- */
@media (max-width: 768px) {
    .container { padding: 3rem 0; }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-content p { font-size: 1.2rem; }
    .details-grid { grid-template-columns: 1fr; gap: 3rem; }
    
    .countdown-timer {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    .countdown-timer div {
        min-width: auto;
        padding: 0.75rem 0.25rem;
    }
    .countdown-timer span { font-size: 1.75rem; }
    .countdown-timer p { font-size: 0.6rem; letter-spacing: 0.5px; }
    
    .rsvp-form { padding: 2rem; }
    h2 { font-size: 2.5rem; }
    
    #rsvp-search-results,
    #photo-search-results {
        left: 2rem;
        right: 2rem;
    }
    
    /* === NEW RULE ADDED FOR MOBILE === */
    .form-row-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 1.5rem; /* Add vertical gap */
        margin-bottom: 1.5rem;
    }
}

/* --- 7. Impact Q Section (Split Card) --- */
.impact-q-section {
    background-color: #1a1a1a; /* Light black (Dark Gray) as requested */
    color: #fff;
    padding: 4rem 0; /* Reduced from 6rem */
}

.impact-q-content {
    max-width: 900px; /* Reduced from 1000px */
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Split layout */
    background: #082e22; /* Darker green for the card */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* Left Panel: Brand */
.impact-q-brand {
    background-color: var(--primary-color);
    color: #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem; /* Reduced from 4rem */
    text-align: center;
}

.impact-q-brand span {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.impact-q-brand h2 {
    font-family: var(--font-serif);
    font-size: 3.5rem; /* Slightly smaller */
    margin: 0;
    line-height: 1;
    color: #111;
}

.brand-line {
    width: 50px;
    height: 3px;
    background: #111;
    margin-top: 1.5rem;
}

/* Right Panel: Text */
.impact-q-text {
    padding: 2.5rem; /* Reduced from 4rem */
    text-align: left; /* Reset text alignment */
}

.impact-q-text h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-family: var(--font-serif);
    font-size: 1.75rem; /* Slightly smaller */
    line-height: 1.3;
    font-weight: 700;
    margin-top: 0;
}

.impact-q-text p {
    color: #e0e0e0;
    font-size: 1rem; /* Slightly smaller */
    margin-bottom: 1.25rem;
    font-weight: 300;
}

.impact-q-text strong {
    font-weight: 700;
    color: var(--primary-color);
}

.button-container {
    margin: 1.5rem 0; /* Reduced from 2.5rem */
    text-align: left;
}

.impact-q-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #000 !important;
    font-weight: 700;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none !important;
    border: none !important;
    transition: all 0.3s ease;
}

.impact-q-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background-color: #fff;
}

.thank-you-text {
    margin-top: 2rem;
    font-style: italic;
    font-family: var(--font-serif);
    font-size: 1.3rem;
    color: var(--primary-color);
}

@media (max-width: 900px) {
    .impact-q-content {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
    .impact-q-brand {
        padding: 3rem 2rem;
    }
    .impact-q-text {
        padding: 3rem 2rem;
        text-align: center;
    }
    .button-container {
        text-align: center;
    }
}
