/* ============================
   Header
============================ */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  text-decoration: none;
  font-size: 18px;
  color: var(--text-main);
}

.main-nav {
  display: flex;
  gap: 22px;
}

.main-nav a {
  text-decoration: none;
  font-size: 14.5px;
  color: var(--text-muted);
  position: relative;
}

.main-nav a.active,
.main-nav a:hover {
  color: var(--text-main);
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--accent);
}



/* ============================
   Annons-layout (root)
============================ */

:root {
  --bg-app: #f6f7f9;
  --bg-panel: #ffffff;
  --bg-muted: #f0f2f5;

  --text-main: #1f2937;
  --text-muted: #6b7280;

  --accent: #2f80ed;
  --accent-soft: rgba(47,128,237,0.12);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --shadow-soft: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-hover: 0 14px 34px rgba(0,0,0,0.14);
}

/* ============================
   Base
============================ */

body {
  background: var(--bg-app);
  color: var(--text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================
   Layout
============================ */

.ads-layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 32px 24px 64px;

  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

.ads-sidebar {
  position: sticky;
  top: 24px;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ads-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ads-popular-section {
  padding: 16px 0;
}
.ads-popular-title {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.ads-popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.ads-popular-card {
  display: block;
  padding: 12px;
  background: var(--bg-panel);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s;
}
.ads-popular-card:hover {
  border-color: var(--accent);
}

.ads-nya-uppdrag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #fff3e0;
  border-radius: 999px;
  color: #e65100;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  align-self: flex-start;
}
.ads-nya-uppdrag-pill:hover {
  background: #ffe0b2;
  transform: scale(1.02);
}
.ads-nya-uppdrag-value {
  color: #e65100;
}

.ads-popular-card__title {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.ads-popular-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ads-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.ads-toolbar h2 {
  font-size: 22px;
  line-height: 1.25;
}

.ads-toolbar__eyebrow {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ads-toolbar__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ads-toolbar__pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* ============================
   Grid
============================ */

.ads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ============================
   Sidebar filter
============================ */

.filter-box {
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

.filter-box h4 {
  font-size: 16px;
  margin-bottom: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-box label {
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-box input[type="range"] {
  width: 100%;
}

/* ============================
   Responsive
============================ */

@media (max-width: 1024px) {
  .ads-layout {
    grid-template-columns: 1fr;
  }

  .ads-sidebar {
    position: static;
  }

  .ads-toolbar {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .ads-layout {
    padding: 20px 16px 48px;
  }
}

/* ============================
   Filter UX (small helpers)
============================ */
.filter-hint {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.filter-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.btn-tertiary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-decoration: none;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: var(--text-main);
}

.btn-tertiary:hover {
  background: var(--accent-soft);
}

.filter-value {
  margin-left: 8px;
  font-weight: 600;
  color: var(--text-main);
}

.filter-range-meta {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}


/* ============================
   AJAX loading state
============================ */
.ads-grid.is-loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity .15s ease;
}

