/*
Theme Name: British Memory
Theme URI: https://www.britishmemory.com/
Author: British Memory
Description: A WordPress blog theme matching the British Memory static website, designed for extended historical articles.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: british-memory
*/

.main-nav .menu,
.site-footer .menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  list-style: none;
}

.main-nav .menu a,
.site-footer .menu a {
  display: inline-flex;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
}

.site-footer .menu a {
  color: var(--white);
}

.blog-hero {
  padding: clamp(58px, 7vw, 96px) 0;
}

.blog-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1.18fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.blog-hero h1,
.archive-hero h1,
.article-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 5.3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.blog-hero p,
.archive-description,
.article-header .post-meta {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.06rem;
}

.blog-hero-media,
.article-hero {
  margin: 0;
  overflow: hidden;
  background: var(--stone);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.blog-hero-media {
  aspect-ratio: 16 / 10;
}

.blog-hero-media img,
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.button-on-light {
  color: var(--red);
  border-color: rgba(141, 31, 45, 0.34);
  background: rgba(141, 31, 45, 0.06);
}

.button-on-light:hover {
  background: rgba(141, 31, 45, 0.12);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(29, 35, 41, 0.05);
}

.post-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--stone);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body {
  padding: 22px;
}

.post-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.post-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  line-height: 1.18;
}

.post-card h2 a,
.read-more {
  text-decoration: none;
}

.post-card p:not(.post-meta) {
  color: var(--muted);
}

.read-more {
  display: inline-flex;
  margin-top: 6px;
  color: var(--red);
  font-weight: 800;
}

.archive-hero {
  padding: clamp(58px, 7vw, 90px) 0;
}

.pagination {
  margin-top: 34px;
}

.pagination .nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 40px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 800;
}

.pagination .current {
  color: var(--white);
  background: var(--red);
  border-color: var(--red);
}

.article-header {
  padding: clamp(58px, 7vw, 90px) 0 28px;
}

.article-header .post-meta a {
  color: var(--red);
}

.article-hero {
  aspect-ratio: 16 / 8.8;
  margin-top: 28px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(240px, 320px);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  padding-bottom: clamp(58px, 7vw, 96px);
}

.article-layout-single {
  grid-template-columns: minmax(0, 820px);
}

.article-content {
  color: var(--ink);
  font-size: 1.08rem;
}

.article-content > * {
  margin-top: 0;
  margin-bottom: 1.25em;
}

.article-content h2,
.article-content h3,
.aside-panel h2 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.2;
}

.article-content h2 {
  margin-top: 1.8em;
  font-size: 2rem;
}

.article-content h3 {
  margin-top: 1.6em;
  font-size: 1.45rem;
}

.article-content img {
  height: auto;
  border-radius: var(--radius);
}

.article-content blockquote {
  margin-inline: 0;
  padding: 18px 22px;
  color: var(--ink);
  background: var(--white);
  border-left: 4px solid var(--gold);
}

.article-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.aside-panel,
.empty-state {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.aside-panel h2,
.empty-state h2 {
  margin: 0 0 12px;
  font-size: 1.2rem;
}

.aside-panel a,
.tag-list a {
  display: inline-flex;
  margin: 0 6px 8px 0;
  padding: 6px 10px;
  color: var(--red);
  background: rgba(141, 31, 45, 0.08);
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.empty-state {
  max-width: 720px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 1040px) {
  .blog-hero-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .article-aside {
    position: static;
  }
}

@media (max-width: 760px) {
  .main-nav .menu {
    flex-wrap: nowrap;
  }

  .blog-hero-grid,
  .post-grid {
    grid-template-columns: 1fr;
  }

  .blog-hero h1,
  .archive-hero h1,
  .article-header h1 {
    font-size: clamp(2.3rem, 12vw, 4rem);
  }
}
