

.job-card-link {
  text-decoration: none; /* hilangkan underline */
  color: inherit;        /* gunakan warna teks default */
  display: block;        /* supaya seluruh card bisa diklik */
}

/* Find Jobs Section — Ketika sidebar aktif, geser ke kiri */
.findjobs-section {
    background-color: var(--bg);
    overflow-y: auto;
    padding-top: 100px;
    transition: margin-right 0.3s ease;
}
.container3 {
    max-width: none; /* HAPUS max-width agar full width */
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible; /* Agar content-wrapper yang handle scroll */
}

/* Search Filter Bar (Mobile & Tablet Only) */
.search-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 0px;
    position: sticky;
    top: 0;
    background: var(--bg);
    padding: 10px 0;
    z-index: 10;
}

.search-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-2);
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid var(--border);
    border-radius: 50px; /* samakan dengan .search-box */
    font-size: 14px;
    font-family: var(--body-font-family);
    transition: border-color 0.3s, box-shadow 0.3s; /* biar smooth saat fokus */
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--card); /* putih */
    color: var(--primary); /* font warna primary */
    border: 1px solid var(--primary); /* border warna primary */
    border-radius: 50px; /* bulat */
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.filter-toggle-btn:hover {
    background: var(--primary); /* hover jadi primary */
    color: white; /* font jadi putih */
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3); /* glow sesuai warna primary */
    transform: translateY(-2px); /* efek naik sedikit */
}


.filter-toggle-btn svg {
    width: 20px;
    height: 20px;
}

.content-wrapper {
    display: flex;
    gap: 24px;
    flex: 1;
    overflow: hidden;
    width: 100%; /* ⬅️ Penting! */
}

.job-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
    padding-right: 8px;
    height: auto;
    max-height: none;
    transition: width 0.3s ease; /* Tambahkan ini */
    padding-top: 16px; /* atau sesuaikan */
}

.job-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;       /* vertikal center */
    justify-content: center;   /* horizontal center */
    transition: all 0.3s;
    cursor: pointer;
    margin-bottom: 16px;
}


.job-card:hover {
    border-color: var(--primary); 
    box-shadow: 0 0 12px rgba(0, 122, 255, 0.3);
    transform: translateY(-2px);
}

.job-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-right: 20px;
}

.time-ago {
    font-size: var(--caption-font-size);
    font-family: var(--caption-font-family);
    font-weight: var(--caption-font-weight);
    color: var(--text-2);
    margin-bottom: 10px;
}

.company-logo-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.logo-box {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin-right: 15px;
}

.job-company-title {
    font-family: var(--h5-font-family);
    font-weight: var(--h5-font-weight);
    font-size: var(--h5-font-size);
    color: var(--text-1);
}

.job-role {
    font-family: var(--body-font-family);
    font-weight: var(--body-font-weight);
    font-size: var(--body-font-size);
    color: var(--text-1);
    margin: 3px 0 0 0;
}

.match-score {
    font-size: var(--caption-font-size);
    color: var(--aktif);
    font-weight: 500;
}


.bookmark-btn:hover svg {
    stroke: var(--primary);
}

.salary-range {
    font-size: var(--h6-font-size);
    font-weight: var(--h6-font-weight);
    font-family: var(--h6-font-family);
    color: var(--text-1);
}
.job-meta {
    display: flex;
    justify-content: center; /* horizontal center */
    align-items: center;     /* vertical center */
    gap: 15px;
}


/* salary + job-tags container */
.job-info {
    display: flex;
    flex-direction: column; /* atas-bawah */
    gap: 5px;
}

/* job-tags horizontal */
.job-tags {
    display: flex;
    flex-direction: row; /* horizontal */
    gap: 8px; /* jarak antar tag */
}

/* tombol bookmark */
.bookmark-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
}

.bookmark-btn svg {
    width: 24px;
    height: 24px;
}

.tag {
    background: var(--sidebar);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: 'Poppins', sans-serif; /* ini buat font Poppins */
    color: var(--text-2);
}


.job-card-left {
    display: flex;
    gap: 20px;
    align-items: center;
    flex: 1;
}

.job-time {
    font-family: var(--caption-font-family);
    font-weight: var(--caption-font-weight);
    font-size: var(--caption-font-size);
    color: var(--text-2);
    min-width: 80px;
}

.company-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
}

.company-name-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.company-name {
    font-family: var(--h5-font-family);
    font-weight: var(--h5-font-weight);
    font-size: var(--h5-font-size);
    color: var(--text-1);
}

.job-title {
    font-family: var(--h6-font-family);
    font-weight: var(--h6-font-weight);
    font-size: var(--h6-font-size);
    color: var(--text-1);
}

.job-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.job-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--caption-font-family);
    font-weight: var(--caption-font-weight);
    font-size: var(--caption-font-size);
    color: var(--text-2);
}

.job-tag svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.job-card-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.job-salary {
    font-family: var(--h5-font-family);
    font-weight: var(--h5-font-weight);
    font-size: var(--h5-font-size);
    color: var(--text-1);
    white-space: nowrap;
}

.bookmark-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.bookmark-btn:hover,
.bookmark-btn.active {
    background: var(--hoverbiru);
    border-color: var(--primary);
}

.bookmark-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-2);
    transition: color 0.3s;
}

.bookmark-btn:hover svg,
.bookmark-btn.active svg {
    color: var(--primary);
}
/* === DESKTOP FILTER SIDEBAR (SLIDE-IN) === */
.filter-sidebar {
    position: fixed;
    top: 80px; /* Mulai dari bawah navbar */
    right: -320px;
    width: 320px;
    height: calc(100vh - 160px); /* Kurangi 80px untuk footer */
    bottom: 0;
    background: var(--card);
    padding: 24px 24px 0 24px;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.05);
}

.filter-sidebar.active {
    right: 0;
}

.filter-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.filter-sidebar-header h3 {
    font-family: var(--h4-font-family);
    font-weight: var(--h4-font-weight);
    font-size: var(--h4-font-size);
    color: var(--text-1);
    margin: 0;
}

.close-sidebar-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.3s;
}

.close-sidebar-btn:hover {
    background: var(--bg);
}

.close-sidebar-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-1);
}

.filter-sidebar-body {
    padding: 0 0 20px;
}

.filter-sidebar-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border);
    position: absolute; /* ⬅️ Ganti dari sticky ke absolute */
    bottom: 0;
    left: 0;
    right: 0;
    background: white; /* ⬅️ Pastikan background putih */
    z-index: 10; /* ⬅️ Agar tidak tertutup oleh konten */
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05); /* Optional: efek lembut saat di atas konten */
}
.findjobs-section.sidebar-active {
    margin-right: 320px;
    width: calc(100% - 320px);
    /* Pastikan tidak ada overflow-x */
    overflow-x: hidden;
}

/* Agar job list tetap bisa scroll dan tidak terpotong */
.findjobs-section.sidebar-active .job-list {
    padding-right: 16px; /* Jarak dari sidebar */
}
@media (min-width: 1025px) {
    .filter-sidebar.active ~ .content-wrapper {
        /* ❌ JANGAN PAKAI MARGIN-RIGHT DI SINI */
    }

    /* ✅ GANTI DENGAN: TAMBAHKAN MARGIN-RIGHT PADA .findjobs-section SAAT SIDEBAR AKTIF */
    .filter-sidebar.active ~ .content-wrapper {
        /* Biarkan content-wrapper tetap penuh */
    }

    /* ✅ INI YANG KAMU MAU: KURANGI LEBAR .findjobs-section */
    .filter-sidebar.active + .findjobs-section {
        margin-right: 320px;
    }
}

/* === MOBILE/TABLET RESPONSIVE === */
@media (max-width: 1024px) {
    .search-filter-bar {
        display: flex;
    }

    .filter-sidebar {
        display: none; /* hide desktop sidebar on mobile/tablet */
    }

    .content-wrapper {
        flex-direction: column;
    }

    .job-list {
        width: 100%;
    }

    /* Show filter popup for tablet/mobile */
    .filter-popup {
        display: none;
    }

    .filter-popup.active {
        display: block;
    }
}

@media (min-width: 1025px) {
    .search-filter-bar {
        display: flex;
    }

    .filter-sidebar {
        display: block;
    }

    .content-wrapper {
        flex-direction: row;
        gap: 24px;
    }

    .job-list {
        flex: 1;
    }

    /* Hide mobile popup on desktop */
    .filter-popup {
        display: none !important;
    }
}
/* Desktop Filter Sidebar */
.filter-sidebar {
    width: 320px;
    height: 670px;
    background: var(--card);
    border: none;
    box-shadow: none;
    padding: 24px 24px 0px 24px;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden; /* ⬅️ HILANGKAN HORIZONTAL SCROLL / NONGOL */
}

.filter-sidebar h3 {
    font-family: var(--h5-font-family);
    font-weight: var(--h5-font-weight);
    font-size: var(--h5-font-size);
    color: var(--text-1);
    margin-bottom: 16px;
}

.filter-section {
    padding: 0; /* ⬅️ Pastikan tidak ada padding */
    width: 100%; /* ⬅️ Jaga agar tidak melebihi lebar parent */
    box-sizing: border-box; /* ⬅️ Penting! */
    box-sizing: border-box;
    /* Tambahkan margin-bottom HANYA jika TIDAK aktif untuk memisahkan antar section */
    margin-bottom: 24px; /* Gunakan margin-bottom yang lebih besar sebagai pemisah default */

}


.filter-section:last-child {
    margin-bottom: 0;
}

.filter-header {
    font-weight: 500;
    margin: 12px 0 8px;
    color: var(--text-2);
    font-size: var(--h6-font-size);
    font-family: var(--h6-font-family);
    font-weight: var(--h6-font-weight);
}

.filter-group label {
    display: block;
    margin: 8px 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-2);
}

.filter-group input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary);
}
.salary-range {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* ini buat rata kanan */
    gap: 8px;
    margin-top: 12px;
}


.salary-range input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}

.salary-range span {
    color: var(--text-2);
}

/* Header section dengan tombol toggle */
.filter-section-header {
     display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0; /* ⬅️ jangan pakai padding-left/right besar */
    margin-bottom: 8px;
    width: 100%; /* ⬅️ penting */
    box-sizing: border-box;
}

.filter-section-header h3 {
    font-family: var(--h5-font-family);
    font-weight: var(--h5-font-weight);
    font-size: var(--h5-font-size);
    color: var(--text-1);
    margin: 0;
}

.toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    transition: transform 0.3s;
}

.toggle-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-2);
}

/* Konten section (default hidden) */
.filter-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0px;
}

/* Modifikasi agar margin-bottom hilang saat section ditutup */
.filter-section.active {
    margin-bottom: 0; /* Hilangkan margin saat aktif/terbuka agar padding bawah content yang bekerja */
}

/* Biarkan last-child seperti ini untuk konsistensi */
.filter-section:last-child {
    margin-bottom: 0;
}

/* Saat aktif (dibuka) */
.filter-section.active .filter-section-content {
    max-height: 500px; 
    /* TAMBAHKAN KEMBALI padding-bottom DI SINI */
    padding-bottom: 16px; /* Tambahkan ruang pemisah di sini */
}

/* Untuk elemen filter di dalamnya, pastikan tidak ada margin-bottom */
.filter-group label {
    display: block;
    margin: 8px 0; /* Jaga ini agar tetap ada margin vertikal kecil */
    /* ... kode lainnya ... */
}

.filter-section.active .toggle-btn svg {
    transform: rotate(180deg);
}

/* ===== FILTER POPUP MOBILE - SLIDE UP ===== */
.filter-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.filter-popup.active {
    display: block;
}

.filter-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.filter-popup-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* Header: Back | Filter | Reset */
.filter-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.filter-popup-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    margin: 0;
    flex: 1;
    text-align: center;
}

.close-popup-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.3s;
    padding: 0;
}

.close-popup-btn:hover { background: #f5f5f5; }
.close-popup-btn svg { color: #333; }

/* Tombol Reset di header - rapi */
.reset-btn-header {
    background: none;
    border: 1px solid #007BFF;
    border-radius: 20px;
    color: #007BFF;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 14px;
    min-width: 60px;
    text-align: center;
    transition: all 0.2s;
}

.reset-btn-header:hover {
    background: #007BFF;
    color: #fff;
}

/* Body scrollable */
.filter-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    -webkit-overflow-scrolling: touch;
}

.filter-popup-body::-webkit-scrollbar { display: none; }

/* Tiap section filter mobile */
.filter-section-mobile {
    border-bottom: 1px solid #f0f0f0;
}

/* Header section - nama filter + chevron */
.filter-section-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #111;
    user-select: none;
}

.filter-section-mobile-header .chevron-icon {
    transition: transform 0.3s;
    color: #888;
    flex-shrink: 0;
    /* Default: panah ke kanan (>) = section tertutup */
    transform: rotate(0deg);
}

/* Saat section TERBUKA, chevron rotate ke bawah */
.filter-section-mobile.open .filter-section-mobile-header .chevron-icon {
    transform: rotate(90deg);
}

/* Konten section - default tersembunyi */
.filter-section-mobile-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

/* Saat open, buka konten */
.filter-section-mobile.open .filter-section-mobile-content {
    max-height: 600px;
}

/* Label filter mobile - teks kiri, checkbox kanan */
.mobile-filter-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f8f8f8;
    font-size: 14px;
    color: #444;
    position: relative;
}

.mobile-filter-label:last-child { border-bottom: none; }

.mobile-filter-label span:first-child {
    flex: 1;
    padding-right: 12px;
}

/* Sembunyikan checkbox asli */
.mobile-filter-label input[type="checkbox"] {
    display: none;
}

/* Custom checkbox bulat */
.custom-checkbox {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ddd;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
}

.mobile-filter-label input[type="checkbox"]:checked ~ .custom-checkbox {
    background: #007BFF;
    border-color: #007BFF;
}

.mobile-filter-label input[type="checkbox"]:checked ~ .custom-checkbox::after {
    content: '';
    width: 6px;
    height: 10px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}

/* ===== SALARY RANGE SLIDER ===== */
.salary-slider-wrapper {
    padding: 8px 20px 20px;
}

.salary-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #007BFF;
    font-weight: 600;
    margin-bottom: 12px;
}

.salary-range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(to right, #007BFF 0%, #007BFF 50%, #e0e0e0 50%, #e0e0e0 100%);
    outline: none;
    cursor: pointer;
    margin-bottom: 12px;
}

.salary-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #007BFF;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
    border: 2px solid white;
}

.salary-range-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #007BFF;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.4);
    border: 2px solid white;
}

.salary-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.salary-quick-tag {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.salary-quick-tag.active,
.salary-quick-tag:hover {
    background: #007BFF;
    color: white;
    border-color: #007BFF;
}

/* Footer tombol Show Results */
.filter-popup-footer {
    padding: 14px 20px 28px;
    border-top: 1px solid #f0f0f0;
    background: #fff;
    flex-shrink: 0;
}

.apply-btn {
    width: 100%;
    padding: 16px;
    border-radius: 50px;
    border: none;
    background: var(--primary, #007BFF);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.apply-btn:hover { opacity: 0.9; }

.reset-btn {
    background: white;
    border: 1px solid var(--border, #e0e0e0);
    color: var(--text-1, #333);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 8px;
}

.reset-btn:hover { background: var(--bg, #f5f5f5); }

/* Responsive */
@media (max-width: 1024px) {
    .search-filter-bar {
        display: flex;
    }

    .filter-sidebar {
        display: none;
    }

    .content-wrapper {
        flex-direction: column;
    }

    .job-list {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .findjobs-section {
        padding: 100px 20px 60px;
    }

    .job-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .job-card-left {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .job-time {
        min-width: auto;
    }

    .job-card-right {
        width: 100%;
        justify-content: space-between;
    }

    .filter-popup-content {
        width: 95%;
        max-height: 90vh;
    }
}
