:root {
    --bg-main: #000000;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-main: #f8fafc;
    --accent-green: #10b981;
}

/* Base Reset and Layout */
body { 
    font-family: sans-serif; 
    background-color: var(--bg-main); 
    color: var(--text-main); 
    margin: 0; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.main-banner { 
    display: block; 
    margin: 2rem auto; 
    max-width: 640px; 
    width: 90%; 
    border-radius: 8px; 
}

/* Search Area */
.search-wrapper { 
    width: 90%; 
    max-width: 460px; 
    margin: 1rem auto; 
    display: flex;
    border-radius: 8px;
    justify-content: center; 
}

#searchInput {
    width: 100%;
    padding: 1.0rem;
    font-size: 1.1rem;
    border-radius: 8px;
    /* Border is now forced to be visible */
    border: 2px solid #949eac !important; 
    background-color: #1e293b;
    color: white;
    outline: none !important; 
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    border-color: var(--accent-green) !important;
}

/* Main Container */
main {
    flex: 1; 
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem 0;
}

/* Master Grid */
.master-grid {
    max-width: 1216px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    align-items: flex-start;
}

/* Card Styling */
.flag-card {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    background: var(--bg-card);
    text-decoration: none; 
    color: var(--text-main); 
    border: 2px solid #334155;
    padding: 1.6rem 0.8rem; 
    border-radius: 10px; 
    transition: all 0.3s ease; 
    text-align: center; 
    flex: 0 0 224px; 
    opacity: 0.5;
}

.flag-card:hover { 
    background-color: var(--bg-card-hover); 
    border-color: var(--accent-green); 
    transform: translateY(-5px); 
    opacity: 1.0;
}

.org-name { 
    font-size: 1.32rem; 
    font-weight: 700; 
    margin-bottom: 0.4rem; 
}

.country-sub { 
    font-size: 1.08rem; 
    color: #94a3b8; 
}

.flag-img { 
    width: 104px; 
    height: 69px; 
    object-fit: cover; 
    border-radius: 5px; 
    margin-bottom: 0.8rem;
}

.no-results-msg { 
    text-align: center; 
    width: 100%; 
    color: var(--accent-green); 
    margin-top: -30px; 
    font-weight: bold;
}

/* Button Styling */
.get-help-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: red;
    color: white;
    padding: 15px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    z-index: 9999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.get-help-btn:hover {
    background-color: darkred;
}

.email-link {
    color: var(--accent-green);
    text-decoration: none; 
    font-weight: bold;
}

.email-link:hover {
    text-decoration: underline;
}

/* Footer Styling */
footer {
    width: 100%;
    padding: 2.5rem 0;
    margin-top: -40px; 
    border-top: 1px solid #000000;
    background-color: #000000;
    color: #64748b;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 20px;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .flag-card { flex: 0 0 90%; }
    .search-wrapper { max-width: 90%; }
}