/* ==============================
   Individual Proverb Pages
============================== */

body.proverb-detail-page {
  padding: 20px 24px 60px 20px;
  background: rgb(90, 90, 90);
  overflow-x: hidden;
}

.proverb-page-shell {
  width: min(1100px, calc(100% - 20px));
  margin-left: 20px;
  margin-right: auto;
}

/* Breadcrumb */

.proverb-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;

  /* A little lower for visual separation from the top controls */
  margin-top: 14px;
  margin-bottom: 18px;

  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.proverb-breadcrumb a {
  color: #ffb45f;
  text-decoration: none;
}

.proverb-breadcrumb a:hover {
  color: #ffffff;
}

/* Page */

.proverb-page-article {
  color: #ffffff;
  padding-bottom: 55px;
}

/*
  The radial menu occupies the upper-right corner.
  Start the proverb below that area rather than allowing
  the heading to run behind it.
*/
.proverb-page-header {
  margin-top: 60px;
  margin-bottom: 22px;
  padding-bottom: 14px;

  border-bottom: 1px solid rgba(255, 153, 51, 0.5);
}

.proverb-page-header h1 {
  margin: 0;
  color: #ffffff;

  /* Slightly larger than normal content, not a giant heading */
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  line-height: 1.35;

  max-width: 900px;
  overflow-wrap: anywhere;
}

/* Main layout */

.proverb-page-grid {
  display: grid;

  /*
    Give the image a substantial column without
    forcing it into an artificial aspect ratio.
  */
  grid-template-columns: minmax(260px, 440px) minmax(0, 1fr);

  gap: clamp(22px, 3vw, 34px);
  align-items: start;
}

/* Image */

.proverb-image {
  width: 100%;
  max-width: 440px;

  margin: 0;

  overflow: hidden;

  border: 1px solid rgba(255, 153, 51, 0.35);
  background: rgba(0, 0, 0, 0.2);
}

.proverb-image img {
  display: block;

  /*
    Let the actual image determine its height.
    This avoids cropping caused by aspect-ratio + object-fit: cover.
  */
  width: 100%;
  height: auto;

  object-fit: contain;
}

.proverb-image-empty {
  min-height: 220px;

  display: flex;
  align-items: center;
  justify-content: center;

  color: rgba(255, 255, 255, 0.68);
  font-size: 16px;
}

/* Content */

.proverb-page-content {
  min-width: 0;

  display: grid;
  gap: 18px;
}

.proverb-info-block {
  min-width: 0;

  padding-bottom: 16px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.proverb-info-block h2 {
  margin: 0 0 8px;

  color: #ff9933;
  font-size: 15px;
  font-weight: 700;
}

.proverb-info-block p {
  margin: 0;

  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.6;

  overflow-wrap: anywhere;
}

/* Keywords / Themes */

.proverb-detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.proverb-tag {
  display: inline-flex;

  /*
    Explicit vertical centering of the text inside each tag.
  */
  align-items: center;
  justify-content: center;

  min-height: 28px;
  box-sizing: border-box;

  padding: 4px 9px;

  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 5px;

  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}

/* Metadata */

.proverb-metadata {
  padding-bottom: 14px;
}

.proverb-meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.proverb-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  box-sizing: border-box;
}

.proverb-meta-label {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.proverb-meta-value {
  color: rgba(255, 255, 255, 0.95);
  font-size: 13px;
  font-weight: 600;
}

/* YouTube */

.proverb-youtube-action {
  padding-top: 2px;
}

.proverb-video-link {
  display: inline-flex;
  align-items: center;

  gap: 8px;

  color: #ffb45f;
  font-size: 16px;
  line-height: 1.4;

  text-decoration: none;
}

.proverb-video-link:hover {
  color: #ffffff;
}

/*
  The logo is deliberately slightly smaller than the
  text line and raised by 1px for optical alignment.
*/
.youtube-shorts-logo {
  width: 26px;
  height: 26px;

  flex: 0 0 26px;

  object-fit: cover;
  border-radius: 50%;

  transform: translateY(-3px);
}

/* ==============================
   Medium screens
============================== */

@media (max-width: 900px) {

  body.proverb-detail-page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .proverb-page-shell {
    width: calc(100% - 20px);
    margin-left: 20px;
  }

  .proverb-page-header {
    margin-top: 55px;
  }

  .proverb-page-grid {
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    gap: 22px;
  }

  .proverb-image {
    max-width: 360px;
  }

  .proverb-page-header h1 {
    font-size: clamp(20px, 3vw, 28px);
  }
}

/* ==============================
   Mobile
============================== */

@media (max-width: 700px) {

  body.proverb-detail-page {
    padding: 12px 14px 55px 20px;
  }

  .proverb-page-shell {
    width: calc(100% - 10px);
    margin-left: 10px;
  }

  .proverb-breadcrumb {
    margin-top: 20px;
    margin-bottom: 14px;
    font-size: 15px;
  }

  .proverb-page-header {
    /*
      Still keep the proverb below the radial menu,
      but don't waste excessive vertical space on phones.
    */
    margin-top: 50px;
    margin-bottom: 18px;
    padding-bottom: 12px;
  }

  .proverb-page-header h1 {
    font-size: clamp(20px, 6vw, 25px);
    line-height: 1.35;
  }

  .proverb-page-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .proverb-image {
    width: 100%;
    max-width: 100%;
  }

  .proverb-page-content {
    width: 100%;
  }

  .proverb-info-block p {
    font-size: 16px;
  }

  .proverb-video-link {
    font-size: 15px;
  }

  .youtube-shorts-logo {
    width: 25px;
    height: 25px;
    flex-basis: 25px;
  }
}

/* ==============================
   Very small phones
============================== */

@media (max-width: 400px) {

  body.proverb-detail-page {
    padding-left: 18px;
    padding-right: 10px;
  }

  .proverb-page-shell {
    width: calc(100% - 8px);
    margin-left: 8px;
  }

  .proverb-page-header {
    margin-top: 48px;
  }

  .proverb-page-header h1 {
    font-size: 20px;
  }

  .proverb-info-block p {
    font-size: 15px;
  }

  .proverb-tag {
    font-size: 12px;
    min-height: 26px;
    padding: 3px 7px;
  }

  .youtube-shorts-logo {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }
}