/* /temaer: the search, the popular themes (theme tiles, sections.css) and every theme A–Å by letter. */

.themes-page { display: flex; flex-direction: column; gap: 40px; padding-top: 20px; padding-bottom: 64px; }
.themes-page .crumbs { margin-bottom: -20px; }

.themes-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px; }
.themes-head__text { display: flex; flex-direction: column; gap: 8px; max-width: 680px; }
.themes-head__title { margin: 0; font-family: var(--font-display); font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.themes-head__text p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); }

.themes-search { display: flex; flex-direction: column; gap: 6px; width: 380px; }
.themes-search label { font-size: 14px; font-weight: 700; }

.themes-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  color: var(--ink-3);
}

.themes-search__field:focus-within { border-color: var(--ink); }
.themes-search input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }

.themes-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }

/* The tiles as in the design: a little taller than the front page's, the count under the name */
.themes-page .theme-tile__image { height: 160px; }
.themes-page .theme-tile__text { flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 16px 14px; }
.themes-page .theme-tile__text strong { font-size: 16px; }
.themes-page .theme-tile__text span { font-size: 14px; }
.themes-h2 { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 800; }
.themes-az-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.themes-count { font-size: 14px; color: var(--ink-3); }

/* Jump to a letter */
.themes-letters { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.themes-letters::-webkit-scrollbar { display: none; }

.themes-letters a {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border-radius: 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.themes-letters a:hover { color: var(--cta); }

/* The letters in columns; a letter's card never breaks between them */
.themes-az { columns: 4; column-gap: 16px; }

.themes-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px 14px 10px;
  background: var(--surface);
  border-radius: var(--r-lg);
  break-inside: avoid;
  scroll-margin-top: 16px;
}

.themes-group__letter { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--cta); }

.themes-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 0 6px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.themes-row + .themes-row { border-top: 1px solid #f2f2f2; }
.themes-row:hover { background: var(--page); color: var(--ink); }
.themes-row__count { font-size: 13px; font-weight: 500; color: var(--ink-3); white-space: nowrap; }

.themes-group[hidden], .themes-row[hidden], .themes-letters a[hidden] { display: none; }

.themes-none { margin: 0; font-size: 15px; color: var(--ink-2); }
.themes-none a, .themes-other { font-weight: 700; color: var(--cta); text-decoration: none; }
.themes-other { align-self: flex-start; font-size: 15px; }
.themes-none a:hover, .themes-other:hover { text-decoration: underline; }

@media (max-width: 1199px) {
  .themes-az { columns: 3; }
}

@media (max-width: 1023px) {
  .themes-az { columns: 2; }
}

@media (max-width: 767px) {
  .themes-page { gap: 26px; padding-top: 14px; padding-bottom: 36px; }
  .themes-page .crumbs { margin-bottom: -12px; }
  .themes-head__title { font-size: 38px; }
  .themes-search { width: 100%; }
  .themes-page .theme-tile__image { height: 110px; }
  .themes-h2 { font-size: 24px; }
  .themes-az { columns: 1; }
  .themes-group { margin-bottom: 10px; }
}
