* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9fafb;
}

.header {
    background: #16a34a;
    color: white;
    padding: 2rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

.intro {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.intro h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.intro p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.intro-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    background: #16a34a;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
    font-family: inherit;
    font-size: 1rem;
}

.btn:hover {
    background: #15803d;
}

.btn.btn-secondary {
    background: #2563eb;
}

.btn.btn-secondary:hover {
    background: #1d4ed8;
}

.filters {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 2rem auto;
    max-width: 1200px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-box {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.search-box:focus {
    outline: none;
    border-color: #16a34a;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.category-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.category-btn.all {
    background: #1f2937;
    color: white;
}

.category-btn.donate {
    background: #dcfce7;
    color: #166534;
}

.category-btn.dropoff {
    background: #dbeafe;
    color: #1e40af;
}

.category-btn.govt {
    background: #f3f4f6;
    color: #374151;
}

.category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.results-count {
    margin: 1rem auto;
    max-width: 1200px;
    color: #6b7280;
}

.loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    font-size: 1.125rem;
}

.error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 2rem auto;
    max-width: 1200px;
}

.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
}

.org-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s;
}

.org-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.org-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.org-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.tag.donate { background: #dcfce7; color: #166534; }
.tag.dropoff { background: #dbeafe; color: #1e40af; }
.tag.govt { background: #f3f4f6; color: #374151; }

.org-description {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.org-meta {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
}

.org-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.badge.supplies {
    background: #fee2e2;
    color: #991b1b;
}

.view-details {
    display: inline-block;
    margin-top: 1rem;
    color: #16a34a;
    font-weight: 600;
    font-size: 0.875rem;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f3f4f6;
    border: none;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    color: #6b7280;
}

.close-btn:hover {
    background: #e5e7eb;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
    color: #1f2937;
    padding-right: 2rem;
}

.modal-body {
    padding: 2rem;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.special-note {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 0.25rem;
}

.contact-item, .location-item {
    padding: 0.5rem 0;
    color: #4b5563;
}

.contact-item a, .location-item a {
    color: #16a34a;
    text-decoration: none;
}

.contact-item a:hover, .location-item a:hover {
    text-decoration: underline;
}

.modal-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-btn {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
}

.modal-btn-primary {
    background: #16a34a;
    color: white;
}

.modal-btn-primary:hover {
    background: #15803d;
}

.modal-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.modal-btn-secondary:hover {
    background: #e5e7eb;
}

footer {
    background: #1f2937;
    color: white;
    padding: 2rem 1rem;
    margin-top: 4rem;
}

footer p {
    text-align: center;
    opacity: 0.8;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .org-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 1rem;
        max-height: 85vh !important;
    }

    .modal-btn {
        min-width: 100%;
    }

    .btn {
        text-align: left;
    }

    #mapModal .modal-content {
        max-height: 85vh !important;
    }

    #mapModal .modal-body {
        height: calc(85vh - 120px) !important;
    }
}
