/* ==========================================
   Veracity Church Directory - Main Styles
   ========================================== */
:root { 
    --vcd-blue: #173A6A; 
    --vcd-light: #DDF2FF; 
    --vcd-badge-bg: #EAF6FF; 
    --vcd-white: #ffffff; 
    --vcd-text-grey: #555555;
    --vcd-font-head: 'Kumbh Sans', sans-serif; 
    --vcd-font-body: 'Nunito', sans-serif; 
}

#vcd-app-wrapper { 
    font-family: var(--vcd-font-body) !important; 
    background-color: var(--vcd-light); 
    border-radius: 12px; 
    overflow: hidden; 
    margin: 40px 0; 
    padding-bottom: 40px;
}

/* --- Filter Section (Cleaned Up & Forced Row) --- */
.vcd-filter-section { 
    background-color: var(--vcd-blue); 
    padding: 30px 40px !important; 
    text-align: center; 
}

.vcd-filter-container { 
    display: flex !important; 
    flex-direction: row !important; /* Force them into a horizontal line */
    flex-wrap: nowrap !important;   /* Prevent stacking on desktop */
    gap: 15px !important; 
    align-items: center !important;
    justify-content: space-between !important; 
    max-width: 1200px !important; 
    margin: 0 auto !important; 
}

/* Ultra-specific targeting to override Theme/Elementor form styles */
#vcd-app-wrapper .vcd-filter-container select, 
#vcd-app-wrapper .vcd-filter-container input { 
    background-color: #ffffff !important; /* Force white background */
    color: #333333 !important;            /* Force dark text */
    padding: 0 15px !important; 
    height: 48px !important;              /* Consistent height */
    border-radius: 8px !important; 
    border: 1px solid #e2e8f0 !important; 
    font-size: 15px !important; 
    flex: 1 1 auto !important; 
    min-width: 150px !important;
    font-family: var(--vcd-font-body) !important; 
    outline: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    appearance: auto !important;          /* Restores the dropdown arrow if theme hid it */
    -webkit-appearance: auto !important;
    margin: 0 !important;
}

#vcd-app-wrapper .vcd-filter-container input::placeholder {
    color: #888888 !important;
}

/* Responsive Stacking for smaller screens */
@media (max-width: 900px) {
    .vcd-filter-container { 
        flex-wrap: wrap !important; 
    }
    #vcd-app-wrapper .vcd-filter-container select, 
    #vcd-app-wrapper .vcd-filter-container input {
        flex: 1 1 45% !important; /* 2x2 grid on tablets */
    }
}
@media (max-width: 600px) {
    #vcd-app-wrapper .vcd-filter-container select, 
    #vcd-app-wrapper .vcd-filter-container input {
        flex: 1 1 100% !important; /* Stack vertically on phones */
    }
}

/* --- Results Grid (Forced 3 Columns) --- */
#vcd-results-grid { 
    display: grid !important; 
    grid-template-columns: repeat(3, 1fr) !important; 
    gap: 30px !important; 
    padding: 60px 40px !important; 
    max-width: 1300px; 
    margin: 0 auto; 
}

@media (max-width: 1024px) {
    #vcd-results-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 768px) {
    #vcd-results-grid { grid-template-columns: 1fr !important; padding: 40px 20px !important;}
}

.vcd-status-msg { 
    grid-column: 1 / -1; 
    text-align: center; 
    color: var(--vcd-blue); 
    font-size: 18px; 
    padding: 40px; 
}

/* --- Card Design --- */
.vcd-card { 
    background: var(--vcd-white) !important; 
    border-radius: 16px !important; 
    padding: 35px 30px !important; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03) !important; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}

.vcd-badge { 
    background-color: var(--vcd-badge-bg) !important; 
    color: var(--vcd-blue) !important; 
    padding: 8px 18px !important; 
    border-radius: 20px !important; 
    font-size: 12px !important; 
    font-weight: 700 !important; 
    text-transform: uppercase; 
    align-self: flex-start; 
    margin-bottom: 20px !important; 
    display: inline-block; 
    letter-spacing: 0.5px;
}

.vcd-card h3 { 
    font-family: var(--vcd-font-head) !important; 
    color: var(--vcd-blue) !important; 
    margin: 0 0 25px 0 !important; 
    font-size: 26px !important; 
    line-height: 1.2 !important; 
    font-weight: 700 !important;
}

.vcd-info { 
    margin: 12px 0 !important; 
    font-size: 16px !important; 
    color: var(--vcd-text-grey) !important; 
    display: flex !important;
    align-items: baseline !important;
    gap: 8px !important;
}
.vcd-info label { 
    color: var(--vcd-text-grey) !important; 
    font-weight: 600 !important; 
    min-width: 95px !important; 
    margin: 0 !important;
}
.vcd-info span {
    color: #222222 !important; 
    font-weight: 400 !important;
}

/* --- Buttons --- */
.vcd-btn-wrap { 
    margin-top: 35px !important; 
    display: flex !important;
    gap: 12px !important; 
}

.vcd-btn {
    flex: 1; 
    padding: 12px 0 !important; 
    border-radius: 6px !important; 
    font-weight: 600 !important; 
    font-size: 15px !important; 
    text-decoration: none !important; 
    transition: 0.2s; 
    font-family: var(--vcd-font-body) !important;
    text-align: center !important;
    display: inline-block;
    box-sizing: border-box;
}

.vcd-btn-primary { 
    background-color: var(--vcd-blue) !important; 
    color: var(--vcd-white) !important; 
    border: 1px solid var(--vcd-blue) !important; 
}
.vcd-btn-primary:hover { 
    opacity: 0.9; 
    color: var(--vcd-white) !important; 
}

.vcd-btn-outline { 
    background-color: transparent !important;
    border: 1px solid var(--vcd-blue) !important; 
    color: var(--vcd-blue) !important; 
}
.vcd-btn-outline:hover { 
    background: rgba(23, 58, 106, 0.05) !important; 
}

/* --- Clear Filters Button --- */
#vcd-app-wrapper .vcd-filter-container button#vcd-clear-btn {
    background-color: transparent !important;
    color: var(--vcd-white) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    padding: 0 20px !important;
    height: 48px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: var(--vcd-font-body) !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    flex: 0 0 auto !important; /* Prevents the button from stretching too wide */
    box-shadow: none !important;
}

#vcd-app-wrapper .vcd-filter-container button#vcd-clear-btn:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--vcd-white) !important;
}

/* Make sure it drops to full width on mobile gracefully */
@media (max-width: 600px) {
    #vcd-app-wrapper .vcd-filter-container button#vcd-clear-btn {
        flex: 1 1 100% !important;
    }
}