/* 
   PropertyJobs UK - Main Stylesheet
   Design: Minimalist SaaS / Programmatic Job Board
*/

:root {
  /* Color Palette */
  --slate-900: #0f172a;
  --slate-800: #1e293b; /* Typography */
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc; /* Background */

  --emerald-600: #059669;
  --emerald-500: #10b981; /* Success / Apply */
  --emerald-400: #34d399;
  --emerald-50: #ecfdf5;

  --white: #ffffff;

  /* Typography */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Spacing & Grid */
  --spacer: 16px;
  --container-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  /* Transitions */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* ══════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--slate-50);
  color: var(--slate-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.025em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

button, input, select {
  font-family: inherit;
  font-size: inherit;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 calc(var(--spacer) * 1.5);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ══════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  font-size: 0.9375rem;
}

.btn--sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn--primary {
  background-color: var(--emerald-500);
  color: var(--white);
}

.btn--primary:hover {
  background-color: var(--emerald-600);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background-color: transparent;
  color: var(--slate-600);
}

.btn--ghost:hover {
  background-color: var(--slate-100);
  color: var(--slate-900);
}

.btn--outline {
  background-color: var(--white);
  border-color: var(--slate-200);
  color: var(--slate-700);
}

.btn--outline:hover {
  background-color: var(--slate-50);
  border-color: var(--slate-300);
}

.btn--block {
  display: flex;
  width: 100%;
}

/* ══════════════════════════════════════════════
   LEVEL 0 — Utility Bar
   ══════════════════════════════════════════════ */
.utility-bar {
  background-color: var(--slate-900);
  color: var(--slate-400);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.utility-bar__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.utility-bar__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.utility-bar__link {
  color: var(--slate-400);
  font-weight: 500;
}

.utility-bar__link:hover {
  color: var(--white);
}

.utility-bar__link--active {
  color: var(--emerald-400);
}

.utility-bar__sep {
  opacity: 0.3;
}

/* ══════════════════════════════════════════════
   SITE HEADER
   ══════════════════════════════════════════════ */
.site-header {
  background-color: var(--white);
  border-bottom: 1px solid var(--slate-200);
  padding: 16px 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  color: var(--slate-900);
  font-weight: 500;
}

.site-header__logo strong {
  color: var(--emerald-500);
}

.site-logo-img {
  height: 56px;
  width: auto;
  object-fit: contain;
  display: block;
}

.site-header__nav {
  display: none;
}

@media (min-width: 768px) {
  .site-header__nav {
    display: flex;
    gap: 24px;
  }
}

.nav-link {
  color: var(--slate-600);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav-link:hover {
  color: var(--emerald-500);
}

.site-header__actions {
  display: flex;
  gap: 12px;
}

/* ══════════════════════════════════════════════
   HERO / SEARCH
   ══════════════════════════════════════════════ */
.hero {
  padding: 60px 0 40px;
  text-align: center;
  background-color: var(--white);
  border-bottom: 1px solid var(--slate-200);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: var(--emerald-50);
  color: var(--emerald-600);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.sync-dot {
  width: 6px;
  height: 6px;
  background-color: var(--emerald-500);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero__title {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 16px;
  color: var(--slate-900);
}

.hero__title--accent {
  color: var(--emerald-500);
}

.hero__sub {
  color: var(--slate-500);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 40px;
}

/* Search Form */
.search-form {
  background: var(--white);
  border: 1px solid var(--slate-200);
  padding: 8px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05);
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 800px;
  margin: 0 auto 24px;
}

@media (min-width: 768px) {
  .search-form {
    flex-direction: row;
    align-items: center;
    padding-right: 8px;
  }
}

.search-form__group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 16px;
}

.search-form__label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--slate-400);
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.search-form__input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.search-form__icon {
  color: var(--slate-400);
  flex-shrink: 0;
}

.search-form__input {
  border: none;
  background: none;
  padding: 4px 0;
  width: 100%;
  font-weight: 500;
  color: var(--slate-800);
  outline: none;
}

.search-form__divider {
  display: none;
  width: 1px;
  height: 32px;
  background-color: var(--slate-200);
}

@media (min-width: 768px) {
  .search-form__divider {
    display: block;
  }
}

.btn--search {
  padding: 14px 28px;
  border-radius: var(--radius-sm);
}

.sync-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--slate-400);
  margin-top: 16px;
}

/* ══════════════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════════════ */
.filter-bar {
  background-color: var(--white);
  border-bottom: 1px solid var(--slate-200);
  padding: 12px 0;
}

.filter-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.filter-bar__count {
  font-size: 0.875rem;
  color: var(--slate-500);
}

.filter-bar__count strong {
  color: var(--slate-900);
}

.filter-bar__right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.filter-bar__label {
  font-size: 0.875rem;
  color: var(--slate-400);
}

.filter-select {
  border: 1px solid var(--slate-200);
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.875rem;
  color: var(--slate-700);
  outline: none;
}

.filter-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-600);
  cursor: pointer;
}

/* ══════════════════════════════════════════════
   MAIN CONTENT LAYOUT
   ══════════════════════════════════════════════ */
.main-content {
  padding: 32px 0 80px;
}

.main-content__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .main-content__grid {
    grid-template-columns: 280px 1fr;
  }
}

/* ── SIDEBAR ── */
.sidebar-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 24px;
}

.sidebar-card__title {
  font-size: 1rem;
  margin-bottom: 24px;
  color: var(--slate-900);
}

.sidebar-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--slate-100);
}

.sidebar-section:last-child {
  border-bottom: none;
}

.sidebar-section__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
  margin-bottom: 12px;
}

.range-display {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.range-display__val {
  font-weight: 600;
  font-size: 0.875rem;
}

.range-display__sep {
  color: var(--slate-300);
}

.range-slider {
  width: 100%;
  accent-color: var(--emerald-500);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  margin-bottom: 10px;
  cursor: pointer;
  color: var(--slate-600);
}

.checkbox-label:hover {
  color: var(--slate-900);
}

.checkbox-label input {
  accent-color: var(--emerald-500);
}

.filter-count {
  color: var(--slate-400);
  font-size: 0.75rem;
  margin-left: auto;
}

/* ── JOB FEED ── */
.job-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.api-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--slate-100);
  color: var(--slate-500);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.api-tag code {
  color: var(--slate-700);
  background: var(--white);
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid var(--slate-200);
}

/* ━━━ JOB CARD ━━━ */
.job-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.job-card:hover {
  border-color: var(--emerald-200);
  box-shadow: 0 10px 20px -5px rgb(16 185 129 / 0.05);
  transform: translateY(-2px);
}

.job-card--featured {
  border-left: 4px solid var(--emerald-500);
}

.job-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.job-card__logo-wrap {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.job-card__logo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  background-color: var(--slate-100);
  color: var(--slate-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.job-card__logo-placeholder--b { background-color: #FEF3C7; color: #D97706; }
.job-card__logo-placeholder--c { background-color: #E0E7FF; color: #4F46E5; }
.job-card__logo-placeholder--d { background-color: #FCE7F3; color: #DB2777; }
.job-card__logo-placeholder--e { background-color: #ECFDF5; color: #059669; }

.job-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8125rem;
}

.job-card__company {
  font-weight: 600;
  color: var(--slate-900);
}

.job-card__dot {
  color: var(--slate-300);
}

.job-card__posted {
  color: var(--slate-400);
}

.job-card__badge--featured {
  background: var(--emerald-50);
  color: var(--emerald-600);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
}

.job-card__title {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.job-card__title-link:hover {
  color: var(--emerald-500);
}

.job-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--slate-50);
  color: var(--slate-600);
  border: 1px solid var(--slate-100);
}

.tag--salary {
  background: var(--emerald-50);
  color: var(--emerald-700);
  border-color: var(--emerald-100);
  font-weight: 600;
}

.job-card__excerpt {
  color: var(--slate-500);
  font-size: 0.9375rem;
  margin-bottom: 24px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  border-top: 1px solid var(--slate-50);
}

.job-card__footer-meta {
  font-size: 0.75rem;
  color: var(--slate-400);
}

.job-card__id {
  font-family: monospace;
  background: var(--slate-100);
  padding: 2px 4px;
  border-radius: 3px;
}

/* ━━━ AD SLOTS ━━━ */
.ad-slot {
  background: #f8fafc;
  border: 1px dashed var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.ad-slot__label {
  display: block;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--slate-400);
  font-weight: 700;
  margin-bottom: 8px;
}

.ad-slot__body {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--slate-400);
  font-weight: 600;
  font-size: 0.75rem;
  gap: 8px;
}

.ad-slot__body--728 {
  width: 100%;
  height: 90px;
}

.ad-slot__body--300 {
  width: 100%;
  height: 250px;
}

/* ━━━ PAGINATION ━━━ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination__page, .pagination__prev, .pagination__next {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
  background: var(--white);
}

.pagination__page--active {
  background: var(--emerald-500);
  color: var(--white);
  border-color: var(--emerald-500);
}

.pagination__page:hover:not(.pagination__page--active) {
  border-color: var(--emerald-500);
  color: var(--emerald-500);
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
.site-footer {
  background-color: var(--white);
  border-top: 1px solid var(--slate-200);
  padding: 80px 0 0;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-bottom: 60px;
}

@media (min-width: 768px) {
  .site-footer__inner {
    grid-template-columns: 1fr auto auto;
    justify-content: space-between;
  }
}

.site-footer__logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--slate-900);
  display: block;
  margin-bottom: 16px;
}

.site-footer-logo-img {
  height: 96px;
  width: auto;
  object-fit: contain;
  display: block;
}

.site-footer__tagline {
  color: var(--slate-500);
  font-size: 0.9375rem;
  max-width: 320px;
  margin-bottom: 20px;
}

.site-footer__tech {
  font-size: 0.75rem;
  color: var(--slate-400);
  font-family: monospace;
}

.site-footer__heading {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-900);
  margin-bottom: 20px;
}

.site-footer__links a {
  display: block;
  color: var(--slate-500);
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.site-footer__links a:hover {
  color: var(--emerald-500);
}

.site-footer__bottom {
  border-top: 1px solid var(--slate-100);
  padding: 24px 0;
  color: var(--slate-400);
  font-size: 0.75rem;
  text-align: center;
}
