/* ==========================================================================
   Govt Jobs BD - listing pages design (v1.8.0)
   Homepage ([govt_jobs_bd] / template) + institution archive.
   Replaces the old per-template inline <style> blocks. Same visual system as
   the single job page: grey ground, white boxed cards, emerald accent,
   Google Sans, high-contrast text, compact spacing. Mobile-first fixes at the end.
   ========================================================================== */
body.sfdf-page { background: #f0f0f0; margin: 0; padding: 0; color: var(--ink); }
.sfdf-page, .sfdf-page * { font-family: var(--body) !important; }
.sfdf-page a { color: inherit; text-decoration: none; }
.sfdf-page img { max-width: 100%; height: auto; display: block; }
.sfdf-page h1, .sfdf-page h2, .sfdf-page h3 { margin: 0; font-family: var(--head); letter-spacing: 0; overflow-wrap: break-word; }
.sfdf-page :focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

/* ---- homepage hero ---- */
.gj-hero { max-width: 1100px; margin: 0 auto; padding: 1.4rem 1rem .4rem; text-align: center; }
.gj-hero h1 { font-weight: 700; font-size: clamp(1.5rem, 3.6vw, 2.2rem); line-height: 1.35; color: var(--ink); margin-bottom: .5rem; }
.gj-hero h1 .accent { color: var(--green); }
.gj-hero-sub { font-size: clamp(1rem, 1.8vw, 1.1rem); color: var(--ink-soft); line-height: 1.6; max-width: 620px; margin: 0 auto; }

/* ---- institution archive: breadcrumb + heading card ---- */
.gj-wrap-top { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 0; }
.gj-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.gj-breadcrumb li { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.gj-breadcrumb a { display: inline-flex; align-items: center; gap: 5px; font-size: .88rem; font-weight: 600; color: var(--ink-soft); padding: 3px 4px; border-radius: 6px; }
.gj-breadcrumb a:hover { color: var(--green); background: var(--green-light); }
.gj-breadcrumb .bc-home { display: inline-flex; color: var(--green); }
.gj-breadcrumb .bc-current { font-size: .88rem; font-weight: 600; color: var(--ink); padding: 3px 4px; max-width: 46ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gj-breadcrumb .bc-sep { display: inline-flex; color: #94a3b8; }
.gj-inst-hero { max-width: 1100px; margin: 0 auto; padding: .6rem 1rem .2rem; }
.gj-inst-card { display: flex; align-items: center; gap: .9rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sh); padding: .9rem 1.1rem; }
.gj-inst-icon { width: 50px; height: 50px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: rgba(13,122,95,.09); color: var(--green); }
.gj-inst-icon svg { width: 26px; height: 26px; }
.gj-inst-meta { min-width: 0; }
.gj-inst-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--green); font-weight: 700; margin-bottom: 2px; }
.gj-inst-meta h1 { font-weight: 700; font-size: clamp(1.25rem, 2.8vw, 1.6rem); color: var(--ink); line-height: 1.35; }
.gj-inst-count { margin-top: 2px; font-size: .95rem; color: var(--ink-soft); }
.gj-inst-count strong { color: var(--green); font-weight: 700; }

/* ---- search / filter card ---- */
.gj-controls { max-width: 1100px; margin: 0 auto; padding: .7rem 1rem .1rem; }
.gj-search-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sh); padding: 1rem; }
.gj-search-form { display: block; width: 100%; }
.gj-row { margin-bottom: .7rem; width: 100%; }
.gj-row:last-child { margin-bottom: 0; }
.gj-row-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.gj-row-two { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.gj-field { display: flex; flex-direction: column; width: 100%; min-width: 0; }
.gj-label { font-size: .9rem; font-weight: 600; color: var(--ink-soft); margin-bottom: .3rem; display: block; }

.gj-input-large, .gj-select {
	width: 100%; height: 46px; padding: .55rem .85rem; border: 1px solid #cbd5e1; border-radius: 10px;
	font-size: 1rem; line-height: 1.4; background: #fff; color: var(--ink);
}
.gj-input-large::placeholder { color: var(--ink-faint); opacity: .9; }
.gj-input-large:focus, .gj-select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(13,122,95,.15); }
.gj-select {
	cursor: pointer; -webkit-appearance: none; -moz-appearance: none; appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23020617' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; padding-right: 38px;
}

.gj-button-row { display: flex; gap: .7rem; justify-content: center; align-items: center; margin-top: .3rem; width: 100%; }
.gj-search-btn, .gj-reset-btn {
	height: 46px; padding: .5rem 1.5rem; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer;
	line-height: 1.4; text-align: center; flex: 1; font-family: var(--head);
}
.gj-search-btn { max-width: 220px; box-shadow: 0 1px 2px rgba(15,23,42,.1), inset 0 -1px 0 rgba(0,0,0,.12); }
.gj-reset-btn { max-width: 160px; }

/* ---- results count ---- */
.gj-results-header { max-width: 1100px; margin: 0 auto; padding: 0 1rem; }
.gj-results-count { background: #fff; padding: .65rem 1rem; border-radius: 10px; box-shadow: var(--sh); border: 1px solid var(--line); font-size: 1rem; font-weight: 500; color: var(--ink-soft); margin: .7rem 0 0; }
.gj-results-count strong { color: var(--green); font-weight: 700; }

/* ---- grid ---- */
.gj-wrap { max-width: 1100px; margin: 0 auto; padding: .8rem 1rem 2.5rem; }
.gj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; align-items: stretch; }
.similar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }

/* ---- skeleton ---- */
.gj-skel-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.gj-skel-top { height: 46px; background: #f1f5f9; position: relative; overflow: hidden; }
.gj-skel-body { padding: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.gj-skel-line { background: #f1f5f9; border-radius: .5rem; position: relative; overflow: hidden; }
.gj-shimmer { position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(to right, transparent, rgba(0,0,0,.05), transparent); animation: shimmer 1.4s ease infinite; }

/* ---- empty + load more ---- */
.gj-empty { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }
.gj-empty h3 { font-size: 1.15rem; font-weight: 700; color: var(--ink); margin: .5rem 0 .25rem; }
.gj-empty p { font-size: 1rem; margin: 0 0 1rem; }
.gj-empty-btn { font-size: .95rem; font-weight: 600; padding: .55rem 1.25rem; border-radius: 10px; cursor: pointer; min-height: 44px; font-family: var(--head); }
.gj-loadmore-wrap { text-align: center; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.gj-loadmore { padding: .55rem 1.6rem; border-radius: 10px; font-size: 1rem; font-weight: 600; cursor: pointer; font-family: var(--head); line-height: 1.4; min-height: 46px; }
.gj-loadmore:disabled { opacity: .6; cursor: default; }

/* ---- back to top ---- */
#gj-back-top {
	position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 50;
	width: 2.75rem; height: 2.75rem; border: none; border-radius: 50%; cursor: pointer;
	display: flex; align-items: center; justify-content: center; box-shadow: var(--shl);
	opacity: 0; transform: translateY(1rem); transition: opacity .3s, transform .3s; pointer-events: none;
}
#gj-back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 880px) {
	.gj-grid, .similar-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
	.gj-row-three, .gj-row-two { grid-template-columns: 1fr; }
	.gj-button-row { flex-direction: column; gap: .55rem; }
	.gj-search-btn, .gj-reset-btn { width: 100%; max-width: 100%; flex: none; }
	.gj-inst-card { padding: .8rem; }
}
@media (max-width: 560px) {
	.gj-grid, .similar-grid { grid-template-columns: 1fr; }
	.gj-hero { padding: 1rem .8rem .2rem; }
	.gj-controls, .gj-results-header, .gj-wrap, .gj-wrap-top, .gj-inst-hero { padding-left: .8rem; padding-right: .8rem; }
	.gj-search-card { padding: .8rem; }
	.gj-inst-icon { width: 42px; height: 42px; border-radius: 11px; }
	.gj-inst-icon svg { width: 22px; height: 22px; }
	.gj-breadcrumb .bc-current { max-width: 24ch; }
	.gj-card-title { font-size: 1.08rem; }
}
@media (max-width: 380px) {
	.gj-card-actions { flex-direction: column; }
	.gj-cbtn-outline, .gj-cbtn-primary { flex: none; width: 100%; }
}
@media print { #gj-back-top, .gj-search-card, .gj-loadmore-wrap { display: none; } }
