/* ═══════════════════════════════════════════════════════════
   remote-jobs.css  — Styles specific to the Remote Jobs page
   Inherits all globals from style.css
   ═══════════════════════════════════════════════════════════ */

/* ─── Page Container ─────────────────────────────────────── */
.rj-container {
    padding-top: 5.5rem;
    padding-bottom: 4rem;
}

/* ─── Hero ───────────────────────────────────────────────── */
.rj-hero {
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.rj-badge {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    color: #34d399;
    margin-bottom: 0;
}

.rj-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, #fff 0%, #34d399 30%, #a78bfa 60%, #f472b6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.rj-subtitle {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.9rem;
    max-width: 500px;
    line-height: 1.6;
}

/* ─── Controls Bar ───────────────────────────────────────── */
.rj-controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.rj-filter-row {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.rj-filter-row.secondary {
    justify-content: center;
}

@media (max-width: 640px) {
    .rj-filter-row {
        flex-direction: column;
    }
}

/* Search */
.rj-search-wrap {
    position: relative;
    flex: 2;
}

.rj-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
}

.rj-search {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px) saturate(180%);
}

.rj-search::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.rj-search:focus {
    border-color: rgba(124, 58, 237, 0.5);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

/* Select Wrap (Country Filter) */
.rj-selector-wrap {
    flex: 1;
}

.rj-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    transition: all 0.2s;
}

.rj-select:focus {
    border-color: rgba(124, 58, 237, 0.5);
    background-color: rgba(255, 255, 255, 0.07);
}

.rj-select option {
    background: #111;
    color: white;
}

/* Source Tabs */
.rj-source-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rj-source-tab {
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rj-source-tab:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.rj-source-tab.active {
    background: rgba(124, 58, 237, 0.12);
    border-color: rgba(124, 58, 237, 0.35);
    color: #34d399;
}

/* More Sources Select */
.rj-source-more-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.rj-source-more-select {
    padding-right: 1.8rem !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.6rem center !important;
    appearance: none;
    outline: none;
}

.rj-source-more-select.active {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='none' stroke='%2334d399' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
}

.rj-source-more-select option {
    background: #111;
    color: #fff;
}

/* ─── Category Pills ─────────────────────────────────────── */
.rj-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    justify-content: center;
}

.rj-cat-pill {
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 99rem;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.2, 1, 0.3, 1);
    white-space: nowrap;
}

.rj-cat-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    transform: translateY(-1px);
}

.rj-cat-pill.active {
    background: rgba(96, 165, 250, 0.2);
    border-color: #60a5fa;
    color: #fff;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}

/* ─── Stats Bar ──────────────────────────────────────────── */
.rj-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rj-count {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.rj-source-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rj-src-stat {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--source-color, #60a5fa);
    background: color-mix(in srgb, var(--source-color, #60a5fa) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--source-color, #60a5fa) 30%, transparent);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
}

/* ─── Job Grid ───────────────────────────────────────────── */
.rj-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ─── Job Card ───────────────────────────────────────────── */
.rj-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px) saturate(180%);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    animation: rj-card-in 0.4s cubic-bezier(0.2, 1, 0.3, 1) both;
    position: relative;
    overflow: hidden;
}

.rj-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.rj-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.rj-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(124, 58, 237, 0.08);
    transform: translateY(-3px);
}

.rj-card:hover::before {
    opacity: 1;
}

@keyframes rj-card-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rj-card-top {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.rj-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.rj-flag-badge {
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    height: 24px;
    min-width: 32px;
}

.rj-source-badge {
    display: none;
}

.rj-remote-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #34d399;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.3);
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
}

.rj-date {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

.rj-card-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rj-company,
.rj-location {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

.rj-location {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.73rem;
}

/* Card Bottom */
.rj-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.75rem;
}

.rj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    flex: 1;
    min-width: 0;
}

.rj-tag {
    font-size: 0.65rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.15rem 0.5rem;
    border-radius: 5px;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rj-apply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1.2rem;
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.rj-apply-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 100%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(25deg);
    animation: rj-gloss 5s infinite;
    pointer-events: none;
}

@keyframes rj-gloss {
    0% {
        left: -100%;
    }

    20% {
        left: 100%;
    }

    100% {
        left: 100%;
    }
}

.rj-apply-btn:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.25) 0%, rgba(6, 182, 212, 0.25) 100%);
    border-color: rgba(124, 58, 237, 0.55);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.2);
    transform: translateY(-1px);
    color: #6ee7b7;
}

/* ─── Skeleton Loader ────────────────────────────────────── */
.rj-skeleton {
    height: 180px;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.04) 25%,
            rgba(255, 255, 255, 0.07) 50%,
            rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    animation: rj-shimmer 1.6s infinite ease-in-out;
}

@keyframes rj-shimmer {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: -200% center;
    }
}

/* ─── Empty / Error States ───────────────────────────────── */
.rj-error,
.rj-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 4rem 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    text-align: center;
}

.rj-error.hidden,
.rj-empty.hidden {
    display: none;
}

.rj-retry-btn {
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.rj-retry-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ─── Load More ──────────────────────────────────────────── */
.rj-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.rj-load-more-wrap.hidden {
    display: none;
}

.rj-load-more-btn {
    padding: 0.7rem 2.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 99rem;
    color: rgba(255, 255, 255, 0.65);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 1, 0.3, 1);
}

.rj-load-more-btn:hover {
    background: rgba(124, 58, 237, 0.1);
    border-color: rgba(124, 58, 237, 0.3);
    color: #34d399;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.1);
}

/* ─── Attribution ────────────────────────────────────────── */
.rj-attribution {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.2);
    padding: 1rem 0 0.5rem;
    line-height: 1.6;
}

.rj-attribution a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s;
}

.rj-attribution a:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* ─── Disclaimer ─────────────────────────────────────────── */
.rj-disclaimer {
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.25);
    padding: 1rem 1.5rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.rj-disclaimer strong {
    color: rgba(255, 255, 255, 0.4);
}

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .rj-grid {
        grid-template-columns: 1fr;
    }

    .rj-controls {
        gap: 0.6rem;
    }

    .rj-stats-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 500px) {
    .rj-title {
        font-size: 1.75rem;
    }

    .rj-categories {
        gap: 0.4rem;
    }

    .rj-cat-pill {
        font-size: 0.72rem;
        padding: 0.35rem 0.8rem;
    }
}