/* =========================================================
   JOBPIN — Frontend styles
   Brand colors are injected via inline CSS variables.
   When `.jp-match-theme` is set, fonts inherit from the page.
   ========================================================= */

.jp-wrap {
  --jp-primary: #0a2540;
  --jp-accent:  #2563eb;
  --jp-map-h:   640px;
  --jp-white:   #ffffff;
  --jp-line:    #e2e8f0;
  --jp-muted:   #64748b;
  --jp-ink:     #0f172a;
  --jp-heading: #ffffff;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--jp-ink);
  -webkit-font-smoothing: antialiased;
}
/* Theme-match mode: inherit fonts from the host theme */
.jp-wrap.jp-match-theme,
.jp-wrap.jp-match-theme .jp-title,
.jp-wrap.jp-match-theme .jp-logo,
.jp-wrap.jp-match-theme .jp-modal-title,
.jp-wrap.jp-match-theme .jp-qa,
.jp-wrap.jp-match-theme .jp-cta,
.jp-wrap.jp-match-theme .jp-lb-cta,
.jp-wrap.jp-match-theme button,
.jp-wrap.jp-match-theme input,
.jp-wrap.jp-match-theme select,
.jp-wrap.jp-match-theme textarea {
  font-family: inherit;
}
.jp-wrap *, .jp-wrap *::before, .jp-wrap *::after { box-sizing: border-box; }

/* Header */
.jp-header {
  background: linear-gradient(135deg, var(--jp-primary) 0%, color-mix(in srgb, var(--jp-primary) 80%, white) 100%);
  color: #fff;
  padding: 36px 48px 28px;
}
.jp-eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; opacity: .85; margin: 0 0 14px; }
.jp-title   { font-family: 'Fraunces', Georgia, serif; font-size: clamp(32px, 5vw, 52px); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin: 0; color: var(--jp-heading); }
.jp-wrap.jp-match-theme .jp-title { font-family: inherit; }

/* Layout */
.jp-gallery {
  display: grid;
  grid-template-columns: 1fr 360px;
  background: var(--jp-primary);
  padding: 0 48px 48px;
}
@media (max-width: 980px) { .jp-gallery { grid-template-columns: 1fr; padding: 0 16px 24px; } }

.jp-map {
  height: var(--jp-map-h);
  background: #dbeafe;
  border: 1px solid rgba(255,255,255,.08);
  border-right: none;
  z-index: 1;
}
@media (max-width: 980px) { .jp-map { height: 420px; border-right: 1px solid rgba(255,255,255,.08); } }

/* Sidebar */
.jp-sidebar {
  background: var(--jp-primary);
  color: #fff;
  display: flex;
  flex-direction: column;
  height: var(--jp-map-h);
}
@media (max-width: 980px) { .jp-sidebar { height: auto; } }

.jp-sidebar-top {
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
}
.jp-refresh { color: #93c5fd; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; user-select: none; }
.jp-refresh:hover { color: #fff; }
.jp-optout { opacity: .7; font-size: 13px; cursor: pointer; }

.jp-brand-block { padding: 22px 20px 18px; text-align: center; }
.jp-logo        { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 700; letter-spacing: .08em; line-height: 1; }
.jp-wrap.jp-match-theme .jp-logo { font-family: inherit; }
.jp-logo-sub    { font-size: 10px; letter-spacing: .32em; opacity: .7; margin-top: 6px; }

.jp-quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 12px 16px; }
.jp-qa {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: all .15s ease;
}
.jp-qa:hover { background: rgba(255,255,255,.14); transform: translateY(-1px); }
.jp-qa-icon  { width: 28px; height: 28px; background: var(--jp-accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; }
.jp-qa-icon svg { width: 14px; height: 14px; }
.jp-qa-label { display: block; font-size: 11px; line-height: 1.2; opacity: .95; }
.jp-qa-count { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }

.jp-cta {
  margin: 0 16px 14px;
  padding: 12px;
  background: var(--jp-accent);
  color: #fff;
  text-align: center;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: block;
  transition: filter .15s;
}
.jp-cta:hover { filter: brightness(1.1); color: #fff; }

.jp-total-bar {
  padding: 12px 20px;
  background: rgba(255,255,255,.05);
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
}
.jp-total-bar strong { color: #93c5fd; margin-left: 4px; }

.jp-project-list { flex: 1; overflow-y: auto; padding: 4px 0; }
.jp-project-list::-webkit-scrollbar { width: 6px; }
.jp-project-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 4px; }

.jp-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px dashed rgba(255,255,255,.08);
  font-size: 13px;
  cursor: pointer;
  transition: background .12s;
}
.jp-row:hover  { background: rgba(255,255,255,.06); }
.jp-row.active { background: rgba(37, 99, 235, .25); }
.jp-row-addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jp-icon-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  transition: background .12s;
}
.jp-icon-btn:hover { background: var(--jp-accent); }
.jp-icon-btn svg { width: 13px; height: 13px; fill: none; stroke: white; stroke-width: 2; }

.jp-empty { padding: 40px 20px; text-align: center; opacity: .7; font-size: 13px; }

/* Custom pin */
.jp-pin {
  width: 28px; height: 36px;
  background: var(--jp-primary);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  border: 2px solid white;
}
.jp-pin::after {
  content: ''; position: absolute; top: 7px; left: 7px;
  width: 10px; height: 10px; background: white; border-radius: 50%;
}

/* Cluster overrides — match the Zintex style */
.jp-wrap .marker-cluster-small,
.jp-wrap .marker-cluster-medium,
.jp-wrap .marker-cluster-large { background: rgba(15, 23, 42, .15) !important; }
.jp-wrap .marker-cluster-small div,
.jp-wrap .marker-cluster-medium div,
.jp-wrap .marker-cluster-large div {
  background: var(--jp-primary) !important;
  color: white !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  font-weight: 700 !important;
  border: 2px solid white !important;
  box-shadow: 0 2px 6px rgba(0,0,0,.25) !important;
}
.jp-wrap.jp-match-theme .marker-cluster-small div,
.jp-wrap.jp-match-theme .marker-cluster-medium div,
.jp-wrap.jp-match-theme .marker-cluster-large div { font-family: inherit !important; }

/* =========================================================
   Lightbox (project photos)
   ========================================================= */
.jp-lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 37, 64, .92);
  z-index: 999999;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.jp-lightbox.open { display: flex; }
.jp-lightbox-inner {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  width: min(960px, 100%);
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.5);
  animation: jp-pop .25s cubic-bezier(.2,.8,.2,1);
}
@keyframes jp-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

.jp-lb-stage {
  background: #0f172a; flex: 1;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  min-height: 360px;
}
.jp-lb-img { max-width: 100%; max-height: 64vh; display: block; object-fit: contain; }
.jp-lb-close {
  position: absolute; top: 14px; right: 14px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #ef4444; color: white;
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.jp-lb-close:hover { background: #dc2626; }
.jp-lb-nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(255,255,255,.92);
  border: none; border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--jp-primary);
}
.jp-lb-prev { left: 16px; }
.jp-lb-next { right: 16px; }
.jp-lb-counter {
  position: absolute; bottom: 16px; right: 20px;
  background: rgba(0,0,0,.6); color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.jp-lb-info { padding: 18px 24px 14px; border-top: 1px solid var(--jp-line); }
.jp-lb-address { font-weight: 700; font-size: 18px; color: var(--jp-ink); }
.jp-lb-service { font-size: 13px; color: var(--jp-muted); margin-top: 4px; }
.jp-lb-desc    { font-size: 14px; color: var(--jp-ink); margin-top: 8px; line-height: 1.5; }

.jp-lb-cta {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--jp-accent);
  color: white;
  border: none;
  font-weight: 600;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}
.jp-lb-cta:hover { filter: brightness(1.1); color: white; }

/* =========================================================
   Generic modal (Services / Media / Reviews / Search)
   ========================================================= */
.jp-modal {
  position: fixed; inset: 0;
  background: rgba(10, 37, 64, .9);
  z-index: 999998;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  backdrop-filter: blur(4px);
}
.jp-modal.open { display: flex; }
.jp-modal-inner {
  background: white;
  border-radius: 16px;
  width: min(820px, 100%);
  max-height: 86vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  animation: jp-pop .25s cubic-bezier(.2,.8,.2,1);
}
.jp-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f1f5f9; color: var(--jp-ink);
  border: none;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.jp-modal-title {
  margin: 0; padding: 22px 28px 18px;
  font-family: 'Fraunces', serif;
  font-size: 24px;
  border-bottom: 1px solid var(--jp-line);
}
.jp-wrap.jp-match-theme .jp-modal-title { font-family: inherit; }
.jp-modal-body { padding: 22px 28px; overflow-y: auto; }

/* Services list inside modal */
.jp-svc { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--jp-line); }
.jp-svc:last-child { border-bottom: none; }
.jp-svc-icon { width: 56px; height: 56px; border-radius: 12px; background: var(--jp-primary); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.jp-svc-icon img { width: 100%; height: 100%; object-fit: cover; }
.jp-svc-icon svg { width: 28px; height: 28px; fill: white; }
.jp-svc-name { font-weight: 700; font-size: 16px; color: var(--jp-ink); }
.jp-svc-desc { font-size: 14px; color: var(--jp-muted); margin-top: 4px; line-height: 1.5; }

/* Media grid inside modal */
.jp-media-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 600px) { .jp-media-grid { grid-template-columns: repeat(2, 1fr); } }
.jp-media-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform .15s; }
.jp-media-grid img:hover { transform: scale(1.03); }

/* Reviews inside modal */
.jp-review { padding: 16px 0; border-bottom: 1px solid var(--jp-line); }
.jp-review:last-child { border-bottom: none; }
.jp-review-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.jp-review-name { font-weight: 700; color: var(--jp-ink); }
.jp-review-loc  { font-size: 12px; color: var(--jp-muted); }
.jp-review-stars { color: #f59e0b; font-size: 16px; letter-spacing: 1px; margin: 4px 0; }
.jp-review-text { font-size: 14px; color: var(--jp-ink); line-height: 1.6; }
.jp-review-date { font-size: 12px; color: var(--jp-muted); margin-top: 6px; }

/* Search inside modal */
.jp-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--jp-line);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
}
.jp-search-input:focus { border-color: var(--jp-accent); }
.jp-search-results { margin-top: 16px; }
.jp-search-result {
  padding: 12px 14px;
  border-bottom: 1px solid var(--jp-line);
  cursor: pointer;
  font-size: 14px;
  color: var(--jp-ink);
}
.jp-search-result:hover { background: #f8fafc; }
