/* ARF Projects Grid — Theme-native styles
   All fonts, text colors, and backgrounds inherit from the active WordPress theme.
   Only layout, spacing, badges, and status pills are defined here.
*/

.arf-projects-wrap *,
.arf-projects-wrap *::before,
.arf-projects-wrap *::after {
    box-sizing: border-box;
}

/* Inherit everything from theme */
.arf-projects-wrap {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    width: 100%;
}

/* ── Stats Row ── */
.arf-stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 2rem;
}
@media (max-width: 640px) {
    .arf-stats-row { grid-template-columns: repeat(2, 1fr); }
}
.arf-stat-card {
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    padding: 0.9rem 1rem;
}
.arf-stat-label {
    font-family: inherit;
    font-size: 11px;
    color: inherit;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.arf-stat-num {
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    color: inherit;
    line-height: 1.2;
}

/* ── Filter Bar ── */
.arf-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid currentColor;
    border-bottom-color: rgba(0,0,0,0.1);
}
.arf-filter-btn {
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.18);
    background: transparent;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.15s, background 0.15s, border-color 0.15s;
    line-height: 1.5;
}
.arf-filter-btn:hover {
    opacity: 1;
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.25);
}
.arf-filter-btn.arf-active {
    opacity: 1;
    background: currentColor;
    border-color: transparent;
}
/* Active button label needs to be white/inverted regardless of theme */
.arf-filter-btn.arf-active span,
.arf-filter-btn.arf-active {
    color: #fff;
    mix-blend-mode: normal;
}
/* Fallback: use a data-active trick for text visibility */
.arf-filter-btn.arf-active {
    background: var(--arf-accent, rgba(0,0,0,0.85));
    color: #fff !important;
    border-color: var(--arf-accent, rgba(0,0,0,0.85));
}

/* ── Project Grid ── */
.arf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
@media (max-width: 540px) {
    .arf-grid { grid-template-columns: 1fr; }
}

/* ── Card ── */
.arf-card {
    background: var(--arf-card-bg, rgba(255,255,255,0.9));
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, box-shadow 0.15s;
    color: inherit;
    font-family: inherit;
}
.arf-card:hover {
    border-color: rgba(0,0,0,0.18);
    box-shadow: 0 2px 14px rgba(0,0,0,0.07);
}
.arf-card.arf-hidden { display: none; }

/* Card image */
.arf-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Category stripe — these stay branded, not theme-inherited */
.arf-card-stripe { height: 3px; flex-shrink: 0; }
.arf-stripe-energy  { background: #2D7A4F; }
.arf-stripe-housing { background: #C27A1A; }
.arf-stripe-default { background: rgba(0,0,0,0.2); }

/* Card body */
.arf-card-body {
    padding: 1.2rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.arf-card-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

/* Badges — keep semantic colors for clarity */
.arf-badge {
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
}
.arf-badge-energy  { background: #E1F5EE; color: #0F6E56; }
.arf-badge-housing { background: #FAEEDA; color: #854F0B; }
.arf-badge-default { background: rgba(0,0,0,0.06); color: inherit; opacity: 0.7; }

/* Status pills — keep semantic colors */
.arf-status-pill {
    font-family: inherit;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid;
    margin-left: auto;
}
.arf-status-completed      { border-color: #1D9E75; color: #0F6E56; }
.arf-status-active         { border-color: #378ADD; color: #185FA5; }
.arf-status-in_development { border-color: #EF9F27; color: #854F0B; }
.arf-status-proposed       { border-color: rgba(0,0,0,0.3); color: inherit; opacity: 0.6; }
.arf-status-planning       { border-color: rgba(0,0,0,0.3); color: inherit; opacity: 0.6; }

/* Card title — inherits theme heading font */
.arf-card-name {
    font-family: inherit;
    font-size: 1.1em;
    font-weight: 700;
    color: inherit;
    line-height: 1.3;
    margin: 0;
}

/* Location */
.arf-card-location {
    font-family: inherit;
    font-size: 0.78em;
    color: inherit;
    opacity: 0.5;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Description */
.arf-card-desc {
    font-family: inherit;
    font-size: 0.88em;
    color: inherit;
    opacity: 0.75;
    line-height: 1.65;
    flex: 1;
    margin: 0;
}

/* Card footer */
.arf-card-footer {
    padding: 0.7rem 1.25rem;
    border-top: 1px solid rgba(0,0,0,0.07);
    font-family: inherit;
    font-size: 0.75em;
    color: inherit;
    opacity: 0.45;
}

/* No results */
.arf-no-results {
    display: none;
    text-align: center;
    padding: 3rem 1rem;
    font-family: inherit;
    font-size: 0.9em;
    color: inherit;
    opacity: 0.5;
    grid-column: 1 / -1;
}
.arf-no-results.arf-show { display: block; }
