/* ========================================
   WordHTML.org Blog — Main Stylesheet
   ======================================== */
:root {
  --accent:      #2d6a4f;
  --accent2:     #40916c;
  --accent-bg:   #eaf5ee;
  --bg:          #f4f1ec;
  --surface:     #ffffff;
  --s2:          #f9f7f4;
  --s3:          #f0ece5;
  --border:      #e5e0d8;
  --border2:     #d0c9be;
  --text:        #1c1c1c;
  --t2:          #5c5650;
  --t3:          #a09890;
  --gold:        #b07d2a;
  --red:         #c0392b;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 2px 16px rgba(0,0,0,0.07);
}

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

body {
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1220px; margin: 0 auto; padding: 0 20px; }

/* ── HEADER ── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  padding: 14px 0;
}
.logo { display: flex; align-items: center; gap: 0; font-size: 20px; font-weight: 700; text-decoration: none; }
.logo-word { color: var(--text); font-style: italic; }
.logo-sep  { color: var(--border2); margin: 0 6px; }
.logo-html { color: var(--accent); }
.logo-blog { font-size: 11px; font-weight: 600; background: var(--accent-bg); color: var(--accent);
             padding: 2px 8px; border-radius: 20px; margin-left: 8px; }
.main-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.main-nav a { padding: 5px 12px; border-radius: var(--radius-sm); font-size: 13px; color: var(--t2); font-weight: 500; }
.main-nav a:hover { background: var(--s2); color: var(--accent); text-decoration: none; }

.btn-editor {
  display: inline-block; padding: 8px 18px;
  background: var(--accent); color: #fff !important;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
  text-decoration: none !important; white-space: nowrap; transition: background .15s;
}
.btn-editor:hover { background: var(--accent2); }

/* ── LAYOUT ── */
.site-main { padding: 32px 0 60px; }
.blog-layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.blog-main { min-width: 0; }

/* ── HERO ── */
.blog-hero {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 36px; margin-bottom: 28px;
  border-left: 4px solid var(--accent);
}
.blog-hero h1 { font-size: 26px; font-weight: 700; margin-bottom: 8px; }
.blog-hero p  { color: var(--t2); font-size: 15px; }

/* ── POST CARDS ── */
 /* 3-column grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

p.post-card__excerpt {
    font-size: 14px;
    margin: 8px 0 10px;
}

.post-cat{
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
background: var(--accent-bg);
    color: var(--accent2);
    padding: 2px 10px;
    border-radius: 20px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .5px;
    width: fit-content;
}


/* Card — vertical layout */
.post-card {
  background: #fff;
  border: 1px solid #e5e0d8;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .18s;
}
.post-card:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

/* Image — 16:9 ratio */
.post-card__img-wrap {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.post-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.post-card:hover .post-card__img-wrap img {
  transform: scale(1.04);
}

/* Body */
.post-card__body {
  padding: 14px 16px 18px;
}
.post-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 8px 0 10px;
}

/* Responsive */
@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .posts-grid { grid-template-columns: 1fr; }
}

/* ── SINGLE POST ── */
.breadcrumb { font-size: 12px; color: var(--t3); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--t3); }
.breadcrumb a:hover { color: var(--accent); }

.single-post__title { font-size: 32px; font-weight: 700; line-height: 1.3; margin: 10px 0; }
.single-post__img { border-radius: var(--radius); overflow: hidden; margin: 20px 0; }
.single-post__img img { width: 100%; max-height: 480px; object-fit: cover; }
.single-post__lead { font-size: 18px; color: var(--t2); line-height: 1.7; margin: 16px 0 24px;
  border-left: 3px solid var(--accent); padding-left: 16px; font-style: italic; }

/* ── POST CONTENT ── */
.post-content { font-size: 16px; line-height: 1.85; color: var(--text); }
.post-content h2 { font-size: 24px; font-weight: 700; margin: 32px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border); }
.post-content h3 { font-size: 19px; font-weight: 600; margin: 24px 0 10px; }
.post-content p  { margin-bottom: 16px; }
.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 16px; }
.post-content li { margin-bottom: 6px; }
.post-content blockquote {
  border-left: 3px solid var(--accent); padding: 12px 20px;
  background: var(--s2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 20px 0; font-style: italic; color: var(--t2);
}
.post-content code {
  background: var(--s3); padding: 2px 7px; border-radius: 4px;
  font-size: 13px; color: var(--gold); font-family: 'Courier New', monospace;
}
.post-content pre {
  background: var(--s3); padding: 16px 20px; border-radius: var(--radius);
  overflow-x: auto; margin: 16px 0;
}
.post-content pre code { background: none; padding: 0; }
.post-content a { color: var(--accent); }
.post-content img { border-radius: var(--radius); margin: 16px 0; }
.post-content table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.post-content td, .post-content th { border: 1px solid var(--border); padding: 8px 12px; }
.post-content th { background: var(--s2); font-weight: 600; }

/* ── CTA BOX ── */
.cta-box {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--accent-bg); border: 1px solid #b7e1c6;
  border-radius: var(--radius); padding: 20px 24px; margin: 32px 0;
}
.cta-box__icon { font-size: 24px; }
.cta-box div { flex: 1; }
.cta-box strong { display: block; font-size: 15px; margin-bottom: 4px; color: var(--accent); }
.cta-box p { font-size: 13px; color: var(--t2); margin: 0; }

/* ── SHARE ── */
.share-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 24px 0; font-size: 13px; color: var(--t2); }
.share-btn { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid var(--border2); background: var(--surface); color: var(--t2); cursor: pointer;
  text-decoration: none; transition: all .15s; }
.share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }
.share-btn--twitter:hover { border-color: #1da1f2; color: #1da1f2; }
.share-btn--fb:hover      { border-color: #1877f2; color: #1877f2; }
.share-btn--li:hover      { border-color: #0077b5; color: #0077b5; }

/* ── RELATED ── */
.related-posts { margin-top: 40px; }
.related-posts h3 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }

/* ── PAGINATION ── */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px; padding: 0 12px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--t2); background: var(--surface);
  transition: all .15s; text-decoration: none;
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }

/* ── SIDEBAR ── */
.blog-sidebar { position: sticky; top: 80px; display: flex; flex-direction: column; gap: 20px; }
.sidebar-widget { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.sidebar-widget--cta { background: var(--accent-bg); border-color: #b7e1c6; }
.widget-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  color: var(--t3); margin-bottom: 14px; }
.search-form { display: flex; gap: 8px; }
.search-form input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; }
.search-form input:focus { outline: none; border-color: var(--accent2); }
.search-form button { width: 36px; height: 36px; background: var(--accent); color: #fff; border: none;
  border-radius: var(--radius-sm); cursor: pointer; font-size: 16px; }

.cat-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.cat-list li { display: flex; justify-content: space-between; align-items: center; }
.cat-list a { font-size: 13px; padding: 5px 0; color: var(--t2); }
.cat-list a:hover { color: var(--accent); }
.cat-count { font-size: 11px; background: var(--s2); color: var(--t3); padding: 1px 8px; border-radius: 20px; }

.recent-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.recent-list li { display: flex; gap: 10px; align-items: flex-start; }
.recent-list img, .recent-placeholder { width: 52px; height: 52px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0; }
.recent-placeholder { background: var(--accent-bg); display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 700; font-size: 16px; }
.recent-list a { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; display: block; margin-bottom: 3px; }
.recent-list a:hover { color: var(--accent); }
.recent-list span { font-size: 11px; color: var(--t3); }

.cta-mini strong { display: block; font-size: 14px; color: var(--accent); margin-bottom: 6px; }
.cta-mini p { font-size: 12px; color: var(--t2); margin-bottom: 12px; }
.btn-editor--full { display: block; text-align: center; }

/* ── EMPTY STATE ── */
.empty-state { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius);
  padding: 40px; text-align: center; color: var(--t2); }

/* ── FOOTER ── */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 60px; padding: 48px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-logo { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.footer-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--t3); margin-bottom: 12px; font-weight: 700; }
.footer-grid p  { font-size: 13px; color: var(--t2); }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-grid ul a { font-size: 13px; color: var(--t2); }
.footer-grid ul a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px 0; font-size: 12px; color: var(--t3); }
.footer-bottom a { color: var(--t3); }

/* ── ALERTS ── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 13px; }
.alert-success { background: var(--accent-bg); color: #1d6b3a; border: 1px solid #b7e1c6; }
.alert-danger  { background: #fdecea; color: var(--red); border: 1px solid #f5c6c6; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .blog-layout        { grid-template-columns: 1fr; }
  .blog-sidebar       { position: static; }
  .post-card--featured{ grid-template-columns: 1fr; }
  .footer-grid        { grid-template-columns: 1fr 1fr; }
  .posts-grid--3      { grid-template-columns: 1fr 1fr; }
  .main-nav           { display: none; }
}
@media (max-width: 600px) {
  .footer-grid  { grid-template-columns: 1fr; }
  .posts-grid--3{ grid-template-columns: 1fr; }
  .single-post__title { font-size: 24px; }
}
