/*
  =========================================
  Blog, news and reviews (cms/)
  =========================================
  The CMS prints its pages in its own cms-* classes; this styles them in the look of page.css (white cards on the
  parallax background, soft shadows, dark pills). The same file on howarthsoftware.co.uk and howarthgames.co.uk.
*/

/* In the hero badge: the section's name over the title, and a post's date line */
.cms-eyebrow {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
  margin-bottom: .2rem;
}
.hero-badge .cms-meta { margin: 0; opacity: .95; }

/* Blog · News · Reviews */
.cms-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1.25rem; }
.cms-tabs a {
  padding: .45rem .95rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, .06);
  font-weight: 600;
  font-size: .95rem;
}
.cms-tabs a:hover { background: rgba(0, 0, 0, .1); }
.cms-tabs a[aria-current] { background: #111; color: #fff; }

/* The list: cards like the site's posts */
.cms-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cms-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
  transition: transform .12s ease, box-shadow .12s ease;
}
.cms-card:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(0, 0, 0, .14); }
.cms-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: rgba(0, 0, 0, .04); }
.cms-card div { padding: .85rem .95rem 1.05rem; }
.cms-card h3 { margin: .25rem 0 .3rem; font-size: 1.05rem; line-height: 1.25; }
.cms-card p { margin: 0; font-size: .92rem; color: rgba(0, 0, 0, .72); }
.cms-date { font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgba(0, 0, 0, .55); }
.cms-by { margin: 0 0 .35rem !important; font-weight: 600; color: #111 !important; }
.cms-stars { color: #e0a100; letter-spacing: .08em; }
.cms-stars span { color: rgba(0, 0, 0, .18); }
.hero-badge .cms-stars span { color: rgba(255, 255, 255, .35); }

.cms-empty { border: 1px dashed rgba(0, 0, 0, .2); border-radius: 14px; padding: 1.5rem; text-align: center; }
.cms-empty h2 { margin: 0 0 .4rem; }
.cms-empty a, .cms-feed a, .cms-back a, .cms-pager a { text-decoration: underline; text-underline-offset: 2px; }
.cms-feed { margin: 1.5rem 0 0; font-size: .9rem; }
.cms-pager { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; font-weight: 600; }

/* A post */
.cms-article { max-width: 46rem; margin-inline: auto; }
.cms-cover { margin: 0 0 1.5rem; }
.cms-cover img { width: 100%; height: auto; border-radius: 14px; }
.cms-body { font-size: 1.05rem; line-height: 1.7; }
.cms-body h2 { font-size: 1.4rem; margin: 2rem 0 .5rem; }
.cms-body h3 { font-size: 1.15rem; margin: 1.6rem 0 .4rem; }
.cms-body h4 { font-size: 1rem; margin: 1.4rem 0 .35rem; }
.cms-body p, .cms-body ul, .cms-body ol { margin: 0 0 1rem; }
.cms-body li { margin: .3rem 0; }
.cms-body a { text-decoration: underline; text-underline-offset: 2px; }
.cms-body blockquote { margin: 1.4rem 0; padding: .4rem 1.1rem; border-left: 4px solid #111; background: rgba(0, 0, 0, .04); border-radius: 0 12px 12px 0; }
.cms-body figure { margin: 1.6rem 0; }
.cms-body img { max-width: 100%; max-height: 80vh; width: auto; height: auto; border-radius: 12px; margin-inline: auto; }
.cms-body figcaption { font-size: .88rem; color: rgba(0, 0, 0, .62); margin-top: .45rem; text-align: center; }
.cms-body code { background: rgba(0, 0, 0, .06); padding: .1rem .35rem; border-radius: 5px; font-size: .92em; }
.cms-body hr { border: 0; border-top: 1px solid rgba(0, 0, 0, .1); margin: 2rem 0; }
.cms-reviewer { font-weight: 700; margin-top: 1rem; }
.cms-back { margin-top: 2rem; font-weight: 600; }
.cms-related { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(0, 0, 0, .08); }
.cms-related h2 { margin: 0 0 1rem; }

/* The admin's preview of a draft */
.cms-preview {
  position: sticky; top: 0; z-index: 60;
  background: #f2b23a; color: #111; font-weight: 700;
  padding: .6rem 1rem; text-align: center; border-radius: 12px; margin-bottom: 1rem;
}
.cms-preview a { text-decoration: underline; }

/* The band under a post or list */
.cms-promo .section-inner p { margin: .5rem 0 0; }
.cms-promo .btn { margin-top: .5rem; }

/* The home page's blocks (cms/public/home.php) */
.cms-home-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.cms-home-links a { display: inline-flex; padding: .6rem 1rem; border-radius: 14px; background: #111; color: #fff; font-weight: 600; }
.cms-home-links a:hover { transform: translateY(-1px); }
.cms-home-review { margin: .6rem 0 0; }
.cms-home-review blockquote { margin: 0; font-size: clamp(1.2rem, 2.4vw, 1.6rem); font-weight: 700; line-height: 1.35; }
.cms-home-review figcaption { margin-top: .6rem; color: rgba(0, 0, 0, .65); font-weight: 600; }

@media (max-width: 900px) { .cms-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cms-cards { grid-template-columns: 1fr; } }
