/* ============================================================
   HotNews.co.il — Profiles Archive (/profiles)
   רשת פרופילים עם חיפוש ו-pagination
   ============================================================ */

.profiles-archive-wrap {
  padding: 24px 0 48px;
}

/* ───────────────────────────────────────────────────────────
   Hero - כותרת ראשית + breadcrumb
   ─────────────────────────────────────────────────────────── */
.profiles-archive-hero {
  margin-bottom: 24px;
}
.profiles-archive-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 10px;
}
.profiles-archive-hero .breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
}
.profiles-archive-hero .breadcrumb a:hover {
  color: var(--brand-primary);
}
.profiles-archive-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.5px;
}
.profiles-archive-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--text-soft);
}

/* ───────────────────────────────────────────────────────────
   Search Box
   ─────────────────────────────────────────────────────────── */
.profiles-search-wrap {
  margin-bottom: 24px;
  max-width: 600px;
}
.profiles-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 0 16px;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-soft);
}
.profiles-search-box:focus-within {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(196, 18, 18, 0.08);
}
.profiles-search-icon {
  font-size: 18px;
  color: var(--text-soft);
  margin-left: 4px;
}
.profiles-search-input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 14px 8px;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  color: var(--text-main);
}
.profiles-search-input::placeholder {
  color: #94a3b8;
}
.profiles-search-clear {
  background: var(--bg-muted);
  border: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  font-size: 14px;
  transition: all 0.12s ease;
}
.profiles-search-clear:hover {
  background: var(--brand-primary);
  color: #fff;
}
.profiles-search-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-soft);
  padding-right: 4px;
}

/* ───────────────────────────────────────────────────────────
   Profiles Grid - 4 בשורה בדסקטופ
   ─────────────────────────────────────────────────────────── */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* ───────────────────────────────────────────────────────────
   Profile Tile - כרטיסיית פרופיל
   ─────────────────────────────────────────────────────────── */
.profile-tile {
  display: block;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.18s ease;
  text-align: center;
}
.profile-tile:hover {
  border-color: var(--brand-primary);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.profile-tile-thumb-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.profile-tile-thumb {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: #f1f5f9;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.10);
  transition: transform 0.18s ease;
  overflow: hidden;
}
.profile-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.profile-tile:hover .profile-tile-thumb {
  transform: scale(1.04);
}
.profile-tile-thumb-placeholder {
  background: linear-gradient(135deg, #566174, #111827);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.profile-tile-thumb-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 35%);
}
.profile-tile-mark {
  font-size: 38px;
  font-weight: 900;
  color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  letter-spacing: -1px;
  user-select: none;
  position: relative;
  z-index: 1;
}

/* תג מספר כתבות */
.profile-tile-count {
  position: absolute;
  top: -4px;
  left: calc(50% - 70px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(196, 18, 18, 0.30);
}

.profile-tile-body {
  text-align: center;
}
.profile-tile-name {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}
.profile-tile-zl {
  font-size: 11px;
  color: var(--text-soft);
  font-weight: 500;
  margin-right: 4px;
}
.profile-tile-role {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ───────────────────────────────────────────────────────────
   No Results - הודעת אין תוצאות
   ─────────────────────────────────────────────────────────── */
.profiles-no-results {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}
.profiles-no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}
.profiles-no-results h3 {
  margin: 0 0 8px;
  font-size: 20px;
  color: var(--text-main);
}
.profiles-no-results p {
  margin: 0;
  color: var(--text-soft);
}

/* ───────────────────────────────────────────────────────────
   Empty state - אין פרופילים בכלל
   ─────────────────────────────────────────────────────────── */
.profiles-empty {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  color: var(--text-soft);
}

/* ───────────────────────────────────────────────────────────
   Pagination - ניווט בעמודים (זהה לעמוד פרופיל בודד)
   ─────────────────────────────────────────────────────────── */
.profiles-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.profile-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.profile-page-link:hover:not(.profile-page-current):not(.profile-page-disabled) {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-soft);
}
.profile-page-current {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  cursor: default;
}
.profile-page-disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  background: var(--bg-muted);
}
.profile-page-ellipsis {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: var(--text-soft);
  font-weight: 700;
}
.profile-page-prev,
.profile-page-next {
  font-weight: 700;
}

/* ───────────────────────────────────────────────────────────
   Mobile Responsive
   ─────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .profiles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .profiles-archive-wrap {
    padding: 12px 0 32px;
  }
  .profiles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .profile-tile {
    padding: 14px 10px;
  }
  .profile-tile-thumb {
    width: 90px;
    height: 90px;
  }
  .profile-tile-name {
    font-size: 15px;
  }
  .profile-tile-role {
    font-size: 12px;
  }
  .profile-tile-count {
    left: calc(50% - 56px);
    min-width: 24px;
    height: 24px;
    font-size: 11px;
  }

  /* Pagination במובייל */
  .profile-page-link {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }
  .profile-page-prev,
  .profile-page-next {
    flex-basis: 100%;
    margin: 4px 0;
  }
}

@media (max-width: 480px) {
  .profiles-grid {
    grid-template-columns: 1fr;
  }
  .profile-tile {
    display: grid;
    grid-template-columns: 90px 1fr;
    text-align: right;
    gap: 14px;
    align-items: center;
  }
  .profile-tile-thumb-wrap {
    margin-bottom: 0;
    justify-content: flex-start;
  }
  .profile-tile-body {
    text-align: right;
  }
  .profile-tile-count {
    left: -4px;
  }
}

/* ─── Group Tabs ─── */
.profiles-group-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding: 4px 0;
}
.profiles-group-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 2px solid var(--border-color);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  background: var(--bg-surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.profiles-group-tab:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: var(--brand-primary-soft);
  box-shadow: 0 2px 8px rgba(196,18,18,0.12);
  transform: translateY(-1px);
}
.profiles-group-tab.active {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(196,18,18,0.25);
}
.profiles-group-count {
  background: rgba(0,0,0,0.12);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  min-width: 22px;
  text-align: center;
}
.profiles-group-tab.active .profiles-group-count {
  background: rgba(255,255,255,0.25);
}

/* ─── author cards extras ─── */
.profile-card-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--brand-primary), #2a3f64);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-card-placeholder span {
  font-size: 48px;
  font-weight: 900;
  color: rgba(255,255,255,0.6);
}
.profile-card-count {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 6px;
  font-weight: 600;
}
