@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+Georgian:wght@700&display=swap");

:root {
  --pyqs-ink: #000000;
  --pyqs-lagoon: #000000;
  --pyqs-gold: #C4B5FD;
  --pyqs-moss: #475569;
  --pyqs-cream: #FFFFFF;
  --pyqs-white: #ffffff;
  --pyqs-violet: #2563EB;
}

.pyqs-page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 28px 16px 18px;
}

.pyqs-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 20px;
  align-items: stretch;
}

.pyqs-hero-copy,
.pyqs-hero-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 28px;
  box-shadow: 0 18px 0 rgba(0, 0, 0, 0.12), 0 28px 38px -18px rgba(0, 0, 0, 0.28);
  padding: clamp(22px, 4vw, 34px);
}

.pyqs-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--pyqs-lagoon);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.pyqs-hero-copy h1 {
  margin: 16px 0 10px;
  color: var(--pyqs-lagoon);
  font-family: "Noto Sans Georgian", sans-serif;
  font-size: clamp(2rem, 1.3rem + 2vw, 3.35rem);
  line-height: 1.08;
}

.pyqs-hero-copy h1 i {
  color: var(--pyqs-violet);
  margin-right: 10px;
}

.pyqs-hero-copy p,
.hero-panel-note {
  margin: 0;
  color: var(--pyqs-moss);
  font-family: "Manrope", sans-serif;
  font-size: 1.03rem;
  line-height: 1.7;
}

.pyqs-hero-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  background:
    linear-gradient(160deg, rgba(196, 181, 253, 0.16), rgba(37, 99, 235, 0.08)),
    rgba(255, 255, 255, 0.94);
}

.hero-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.hero-stat-value {
  color: var(--pyqs-lagoon);
  font-family: "Noto Sans Georgian", sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.hero-stat-label {
  color: var(--pyqs-moss);
  font-weight: 700;
}

.search-section {
  margin-top: 34px;
  display: flex;
  justify-content: center;
}

.search-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  padding: 0.45rem 0.45rem 0.45rem 1.4rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  width: min(800px, 100%);
  border: 1px solid rgba(37, 99, 235, 0.24);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-wrapper:focus-within {
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.2);
  border-color: var(--pyqs-violet);
}

.search-wrapper i {
  color: var(--pyqs-violet);
  font-size: 1.2rem;
  margin-right: 12px;
}

.search-wrapper #searchInput {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.95rem 0;
  background: transparent;
  color: var(--pyqs-ink);
  font-family: "Manrope", sans-serif;
  font-size: 1rem;
}

.search-wrapper #searchInput::placeholder {
  color: var(--pyqs-moss);
  opacity: 0.8;
}

.clear-btn {
  border: none;
  background: transparent;
  color: var(--pyqs-moss);
  cursor: pointer;
  padding: 0 1rem;
  font-size: 1.3rem;
  border-radius: 999px;
  box-shadow: none;
  min-width: 0;
  min-height: 0;
  line-height: 1;
  flex: 0 0 auto;
}

.clear-btn:hover {
  color: var(--pyqs-gold);
  background: rgba(196, 181, 253, 0.14);
  transform: none;
}

.result-stats {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin: 18px 4px 0;
  flex-wrap: wrap;
}

#resultCount {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--pyqs-lagoon);
  border: 1px solid rgba(37, 99, 235, 0.32);
  font-weight: 800;
}

.hint {
  color: var(--pyqs-moss);
  font-weight: 600;
}

.hint i {
  color: var(--pyqs-gold);
  margin-right: 6px;
}

.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 24px;
  margin-top: 24px;
  padding-bottom: 12px;
}

.pdf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 20px 18px;
  border-radius: 28px;
  background: var(--pyqs-white);
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow:
    0 14px 0 rgba(0, 0, 0, 0.12),
    0 24px 28px -12px rgba(0, 0, 0, 0.24),
    inset 0 -2px 0 rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pdf-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.1),
    0 28px 34px -16px rgba(37, 99, 235, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.04);
}

.pdf-icon {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(37, 99, 235, 0.18), rgba(196, 181, 253, 0.2));
  color: var(--pyqs-violet);
  font-size: 2rem;
  box-shadow: 3px 5px 0 rgba(0, 0, 0, 0.16);
}

.course-name {
  color: var(--pyqs-lagoon);
  font-family: "Noto Sans Georgian", sans-serif;
  font-size: 1.45rem;
  line-height: 1.25;
  margin: 0;
}

.card-code {
  display: inline-flex;
  width: fit-content;
  padding: 0.28rem 0.78rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  color: var(--pyqs-moss);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exam-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--pyqs-lagoon);
  border: 1px solid rgba(37, 99, 235, 0.25);
  font-weight: 700;
}

.meta-row {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 2px dotted rgba(37, 99, 235, 0.24);
  padding-top: 16px;
}

.year-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(196, 181, 253, 0.2);
  color: var(--pyqs-lagoon);
  border: 1px solid rgba(196, 181, 253, 0.48);
  font-weight: 800;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-view,
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 999px;
  padding: 0.62rem 1.08rem;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
}

.btn-view {
  background: var(--pyqs-moss);
  color: var(--pyqs-cream);
  border-bottom: 3px solid #3f535b;
  box-shadow: 0 4px 0 #304047;
}

.btn-download {
  background: var(--pyqs-gold);
  color: var(--pyqs-ink);
  border-bottom: 3px solid #c47c1f;
  box-shadow: 0 4px 0 #9b6519;
}

.btn-view:hover,
.btn-download:hover {
  transform: translateY(-2px);
}

.btn-view:hover {
  background: #6a828e;
  box-shadow: 0 6px 0 #304047;
}

.btn-download:hover {
  background: #ffba58;
  box-shadow: 0 6px 0 #9b6519;
}

.btn-view:active,
.btn-download:active {
  transform: translateY(2px);
}

.btn-view:active {
  box-shadow: 0 1px 0 #304047;
}

.btn-download:active {
  box-shadow: 0 1px 0 #9b6519;
}

.no-results {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border-radius: 40px;
  background: rgba(37, 99, 235, 0.1);
  border: 2px dashed rgba(37, 99, 235, 0.35);
  color: var(--pyqs-lagoon);
}

.no-results i {
  display: block;
  margin-bottom: 16px;
  color: var(--pyqs-moss);
  font-size: 3rem;
}

.empty-state strong {
  display: block;
  margin-bottom: 10px;
  color: var(--pyqs-lagoon);
  font-family: "Noto Sans Georgian", sans-serif;
  font-size: 1.35rem;
}

.empty-state p {
  margin: 0;
}

.btn-view.is-disabled,
.btn-download.is-disabled {
  opacity: 0.68;
  cursor: not-allowed;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .pyqs-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pyqs-page {
    padding-inline: 12px;
  }

  .pdf-card {
    padding: 20px 16px 16px;
  }

  .course-name {
    font-size: 1.28rem;
  }

  .action-buttons {
    width: 100%;
  }

  .btn-view,
  .btn-download {
    justify-content: center;
    flex: 1 1 140px;
  }
}

/* Final PYQs archive redesign */
body {
  background:
    radial-gradient(circle at 9% 2%, rgba(124, 92, 255, 0.12), transparent 26%),
    radial-gradient(circle at 92% 0%, rgba(147, 197, 253, 0.14), transparent 28%),
    linear-gradient(180deg, #fbfaff 0%, #ffffff 54%, #f7f9ff 100%);
  color: #12182f;
}

.pyqs-page {
  width: min(1180px, calc(100% - 36px));
  max-width: none;
  padding: 24px 0 26px;
}

.pyqs-hero {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.72fr);
  gap: 18px;
  align-items: stretch;
}

.pyqs-hero-copy,
.pyqs-hero-panel {
  position: relative;
  min-height: 188px;
  padding: 24px 28px;
  border: 1px solid #ece9ff;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(54, 44, 134, 0.06);
  overflow: hidden;
}

.pyqs-hero-copy::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 120px;
  height: 92px;
  border-radius: 0 32px 0 0;
  background:
    linear-gradient(90deg, #6759ff 0 20%, #ffffff 20% 82%, #dedbff 82%) 18px 52px / 86px 22px no-repeat,
    linear-gradient(90deg, #7a6cff 0 20%, #ffffff 20% 82%, #e6e4ff 82%) 26px 30px / 74px 22px no-repeat,
    radial-gradient(circle at 24px 76px, #7b5cff 0 13px, transparent 14px),
    linear-gradient(145deg, rgba(124, 92, 255, 0.12), transparent);
  opacity: 0.96;
}

.pyqs-kicker {
  margin-left: 84px;
  padding: 5px 10px;
  border: 1px solid #e2ddff;
  color: #6b4cff;
  background: #f3f0ff;
  font-size: 0.62rem;
  letter-spacing: 0;
  font-weight: 950;
}

.pyqs-hero-copy h1 {
  max-width: 440px;
  margin: 12px 0 10px 84px;
  color: #12182f;
  font-family: "Manrope", sans-serif;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: 0;
}

.pyqs-hero-copy h1 i {
  display: none;
}

.pyqs-hero-copy p,
.hero-panel-note {
  max-width: 430px;
  margin-left: 84px;
  color: #647089;
  font-size: 0.88rem;
  line-height: 1.6;
  font-weight: 650;
}

.pyqs-hero-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  min-height: 188px;
  background:
    radial-gradient(circle at 90% 15%, rgba(124, 92, 255, 0.1), transparent 34%),
    #ffffff;
}

.hero-stat {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
}

.hero-stat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  color: #7a5cff;
  background: #f2efff;
}

.hero-stat-value {
  color: #6b4cff;
  font-family: "Manrope", sans-serif;
  font-size: 2rem;
  font-weight: 950;
}

.hero-stat-label {
  display: block;
  grid-column: 2;
  margin-top: -12px;
  color: #68778f;
  font-size: 0.72rem;
  font-weight: 850;
}

.hero-panel-note {
  grid-column: 1 / -1;
  max-width: 360px;
  margin: 0;
  font-size: 0.8rem;
}

.search-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.search-wrapper {
  width: 100%;
  min-height: 42px;
  padding: 0 12px 0 16px;
  border: 1px solid #e3e7f4;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(54, 44, 134, 0.04);
  z-index: 100;
}

.search-wrapper i {
  color: #7b5cff;
  font-size: 0.85rem;
  margin-right: 10px;
}

.search-wrapper #searchInput {
  padding: 0;
  color: #1b2440;
  font-size: 0.82rem;
  font-weight: 650;
}

.clear-btn {
  padding: 0 4px;
  color: #a0a7b8;
  font-size: 1rem;
}

.suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  border-radius: 12px;
  border: 1px solid #e3e7f4;
  background: #ffffff;
  box-shadow: 0 14px 24px rgba(54, 44, 134, 0.1);
  overflow: hidden;
  z-index: 9999;
  text-align: left;
}

.suggestions[hidden] {
  display: none;
}

.suggestion-item,
.suggestion-empty {
  display: grid;
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  border: none;
  border-bottom: 1px solid #f2f4fa;
  background: transparent;
  color: #1b2440;
  cursor: pointer;
}

.suggestion-empty {
  cursor: default;
}

.suggestion-item:last-child,
.suggestion-empty:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f8f9fd;
}

.suggestion-item strong {
  font-size: 0.88rem;
  font-family: "Manrope", sans-serif;
  color: #12182f;
  margin-bottom: 2px;
}

.suggestion-item span,
.suggestion-empty span {
  font-size: 0.76rem;
  color: #647089;
}

.pyq-search-btn {
  min-height: 42px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #8b6cff, #6a4df7);
  font-size: 0.78rem;
  font-weight: 950;
  box-shadow: 0 12px 22px rgba(107, 76, 255, 0.18);
  cursor: pointer;
}

.pyq-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.pyq-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #e5e8f5;
  border-radius: 999px;
  color: #303b58;
  background: #ffffff;
  font-size: 0.72rem;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(54, 44, 134, 0.04);
  cursor: pointer;
}

.pyq-filter-btn i {
  color: #7b5cff;
}

.pyq-filter-btn.active {
  color: #ffffff;
  border-color: #7b5cff;
  background: #7b5cff;
}

.pyq-filter-btn.active i {
  color: #ffffff;
}

.result-stats {
  margin: 14px 0 0;
}

#resultCount {
  padding: 6px 11px;
  border: 1px solid #e2ddff;
  color: #ffffff;
  background: #7b5cff;
  font-size: 0.72rem;
  font-weight: 950;
}

.hint {
  color: #6a778e;
  font-size: 0.76rem;
  font-weight: 750;
}

.hint i {
  color: #7b5cff;
}

.pdf-grid {
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.pdf-card {
  min-height: 210px;
  gap: 8px;
  padding: 14px;
  border: 1px solid #e3e7f4;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(54, 44, 134, 0.06);
}

.pdf-card:hover {
  transform: translateY(-4px);
  border-color: #cfc6ff;
  box-shadow: 0 18px 32px rgba(107, 76, 255, 0.12);
}

.pdf-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: #7b5cff;
  background: #f2efff;
  box-shadow: none;
  font-size: 1rem;
}

.card-code {
  position: absolute;
  right: 12px;
  top: 14px;
  padding: 4px 8px;
  color: #7b5cff;
  background: #f5f2ff;
  font-size: 0.6rem;
  letter-spacing: 0;
}

.course-name {
  display: -webkit-box;
  min-height: 54px;
  margin: 8px 0 0;
  overflow: hidden;
  color: #12182f;
  font-family: "Manrope", sans-serif;
  font-size: 0.88rem;
  line-height: 1.24;
  font-weight: 950;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.exam-tag {
  padding: 0;
  border: 0;
  color: #5f6d85;
  background: transparent;
  font-size: 0.68rem;
  font-weight: 800;
}

.exam-tag i {
  color: #7b5cff;
}

.meta-row {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #eef1f8;
}

.year-badge {
  width: fit-content;
  padding: 4px 8px;
  border: 0;
  color: #5f6d85;
  background: #f8f9fd;
  font-size: 0.66rem;
  font-weight: 850;
}

.action-buttons {
  justify-content: space-between;
  gap: 8px;
}

.btn-view,
.btn-download {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #e5e8f5;
  border-radius: 999px;
  box-shadow: none;
  font-size: 0.66rem;
  font-weight: 950;
}

.btn-view {
  color: #303b58;
  background: #ffffff;
  border-bottom: 1px solid #e5e8f5;
}

.btn-download {
  color: #ffffff;
  background: #8a65ff;
  border-color: #8a65ff;
  border-bottom: 1px solid #8a65ff;
}

.btn-view:hover,
.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(107, 76, 255, 0.12);
}

@media (max-width: 900px) {
  .pyqs-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .pyqs-page {
    width: calc(100% - 20px);
    padding-inline: 0;
  }

  .pyqs-kicker,
  .pyqs-hero-copy h1,
  .pyqs-hero-copy p {
    margin-left: 0;
  }

  .pyqs-hero-copy::before {
    opacity: 0.2;
  }

  .search-section {
    grid-template-columns: 1fr;
  }

  .pyq-filter-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .pyq-filter-btn {
    flex: 0 0 auto;
  }

  .pdf-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

