/* ADD THIS AT THE VERY TOP OF STYLE.CSS */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Forces no horizontal scroll */
    position: relative;
}

/* =========================================
   1. GENERAL STYLES & TYPOGRAPHY
   ========================================= */
body {  
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
    background-color: #f4f4f9; /* Fallback background */
    overflow-x: hidden; /* Prevents side-scrolling global */
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

/* =========================================
   2. BUTTONS (UNIFIED STYLES)
   ========================================= */
/* The Main Gold Gradient Button */
button[type="submit"], 
.primary-btn, 
.btn-gold {
    background: linear-gradient(135deg, #f4c542, #ffdb73); 
    color: #1a1a2e; 
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 15px 30px;
    margin-top: 10px;
    width: 100%;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(244, 197, 66, 0.4); 
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box; 
}

button[type="submit"]:hover, 
.primary-btn:hover, 
.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 197, 66, 0.6);
    background: linear-gradient(135deg, #ffdb73, #f4c542); 
}

/* The Secondary Outline Button */
.secondary-btn, 
.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    padding: 13px 30px; 
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-sizing: border-box;
}

.secondary-btn:hover, 
.btn-outline:hover {
    background-color: white;
    color: #1a1a2e;
    border-color: white;
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1470252649378-9c29740c9fa8?q=80&w=2070&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    padding: 20px;
}

.main-title {
    font-size: 5rem;
    letter-spacing: 15px;
    margin: 10px 0;
    color: #f4c542;
}

.subtitle {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 20px;
}

.buttons {
    margin-top: 30px;
}

/* Button overrides for Hero specific spacing */
.hero .btn {
    width: auto; 
    margin: 10px;
}

/* =========================================
   4. SECTIONS & CARDS
   ========================================= */
.section { padding: 80px 0; }
.light-bg { background-color: #f9f9f9; }
.white-bg { background-color: #ffffff; }
.dark-bg { background-color: #1a1a2e; color: white; }
.form-bg { background-color: #1a1a2e; color: white; }

.scripture {
    font-size: 1.5rem;
    font-style: italic;
    border-left: 4px solid #f4c542;
    padding-left: 20px;
    margin: 30px auto;
    max-width: 600px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.card .icon { font-size: 3rem; margin-bottom: 10px; }

.map-responsive iframe {
    width: 100%;
    border-radius: 10px;
    margin-top: 20px;
}

/* =========================================
   5. FORM STYLING
   ========================================= */
.form-container {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.form-container p { color: #ccc; margin-bottom: 2rem; font-size: 0.9rem; }
.form-container h2 { color: white; }

.form-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 15px;
}
.row-two { grid-template-columns: 1fr 1fr; }
.row-one { grid-template-columns: 1fr; }

/* Input Styles */
input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 48px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #f4c542;
    box-shadow: 0 0 8px rgba(244, 197, 66, 0.3);
}

/* Phone Group Special Styling */
.phone-input-group {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    height: 48px;
    padding: 0;
}
.phone-input-group .prefix {
    background: #eaeaea;
    color: #333;
    font-weight: 700;
    font-size: 14px;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid #ddd;
}
.phone-input-group input {
    border: none;
    border-radius: 0;
    height: 100%;
    padding-left: 15px;
    flex: 1; /* FIX: Ensures input takes remaining width */
}
.phone-input-group input:focus { box-shadow: none; }

/* Checkbox & Date */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 10px 0;
    color: white;
    font-size: 14px;
    cursor: pointer;
}
.checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #f4c542;
}
.date-label {
    display: block;
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 5px;
    text-align: left;
}

/* =========================================
   6. CHECKOUT MODAL (OVERLAY)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.checkout-modal {
    background: #1a1a2e;
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    color: white;
    border: 1px solid #444;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh; /* Limits height to 90% of screen */
    overflow-y: auto; /* Adds internal scroll if needed */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.checkout-modal::-webkit-scrollbar { display: none; }
/* Hide scrollbar for IE, Edge and Firefox */
.checkout-modal { -ms-overflow-style: none; scrollbar-width: none; }

.modal-overlay.active .checkout-modal {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}
.close-modal:hover { color: white; }

.payment-method h4 { color: #f4c542; margin-bottom: 5px; }

.checkout-modal button { margin-top: 10px; }

.checkout-modal input[type="file"] {
    background: white;
    padding: 10px;
    height: auto;
    margin-bottom: 10px;
}

/* =========================================
   7. FOOTER
   ========================================= */
footer {
    background-color: #111;
    color: #888;
    padding: 40px 0;
    text-align: center;
}
footer a { color: #f4c542; text-decoration: none; }

/* =========================================
   8. RESPONSIVENESS & ANIMATIONS
   ========================================= */
/* =========================================
   9. MOBILE OPTIMIZATION (UPDATED)
   ========================================= */

@media (max-width: 768px) {
    
    /* 1. Fix the Hero Title Overflow */
    /* Using 'vw' makes it scale perfectly with the screen width */
    .main-title { 
        font-size: 12vw; /* Scales dynamically */
        letter-spacing: 3px; /* Reduced from 15px to fit */
        line-height: 1.2;
    }

    .hero-content {
        width: 100%;
        padding: 0 20px; /* Ensure text doesn't touch edges */
    }

    /* 2. Fix Section Padding */
    .section { 
        padding: 50px 0; 
    }

    /* 3. Stack Form Inputs Properly */
    .form-grid.row-two, 
    .form-grid.row-one { 
        grid-template-columns: 1fr; /* Force single column */
        gap: 15px;
    }

    /* 4. Fix Form Container Width */
    .form-container { 
        width: 100%;
        padding: 25px 15px; /* Reduce padding to save space */
        box-shadow: none; /* Optional: Cleaner look on mobile */
        background-color: rgba(255, 255, 255, 0.08);
    }

    /* 5. Fix Modals popping off screen */
    .checkout-modal, .status-modal {
        width: 92% !important; /* Force fit with margin */
        max-width: 92% !important;
        padding: 25px 20px;
        max-height: 85vh; /* Keep within vertical view */
    }

    /* 6. Buttons */
    .hero-content .buttons .btn,
    .form-container button {
        width: 100%; 
        display: block;
        margin: 10px 0;
    }

    /* 7. Maps */
    .map-responsive iframe {
        height: 300px; /* Shorter map on mobile */
    }
    
    /* 8. Phone Input Fix */
    .phone-input-group {
        width: 100%;
    }
    .phone-input-group input {
        width: 100%; /* Ensure input takes available space */
        min-width: 0; /* Prevents flexbox overflow issues */
    }
}

/* Scroll Animations */
.hidden {
    opacity: 0;
    transform: translateY(50px);
    filter: blur(5px);
    transition: all 0.6s ease-out;
}
.show {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Staggered Cards */
.card:nth-child(2) { transition-delay: 100ms; }
.card:nth-child(3) { transition-delay: 200ms; }
.card:nth-child(4) { transition-delay: 300ms; }
.card:nth-child(5) { transition-delay: 400ms; }
.card:nth-child(6) { transition-delay: 500ms; }

/* Hero Stagger */
.hero-content p, .hero-content h1, .hero-content .buttons {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s ease-out forwards;
}
.hero-content h1 { animation-delay: 0.2s; }
.hero-content .tagline { animation-delay: 0.4s; }
.hero-content .date-location { animation-delay: 0.6s; }
.hero-content .buttons { animation-delay: 0.8s; }

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   9. LOGIC & TABS (Important Overrides)
   ========================================= */
/* Tabs Styling */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.1);
    padding: 5px;
    border-radius: 50px;
    display: inline-flex; 
}

.tab-btn {
    background: transparent;
    border: none;
    color: #ccc;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #f4c542;
    color: #1a1a2e;
    box-shadow: 0 4px 10px rgba(244, 197, 66, 0.3);
}

/* Group Member Row */
.member-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

.member-row input { margin-bottom: 0; }
.member-row .remove-btn {
    background: #ff4d4d;
    color: white;
    border: none;
    width: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FORCE HIDE for Logic Elements (Overrides animation styles) */
/* This ensures toggled fields stay hidden regardless of scroll animations */
#groupSection.hidden, 
#individualPrompt.hidden, 
#arrivalField.hidden,
#departureField.hidden {
    display: none !important;
}

/* =========================================
   10. STATUS MODAL FIXES (Dark Mode)
   ========================================= */

/* Specific layout for the status modal */
.status-modal {
    max-width: 450px;
    padding: 40px 30px;
    text-align: center;
}

/* Large Icon Styling */
.modal-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounceIn 0.6s ease;
}

/* Headings */
.status-modal h3 {
    color: white; /* Fixes visibility */
    margin: 0 0 5px 0;
    font-size: 1.5rem;
}

/* The "Status: Pay On-Site" Text */
.status-highlight {
    color: #17a2b8; /* Cyan for visibility */
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* The Body Text (The part that was invisible) */
.modal-desc {
    color: #ccc; /* Light grey for readability on dark bg */
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
    padding: 0 10px;
}

/* Button Layout */
.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Refine the Secondary Button for Dark Mode */
.status-modal .secondary-btn {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #aaa;
    font-size: 0.85rem;
    padding: 12px;
}

.status-modal .secondary-btn:hover {
    border-color: white;
    color: white;
    background: rgba(255,255,255,0.05);
}

/* Bounce Animation for the Icon */
@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

/* SCANNER PAGE STYLES */
#reader {
    background: black;
}
#reader video {
    object-fit: cover;
    border-radius: 8px;
}
/* Hide the library's default "Scan an Image File" link if you want cleaner UI */
#reader__dashboard_section_csr span, 
#reader__dashboard_section_swaplink {
    display: none !important;
}

footer a:hover span {
    border-color: #f4c542 !important;
    color: #f4c542 !important;
}
footer a:hover {
    color: #f4c542 !important;
}   


/* =========================================
   TAGS / BADGES STYLES
   ========================================= */
.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.tag-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    background: #666; /* Default Gray */
    cursor: pointer;
    transition: transform 0.2s;
}

.tag-badge:hover {
    transform: scale(1.1); /* Pop effect */
}

/* Specific Colors for Committees */
.tag-media { background-color: #ff4757; }   /* Red */
.tag-reg { background-color: #1e90ff; }     /* Blue */
.tag-kitchen { background-color: #2ed573; } /* Green */
.tag-vip { background-color: #f4c542; color: #1a1a2e; } /* Gold */
.tag-security { background-color: #2f3542; } /* Dark */

/* Small "+" Button */
.btn-add-tag {
    background: transparent;
    border: 1px dashed #aaa;
    color: #aaa;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    line-height: 18px;
    padding: 0;
}
.btn-add-tag:hover {
    border-color: #f4c542;
    color: #f4c542;
}

/* Ensure inputs inside modals look good */
.checkout-modal input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box; /* Prevents overflow */
}
.checkout-modal input:focus {
    border-color: #f4c542;
    outline: none;
}


