/*
Theme Name: RTK Child
Template: twentytwentyone
Version: 1.0
*/

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

body {
  font-family: -apple-system, 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  background: #f4f4f4;
  color: #333;
  font-size: 14px;
}

/* ── Header ── */
.rtk-header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.rtk-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.rtk-logo {
  font-size: 20px;
  font-weight: 700;
  color: #03c75a;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.rtk-logo span { color: #222; }
.rtk-gnb { display: flex; gap: 20px; list-style: none; }
.rtk-gnb a {
  font-size: 13px;
  color: #555;
  text-decoration: none;
}
.rtk-gnb a:hover { color: #03c75a; }

/* ── Category bar ── */
.rtk-catbar {
  background: #fff;
  border-bottom: 1px solid #eee;
  overflow-x: auto;
}
.rtk-catbar-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  gap: 6px;
  white-space: nowrap;
}
.rtk-catbar a {
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  background: #f4f4f4;
  color: #555;
  text-decoration: none;
  border: 1px solid #e0e0e0;
}
.rtk-catbar a:hover,
.rtk-catbar a.current { background: #03c75a; color: #fff; border-color: #03c75a; }

/* ── Layout ── */
.rtk-wrap {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) {
  .rtk-wrap { grid-template-columns: 1fr; }
  .rtk-sidebar { display: none; }
}

/* ── Post cards ── */
.rtk-post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.rtk-post-header h2 { font-size: 15px; font-weight: 700; color: #222; }
.rtk-post-count { font-size: 12px; color: #aaa; }

.rtk-card-list { display: flex; flex-direction: column; gap: 12px; }

.rtk-card {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  display: flex;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
.rtk-card:hover { border-color: #bbb; }

.rtk-card-thumb {
  width: 140px;
  min-width: 140px;
  height: 110px;
  object-fit: cover;
  background: #ddd;
  display: block;
}
.rtk-card-thumb-placeholder {
  width: 140px;
  min-width: 140px;
  height: 110px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #ccc;
}

.rtk-card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
}
.rtk-card-cat {
  font-size: 11px;
  color: #03c75a;
  font-weight: 600;
  margin-bottom: 5px;
}
.rtk-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
  line-height: 1.4;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rtk-card-excerpt {
  font-size: 12px;
  color: #777;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rtk-card-meta {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}
.rtk-card-meta span { font-size: 11px; color: #bbb; }

/* ── Pagination ── */
.rtk-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 24px 0;
}
.rtk-pagination a, .rtk-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 13px;
  border: 1px solid #e0e0e0;
  background: #fff;
  color: #555;
  text-decoration: none;
}
.rtk-pagination .current {
  background: #03c75a;
  color: #fff;
  border-color: #03c75a;
}

/* ── Sidebar ── */
.rtk-sidebar { display: flex; flex-direction: column; gap: 14px; }

.rtk-widget {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  padding: 16px;
}
.rtk-widget-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 12px;
}

/* Profile widget */
.rtk-profile { text-align: center; }
.rtk-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #03c75a;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
}
.rtk-profile-name { font-size: 14px; font-weight: 700; color: #222; margin-bottom: 6px; }
.rtk-profile-bio { font-size: 12px; color: #888; line-height: 1.5; margin-bottom: 14px; }
.rtk-profile-stats { display: flex; justify-content: center; gap: 24px; }
.rtk-stat-num { font-size: 15px; font-weight: 700; color: #222; }
.rtk-stat-label { font-size: 11px; color: #aaa; }

/* Category list */
.rtk-cat-list { list-style: none; }
.rtk-cat-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f7f7f7;
}
.rtk-cat-list li:last-child { border: none; }
.rtk-cat-list a { font-size: 13px; color: #444; text-decoration: none; }
.rtk-cat-list a:hover { color: #03c75a; }
.rtk-cat-count {
  font-size: 11px;
  color: #aaa;
  background: #f4f4f4;
  padding: 2px 8px;
  border-radius: 10px;
}

/* Recent posts */
.rtk-recent-list { display: flex; flex-direction: column; gap: 10px; }
.rtk-recent-item {
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.rtk-recent-thumb {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  object-fit: cover;
  background: #eee;
  min-width: 48px;
}
.rtk-recent-title {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rtk-recent-date { font-size: 11px; color: #bbb; }

/* ── Footer ── */
.rtk-footer {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  margin-top: 40px;
  padding: 24px 20px;
  text-align: center;
}
.rtk-footer p { font-size: 12px; color: #aaa; line-height: 1.8; }
.rtk-footer a { color: #888; text-decoration: none; }

/* ── Single post ── */
.rtk-single-wrap {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) { .rtk-single-wrap { grid-template-columns: 1fr; } }

.rtk-post-box {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
  padding: 32px;
}
.rtk-post-box .post-cat { font-size: 11px; color: #03c75a; font-weight: 600; margin-bottom: 10px; }
.rtk-post-box h1 { font-size: 22px; font-weight: 700; color: #111; line-height: 1.4; margin-bottom: 12px; }
.rtk-post-box .post-meta { font-size: 12px; color: #aaa; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; }
.rtk-post-box .post-content { font-size: 15px; line-height: 1.8; color: #333; }
.rtk-post-box .post-content h2 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; color: #111; }
.rtk-post-box .post-content h3 { font-size: 16px; font-weight: 700; margin: 22px 0 10px; color: #222; }
.rtk-post-box .post-content p { margin-bottom: 16px; }
.rtk-post-box .post-content img { max-width: 100%; border-radius: 6px; margin: 12px 0; }
