/* blog.css — Archivolt Insights. Builds on site.css (the main site's stylesheet). */

.page-hero a { color: var(--teal); }
.hero-back { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }

.blog-section { padding: 4rem 2rem 5rem; background: var(--off-white); }
.blog-section .blog-grid { margin-top: 2rem; }

/* Toolbar: category chips + search */
.blog-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip {
  font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.45rem 0.9rem; border-radius: 100px; border: 1px solid rgba(27,45,91,0.15);
  background: var(--white); color: var(--text-muted); transition: all var(--transition);
}
.chip:hover { border-color: var(--orange); color: var(--orange); }
.chip.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.search-box { display: flex; border: 1px solid rgba(27,45,91,0.15); border-radius: 100px; background: var(--white); overflow: hidden; }
.search-box input { border: 0; padding: 0.55rem 1rem; font: inherit; font-size: 0.9rem; width: 220px; outline: none; background: transparent; }
.search-box button { border: 0; background: none; padding: 0 1rem; font-size: 1.2rem; color: var(--navy); cursor: pointer; }
.search-box:focus-within { border-color: var(--orange); }

/* Cards */
.post-card { color: inherit; display: flex; flex-direction: column; overflow: hidden; }
.post-card-cover { height: 180px; overflow: hidden; background: var(--grad-hero); display: flex; align-items: center; justify-content: center; }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.post-card:hover .post-card-cover img { transform: scale(1.04); }
.post-card-placeholder { background: var(--grad-hero); position: relative; }
.post-card-placeholder::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px); background-size: 28px 28px; }
.post-card-placeholder span { position: relative; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255,255,255,0.65); padding: 0 1.5rem; text-align: center; }
.blog-meta { display: flex; justify-content: space-between; margin-top: auto; }

/* Featured post */
.featured-post {
  display: grid; grid-template-columns: 1.1fr 1fr; margin-top: 2rem; background: var(--white);
  border: 1px solid rgba(27,45,91,0.08); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-card); color: inherit; transition: box-shadow var(--transition), transform var(--transition);
}
.featured-post:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.featured-cover { min-height: 300px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.featured-cover img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.featured-label { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--orange); margin-bottom: 0.75rem; }
.featured-body h2 { font-size: 1.7rem; line-height: 1.2; color: var(--navy-deep); margin-bottom: 1rem; }
.featured-excerpt { color: var(--text-muted); line-height: 1.8; margin-bottom: 1rem; }
.featured-meta { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 1.5rem; }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.4rem; margin-top: 3rem; flex-wrap: wrap; }
.pg-num, .pg-step { font-family: var(--font-mono); font-size: 0.75rem; padding: 0.5rem 0.85rem; border-radius: var(--radius-sm); border: 1px solid rgba(27,45,91,0.12); background: var(--white); color: var(--navy); }
.pg-num.current { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pg-num:hover, .pg-step:hover { border-color: var(--orange); color: var(--orange); }

/* Single post */
.preview-bar { position: sticky; top: 0; z-index: 1100; background: var(--gold); color: var(--navy-deep); text-align: center; padding: 0.6rem 1rem; font-size: 0.9rem; }
.preview-bar a { color: var(--navy-deep); text-decoration: underline; margin-left: 0.75rem; }
.post-hero-inner { max-width: 760px; }
.post-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; }
.post-lede { font-size: 1.15rem !important; max-width: 60ch !important; }
.post-byline { font-family: var(--font-mono); font-size: 0.7rem !important; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 1.5rem; color: rgba(255,255,255,0.45) !important; }

.post-section { padding: 3.5rem 2rem 4rem; background: var(--white); }
.post-wrap { max-width: 720px; margin: 0 auto; }
.post-cover { margin: 0 0 2.5rem; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.post-cover img { width: 100%; display: block; }

.post-body { font-size: 1.08rem; line-height: 1.85; color: var(--dark-grey); overflow-wrap: break-word; }
.post-body > * + * { margin-top: 1.25rem; }
.post-body h2 { font-size: 1.6rem; color: var(--navy-deep); margin-top: 2.75rem; line-height: 1.25; }
.post-body h3 { font-size: 1.25rem; color: var(--navy-deep); margin-top: 2.25rem; }
.post-body h4 { font-size: 1.05rem; color: var(--navy-deep); margin-top: 1.75rem; }
.post-body a { color: var(--orange); text-decoration: underline; text-underline-offset: 3px; }
.post-body strong, .post-body em { color: var(--navy-deep); }
.post-body ul, .post-body ol { padding-left: 1.5rem; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li + li { margin-top: 0.4rem; }
.post-body blockquote { border-left: 3px solid var(--orange); padding: 0.25rem 0 0.25rem 1.25rem; color: var(--navy); font-style: italic; }
.post-body code { font-family: var(--font-mono); font-size: 0.88em; background: var(--light-grey); padding: 0.15em 0.4em; border-radius: var(--radius-sm); }
.post-body pre { background: var(--navy-deep); color: #E6EAF5; padding: 1.25rem; border-radius: var(--radius-md); overflow-x: auto; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); }
.post-body hr { border: 0; border-top: 1px solid var(--light-grey); margin: 2.5rem 0; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.post-body th, .post-body td { border: 1px solid var(--light-grey); padding: 0.6rem 0.8rem; text-align: left; }
.post-body th { background: var(--off-white); color: var(--navy-deep); }

.post-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 2.5rem; }
.post-share { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--light-grey); }
.post-share span { font-family: var(--font-mono); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-right: 0.5rem; }
.post-share a, .post-share button { font-size: 0.85rem; padding: 0.4rem 0.9rem; border-radius: 100px; border: 1px solid rgba(27,45,91,0.15); color: var(--navy); background: var(--white); cursor: pointer; font-family: inherit; }
.post-share a:hover, .post-share button:hover { border-color: var(--orange); color: var(--orange); }

.post-cta { margin-top: 3rem; padding: 2rem; border-radius: var(--radius-lg); background: var(--grad-hero); color: var(--white); display: flex; gap: 1.5rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.post-cta h3 { color: var(--white); font-size: 1.3rem; margin-bottom: 0.4rem; }
.post-cta p { color: rgba(255,255,255,0.6); font-size: 0.92rem; max-width: 46ch; }
.post-cta-label { font-family: var(--font-mono); font-size: 0.62rem !important; letter-spacing: 0.18em; text-transform: uppercase; color: var(--teal) !important; margin-bottom: 0.5rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; }
.post-nav a { display: block; padding: 1.25rem; border: 1px solid var(--light-grey); border-radius: var(--radius-md); color: var(--navy-deep); font-family: var(--font-display); font-weight: 600; line-height: 1.35; transition: border-color var(--transition); }
.post-nav a:hover { border-color: var(--orange); }
.post-nav span { display: block; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.4rem; }
.post-nav-next { text-align: right; grid-column: 2; }

.related { background: var(--off-white); }

@media (max-width: 900px) {
  .featured-post { grid-template-columns: 1fr; }
  .featured-cover { min-height: 200px; }
  .blog-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .blog-section { padding: 3rem 1.25rem 4rem; }
  .post-section { padding: 2.5rem 1.25rem 3rem; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-toolbar { flex-direction: column; align-items: stretch; }
  .search-box input { width: 100%; }
  .featured-body { padding: 1.75rem; }
  .featured-body h2 { font-size: 1.35rem; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { grid-column: 1; }
  .post-body { font-size: 1rem; }
}
