/* ==========================================================================
   Οδηγοί Κατάρτισης Σ.Α.Ε.Κ. — Custom styles
   ========================================================================== */

:root {
  --bs-primary: #1A3A4A;
  --bs-primary-rgb: 26, 58, 74;

  --accent:      #E85D3A;
  --ink:         #111111;
  --bg-soft:     #F0EBE1;
  --bg-cream:    #F5F4F0;
  --border-soft: #E1DDD3;
  --text-muted:  #6B6B6B;
  --success:     #198754;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--bg-cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bs-primary); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

/* ----- Header ----- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border-soft);
}
.site-header h1 { color: var(--bs-primary); font-weight: 700; letter-spacing: -0.01em; }
.site-header .breadcrumb { font-size: 12px; }
.site-header .breadcrumb a { color: var(--text-muted); }
.site-header .breadcrumb-item.active { color: var(--ink); }
.site-header .breadcrumb-item + .breadcrumb-item::before { content: "›"; }

/* ----- Stat cards ----- */
.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px 16px;
  height: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover { transform: translateY(-1px); box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--bs-primary); margin-top: 2px; line-height: 1.1; }

/* ----- Filters panel ----- */
.filters-panel {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 18px;
}
.search-wrap { position: relative; }
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
  pointer-events: none;
}
.btn-clear-search {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px 8px;
}
.btn-clear-search:hover { color: var(--accent); }

#q {
  border-color: var(--border-soft);
  background: var(--bg-soft);
  padding-left: 44px !important;
}
#q:focus { background: #ffffff; border-color: var(--bs-primary); box-shadow: 0 0 0 .2rem rgba(26,58,74,.15); }

.form-select:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 .2rem rgba(26,58,74,.15); }

/* ----- Active filter chips ----- */
.active-filters .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-soft);
  color: var(--bs-primary);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
}
.active-filters .chip button {
  background: transparent; border: 0; color: inherit; padding: 0; margin-left: 2px; line-height: 1;
}
.active-filters .chip button:hover { color: var(--accent); }

/* ----- Result cards ----- */
.results-list { display: flex; flex-direction: column; gap: 10px; }

.result-card {
  background: #ffffff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.result-card:hover { border-color: var(--bs-primary); box-shadow: 0 2px 12px rgba(26,58,74,.06); }

.result-card .info { flex: 1 1 auto; min-width: 0; }
.result-card .title-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px;
}
.result-card .title {
  font-weight: 600; font-size: 15px; color: var(--ink); line-height: 1.4;
}
.result-card .meta { font-size: 12px; color: var(--text-muted); }
.result-card .meta i { font-size: 13px; vertical-align: -1px; margin-right: 2px; }
.result-card .meta .sep { margin: 0 6px; color: #c5c5c5; }

.result-card .actions { display: flex; gap: 6px; flex-shrink: 0; }
.result-card .actions .btn { padding: 4px 10px; font-size: 13px; }

.badge-updated {
  background: #E8F5E9;
  color: #1B5E20;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.01em;
}
.badge-pilot {
  background: #FFF3E0;
  color: #BF360C;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

/* ----- Skeleton (loading) ----- */
.result-card.skeleton { pointer-events: none; }
.sk-line { background: linear-gradient(90deg, #f0f0f0 0%, #e6e6e6 50%, #f0f0f0 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: 4px; height: 12px; }
.sk-title { width: 60%; margin-bottom: 8px; height: 16px; }
.sk-meta  { width: 40%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ----- Empty state ----- */
.empty-state {
  background: #ffffff;
  border: 1px dashed var(--border-soft);
  border-radius: 10px;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state .bi { font-size: 48px; color: #c5c5c5; display: block; margin-bottom: 12px; }
.empty-state .title { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }

/* ----- Pagination ----- */
.pagination .page-link { color: var(--bs-primary); border-color: var(--border-soft); }
.pagination .page-item.active .page-link { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.pagination .page-link:hover { background: var(--bg-soft); }

/* ----- Modal ----- */
.modal-content { border-radius: 12px; border: 1px solid var(--border-soft); }
.modal-header { border-bottom-color: var(--border-soft); }
.modal-footer { border-top-color: var(--border-soft); }
.modal-title { color: var(--bs-primary); }

.detail-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
}
.detail-row:last-child { border-bottom: 0; }
.detail-row .label { color: var(--text-muted); font-weight: 500; }
.detail-row .value { color: var(--ink); }

/* ----- Buttons ----- */
.btn-primary {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: #0e2935;
  border-color: #0e2935;
}
.btn-outline-primary { color: var(--bs-primary); border-color: var(--bs-primary); }
.btn-outline-primary:hover { background: var(--bs-primary); border-color: var(--bs-primary); }

/* ----- Footer ----- */
.site-footer { background: #ffffff; border-top: 1px solid var(--border-soft); }

/* ----- Mobile tweaks ----- */
@media (max-width: 576px) {
  .stat-value { font-size: 22px; }
  .result-card { flex-direction: column; align-items: stretch; }
  .result-card .actions { width: 100%; }
  .result-card .actions .btn { flex: 1; }
  .detail-row { grid-template-columns: 1fr; gap: 2px; }
  .detail-row .label { font-size: 12px; }
  .site-header h1 { font-size: 1.3rem; }
}

/* ----- Accessibility ----- */
.result-card:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  clip: rect(0, 0, 0, 0); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px;
}
