/* ═══════════════════════════════════════════════════════════════
   ASMG Blog Theme — matches asmediagroup.co.uk
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #111112;
  --bg-mid:    #18181a;
  --bg-card:   #1e1e21;
  --border:    rgba(255,255,255,0.08);
  --text:      #f0f0f0;
  --text-muted: #888;
  --accent:    #c8a96e;
  --accent-2:  #6e9ec8;
  --white:     #ffffff;
  --radius:    6px;
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --max:       1100px;
  --nav-h:     64px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--white); }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(17,17,18,0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--white);
}

.nav-logo img {
  height: 48px;
  width: auto;
  display: block;
}

.nav-logo-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--white); }

/* ─── HAMBURGER ─── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 200;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── LAYOUT ─── */
.content-wrap {
  flex: 1;
  padding-top: var(--nav-h);
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 96px 40px;
}

.section-sm {
  max-width: var(--max);
  margin: 0 auto;
  padding: 64px 40px;
}

/* ─── UTILITIES ─── */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.divider {
  width: 40px;
  height: 2px;
  background: var(--accent);
  margin: 24px 0 32px;
}

hr.full {
  border: none;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--white);
  color: var(--bg);
}
.btn-primary:hover { background: #e8e8e8; }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: rgba(255,255,255,0.3); }

/* ─── BLOG HERO ─── */
.blog-hero {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--border);
}

.blog-hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  max-width: 700px;
}

.blog-hero p {
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.7;
  max-width: 640px;
  margin-top: 20px;
}

/* ─── CATEGORY FILTER ─── */
.category-bar {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.category-bar .container {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.category-tag {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.category-tag:hover { color: var(--white); }
.category-tag.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── BLOG LISTING ─── */
.blog-list {
  padding: 64px 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border);
}

.post-card {
  background: var(--bg);
  padding: 48px 40px;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
}

.post-card:hover { background: var(--bg-card); }

.post-card a {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card .post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.post-card .post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.post-card .post-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-card .post-date {
  font-size: 12px;
  color: var(--text-muted);
}

.post-card h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 12px;
  line-height: 1.3;
}

.post-card .post-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
}

.post-card .read-more {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 24px;
  transition: color 0.2s;
}

.post-card:hover .read-more { color: var(--accent); }

/* ─── SINGLE POST ─── */
.post-header {
  padding: 80px 0 48px;
  border-bottom: 1px solid var(--border);
}

.post-header .post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.post-header .post-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-header .post-date {
  font-size: 13px;
  color: var(--text-muted);
}

.post-header h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
  max-width: 800px;
}

.post-header .post-summary {
  font-size: 18px;
  color: #bbb;
  line-height: 1.7;
  max-width: 700px;
  margin-top: 20px;
}

/* ─── POST BODY ─── */
.post-body {
  padding: 64px 0;
  max-width: 760px;
}

.post-body h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-top: 48px;
  margin-bottom: 20px;
}

.post-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  margin-top: 36px;
  margin-bottom: 16px;
}

.post-body p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 32px 0;
  display: block;
}

.post-body figure {
  margin: 32px 0;
}

.post-body figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}

.post-body ul, .post-body ol {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
  padding-left: 24px;
}

.post-body li { margin-bottom: 8px; }

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--bg-card);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-body blockquote p {
  color: #bbb;
  font-size: 17px;
  margin-bottom: 0;
}

.post-body strong { color: var(--white); }

.post-body a { color: var(--accent); text-decoration: underline; }
.post-body a:hover { color: var(--white); }

/* ─── RELATED POSTS ─── */
.related-section {
  border-top: 1px solid var(--border);
  padding: 64px 0;
}

.related-section h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--white);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2px;
  background: var(--border);
  margin-top: 8px;
  max-width: 100%;
}

.related-card {
  background: var(--bg);
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
}

.related-card:hover { background: var(--bg-card); }

.related-card .related-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.related-card .related-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.related-card .related-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.related-card .related-date {
  font-size: 11px;
  color: var(--text-muted);
}

.related-card h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 10px;
}

.related-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.related-card:hover h4 { color: var(--accent); }

@media (max-width: 900px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* ─── POST FOOTER ─── */
.post-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.post-footer .back-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
}

.post-footer .back-link:hover { color: var(--accent); }

/* ─── POST TAGS ─── */
.post-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.post-tags .tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.post-tags .tag:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.2);
}

/* ─── PAGINATION ─── */
.pagination {
  padding: 48px 0 80px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.pagination a, .pagination span {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}

.pagination .active {
  color: var(--accent);
  border-color: var(--accent);
}

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

footer .footer-logo img {
  height: 24px;
  width: auto;
  opacity: 0.6;
}

footer .footer-logo {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

footer p {
  font-size: 12px;
  color: #555;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 12px;
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--text-muted); }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  nav { padding: 0 24px; }
  .container { padding: 0 24px; }
  .section, .section-sm { padding-left: 24px; padding-right: 24px; }
  .post-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 20px; text-align: center; }
}

@media (max-width: 600px) {
  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(17,17,18,0.97);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 14px 24px;
    font-size: 15px;
  }

  .blog-hero { padding: 48px 0 32px; }
  .post-card { padding: 32px 24px; }
}
