/* ======================================
   Experts Page — Minimal Profile Cards
   Clean, airy, scannable. Tajawal font.
====================================== */

* {
  font-family: 'Tajawal', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* ===========================
   HERO — Light off-white band
=========================== */
.experts-page-hero {
  background: #f7f9f8;
  border-bottom: 1px solid #e8eeeb;
  padding: 120px 40px 44px;
  position: relative;
}



.experts-hero-inner {
  max-width: 1120px;
  margin: 11px auto;
  position: relative;
  z-index: 1;
}

/* Eyebrow label */
.experts-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #0a4d4d;
  margin-bottom: 14px;
  animation: fadeSlideUp 0.5s ease both;
}

.experts-eyebrow i {
  font-size: 13px;
}

.experts-page-hero h1 {
  font-size: 42px;
  font-weight: 800;
  color: #062141;
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin-bottom: 12px;
  animation: fadeSlideUp 0.5s ease 0.08s both;
}

.experts-page-hero p {
  font-size: 16px;
  color: #5a7070;
  line-height: 1.75;
  max-width: 520px;
  margin-bottom: 30px;
  animation: fadeSlideUp 0.5s ease 0.16s both;
}

/* ===========================
   FILTER BAR
=========================== */
.experts-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  animation: fadeSlideUp 0.5s ease 0.24s both;
}

/* Search box */
.search-box {
  flex: 1 1 340px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #dde6e3;
  border-radius: 12px;
  padding: 11px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-box:focus-within {
  border-color: #0a4d4d;
  box-shadow: 0 0 0 3px rgba(10, 77, 77, 0.08);
}

.search-box i {
  color: #8aabaa;
  font-size: 16px;
  flex-shrink: 0;
  transition: color 0.2s;
}

.search-box:focus-within i {
  color: #0a4d4d;
}

.search-box input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: #062141;
  font-size: 15px;
  font-weight: 500;
}

.search-box input::placeholder {
  color: #9ab5b4;
  font-weight: 400;
}

/* Selects */
.experts-filters select {
  flex: 0 0 auto;
  background: #fff;
  color: #062141;
  border: 1.5px solid #dde6e3;
  border-radius: 12px;
  padding: 11px 38px 11px 16px;
  outline: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%230a4d4d' d='M5 6L0 1l1.2-1L5 3.8 8.8 0 10 1z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
}

.experts-filters select:hover,
.experts-filters select:focus {
  border-color: #0a4d4d;
  box-shadow: 0 0 0 3px rgba(10, 77, 77, 0.08);
}

.experts-filters select option {
  background: #fff;
  color: #062141;
}

/* Count pill — replaces the old keywords-stats */
.experts-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 13px;
  color: #5a7070;
  animation: fadeSlideUp 0.5s ease 0.32s both;
}

.experts-count-pill strong {
  font-size: 14px;
  font-weight: 700;
  color: #062141;
}

.experts-count-pill .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #b0c8c7;
}

/* ===========================
   MAIN SECTION
=========================== */
.experts-page {
  background: #fff;
  padding: 48px 40px 80px;
}

/* ===========================
   GRID
=========================== */
.experts-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ===========================
   PROFILE CARD — horizontal layout
=========================== */
.expert-card2 {
  background: #fff;
  border: 1.5px solid #e8eeeb;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  animation: fadeSlideUp 0.45s ease both;
  opacity: 1 !important;
  visibility: visible !important;
}

.expert-card2:hover {
  border-color: #a8cec8;
  box-shadow: 0 6px 24px rgba(6, 33, 65, 0.08);
  transform: translateY(-3px);
}

/* ===========================
   AVATAR — square-rounded
=========================== */
.avatar-wrapper {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e1f5ee 0%, #c9ece3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  transition: transform 0.2s ease;
  border: 1.5px solid #c3ddd7;
}

.expert-card2:hover .avatar-wrapper {
  transform: scale(1.04);
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.avatar-fallback i {
  font-size: 26px;
  color: #0a4d4d;
  opacity: 0.75;
}

/* ===========================
   CARD INFO COLUMN
=========================== */
.card-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Field badge */
.badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 20px;
  background: #e1f5ee;
  color: #085041;
  border: 1px solid #b4ddd4;
  margin-bottom: 6px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  align-self: flex-start;
}

/* Name */
.name {
  font-size: 16px;
  font-weight: 700;
  color: #062141;
  line-height: 1.3;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.2s;
}

.expert-card2:hover .name {
  color: #0a4d4d;
}

/* Work info */
.work-info {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: #7a9898;
  line-height: 1.6;
  margin-bottom: 10px;
}

.work-info i {
  font-size: 12px;
  color: #0a4d4d;
  margin-top: 2px;
  flex-shrink: 0;
  opacity: 0.7;
}

/* Keywords */
.keywords-container {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.keyword-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #3d7070;
  background: #f0f8f6;
  border: 1px solid #d0e8e3;
  border-radius: 8px;
  padding: 3px 9px;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.keyword-tag i {
  font-size: 10px;
  opacity: 0.6;
}

.keyword-tag:hover {
  background: #e1f5ee;
  border-color: #a8d8cf;
}

/* University meta */
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: #7a9898;
  font-weight: 600;
  margin-bottom: 12px;
}

.meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta i {
  font-size: 13px;
  color: #0a4d4d;
  opacity: 0.7;
}

.university-tag {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #7a9898;
  font-weight: 600;
}

.university-tag i {
  color: #0a4d4d;
  opacity: 0.7;
  font-size: 13px;
}

/* Action link buttons — icon only, clean */
.actions {
  display: flex;
  gap: 7px;
  margin-top: auto;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: #062141;
  color: #fff;
  border: 1.5px solid #062141;
}

.btn-primary:hover {
  background: #0a4d4d;
  border-color: #0a4d4d;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: #062141;
  border: 1.5px solid #dde6e3;
}

.btn-ghost:hover {
  background: #f0f8f6;
  border-color: #a8cec8;
  color: #0a4d4d;
}

/* ===========================
   CARD — card-top kept for compat
=========================== */
.card-top {
  display: none; /* replaced by .card-info layout */
}

/* ===========================
   NO RESULTS
=========================== */
.no-experts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
}

.no-experts i {
  font-size: 56px;
  color: #c5d9d6;
  margin-bottom: 20px;
  display: block;
}

.no-experts h3 {
  font-size: 22px;
  font-weight: 700;
  color: #062141;
  margin-bottom: 8px;
}

.no-experts p {
  font-size: 15px;
  color: #7a9898;
}

/* ===========================
   ANIMATIONS
=========================== */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger cards on load */
.expert-card2:nth-child(1)  { animation-delay: 0.05s; }
.expert-card2:nth-child(2)  { animation-delay: 0.10s; }
.expert-card2:nth-child(3)  { animation-delay: 0.15s; }
.expert-card2:nth-child(4)  { animation-delay: 0.20s; }
.expert-card2:nth-child(5)  { animation-delay: 0.25s; }
.expert-card2:nth-child(6)  { animation-delay: 0.30s; }
.expert-card2:nth-child(7)  { animation-delay: 0.35s; }
.expert-card2:nth-child(8)  { animation-delay: 0.40s; }
.expert-card2:nth-child(9)  { animation-delay: 0.45s; }
.expert-card2:nth-child(10) { animation-delay: 0.50s; }
.expert-card2:nth-child(n+11) { animation-delay: 0.52s; }

/* ===========================
   RESPONSIVE — Tablets
=========================== */
@media (max-width: 900px) {
  .experts-page-hero {
    padding: 110px 24px 36px;
  }

  .experts-page-hero h1 {
    font-size: 34px;
  }

  .experts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .experts-page-hero {
    padding: 100px 20px 32px;
  }

  .experts-page-hero h1 {
    font-size: 30px;
  }

  .experts-page-hero p {
    font-size: 15px;
  }

  .experts-filters {
    flex-direction: column;
    gap: 8px;
  }

  .search-box {
    flex: 1 1 100%;
    width: 100%;
  }

  .experts-filters select {
    width: 100%;
  }

  .experts-page {
    padding: 36px 20px 60px;
  }

  .experts-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .expert-card2 {
    display: flex !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
}

@media (max-width: 480px) {
  .experts-page-hero {
    padding: 90px 14px 20px;
  }

  .experts-page-hero h1 {
    font-size: 22px;
  }

  .experts-page-hero p {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .experts-page {
    padding: 16px 10px 40px;
  }

  .experts-grid {
    gap: 7px !important;
  }

  .expert-card2 {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 12px;
    border-width: 1px;
  }

  .avatar-wrapper {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
  }

  .avatar-fallback i {
    font-size: 16px;
  }

  .badge {
    font-size: 9px;
    padding: 2px 7px;
    margin-bottom: 3px;
  }

  .name {
    font-size: 13px;
    margin-bottom: 2px;
  }

  .work-info {
    font-size: 11px;
    margin-bottom: 5px;
    line-height: 1.45;
  }

  .keywords-container {
    display: none;
  }

  .meta {
    margin-bottom: 7px;
    font-size: 10px;
  }

  .university-tag {
    font-size: 10px;
  }

  .actions {
    flex-direction: row;
    gap: 5px;
  }

  .btn-primary,
  .btn-ghost {
    flex: 1;
    font-size: 11px;
    padding: 5px 7px;
    border-radius: 8px;
  }
}

@media (max-width: 360px) {
  .experts-page-hero h1 {
    font-size: 20px;
  }

  .expert-card2 {
    padding: 10px;
    gap: 8px;
  }

  .avatar-wrapper {
    width: 36px;
    height: 36px;
  }

  .name {
    font-size: 13px;
  }

  .badge {
    font-size: 8px;
  }
}

/* Landscape */
@media (max-width: 768px) and (orientation: landscape) {
  .experts-page-hero {
    padding-top: 80px;
  }

  .experts-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}