/* --- CSS VARIABLES & RESET --- */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --border: #e2e8f0;
    --font-sans: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --container-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; } /* Mencegah scroll horizontal di mobile */
body { font-family: var(--font-sans); background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }

/* --- UTILITY LAYOUT --- */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; width: 100%; }
.btn { display: inline-block; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; border: none; font-size: 0.95rem; width: auto; }
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-dark); }
.btn-outline { border: 1px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background-color: #eff6ff; }

/* --- HEADER & HERO --- */
header { background-color: var(--bg-card); border-bottom: 1px solid var(--border); padding: 15px 0; position: sticky; top: 0; z-index: 100; }
.header-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
nav ul { display: flex; gap: 20px; font-size: 0.9rem; }
.header-actions { display: flex; gap: 10px; }

.hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; padding: 60px 0; text-align: center; margin-bottom: 40px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 10px; line-height: 1.2; }
.search-box { background: white; padding: 10px; border-radius: 8px; display: inline-flex; width: 100%; max-width: 600px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.search-box input { border: none; padding: 10px 15px; flex-grow: 1; font-size: 1rem; outline: none; }

/* --- MAIN GRID LAYOUT --- */
.layout-grid { display: grid; grid-template-columns: 2.5fr 1fr; gap: 40px; margin-bottom: 60px; }
.section-title { font-size: 1.5rem; margin-bottom: 20px; color: var(--text-main); }

/* ========================================= */
/* STYLE KHUSUS: LOWONGAN TERBARU (MAIN)    */
/* ========================================= */
.job-card { 
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; 
    padding: 25px; margin-bottom: 20px; display: flex; gap: 20px; transition: box-shadow 0.2s; 
}
.job-card:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); border-color: var(--primary); }
.company-logo { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.job-info { flex-grow: 1; }
.job-title { font-size: 1.25rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.company-name { font-weight: 600; color: var(--secondary); font-size: 0.95rem; margin-bottom: 10px; }
.job-meta { display: flex; flex-wrap: wrap; gap: 15px; color: var(--secondary); font-size: 0.9rem; margin-bottom: 15px; }
.tag { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.tag.fulltime { background-color: #dbeafe; color: #1e40af; }
.tag.remote { background-color: #d1fae5; color: #065f46; }
.job-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 15px; border-top: 1px solid var(--border); margin-top: 10px; }
.post-date { font-size: 0.85rem; color: #94a3b8; }

/* ========================================= */
/* STYLE KHUSUS: LOWONGAN POPULER (SIDEBAR)  */
/* ========================================= */
.sidebar { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; height: fit-content; position: sticky; top: 90px; }
.sidebar-header { font-size: 1.2rem; font-weight: 700; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid var(--bg-body); }
.sidebar-list { display: flex; flex-direction: column; }
.sidebar-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; transition: 0.2s; cursor: pointer; }
.sidebar-item:hover { background-color: #f8fafc; padding-left: 5px; border-radius: 4px; }
.sidebar-logo { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.sidebar-link-style {
    font-size: 0.95rem; font-weight: 600; color: var(--primary); cursor: pointer; text-decoration: none;
    display: block; margin-bottom: 2px; transition: 0.2s;
}
.sidebar-link-style:hover { text-decoration: underline; color: var(--primary-dark); }
.sidebar-content p { font-size: 0.85rem; color: var(--secondary); }

/* ========================================= */
/* STYLE KHUSUS: MODAL FLOATING             */
/* ========================================= */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); z-index: 2000; display: none;
    justify-content: center; align-items: center; padding: 20px; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
.modal-content {
    background-color: white; width: 100%; max-width: 600px; max-height: 85vh;
    border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    overflow-y: auto; position: relative; animation: slideUp 0.3s ease;
}
.modal-header { padding: 20px 25px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: white; z-index: 10; }
.close-modal { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--secondary); }
.close-modal:hover { color: red; }
.modal-body { padding: 25px; }
.detail-section { margin-bottom: 20px; }
.detail-section h4 { font-size: 1.1rem; color: var(--text-main); margin-bottom: 10px; border-left: 4px solid var(--primary); padding-left: 10px; }
.detail-section p, .detail-section li { color: #334155; font-size: 0.95rem; margin-bottom: 8px; }
.detail-section ul { list-style-type: disc; padding-left: 25px; }
.modal-footer { padding: 20px 25px; border-top: 1px solid var(--border); background-color: #f8fafc; text-align: right; position: sticky; bottom: 0; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ========================================= */
/* STYLE KHUSUS: IKLAN (ADSENSE PLACEHOLDERS) */
/* ========================================= */
.ad-placeholder {
    background-color: #f8fafc;
    border: 2px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #94a3b8;
    text-align: center;
    margin: 0 auto;
    overflow: hidden;
}
.ad-placeholder p { margin: 0; font-weight: 600; font-size: 0.9rem; }
.ad-placeholder span { font-size: 0.75rem; color: #64748b; }

.sidebar-ad {
    width: 100%; height: 250px; margin-bottom: 20px; border-radius: 8px;
}

.footer-ad-container { margin-bottom: 30px; width: 100%; }
.footer-ad {
    width: 100%; max-width: 728px; height: 90px; border-radius: 8px; margin: 0 auto;
}

.modal-ad {
    width: 100%; height: 100px; margin-top: 20px; margin-bottom: 0; border-radius: 6px;
}

/* --- FOOTER --- */
footer { background-color: #1e293b; color: #94a3b8; padding: 40px 0; text-align: center; }

/* ========================================= */
/* MEDIA QUERIES (RESPONSIVE MOBILE)        */
/* ========================================= */

/* Tablet & S Laptop (Kurang dari 900px) */
@media (max-width: 900px) {
    .layout-grid { 
        grid-template-columns: 1fr; /* Ubah grid menjadi 1 kolom */
    } 
    .sidebar { 
        position: static; /* Matikan sticky di mobile agar tidak menutupi */
        margin-top: 20px; 
    }
}

/* Mobile Phone (Kurang dari 600px) */
@media (max-width: 600px) {
    /* Header Stack Vertikal */
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    nav ul {
        width: 100%;
        justify-content: flex-start;
        margin-top: 10px;
        flex-wrap: wrap;
    }
    .header-actions {
        width: 100%;
        justify-content: stretch;
    }
    .header-actions .btn {
        flex: 1;
        text-align: center;
    }

    /* Hero Section */
    .hero h1 { font-size: 1.8rem; } /* Perkecil font judul */
    .search-box { 
        flex-direction: column; 
        width: 100%;
    }
    .search-box button { 
        width: 100%; 
        margin-top: 5px; 
    }

    /* Job Cards Stack Vertikal */
    .job-card { 
        flex-direction: column; 
        align-items: center;
        text-align: center;
        padding: 20px;
    }
    .company-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }
    .job-meta {
        justify-content: center;
    }
    .job-tags {
        justify-content: center;
        flex-wrap: wrap;
        display: flex;
        gap: 5px;
    }
    .job-footer { 
        flex-direction: column; 
        gap: 15px; 
        align-items: stretch;
    }
    .job-footer .btn {
        width: 100%;
    }

    /* Iklan Responsif */
    .sidebar-ad, .footer-ad, .modal-ad {
        height: auto;
        aspect-ratio: 16/9; /* Rasio aspek agar tetap proporsional */
        max-width: 100%;
    }
    
    /* Modal Hampir Full Screen */
    .modal-content {
        width: 95%;
        height: 90vh;
        margin: auto;
    }
}


/* Tambahkan ini di style.css */
.detail-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Kiri 2/3, Kanan 1/3 */
    gap: 30px;
    margin-top: 30px;
}

.detail-main {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .detail-wrapper { grid-template-columns: 1fr; }
}