/* ============================================================
   DMILLER TECH — Blog & Post Styles
   ============================================================ */

/* ---- Blog Hero (home.php + archive.php) ---- */
.blog-main { padding-top: 80px; }

.blog-hero {
  position: relative;
  background: linear-gradient(150deg, #080f1e 0%, #0c2340 55%, #091929 100%);
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}
.blog-hero .hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.blog-hero-content {
  position: relative; z-index: 1;
  max-width: 660px; margin: 0 auto;
}
.blog-hero .section-tag {
  color: #93c5fd;
  background: rgba(37,99,235,.18);
  border-color: rgba(37,99,235,.35);
}
.blog-hero .section-tag::before {
  background: #60a5fa; box-shadow: 0 0 6px #60a5fa;
}
.blog-hero .hero-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900; color: #fff; line-height: 1.1;
  margin: .75rem 0 1rem; letter-spacing: -.02em;
}
.blog-hero .hero-subtitle {
  font-size: 1rem; color: rgba(255,255,255,.58); line-height: 1.8; max-width: 520px; margin: 0 auto;
}

/* ---- Blog Posts Grid ---- */
.blog-posts-section { padding: 80px 0; background: var(--bg-alt); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}

.no-posts {
  text-align: center; padding: 5rem 0;
  color: var(--text-muted); font-size: 1rem;
}

/* ---- Post Card (content-post.php) ---- */
.post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s, border-color .25s;
}
.post-card:hover { transform: translateY(-5px); box-shadow: var(--sh-lg); border-color: rgba(37,99,235,.25); }

.post-card-thumb {
  display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-alt);
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.post-card:hover .post-card-thumb img { transform: scale(1.04); }

.post-card-body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-card-meta {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  font-size: .73rem; color: var(--text-muted); margin-bottom: .75rem;
}
.meta-dot { color: var(--text-dim); }
.post-cat {
  color: var(--blue); font-weight: 600; font-size: .7rem;
  background: rgba(37,99,235,.08); border: 1px solid rgba(37,99,235,.18);
  border-radius: 5px; padding: .15em .5em; text-transform: uppercase; letter-spacing: .04em;
  transition: background .2s;
}
.post-cat:hover { background: rgba(37,99,235,.15); }

.post-card-title { font-family: var(--font-head); font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: .6rem; line-height: 1.4; }
.post-card-title a { transition: color .2s; }
.post-card-title a:hover { color: var(--blue); }

.post-card-excerpt { font-size: .85rem; color: var(--text-muted); line-height: 1.75; flex: 1; margin-bottom: 1.1rem; }

.post-read-more {
  font-size: .82rem; font-weight: 600; color: var(--blue);
  display: inline-flex; align-items: center; gap: .3rem;
  margin-top: auto;
  transition: gap .25s, color .2s;
}
.post-read-more:hover { gap: .55rem; color: var(--navy-mid); }

/* ---- Pagination ---- */
.blog-pagination { margin-top: 3.5rem; display: flex; justify-content: center; }
.blog-pagination .nav-links { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: var(--r);
  font-size: .88rem; font-weight: 500; color: var(--text-muted);
  border: 1.5px solid var(--border);
  transition: all .22s;
}
.blog-pagination .page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.blog-pagination .page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.blog-pagination .prev, .blog-pagination .next { width: auto; padding: 0 1rem; gap: .35rem; }

/* ---- Single Post Hero ---- */
.single-main { padding-top: 80px; }

.single-hero {
  position: relative;
  background: linear-gradient(150deg, #080f1e 0%, #0c2340 55%, #091929 100%);
  padding: 90px 24px 70px;
  overflow: hidden;
}
.single-hero .hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.single-hero-content { position: relative; z-index: 1; max-width: 820px; margin: 0 auto; }

.single-meta {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .78rem; color: rgba(255,255,255,.7); margin-bottom: 1.1rem;
}
.single-cat {
  color: #93c5fd; font-weight: 600; font-size: .72rem;
  background: rgba(37,99,235,.2); border: 1px solid rgba(37,99,235,.35);
  border-radius: 5px; padding: .18em .55em; text-transform: uppercase; letter-spacing: .05em;
}
.single-title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 900; color: #fff; line-height: 1.15;
  margin-bottom: 1.1rem; letter-spacing: -.025em;
}
.single-excerpt { font-size: 1.05rem; color: rgba(255,255,255,.58); line-height: 1.75; margin-bottom: 1.5rem; }

.single-author-row { display: flex; align-items: center; gap: .75rem; }
.single-author-row .author-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-mid), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #fff; flex-shrink: 0;
  text-transform: uppercase;
}
.single-author-row strong { display: block; font-size: .88rem; font-weight: 700; color: #fff; }
.single-author-row span  { font-size: .76rem; color: rgba(255,255,255,.45); }

/* ---- Featured Image ---- */
.single-thumb-wrap {
  background: var(--bg-alt); padding: 2rem 0 0;
}
.single-thumb {
  width: 100%; max-height: 500px; object-fit: cover;
  border-radius: var(--r-lg); box-shadow: var(--sh-xl);
}

/* ---- Single Post Body ---- */
.single-body-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  margin: 3.5rem 0;
  align-items: start;
}

.single-content {
  font-size: .97rem; color: var(--text-muted); line-height: 1.85;
}
.single-content h1, .single-content h2, .single-content h3, .single-content h4 {
  font-family: var(--font-head); color: var(--navy); font-weight: 700;
  margin: 2.2rem 0 .8rem; line-height: 1.2; letter-spacing: -.01em;
}
.single-content h2 { font-size: 1.5rem; }
.single-content h3 { font-size: 1.2rem; }
.single-content h4 { font-size: 1rem; }
.single-content p { margin-bottom: 1.3rem; }
.single-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; transition: color .2s; }
.single-content a:hover { color: var(--navy-mid); }
.single-content ul, .single-content ol { margin: 1rem 0 1.3rem 1.5rem; }
.single-content li { margin-bottom: .5rem; }
.single-content blockquote {
  border-left: 4px solid var(--blue); margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: rgba(37,99,235,.04); border-radius: 0 var(--r) var(--r) 0;
  font-style: italic; color: var(--text-muted);
}
.single-content pre {
  background: var(--bg-dark); color: #e2e8f0; padding: 1.2rem 1.5rem;
  border-radius: var(--r); overflow-x: auto; font-size: .85rem; margin: 1.3rem 0;
  line-height: 1.65;
}
.single-content code {
  background: var(--bg-alt); padding: .1em .4em; border-radius: 4px;
  font-size: .88em; color: var(--blue);
}
.single-content pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.single-content img { border-radius: var(--r); max-width: 100%; margin: 1rem 0; }
.single-content table { width: 100%; border-collapse: collapse; margin: 1.3rem 0; font-size: .9rem; }
.single-content th, .single-content td { padding: .7rem 1rem; border: 1px solid var(--border); text-align: left; }
.single-content th { background: var(--bg-alt); font-weight: 700; color: var(--navy); }
.single-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }

/* ---- Sidebar ---- */
.single-sidebar { position: sticky; top: 90px; }
.sidebar-sticky { display: flex; flex-direction: column; gap: 1.1rem; }

.sidebar-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1.4rem;
}
.sidebar-card h4 {
  font-family: var(--font-head); font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 1rem;
}
.sidebar-card p { font-size: .84rem; color: var(--text-muted); line-height: 1.75; }

/* Share buttons */
.share-buttons { display: flex; flex-direction: column; gap: .55rem; }
.share-btn {
  display: flex; align-items: center; gap: .6rem;
  font-size: .84rem; font-weight: 600; padding: .6rem .9rem;
  border-radius: var(--r); border: 1.5px solid var(--border);
  transition: all .22s; color: var(--text-muted);
}
.share-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-sm); }
.share-linkedin:hover { border-color: #0a66c2; color: #0a66c2; background: rgba(10,102,194,.05); }
.share-twitter:hover  { border-color: #1a1a1a; color: #1a1a1a; background: rgba(0,0,0,.04); }
.share-email:hover    { border-color: var(--blue); color: var(--blue); background: rgba(37,99,235,.05); }

/* About sidebar card */
.sidebar-about { background: var(--navy); border-color: transparent; }
.sidebar-logo { display: flex; align-items: center; gap: .6rem; margin-bottom: .85rem; }
.sidebar-logo strong { color: #fff; font-size: 1rem; font-weight: 800; font-family: var(--font-head); }
.sidebar-about p { color: rgba(255,255,255,.55); }

/* Sidebar post list */
.sidebar-post-list { display: flex; flex-direction: column; gap: .85rem; }
.sidebar-post-list li { border-bottom: 1px solid var(--border); padding-bottom: .85rem; }
.sidebar-post-list li:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-post-list a { font-size: .85rem; font-weight: 600; color: var(--navy); line-height: 1.45; display: block; margin-bottom: .2rem; transition: color .2s; }
.sidebar-post-list a:hover { color: var(--blue); }
.sidebar-post-list time { font-size: .72rem; color: var(--text-muted); }

/* ---- Post Tags ---- */
.post-tags {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin: 2rem 0; font-size: .82rem; color: var(--text-muted);
}
.post-tags a {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--r); padding: .25em .7em;
  font-size: .78rem; color: var(--text-muted);
  transition: border-color .2s, color .2s;
}
.post-tags a:hover { border-color: var(--blue); color: var(--blue); }

/* ---- Post Navigation ---- */
.single-post-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  padding: 2.5rem 0; border-top: 1px solid var(--border);
  margin-bottom: 3rem;
}
.post-nav-link {
  display: flex; flex-direction: column; gap: .3rem;
  padding: 1.1rem 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); transition: all .22s;
}
.post-nav-link:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--sh); }
.post-nav-next { text-align: right; }
.post-nav-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); }
.post-nav-title { font-size: .88rem; font-weight: 700; color: var(--navy); line-height: 1.4; transition: color .2s; }
.post-nav-link:hover .post-nav-title { color: var(--blue); }

/* ---- WordPress native block support ---- */
.wp-block-image img { border-radius: var(--r); }
.wp-block-quote { border-left: 4px solid var(--blue); padding: 1rem 1.5rem; background: rgba(37,99,235,.04); border-radius: 0 var(--r) var(--r) 0; font-style: italic; color: var(--text-muted); margin: 1.5rem 0; }
.wp-block-separator { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.wp-caption-text, figcaption { font-size: .78rem; color: var(--text-dim); text-align: center; margin-top: .5rem; }
.aligncenter { display: block; margin: 1rem auto; text-align: center; }
.alignleft { float: left; margin: .5rem 1.5rem .5rem 0; }
.alignright { float: right; margin: .5rem 0 .5rem 1.5rem; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .single-body-grid { grid-template-columns: 1fr; }
  .single-sidebar { position: static; }
  .sidebar-sticky { flex-direction: row; flex-wrap: wrap; }
  .sidebar-card { flex: 1 1 280px; }
}
@media (max-width: 768px) {
  .blog-grid { grid-template-columns: 1fr; }
  .single-post-nav { grid-template-columns: 1fr; }
  .single-title { font-size: 1.7rem; }
  .sidebar-sticky { flex-direction: column; }
  .sidebar-card { flex: 1; }
}
