.jobs-by-location {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 40px 0;
    padding: 24px;
    background: #f9fafb;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.jobs-by-location .jobs-by-location__title {
    font-weight: 700;
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0 0 10px;
    font-size: 20px;
}

.jobs-by-location .jobs-by-location__select {
    display: flex;
    max-width: 100%;
    margin-bottom: 20px;
}

.jobs-by-location .select2-container--default.select2-container .select2-selection--single {
    background-color: #fff;
}

.jobs-by-location .select2-container {
    overflow: hidden;
}

.jobs-by-location .jobs-by-location__results {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 100%;
    padding-top: 16px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .jobs-by-location .jobs-by-location__results {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* ===========================================
   JOB CARDS - Mobile Card Design
   (Adapted from homepage .home-featured-jobs)
   =========================================== */

/* Card Container */
.jobs-by-location .rj-mobile-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    padding-top: 20px;
    margin-bottom: 0;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f1f1;
    display: flex;
    flex-direction: column;
    overflow: visible;
    height: 100%;
}

/* Overlay link */
.jobs-by-location .rj-mobile-overlay-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Top Section: Logo + Content */
.jobs-by-location .rj-mobile-card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
    z-index: 2;
}

/* Logo */
.jobs-by-location .rj-mobile-logo {
    flex: 0 0 48px;
    margin: 0;
}

.jobs-by-location .rj-mobile-logo .employer-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 1px solid #eee;
    padding: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-sizing: border-box;
}

.jobs-by-location .rj-mobile-logo img {
    width: 100%;
    height: 100%;
    -o-object-fit: contain;
       object-fit: contain;
}

/* Content: Title & Salary */
.jobs-by-location .rj-mobile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 5px;
    min-width: 0;
    align-items: flex-start;
}

.jobs-by-location .rj-mobile-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: #111;
}

.jobs-by-location .rj-mobile-title a {
    color: inherit;
    text-decoration: none;
}

/* Salary Styling */
.jobs-by-location .rj-mobile-salary,
.jobs-by-location .rj-mobile-salary .price {
    font-size: 13px;
    font-weight: 700;
    color: #1a7f45;
    background-color: rgba(30, 190, 115, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 2px;
}

/* Badges: Top Right Absolute */
.jobs-by-location .rj-mobile-badges {
    position: absolute;
    top: -12px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 20;
}

.jobs-by-location .rj-badge {
    font-size: 9px;
    padding: 3px 8px;
    border-radius: 8px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    height: 22px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.jobs-by-location .rj-badge-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    color: #333;
}

.jobs-by-location .rj-badge-violet {
    background: linear-gradient(135deg, #BE22FF 0%, #aa00ff 100%);
    color: #fff;
}

/* Favorite Icon Wrapper */
.jobs-by-location .rj-mobile-favorite-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 28px;
    height: 28px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #eee;
    z-index: 21;
}

/* Meta Row: Company & Location */
.jobs-by-location .rj-mobile-meta-row {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
}

.jobs-by-location .rj-mobile-company-name,
.jobs-by-location .rj-mobile-location {
    display: flex;
    align-items: center;
    gap: 6px;
}

.jobs-by-location .rj-mobile-company-name i,
.jobs-by-location .rj-mobile-location i {
    font-size: 14px;
    color: #999;
}

.jobs-by-location .rj-mobile-company-name a {
    color: #555;
    font-weight: 500;
    text-decoration: none;
}

/* Bottom Row: Tags & Expiry */
.jobs-by-location .rj-mobile-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.jobs-by-location .rj-mobile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.jobs-by-location .rj-mobile-tags span,
.jobs-by-location .rj-mobile-tags a {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

.jobs-by-location .rj-mobile-expiry {
    font-size: 11px;
    color: #999;
}

/* Heart button styling within cards */
.jobs-by-location .btn-follow {
    position: relative;
    top: auto;
    right: auto;
}

.jobs-by-location .btn-follow.btn-action-job {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
