/* ─────────────────────────────────────
   Results AJAX Filter — style.css v1.0.0
   Matches the case study card design
───────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@600;700&display=swap');

/* ── Wrapper ────────────────────────── */
.raf-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ── Filter bar ─────────────────────── */
.raf-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.raf-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}

.raf-tab:hover {
    border-color: #0b3c5e;
    color: #0b3c5e;
    background: #EAF2FB;
}

.raf-tab.active {
    background: #0b3c5e;
    border-color: #0b3c5e;
    color: #ffffff;
    font-weight: 700;
}

/* ── Grid ───────────────────────────── */
.raf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    min-height: 200px;
    transition: opacity 0.2s ease;
}

.raf-grid.raf-loading {
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .raf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .raf-grid { grid-template-columns: 1fr; }
    .raf-filter-bar { gap: 8px; }
    .raf-tab { font-size: 13px; padding: 8px 16px; }
}

/* ── Card ───────────────────────────── */
.raf-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #0b3c5e;
    padding: 24px 24px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
    animation: raf-fade-in 0.35s ease both;
    box-sizing: border-box;
}

.raf-card:hover {
    box-shadow: 0 8px 32px rgba(11, 60, 94, 0.10);
    transform: translateY(-3px);
}

/* ── Card top row ───────────────────── */
.raf-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Achievement badge ──────────────── */
.raf-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 4px 12px 4px 8px;
    line-height: 1.5;
    white-space: nowrap;
}

.raf-badge svg {
    color: #16a34a;
    flex-shrink: 0;
}

/* ── Location · Year ────────────────── */
.raf-loc-year {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    white-space: nowrap;
    margin-left: auto;
}

/* ── Card title ─────────────────────── */
.raf-card__title {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #0b3c5e;
    margin: 0;
}

.raf-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.raf-card__title a:hover {
    color: #ff6e00;
}

/* ── Excerpt ────────────────────────── */
.raf-card__excerpt {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #4b5563;
    line-height: 1.65;
    margin: 0;
    flex: 1;
}

/* ── Bottom tags row ────────────────── */
.raf-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 4px;
}

.raf-tag {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #374151;
    background: transparent;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 10px;
    line-height: 1.5;
    white-space: nowrap;
}

/* Highlighted tag (extra_achieved) */
.raf-tag--highlight {
    color: #166534;
    border-color: #86efac;
    background: #f0fdf4;
}

/* ── Spinner ────────────────────────── */
.raf-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 40px 0;
}

.raf-spinner.visible {
    display: flex;
}

.raf-spinner span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0b3c5e;
    animation: raf-bounce 0.9s infinite ease-in-out;
    opacity: 0.7;
}

.raf-spinner span:nth-child(2) { animation-delay: 0.15s; }
.raf-spinner span:nth-child(3) { animation-delay: 0.30s; }

@keyframes raf-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40%           { transform: scale(1);   opacity: 1;   }
}

/* ── No results ─────────────────────── */
.raf-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

/* ── Card entrance animation ────────── */
@keyframes raf-fade-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Load More ──────────────────────── */
.raf-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.raf-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 44px;
    background: #ffffff;
    color: #0b3c5e;
    border: 2px solid #0b3c5e;
    border-radius: 999px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.raf-load-more-btn:hover:not(:disabled) {
    background: #0b3c5e;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(11, 60, 94, 0.25);
    transform: translateY(-2px);
}

.raf-load-more-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: none;
}

.raf-load-more-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}
