/* ==========================================================================
   1. BLOG LAYOUT & STRUCTURAL GRID
   ========================================================================== */
#content {
  position: static;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.blog-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

@media (min-width: 820px) {
  .blog-container {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 3.5rem;
  }
}

.blog-primary {
  min-width: 0;
}

/* ==========================================================================
   2. POST LISTINGS & HEADINGS
   ========================================================================== */
.post {
  margin-bottom: 3.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
}

.post:last-child {
  border-bottom: none;
}

.post h1.title-post,
.post h2.title-index {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

h1.author-name,
h1.title-post,
h2.title-index {
  text-shadow: 0.04rem 0.04rem var(--color-crimson);
}

.post h1.title-post a,
.post h2.title-index a {
  color: var(--color-text);
  text-decoration: none;
  background-color: transparent;
  padding: 0;
}

.post h1.title-post a:hover,
.post h2.title-index a:hover {
  color: var(--color-text);
  background-color: var(--color-accent);
}

.category-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.category-header h1.category-title {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   3. POST METADATA (Date, Category, Author)
   ========================================================================== */
.post .date,
.post-meta,
.post .meta {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

/* Base metadata links */
.post .date a,
.post-meta a,
.post .meta a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
  background-color: transparent;
  padding: 0 0.15em;
}

.post .date a:hover,
.post-meta a:hover,
.post .meta a:hover {
  background-color: var(--color-accent);
  color: var(--color-text);
  text-decoration: none;
}

/* Accent Font for Category & Author names */
.hand-note,
.hand-note a {
  font-family: var(--font-accent) !important;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
}

/* Read More Link */
.readmore,
.post .actions a.readmore {
  display: inline-block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 4px;
  background-color: transparent;
  padding: 0;
}

.readmore:hover,
.post .actions a.readmore:hover {
  background-color: var(--color-accent);
  text-decoration: none;
}

/* ==========================================================================
   4. SIDEBAR WIDGETS & SEARCH
   ========================================================================== */
.blog-sidebar {
  font-size: 0.9rem;
}

.sidebar-widget {
  margin-bottom: 2.5rem;
}

.widget-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-crimson);
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--color-border);
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget li {
  padding: 0.35rem 0;
}

.sidebar-widget a {
  color: var(--color-text);
  text-decoration: none;
  background-color: transparent;
  padding: 0;
}

.sidebar-widget a:hover {
  color: var(--color-crimson);
  text-decoration: underline;
}

/* Search Widget */
.search,
.search-widget {
  margin-bottom: 2rem;
}

.search form,
.search-widget form {
  display: flex;
  width: 100%;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-family: var(--font-body);
  border: 1px solid var(--color-border);
  border-right: none;
  border-radius: 4px 0 0 4px;
  background: var(--color-card-bg);
  color: var(--color-text);
  outline: none;
}

.search-input:focus {
  border-color: var(--color-crimson);
}

.search-button {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--color-text);
  color: var(--color-card-bg);
  border: 1px solid var(--color-text);
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.search-button:hover {
  background: var(--color-crimson);
  border-color: var(--color-crimson);
}

/* ==========================================================================
   5. SINGLE POST DETAILS & MEDIA
   ========================================================================= */
.single-post .title-post {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

/* Tags (Post & Sidebar Cloud) */
.post-tags {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-muted);
}

.post-tags .tag-label {
  font-weight: 700;
  color: var(--color-text);
  margin-right: 0.35rem;
}

.tag-cloud a,
.post-tags a {
  display: inline-block;
  font-family: var(--font-accent);
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin: 0 0.25rem 0.35rem 0;
  font-size: 0.9rem;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tag-cloud a:hover,
.post-tags a:hover {
  background-color: var(--color-accent);
  color: var(--color-text);
  text-decoration: none;
}

/* Related Posts */
.related-posts {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.related-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.related-posts ul {
  list-style: none;
  padding-left: 0;
}

.related-posts li {
  margin-bottom: 0.5rem;
}

/* Featured Media */
.featured-image,
.featured-video,
.featured-audio {
  margin: 1.5rem 0 2rem 0;
}

.featured-image img {
  border-radius: 4px;
  width: 100%;
  height: auto;
  display: block;
}

.featured-video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 4px;
}

.featured-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   6. BREADCRUMBS & PAGINATION
   ========================================================================== */
.breadcrumb {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-accent);
  text-underline-offset: 3px;
  background-color: transparent;
  padding: 0 0.15em;
  border-radius: 2px;
}

.breadcrumb a:hover {
  background-color: var(--color-accent);
  color: var(--color-text);
  text-decoration: none;
}

/* Feed Pagination (Grid ensures perfect 3-slot centering) */
.pager {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.pager .newer {
  justify-self: start;
}

.pager .older {
  justify-self: end;
}

.page-number {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
  text-align: center;
  white-space: nowrap;
}

/* Single Post Navigation */
.postnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

/* Shared Button Styles */
.pager .pagination-arrow,
.postnav .pagination-arrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text);
  background-color: var(--color-card-bg);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pager .pagination-arrow:hover,
.postnav .pagination-arrow:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text);
  text-decoration: none;
}

/* ==========================================================================
   7. AUTHOR PROFILE
   ========================================================================== */
.author-profile {
  margin-bottom: 3rem;
}

.author-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.author-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-crimson);
  margin-bottom: 0.35rem;
}

.author-name {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
}

.author-bio,
.author-bio p {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.author-post-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0 0;
}

.author-post-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.author-post-item:first-child {
  padding-top: 0;
}

.author-post-item:last-child {
  border-bottom: none;
}

.author-post-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.author-post-title:hover {
  color: var(--color-crimson);
  background-color: transparent;
  text-decoration: underline;
}

.author-post-item .post-meta {
  margin-bottom: 0;
  font-size: 0.75rem;
}