/* ============================================================
   teqaudler.html — scholarships catalog page
   Extends universitetler.css patterns; adds scholarship-specific bits
   ============================================================ */

/* ===== Filter stack (two filter groups stacked) ===== */
.tl-filter-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.tl-filter-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}
.tl-filter-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.55;
  letter-spacing: -0.01em;
}

/* ===== Card grid (2 columns — wider cards than universities) ===== */
.tl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

/* ===== Scholarship card ===== */
.tl-card {
  position: relative;
  display: grid;
  /* minmax(0,1fr) — otherwise the 1fr track resolves to minmax(auto,1fr) and
     the nowrap facts row expands the card past the viewport on mobile. */
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 24px 26px;
  background: #fff;
  border-radius: 28px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 4px 14px rgba(26, 26, 77, 0.06);
  transition: transform 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
  animation: tlCardIn 320ms var(--ease-out) backwards;
  overflow: hidden;
}
@keyframes tlCardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.tl-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(26, 26, 77, 0.12);
}

/* Logo / abbreviation tile */
.tl-card-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(0, 0, 0, 0.08) 100%);
  background-blend-mode: overlay;
  overflow: hidden;
}
.tl-card-logo-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Image-based logo variant (rəsmi loqo).
   Default: AĞ qutucuq (transparent PNG-lərin altında). Tünd fonlu logolar üçün
   inline `style="background: ..."` arxa rəngi yenidən təyin edir. */
.tl-card-logo.has-image {
  background: #fff;
  background-image: none;
  border: 1px solid rgba(26, 26, 77, 0.08);
  padding: 0;                    /* logo qutucuğa tam otursun, kiçik görünməsin */
  overflow: hidden;
}
.tl-card-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Body */
.tl-card-body { min-width: 0; }

.tl-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.tl-card-flag {
  font-size: 0.9375rem;
  line-height: 1;
}
.tl-card-country-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.6;
  letter-spacing: -0.01em;
}
.tl-card-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(91, 79, 207, 0.10);
  color: var(--brand);
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: -0.01em;
  margin-left: 4px;
}
.tl-card-funding-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.6875rem;
  letter-spacing: -0.01em;
  border: 1px solid #FCD34D;
}
.tl-card-funding-badge svg { width: 9px; height: 9px; }

.tl-card-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 6px 0;
  /* Bütün kartlar eyni hündürlükdə olsun deyə başlıq 1 sətirə kilidlənir. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-card-tagline {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink);
  opacity: 0.65;
  margin: 0 0 12px 0;
  /* Bütün kartlar eyni hündürlükdə olsun deyə təsvir dəqiq 2 sətirə
     kilidlənir (uzun mətnlər ... ilə qısalır, qısa mətnlər 2 sətir yer tutur). */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.8em;
}

/* Key facts row at the bottom */
.tl-card-facts {
  display: flex;
  gap: 14px;
  flex-wrap: nowrap;
  overflow: hidden;
  margin-top: auto;
}
.tl-card-fact { white-space: nowrap; }
.tl-card-fact {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--ink);
  opacity: 0.7;
}
.tl-card-fact-icon {
  font-size: 0.875rem;
  opacity: 0.85;
}
.tl-card-fact-strong {
  font-weight: 600;
  opacity: 1;
  color: var(--ink);
}

.tl-card-arrow {
  font-family: 'Inter', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink);
  opacity: 0.4;
  transition: transform 240ms var(--ease-out), opacity 240ms var(--ease-out);
  align-self: center;
}
.tl-card:hover .tl-card-arrow {
  opacity: 1;
  color: var(--brand);
  transform: translateX(4px);
}

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .tl-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .tl-grid { grid-template-columns: 1fr; }
  .tl-filter-group { gap: 10px; }
  .tl-filter-label { min-width: auto; }
}
@media (max-width: 700px) {
  .tl-card { padding: 18px 20px; gap: 14px; border-radius: 24px; }
  .tl-card-logo { width: 52px; height: 52px; border-radius: 16px; }
  .tl-card-logo-text { font-size: 0.875rem; }
  .tl-card-name { font-size: 1rem; }
  .tl-card-arrow { display: none; }
  /* Let the key-facts (məbləğ / müddət / son tarix) wrap instead of clipping. */
  .tl-card-facts { flex-wrap: wrap; row-gap: 6px; column-gap: 12px; overflow: visible; }
}

/* ===== Profil uyğunluq rozetkası (login + profil olduqda) ===== */
.tl-match {
  position: absolute;
  top: 22px;
  right: 26px;
  z-index: 3;
  cursor: help;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 11.5px;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; letter-spacing: .2px;
}
.tl-match.tier-good { background: var(--green-soft, #DCFCE7); color: #15803D; }
.tl-match.tier-mid  { background: var(--yellow-soft, #FEF9C3); color: #92710A; }
.tl-match.tier-low  { background: var(--inner-2, #ECECF3); color: var(--mute, #8B8DA6); }
/* The match badge is absolutely positioned top-right; reserve room on the meta
   row so it never overlaps the level / funding badges (visible on narrow cards). */
.tl-card:has(.tl-match) .tl-card-meta-row { padding-right: 74px; }

/* ===== Hələ uyğun olmayan / bağlanmış təqaüdlər bölməsi ===== */
#tl-inelig-wrap { margin-top: 34px; }
.tl-inelig-toggle {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--inner, #F6F6FB); border: 1px solid var(--line, #E6E6F0);
  border-radius: 16px; padding: 16px 20px; cursor: pointer;
  font: inherit; color: var(--ink, #1a1a4d); text-align: left;
  transition: background .15s ease, border-color .15s ease;
}
.tl-inelig-toggle:hover { background: var(--inner-2, #ECECF3); }
.tl-inelig-title { font-weight: 700; font-size: 1rem; }
.tl-inelig-count {
  background: var(--inner-2, #ECECF3); color: var(--mute, #8B8DA6);
  font-weight: 700; font-size: .82rem; padding: 3px 11px; border-radius: 999px;
}
.tl-inelig-caret { margin-left: auto; transition: transform .2s ease; color: var(--mute, #8B8DA6); }
.tl-inelig-toggle[aria-expanded="true"] .tl-inelig-caret { transform: rotate(180deg); }
.tl-inelig-hint { color: var(--mute, #8B8DA6); font-size: .86rem; margin: 10px 4px 16px; }
.tl-grid--muted { margin-top: 4px; }

/* Greyed-out ineligible/closed cards */
.tl-card--inelig { opacity: .62; filter: grayscale(.35); }
.tl-card--inelig:hover { opacity: .85; }
.tl-card-reason {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 5px 11px; border-radius: 999px;
  background: var(--inner-2, #ECECF3); color: var(--mute, #6b6d86);
  font-size: .8rem; font-weight: 600; line-height: 1.3;
}
.tl-card-reason.is-closed { background: #FEE2E2; color: #B91C1C; }
.tl-card-reason::before { content: "ⓘ"; font-weight: 700; }
.tl-card-reason.is-closed::before { content: "⏳"; }
