@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,500;0,600;0,700;1,500&family=Inter:wght@400;500;600&display=swap');

:root {
  --paper: #EAE6DB;
  --paper-raised: #F4F1E8;
  --ink: #211F1A;
  --ink-soft: #55524A;
  --line: #D3CCB8;
  --brick: #7A2E2E;
  --brick-dark: #5E2222;
  --moss: #2F4A3E;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

a { color: var(--brick); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.4em;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Masthead ---- */
.masthead {
  border-bottom: 2px solid var(--ink);
  padding: 28px 0 18px;
}
.masthead .wrap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.masthead .site-name {
  font-family: 'Lora', serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.masthead .site-name a { color: var(--ink); }
.masthead .tagline {
  color: var(--ink-soft);
  font-size: 14px;
  font-style: italic;
}

/* ---- Ad slots ---- */
.ad-slot {
  margin: 32px 0;
  text-align: center;
}
.ad-slot--placeholder {
  border: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  padding: 18px;
  border-radius: 4px;
  background: var(--paper-raised);
}

/* ---- Homepage ---- */
.hero-post {
  padding: 40px 0 20px;
  border-bottom: 1px solid var(--line);
}
.hero-post .kicker {
  color: var(--moss);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}
.hero-post h1 {
  font-size: 40px;
  margin-bottom: 14px;
}
.hero-post .excerpt {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 640px;
}
.hero-post .cover {
  margin: 22px 0;
  border-radius: 2px;
  overflow: hidden;
}
.hero-post .cover img { width: 100%; }

.post-list {
  padding: 30px 0 50px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.post-row {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.post-row h3 { font-size: 21px; margin-bottom: 6px; }
.post-row h3 a { color: var(--ink); }
.post-row .excerpt { color: var(--ink-soft); font-size: 15px; }
.post-row .thumb {
  width: 160px; height: 106px;
  object-fit: cover;
  border-radius: 2px;
  background: var(--paper-raised);
}
.meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 8px;
}

.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--ink-soft);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 0 50px;
  border-top: 1px solid var(--line);
}
.pagination .page-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--brick);
}
.pagination .page-link.disabled {
  color: var(--line);
  pointer-events: none;
}
.pagination .page-info {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---- Post page ---- */
.post-header { padding: 44px 0 10px; }
.post-header h1 { font-size: 38px; }
.post-header .meta { margin-bottom: 18px; }
.post-cover { margin: 24px 0; border-radius: 2px; overflow: hidden; }
.post-cover img { width: 100%; }

.post-body {
  padding: 10px 0 20px;
  font-size: 18px;
}
.post-body p { margin: 0 0 1.3em; }
.post-body img { border-radius: 2px; margin: 1.4em 0; }
.post-body h2 { font-size: 26px; margin-top: 1.4em; }
.post-body h2:first-child { margin-top: 0; }

/* ---- Khoá nội dung / Unlock ---- */
.lock-wrap {
  position: relative;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.lock-fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 160px;
  background: linear-gradient(to bottom, rgba(234,230,219,0), var(--paper) 75%);
  pointer-events: none;
}
.lock-box {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  width: 90%; max-width: 440px;
  background: var(--ink);
  color: #F4F1E8;
  border-radius: 10px;
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.lock-box .lock-icon { font-size: 22px; margin-bottom: 6px; }
.lock-box .lock-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.lock-box .lock-sub { font-size: 13px; color: #C9C4B6; margin-bottom: 14px; }
.lock-box button.btn-unlock {
  background: var(--brick);
  color: #fff;
  border: none;
  padding: 10px 22px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lock-box button.btn-unlock:hover { background: var(--brick-dark); }
.lock-box .lock-ad-area { margin-top: 4px; }
.lock-box .lock-countdown { font-size: 12px; color: #C9C4B6; margin-top: 10px; }

.back-link {
  display: inline-block;
  margin: 30px 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.related {
  border-top: 2px solid var(--ink);
  padding: 30px 0 60px;
}
.related h3.section-title {
  font-family: 'Lora', serif;
  font-size: 15px;
  font-style: italic;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.related-card { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.related-card h4 { font-size: 17px; margin: 0; }
.related-card h4 a { color: var(--ink); }

footer.site-footer {
  border-top: 2px solid var(--ink);
  padding: 26px 0 40px;
  color: var(--ink-soft);
  font-size: 13px;
}

@media (max-width: 640px) {
  .post-row { grid-template-columns: 1fr 110px; }
  .post-row .thumb { width: 110px; height: 76px; }
  .hero-post h1 { font-size: 30px; }
  .post-header h1 { font-size: 28px; }
  .related-grid { grid-template-columns: 1fr; }
}
