*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { overflow-x: hidden; }

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --border: #e8e8ec;
  --text: #1a1a2e;
  --text-muted: #7a7a8c;
  --accent: #4f46e5;
  --accent-soft: #ede9fe;
  --jobfind: #0ea5e9;
  --jobfind-soft: #e0f2fe;
  --kariera: #10b981;
  --kariera-soft: #d1fae5;
  --xe: #f59e0b;
  --xe-soft: #fef3c7;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.1), 0 8px 32px rgba(0,0,0,.07);
  --transition: .18s ease;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Header ── */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  letter-spacing: -.3px;
  color: var(--text);
  text-decoration: none;
}

.logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.logo strong { color: var(--accent); }

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.btn-refresh {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
}
.btn-refresh:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.btn-refresh.spinning svg { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Main ── */
.main { padding: 32px 20px 64px; }

/* ── Filters ── */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

.filter-group { display: flex; align-items: center; gap: 10px; }
.filter-label { font-size: 13px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

.source-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip { display: flex; align-items: center; }
.chip input { display: none; }

.chip span {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  color: var(--text-muted);
  user-select: none;
}

.chip-all input:checked + span        { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-jobfind input:checked + span    { background: var(--jobfind); border-color: var(--jobfind); color: #fff; }
.chip-kariera input:checked + span    { background: var(--kariera); border-color: var(--kariera); color: #fff; }
.chip-xe input:checked + span         { background: var(--xe); border-color: var(--xe); color: #fff; }
.chip span:hover { border-color: var(--accent); color: var(--accent); }

.period-tabs { display: flex; gap: 6px; }
.period-tab {
  padding: 5px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.period-tab:hover { border-color: var(--accent); color: var(--accent); }
.period-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.filter-search { flex: 1; min-width: min(200px, 100%); }
.search-input {
  width: 100%;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  transition: var(--transition);
  outline: none;
}
.search-input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-input::placeholder { color: var(--text-muted); }

/* ── Stats bar ── */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 2px;
}

#count-label { font-size: 14px; color: var(--text-muted); }
#count-label strong { color: var(--text); font-weight: 600; }

.sort-select {
  padding: 6px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--accent); }

/* ── Job Grid ── */
.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* ── Job Card ── */
.job-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
  animation: fadeUp .25s ease both;
}

.job-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-source-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}

.card-new-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  animation: pulse-new 2s ease-in-out infinite;
}
.card-new-badge.hidden { display: none; }

@keyframes pulse-new {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}

.badge-jobfind { background: var(--jobfind-soft); color: var(--jobfind); }
.badge-kariera { background: var(--kariera-soft); color: var(--kariera); }
.badge-xe      { background: var(--xe-soft);      color: #b45309; }

.card-date { font-size: 12px; color: var(--text-muted); }

.card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -.2px;
}

.card-company { font-size: 13px; color: var(--text-muted); }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.tag {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border-top: 1px solid var(--border);
  transition: gap var(--transition);
}
.card-link:hover { gap: 8px; }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #fafafa 0%, #f0eeff 100%);
  border-bottom: 1px solid var(--border);
  padding: 64px 0 56px;
  overflow: hidden;
  max-width: 100vw;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.hero-text { flex: 1; max-width: 560px; }

.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 18px;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-stat { text-align: left; }
.hero-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.5px;
}
.hero-stat span { font-size: 12px; color: var(--text-muted); }

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
}

/* Visual decoration */
.hero-visual {
  position: relative;
  width: 200px;
  height: 200px;
  flex-shrink: 0;
}

.hero-blob {
  position: absolute;
  inset: 0;
  border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
  background: linear-gradient(135deg, var(--accent-soft), #dbeafe);
  animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
  0%, 100% { border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%; }
  50%       { border-radius: 40% 60% 60% 40% / 60% 30% 70% 40%; }
}

.hero-badge-stack {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hbadge {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .3px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  animation: floatBadge 3s ease-in-out infinite;
}
.hbadge:nth-child(2) { animation-delay: .4s; }
.hbadge:nth-child(3) { animation-delay: .8s; }

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

.hbadge-jobfind { background: var(--jobfind-soft); color: var(--jobfind); }
.hbadge-kariera { background: var(--kariera-soft); color: var(--kariera); }
.hbadge-xe      { background: var(--xe-soft); color: #b45309; }

/* ── Category Bar ── */
.category-bar-wrap {
  margin-bottom: 18px;
}

.category-bar-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
}

.beta-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
  letter-spacing: .3px;
  text-transform: lowercase;
}

.category-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Mobile custom category dropdown — hidden on desktop ── */
.cat-dropdown { display: none; position: relative; }

.cat-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}
.cat-dropdown-btn:focus,
.cat-dropdown-btn[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.cat-chevron {
  flex-shrink: 0;
  transition: transform .2s ease;
  color: var(--text-muted);
}
.cat-dropdown-btn[aria-expanded="true"] .cat-chevron {
  transform: rotate(180deg);
}

.cat-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: var(--shadow-hover);
  z-index: 50;
  flex-wrap: wrap;
  gap: 8px;
  animation: fadeUp .15s ease both;
}
.cat-dropdown-panel.open { display: flex; }

.cat-btn {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cat-btn:hover { border-color: var(--accent); color: var(--accent); }
.cat-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── Footer ── */
.footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-inner a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-inner a:hover { color: var(--accent); }
.footer-note { font-size: 12px; opacity: .7; }

/* ── Responsive: Tablet (≤ 768px) ── */
@media (max-width: 768px) {
  .hero-visual { display: none; }
  .hero { padding: 40px 0 32px; }
  .hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .hero-text {
    width: 100%;
    max-width: 100%;
  }
  .hero-sub { max-width: 100%; }
}

/* ── Responsive: Large phone (≤ 640px) ── */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .main { padding: 20px 0 48px; }

  .header-meta span { display: none; }

  /* Hero */
  .hero { padding: 32px 0 28px; }
  .hero-eyebrow { font-size: 11px; margin-bottom: 12px; }
  .hero-title {
    font-size: clamp(26px, 7vw, 38px);
    letter-spacing: -1px;
    margin-bottom: 12px;
  }
  .hero-sub { font-size: 14px; line-height: 1.65; margin-bottom: 24px; }
  .hero-stat strong { font-size: 18px; }
  .hero-stat span  { font-size: 11px; }
  .hero-stats { gap: 12px; }
  .hero-stat-divider { height: 26px; }

  /* Filters */
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }
  .filter-group {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }
  .filter-search { min-width: unset; width: 100%; }
  .source-chips  { flex-wrap: wrap; }
  .search-input  { width: 100%; }

  /* Categories — switch to custom dropdown on mobile */
  .category-bar    { display: none; }
  .cat-dropdown    { display: block; }

  /* Grid */
  .job-grid { grid-template-columns: 1fr; }

  /* Cards */
  .job-card    { padding: 16px; }
  .card-title  { font-size: 15px; }

  /* Stats bar */
  .stats-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ── Legal pages (privacy, terms) ────────────────────────────────────────── */
.legal-page {
  max-width: 760px;
  padding: 48px 24px 80px;
  line-height: 1.7;
  color: var(--text);
}
.legal-page h1 {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.legal-page h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 36px 0 8px;
  color: var(--text);
}
.legal-page p {
  font-size: 15px;
  margin: 10px 0;
  color: var(--text-muted);
}
.legal-page p strong { color: var(--text); }
.legal-page a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-updated {
  font-size: 13px !important;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 24px !important;
}
.legal-back {
  margin-top: 48px !important;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}
.footer-links a:hover { color: var(--accent); text-decoration: underline; }

/* ── Popular searches ── */
.popular-searches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.popular-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-right: 4px;
}

.popular-chip {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.popular-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.popular-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  padding-right: 28px;
  position: relative;
  box-shadow: 0 2px 6px rgba(79,70,229,.25);
}

.popular-chip.active::after {
  content: "×";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  opacity: .85;
}

.popular-chip.active:hover {
  background: #4338ca;
  border-color: #4338ca;
  color: #fff;
}

/* ── Search input wrapper with clear (×) button ── */
.search-input-wrap {
  position: relative;
  width: 100%;
}

.search-input-wrap .search-input {
  width: 100%;
  padding-right: 40px;
}

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: var(--transition);
}

.search-clear:hover {
  background: var(--accent);
  color: #fff;
}

/* ── Category label multi-select hint ── */
.cat-hint {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
  margin-left: 2px;
}

/* ── "X νέες αυτή την εβδομάδα" trust stat ── */
.new-count {
  color: #15803d;
  font-weight: 600;
  font-size: 13px;
  margin-left: 2px;
}

@media (max-width: 640px) {
  .popular-searches {
    padding: 8px 10px;
  }
  .popular-label {
    width: 100%;
    margin-bottom: 2px;
  }
  .popular-chip {
    font-size: 12px;
    padding: 4px 10px;
  }
}
