/*
Theme Name: LokerMalang.id
Theme URI: https://lokermalang.id
Author: Andi Prasetya & Tim LokerMalang.id
Description: Tema WordPress ringan dan SEO-friendly untuk portal lowongan kerja area Kota Malang, Kabupaten Malang, dan Kota Batu.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: lokermalang-theme
*/

:root {
  --primary: #0f4c81;
  --primary-dark: #093256;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.site-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.site-title span {
  color: var(--accent);
}

.custom-logo-link img {
  max-height: 44px;
  width: auto;
  display: block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text);
}

.nav-link:hover {
  color: var(--primary);
}

.btn-post-job {
  background: var(--accent);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
  display: inline-block;
  transition: background 0.2s ease;
}

.btn-post-job:hover {
  background: var(--accent-dark);
}

/* Hero & Search */
.hero-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  padding: 36px 0;
}

.hero-box h1 {
  margin: 0 0 8px;
  font-size: 1.85rem;
  line-height: 1.25;
}

.hero-box p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.975rem;
}

.filter-bar {
  background: var(--surface);
  padding: 14px;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.925rem;
  color: var(--text);
  background: #ffffff;
}

.btn-search {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 0.925rem;
  cursor: pointer;
}

.btn-search:hover {
  background: var(--primary-dark);
}

/* Main Layout + Sticky Sidebar Ads */
.content-grid-wrap {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 20px;
  max-width: 1400px;
  margin: 28px auto 48px;
  padding: 0 16px;
  align-items: start;
}

.content-grid-wrap.no-sidebars {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1040px;
}

.sidebar-ad {
  position: sticky;
  top: 84px;
  min-height: 250px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}

.section-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--muted);
}

.job-list {
  display: grid;
  gap: 14px;
}

.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.job-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.job-card-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.company-logo {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: #ffffff;
  color: var(--primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
  object-fit: contain;
  padding: 4px;
}

.job-title {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 700;
}

.job-title a:hover {
  color: var(--primary);
}

.company-name {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.job-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
}

.badge-loc {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-salary {
  background: #dcfce7;
  color: #15803d;
}

.job-card-side {
  text-align: right;
  flex-shrink: 0;
}

.job-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.btn-detail {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--surface);
}

.btn-detail:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Slot Iklan Sisipan Setiap 5 Loker (Selebar Card Loker) */
.lm-inline-ad-card {
  width: 100%;
  background: #fffdf9;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.lm-inline-ad-custom {
  width: 100%;
  overflow: hidden;
}

.lm-inline-ad-custom img,
.lm-inline-ad-custom iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

.lm-inline-ad-badge {
  display: inline-block;
  background: #ffedd5;
  color: #c2410c;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  margin-bottom: 5px;
}

.lm-inline-ad-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2px;
}

.lm-inline-ad-desc {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Single Job & Page */
.single-wrap {
  margin: 28px auto 64px;
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}

.single-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.single-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.single-title {
  margin: 0 0 6px;
  font-size: 1.55rem;
}

.single-company {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.meta-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.meta-item span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
}

.meta-item strong {
  font-size: 0.95rem;
}

.job-content {
  font-size: 0.975rem;
  margin-bottom: 28px;
}

.apply-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.btn-apply-now {
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  padding: 11px 20px;
  border-radius: 8px;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.btn-apply-now:hover {
  background: var(--accent-dark);
}

/* Pagination */
.pagination-wrap {
  margin-top: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pagination-wrap .page-numbers {
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.875rem;
  font-weight: 600;
}

.pagination-wrap .page-numbers.current {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Anchor Ad */
.anchor-ad-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
  padding: 8px 16px;
  z-index: 45;
  text-align: center;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0 84px;
  margin-top: 40px;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-menu {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-menu a:hover {
  color: var(--primary);
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .content-grid-wrap {
    grid-template-columns: minmax(0, 1fr);
    max-width: 1040px;
  }
  .sidebar-ad {
    display: none;
  }
}

@media (max-width: 768px) {
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .job-card,
  .lm-inline-ad-card,
  .single-header,
  .apply-box {
    flex-direction: column;
    align-items: flex-start;
  }
  .job-card-side {
    text-align: left;
  }
}

/* ==========================================================================
   Revisi Layout 3-Kolom & Sticky Sidebar Banner 200x600 (Front Page & Single)
   ========================================================================== */
.page-layout-3col,
.lm-single-layout {
    max-width: 1380px;
    margin: 24px auto 48px;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 208px minmax(0, 1fr) 208px;
    gap: 22px;
    align-items: start;
}

.sidebar-ad,
.lm-single-ad-col {
    position: sticky;
    top: 84px;
    width: 208px;
    max-width: 208px;
}

.sidebar-ad img,
.lm-single-ad-col img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1160px) {
    .page-layout-3col,
    .lm-single-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .sidebar-ad,
    .lm-single-ad-col {
        display: none;
    }
}

/* ==========================================================================
   Fix Banner Kiri & Kanan 200x600 Tidak Menumpuk (.content-grid-wrap & .lm-single-layout)
   ========================================================================== */
.content-grid-wrap,
.lm-single-layout {
    max-width: 1400px !important;
    margin: 24px auto 96px !important;
    padding: 0 16px !important;
    display: grid !important;
    grid-template-columns: 208px minmax(0, 1fr) 208px !important;
    gap: 24px !important;
    align-items: start !important;
}

.content-grid-wrap.no-sidebars {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 960px !important;
}

.content-grid-wrap > *,
.lm-single-layout > * {
    min-width: 0 !important;
}

.content-grid-wrap .sidebar-ad,
.lm-single-ad-col {
    position: sticky !important;
    top: 84px !important;
    width: 208px !important;
    min-width: 208px !important;
    max-width: 208px !important;
}

@media (max-width: 1180px) {
    .content-grid-wrap,
    .lm-single-layout {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .content-grid-wrap .sidebar-ad,
    .lm-single-ad-col {
        display: none !important;
    }
}

/* ==========================================================================
   Force Clean Mobile Layout on Pasang Loker Page
   ========================================================================== */
@media (max-width: 860px) {
    .page-template-page-pasang-loker .lm-pasang-grid,
    .page-template-page-pasang-loker .lm-pkg-grid,
    .page-template-page-pasang-loker .lm-fields-grid,
    body[class*="pasang-loker"] [style*="display:grid"],
    body[class*="pasang-loker"] [style*="display: grid"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .page-template-page-pasang-loker .lm-preview-aside,
    body[class*="pasang-loker"] aside {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .page-template-page-pasang-loker .lm-pasang-wrap,
    .page-template-page-pasang-loker .single-card,
    body[class*="pasang-loker"] main,
    body[class*="pasang-loker"] .single-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .page-template-page-pasang-loker .lm-anchor-ad,
    .page-template-page-pasang-loker #lm-anchor-ad-bar,
    body[class*="pasang-loker"] .lm-anchor-ad,
    body[class*="pasang-loker"] #lm-anchor-ad-bar {
        display: none !important;
    }
}

/* ==========================================================================
   Rapikan Tombol "+ Pasang Loker" di Header (Anti 2 Baris di Mobile)
   ========================================================================== */
.btn-post-job {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    line-height: 1.2 !important;
}

@media (max-width: 640px) {
    .site-header .container,
    header .header-inner,
    header .nav-wrap {
        gap: 10px !important;
    }

    .site-logo img,
    header img {
        max-height: 30px !important;
        width: auto !important;
    }

    .btn-post-job {
        padding: 8px 11px !important;
        font-size: 0.78rem !important;
        border-radius: 8px !important;
    }
}

/* ==========================================================================
   Perbesar Logo Perusahaan Maksimal Tanpa Merusak Tatanan Card
   ========================================================================== */
.job-card {
  align-items: center;
  min-height: 112px;
}

.job-card-main {
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
}

.job-card .company-logo {
  width: 92px;
  height: 76px;
  min-width: 92px;
  border-radius: 12px;
  padding: 6px;
  font-size: 1.55rem;
  object-fit: contain;
}

@media (max-width: 768px) {
  .job-card {
    align-items: flex-start;
    min-height: 0;
  }

  .job-card-main {
    align-items: flex-start;
    gap: 14px;
    width: 100%;
  }

  .job-card .company-logo {
    width: 74px;
    height: 62px;
    min-width: 74px;
    font-size: 1.3rem;
    padding: 5px;
  }
}