/**
 * SkillXarc — Resources Page Styles
 * File: assets/css/resources.css
 * Prefix: rp- (resources page)
 *
 * Sections:
 *  1. Hero
 *  2. Content wrapper
 *  3. Tab bar
 *  4. Card grid
 *  5. Card
 *  6. Empty state
 *  7. Responsive
 */

/* ─────────────────────────────────────────────────────
   1. HERO
───────────────────────────────────────────────────── */
.rp-hero {
    background-color: #f8f7f4;
    padding: clamp( 4.5rem, 9vw, 7rem ) 0 clamp( 3rem, 6vw, 5rem );
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.rp-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rp-hero__label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #006644;
    margin-bottom: 1rem;
}

.rp-hero__title {
    font-family: var(--font-body);
    font-size: clamp( 2.5rem, 6vw, 4rem );
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.04em;
    color: #0a0e1a;
    margin: 0 0 1.25rem;
}

.rp-hero__sub {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: #374151;
    max-width: 52ch;
    margin: 0;
}

/* ─────────────────────────────────────────────────────
   2. CONTENT WRAPPER
───────────────────────────────────────────────────── */
.rp-content {
    padding: clamp( 3rem, 6vw, 4.5rem ) 0 clamp( 4.5rem, 9vw, 7rem );
    background: #f9fafb;
}

/* ─────────────────────────────────────────────────────
   3. TAB BAR
───────────────────────────────────────────────────── */
.rp-tabbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: clamp( 2rem, 4vw, 3rem );
}

.rp-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.375rem;
    border-radius: 999px;
    border: 1.5px solid #d1d5db;
    background: #ffffff;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.rp-tab:hover:not(.is-active) {
    border-color: #006644;
    color: #006644;
}

.rp-tab.is-active {
    background: #006644;
    border-color: #006644;
    color: #ffffff;
}

/* ─────────────────────────────────────────────────────
   4. CARD GRID
───────────────────────────────────────────────────── */
.rp-grid {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 1.5rem;
}

/* ─────────────────────────────────────────────────────
   5. CARD
───────────────────────────────────────────────────── */
.rp-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.07),
        0 4px 14px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.rp-card:hover {
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.10),
        0 16px 40px rgba(0, 0, 0, 0.07);
    transform: translateY( -3px );
}

/* Thumbnail */
.rp-card__thumb-wrap {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e9ecef;
    flex-shrink: 0;
}

.rp-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.rp-card:hover .rp-card__thumb { transform: scale( 1.04 ); }

.rp-card__thumb--placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient( 135deg, #e9ecef 0%, #d1d5db 100% );
    color: #9ca3af;
}

.rp-card__thumb--placeholder svg { width: 40px; height: 40px; }

/* Card body */
.rp-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Type badge */
.rp-card__badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.2rem 0.625rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.rp-card__badge--post     { background: #dcfce7; color: #166534; }
.rp-card__badge--document { background: #dbeafe; color: #1e40af; }
.rp-card__badge--resource { background: #ede9fe; color: #6d28d9; }

/* Title */
.rp-card__title {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.4;
    color: #111827;
    margin: 0 0 0.625rem;
}

.rp-card__title a {
    color: inherit;
    text-decoration: none;
}

.rp-card__title a:hover { color: #006644; }

/* Excerpt */
.rp-card__excerpt {
    font-size: 0.875rem;
    line-height: 1.65;
    color: #374151;
    margin: 0;
    padding-bottom: 1rem;
    flex: 1;
}

/* Date */
.rp-card__date {
    display: block;
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid #f3f4f6;
}

/* ─────────────────────────────────────────────────────
   6. FILTER VISIBILITY
───────────────────────────────────────────────────── */
.rp-card.is-hidden,
.rp-empty.is-hidden { display: none !important; }

/* ─────────────────────────────────────────────────────
   7. EMPTY STATE
───────────────────────────────────────────────────── */
.rp-empty {
    text-align: center;
    color: #374151;
    font-size: 1rem;
    padding: 4rem 0;
}

/* ─────────────────────────────────────────────────────
   8. RESPONSIVE
───────────────────────────────────────────────────── */
@media ( max-width: 1024px ) {
    .rp-grid { grid-template-columns: repeat( 2, 1fr ); }
}

@media ( max-width: 600px ) {
    .rp-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .rp-hero__title { letter-spacing: -0.02em; }
    .rp-tabbar { gap: 0.375rem; }
    .rp-tab { font-size: 0.875rem; padding: 0.4rem 1rem; }
}

@media ( prefers-reduced-motion: reduce ) {
    .rp-card,
    .rp-card__thumb { transition: none; }
    .rp-card:hover { transform: none; }
}
