/* Page parts added after the design lock (approved 2026-10-10): category
   header card, image pages, related categories and FAQ. They reuse the
   site's own language from styles.css, which stays untouched:
   - grey #f0f0f0 chips, 4px corners, black on hover (the Category menu)
   - the dark #333 Search button
   - the light #f8f9fa heading card and white #fff content cards */

/* Grey chip, as in the Category menu. */
.related-cats a,
.image-tags a,
.image-nav a {
  display: inline-block;
  margin: 4px;
  padding: 8px 14px;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #333;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.related-cats a:hover,
.image-tags a:hover,
.image-nav a:hover {
  background-color: #000;
  color: #fff;
}

/* Category / tag header card: title, a one-line intro, then the Top/New toggle. */
.heading2.cat-head { padding: 6px 24px 18px; }
.cat-head h2 { margin: 14px 0 6px; }
.cat-head .cat-intro {
  max-width: 600px;
  margin: 0 auto;
  color: #666;
  font-size: 0.8em;
  line-height: 1.6;
}
.cat-intro a { color: #333; }
.sort-toggle {
  display: inline-flex;
  gap: 4px;
  margin-top: 14px;
  padding: 4px;
  border-radius: 6px;
  background-color: #f0f0f0;
}
.sort-toggle a {
  min-width: 64px;
  padding: 6px 16px;
  border-radius: 4px;
  color: #333;
  font-size: 0.75em;
  font-weight: bold;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.sort-toggle a:hover { background-color: #000; color: #fff; }
.sort-toggle a.on { background-color: #333; color: #fff; }

/* Breadcrumb above image pages. */
.crumbs {
  max-width: 800px;
  margin: 15px auto 0;
  padding: 0 15px;
  font-size: 0.9em;
  color: #888;
  text-align: center;
}
.crumbs a { color: #333; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* Image pages: the picture sits in the site's white `main` card. */
main.image-page h1 { margin-bottom: 15px; }
.image-page-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
main.image-page p { margin: 8px 0; }
main.image-page p.image-facts { font-size: 0.95em; color: #666; }
main.image-page p.image-tags,
main.image-page p.image-nav { font-size: 1em; margin-top: 12px; }

/* Related categories and FAQ below the grid. `clear: both` keeps them under
   the floated grid items before Masonry has positioned them. */
.related-cats,
.cat-faq {
  clear: both;
  max-width: 800px;
  margin: 20px auto;
  padding: 18px 24px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #333;
  box-sizing: border-box;
}
.related-cats h2,
.cat-faq h2 {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  margin: 4px 0 14px;
}
.related-cats p { text-align: center; margin: 0; }
.cat-faq h3 { font-size: 1em; margin: 16px 0 4px; }
.cat-faq p { margin: 0 0 8px; color: #555; font-size: 0.95em; line-height: 1.6; }
.cat-faq a { color: #333; }

@media (max-width: 840px) {
  .related-cats,
  .cat-faq { margin: 20px 10px; }
  .heading2.cat-head { padding: 4px 16px 16px; }
}

/* "Preview as your avatar" card under an image page (F41 B1, #5). Each tile
   is a small mock of the app, the avatar at the size the app shows it. */
.avatar-preview {
  clear: both;
  max-width: 800px;
  margin: 20px auto;
  padding: 18px 24px 22px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #333;
  box-sizing: border-box;
}
.avatar-preview h2 {
  font-size: 1.2em;
  font-weight: bold;
  text-align: center;
  margin: 4px 0 16px;
}
.ap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.ap { margin: 0; }
.ap-mock {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 170px;
  padding: 12px;
  border-radius: 8px;
  background-color: #f8f9fa;
  overflow: hidden;
  box-sizing: border-box;
  font-size: 0.8rem;
  line-height: 1.3;
}
.ap-av { position: relative; display: block; flex: none; }
.ap-av img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.ap figcaption {
  margin-top: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: #888;
}
.ap figcaption b { color: #333; margin-right: 4px; }
.avatar-preview p.ap-more { margin: 16px 0 0; text-align: center; }
.ap-more a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  background-color: #f0f0f0;
  color: #333;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}
.ap-more a:hover { background-color: #000; color: #fff; }

/* Discord: a chat message in the dark theme, 40 px avatar with a status dot. */
.ap-discord .ap-mock {
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  background-color: #313338;
  color: #dbdee1;
}
.ap-discord .ap-av { width: 40px; height: 40px; }
.ap-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 3px solid #313338;
  border-radius: 50%;
  background-color: #23a55a;
}
.ap-msg { text-align: left; white-space: nowrap; }
.ap-msg b { color: #f2f3f5; }
.ap-msg small { color: #949ba4; font-size: 0.7rem; }

/* Instagram: profile picture inside the gradient story ring. */
.ap-instagram .ap-mock { background-color: #fff; box-shadow: inset 0 0 0 1px #eee; color: #262626; }
.ap-instagram .ap-av {
  width: 77px;
  height: 77px;
  padding: 3px;
  border-radius: 50%;
  background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
}
.ap-instagram .ap-av img { border: 3px solid #fff; box-sizing: border-box; }

/* TikTok: 96 px profile picture, handle and the red Follow button. */
.ap-tiktok .ap-mock { background-color: #fff; box-shadow: inset 0 0 0 1px #eee; color: #161823; }
.ap-tiktok .ap-av { width: 96px; height: 96px; }
.ap-follow {
  padding: 3px 18px;
  border-radius: 4px;
  background-color: #fe2c55;
  color: #fff;
  font-weight: bold;
}

/* X: header banner with the 80 px avatar overlapping it. */
.ap-x .ap-mock {
  align-items: flex-start;
  justify-content: flex-end;
  gap: 2px;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px #eee;
  color: #0f1419;
}
.ap-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 62px;
  background-color: #cfd9de;
}
.ap-x .ap-av { width: 80px; height: 80px; margin-bottom: 4px; }
.ap-x .ap-av img { border: 4px solid #fff; box-sizing: border-box; }
.ap-x small { color: #536471; }

@media (max-width: 840px) {
  .avatar-preview { margin: 20px 10px; padding: 16px; }
  .ap-grid { grid-template-columns: repeat(2, 1fr); }
}
