/* === Music Funding Denmark — Styles === */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
       background: #f8fafc; color: #1e293b; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* Layout */
.site-container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; min-height: 100vh; }

/* Headers */
header { margin-bottom: 2rem; }
.header-top { text-align: center; margin-bottom: 1.5rem; }
.header-top h1 { font-size: 2rem; color: #0f172a; }
.header-top .subtitle { color: #64748b; font-size: 1rem; }

/* Search & Filters */
.header-controls { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-end;
                   background: #fff; padding: 1rem; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.search-box { flex: 1; min-width: 200px; display: flex; gap: 0.5rem; }
#search-input { flex: 1; padding: 0.625rem 0.75rem; border: 1px solid #e2e8f0; border-radius: 8px;
                font-size: 0.95rem; transition: border-color 0.2s; }
#search-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
#search-btn { padding: 0.625rem 1rem; background: #3b82f6; color: #fff; border: none;
               border-radius: 8px; cursor: pointer; font-size: 1rem; }
#search-btn:hover { background: #2563eb; }
.filter-controls { display: flex; flex-direction: column; gap: 0.25rem; }
#filter-tag { width: 180px; padding: 0.375rem; border: 1px solid #e2e8f0; border-radius: 6px;
               background: #fff; font-size: 0.85rem; max-height: 120px; }
.filter-hint { font-size: 0.7rem; color: #94a3b8; }
.btn-small { padding: 0.5rem 0.75rem; background: #e2e8f0; color: #475569; border: none;
              border-radius: 6px; cursor: pointer; font-size: 0.85rem; align-self: flex-end; }
.btn-small:hover { background: #cbd5e1; }

/* Optional pill filters */
.filter-toggles { display: flex; gap: 0.5rem; align-items: center; }
.filter-pills { position: absolute; top: 100%; right: 0; margin-top: 0.5rem; 
                background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
                padding: 0.75rem; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
                z-index: 100; min-width: 260px; max-height: 340px; overflow-y: auto; }
.filter-scroll { display: flex; flex-direction: column; gap: 0.6rem; }
.pill-group h4 { font-size: 0.7rem; color: #94a3b8; text-transform: uppercase;
                 letter-spacing: 0.03em; margin-bottom: 0.2rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.filter-pill { display: inline-block; padding: 0.2rem 0.5rem; 
               background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px;
               font-size: 0.75rem; color: #475569; cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.filter-pill:hover { background: #e2e8f0; border-color: #cbd5e1; }
.filter-pill.selected { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.filter-pill.selected:hover { background: #2563eb; }

/* Results */
.results-header { display: flex; justify-content: space-between; align-items: center;
                   margin-bottom: 1rem; padding: 0 0.25rem; }
#result-count { font-size: 0.9rem; color: #64748b; font-weight: 500; }
#active-filters { font-size: 0.8rem; color: #3b82f6; }

/* Amount row (new: gennemsnit + samlet pulje on two lines) */
.funder-amount-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    font-size: 0.82rem;
    color: #64748b;
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.amount-label {
    font-weight: 500;
    color: #475569;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.funder-amount-avg {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}
.funder-amount-total {
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
}
.amount-sep {
    color: #cbd5e1;
    font-size: 0.7rem;
}
.funder-amount-avg.ukendt,
.funder-amount-total.ukendt {
    color: #94a3b8;
    font-style: italic;
    font-weight: 400;
}
/* Amount note — clue shown when amounts are unknown but amount_note has info */
.amount-note {
    font-size: 0.75rem;
    color: #64748b;
    font-style: italic;
    margin: 0.3rem 0 0.2rem;
    padding: 0.2rem 0.5rem;
    background: #fef9c3;
    border-radius: 4px;
    border-left: 2px solid #eab308;
}
/* Map link on geo */
.geo-map-link {
    display: inline-block;
    margin-left: 0.25rem;
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.85rem;
    vertical-align: middle;
    transition: color 0.2s;
}
.geo-map-link:hover {
    color: #2563eb;
    text-decoration: underline;
}
/* Funder grid: slightly tighter spacing */
.funder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
               gap: 0.85rem; }
.funder-card { background: #fff; border-radius: 10px; padding: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
               border: 1px solid #e2e8f0; transition: box-shadow 0.2s, transform 0.2s; display: flex;
               flex-direction: column; gap: 0.4rem; }

/* No results */
.no-results { grid-column: 1 / -1; text-align: center; padding: 3rem; color: #94a3b8; }

/* Footer */
footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #e2e8f0;
          text-align: center; color: #94a3b8; font-size: 0.8rem; }
footer .footer-small { font-size: 0.7rem; margin-top: 0.25rem; }

/* Detail Page */
.detail-header { margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 2px solid #e2e8f0; }
.back-link { display: inline-block; color: #3b82f6; text-decoration: none; font-size: 0.9rem; margin-bottom: 0.75rem; }
.back-link:hover { text-decoration: underline; }
.detail-header h1 { font-size: 1.75rem; color: #0f172a; margin-bottom: 0.25rem; }
.detail-header .subtitle { color: #64748b; }

.detail-grid { display: grid; gap: 1.5rem; }
.detail-section { background: #fff; border-radius: 10px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.detail-section h2 { font-size: 1.1rem; color: #0f172a; margin-bottom: 1rem;
                      padding-bottom: 0.5rem; border-bottom: 1px solid #e2e8f0; }

.detail-desc { font-size: 0.95rem; color: #475569; line-height: 1.7; white-space: pre-wrap; }
.detail-desc-en { font-size: 0.85rem; color: #94a3b8; line-height: 1.6; margin-top: 0.75rem;
                  font-style: italic; border-left: 2px solid #e2e8f0; padding-left: 0.75rem; }

.detail-list { display: grid; gap: 0.75rem; }
.detail-item { display: flex; gap: 1rem; }
.detail-item dt { flex-shrink: 0; font-size: 0.85rem; color: #64748b; min-width: 120px; }
.detail-item dd { flex: 1; font-size: 0.9rem; color: #1e293b; }
.detail-item a { color: #3b82f6; text-decoration: none; }
.detail-item a:hover { text-decoration: underline; }

.dos-donts { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.dos, .donts { padding: 1rem; border-radius: 8px; }
.dos { background: #f0fdf4; border: 1px solid #bbf7d0; }
.donts { background: #fef2f2; border: 1px solid #fecaca; }
.dos h3 { color: #16a34a; font-size: 0.95rem; margin-bottom: 0.5rem; }
.donts h3 { color: #dc2626; font-size: 0.95rem; margin-bottom: 0.5rem; }
.dos ul, .donts ul { margin: 0; padding-left: 1.25rem; font-size: 0.85rem; color: #475569; line-height: 1.6; }

.detail-link { display: inline-block; padding: 0.5rem 1rem; background: #f1f5f9; color: #3b82f6;
               text-decoration: none; border-radius: 6px; font-size: 0.9rem; border: 1px solid #e2e8f0; }
.detail-link:hover { background: #e2e8f0; }

/* Responsive */
@media (max-width: 768px) {
    .header-controls { flex-direction: column; align-items: stretch; }
    #filter-tag { width: 100%; }
    .filter-hint { display: none; }
    .dos-donts { grid-template-columns: 1fr; }
    .detail-item dt { min-width: 90px; font-size: 0.8rem; }
}
