/*
Theme Name: Kitudep
Theme URI: https://kitudep.com/
Description: Theme nhẹ, hiện đại cho công cụ tạo nickname kí tự đặc biệt. Không dùng jQuery, không dùng Bootstrap. Đi kèm plugin Kitudep Nicknames.
Author: Kitudep
Version: 1.1.0
Requires at least: 6.0
Requires PHP: 7.2
License: GNU General Public License v2 or later
Text Domain: kitudep
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --accent: #9D00FF;
  --accent-soft: #f3e3ff;
  --accent-dark: #8400d6;
  --grad-start: #b94dff;
  --grad-end: #9D00FF;
  --bg: #fcf7fb;
  --ink: #2b2333;
  --muted: #8b8195;
  --muted2: #a99fb3;
  --line: #efe6f3;
  --card: #fcf9fc;
  --footer-bg: #2b2333;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Be Vietnam Pro', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
::selection { background: var(--accent-soft); color: var(--ink); }
img { max-width: 100%; height: auto; }
a { color: var(--accent); }

.kitu-container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.kitu-narrow { max-width: 820px; }
.kitu-mid { max-width: 1080px; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 247, 251, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 13px 20px; max-width: var(--maxw); margin: 0 auto;
}
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.site-brand__mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent);
  display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 17px;
}
.site-brand__name { font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.site-brand__name span { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 14.5px; font-weight: 600; }
.main-nav ul { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.main-nav a { text-decoration: none; color: #6b6376; padding: 7px 12px; border-radius: 9px; display: inline-block; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current_page_item > a { background: #fff; color: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; cursor: pointer; font-size: 18px; color: var(--ink); }

@media (max-width: 782px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; width: 100%; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { display: block; }
}

/* ---------- Sections ---------- */
.section { padding: 54px 0; }
.section--tint { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 28px; }
.section-head--left { text-align: left; margin-left: 0; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); padding: 5px 12px; border-radius: 999px;
}
.section h2 { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 14px 0 8px; }
.section-head p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0; }

/* ---------- Hero (front page) ---------- */
.hero { position: relative; overflow: hidden; padding: 28px 0 16px; }
.hero__glow {
  position: absolute; top: -150px; left: 50%; transform: translateX(-50%);
  width: 760px; height: 400px; background: var(--accent-soft); border-radius: 50%;
  filter: blur(80px); opacity: .6; pointer-events: none;
}
.hero__inner { position: relative; max-width: 920px; margin: 0 auto; padding: 0 20px; }
.hero__top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.hero h1 { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.025em; margin: 0; }
.hero h1 .accent { color: var(--accent); }
.hero__badge {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: #fff; border: 1px solid var(--line);
  padding: 6px 13px; border-radius: 999px; white-space: nowrap;
}

/* ---------- Trending list ---------- */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 14px; box-shadow: 0 18px 44px -30px rgba(120, 60, 140, .25); }
.trend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 6px; }
.trend-row { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 13px; }
.trend-row[data-kitu-fill] { cursor: pointer; }
.trend-row:hover { background: var(--bg); }
.trend-row[data-kitu-fill]:hover { background: var(--accent-soft); }
.trend-row[data-kitu-fill]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.trend-row__rank { font-size: 13px; font-weight: 800; color: #cabfd3; width: 22px; text-align: center; flex-shrink: 0; }
.trend-row__term { font-weight: 600; font-size: 15px; color: var(--ink); }
.trend-row__sub { font-size: 12px; color: var(--muted2); }
.pill-up { flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: #0f9b78; background: #e3f7f0; padding: 4px 9px; border-radius: 999px; }
.pill-down { flex-shrink: 0; font-size: 12.5px; font-weight: 700; color: #d23f60; background: #fdeaef; padding: 4px 9px; border-radius: 999px; }

/* ---------- Topics / post cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 258px), 1fr)); gap: 16px; }
.topic-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: #fff; transition: transform .15s, box-shadow .15s, border-color .15s; }
.topic-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 18px 40px -26px rgba(120, 0, 180, .4); }
.topic-card__media { height: 118px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 34px; position: relative; overflow: hidden; }
.topic-card__media img { width: 100%; height: 100%; object-fit: cover; }
.topic-card__tag { position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 700; color: var(--accent); background: #fff; padding: 3px 9px; border-radius: 999px; }
.topic-card__body { padding: 16px 17px 18px; flex: 1; display: flex; flex-direction: column; }
.topic-card__title { font-weight: 700; font-size: 17.5px; letter-spacing: -.01em; margin: 0 0 6px; }
.topic-card__desc { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.55; flex: 1; }
.topic-card__foot { display: flex; align-items: center; justify-content: space-between; }
.topic-card__meta { font-size: 12.5px; color: var(--muted2); }
.topic-card__more { font-size: 13.5px; font-weight: 700; color: var(--accent); }
.count-badge { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

/* ---------- Tabs (archive filter) ---------- */
.kitu-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.kitu-tab { padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer; font-family: inherit; color: #6b6376; background: #fff; text-decoration: none; }
.kitu-tab.is-active { color: #fff; background: var(--accent); border-color: transparent; }

/* ---------- Guide / FAQ ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 22px; align-items: start; }
.guide-box { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; }
.guide-box--tint { background: var(--accent-soft); }
.guide-box h2 { font-size: 24px; margin: 0 0 6px; }
.guide-step { display: flex; gap: 14px; margin-top: 18px; }
.guide-step__num { width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.guide-step__title { font-weight: 700; font-size: 15.5px; margin-bottom: 2px; }
.guide-step__desc { font-size: 14px; color: var(--muted); line-height: 1.55; }
.stat-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.stat { background: #fff; border: 1px solid #f0eaf4; border-radius: 14px; padding: 12px 16px; flex: 1; min-width: 120px; }
.stat__num { font-size: 22px; font-weight: 800; color: var(--accent); }
.stat__label { font-size: 12.5px; color: var(--muted); }

.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 20px; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; font-weight: 700; font-size: 16px; color: var(--ink); }
.faq-q .faq-icon { font-size: 22px; font-weight: 500; color: var(--accent); flex-shrink: 0; line-height: 1; }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; font-size: 15px; color: #6b6376; line-height: 1.65; }
.faq-item.is-open .faq-a { padding: 0 20px 18px; max-height: 600px; }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted2); font-weight: 500; flex-wrap: wrap; margin-bottom: 14px; }
.crumbs a { color: var(--muted2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .current { color: #6b6376; font-weight: 600; }

/* ---------- Page / article prose ---------- */
.page-head { padding: 36px 0 8px; }
.page-head h1 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; margin: 0 0 8px; }
.page-head p { font-size: 16.5px; color: var(--muted); line-height: 1.6; margin: 0; max-width: 600px; }

.article { max-width: 820px; margin: 0 auto; padding: 18px 20px 40px; }
.article__cat { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; text-decoration: none; }
.article h1 { font-size: 38px; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; margin: 16px 0 14px; }
.article__meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted2); font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.article__meta .hl { color: var(--accent); font-weight: 600; }

.prose { font-size: 16.5px; line-height: 1.75; color: #5f5769; }
.prose > p:first-child { font-size: 17px; margin-top: 22px; }
.prose h2 { font-size: 25px; font-weight: 800; letter-spacing: -.02em; margin: 36px 0 12px; scroll-margin-top: 80px; color: var(--ink); }
.prose h3 { font-size: 21px; font-weight: 800; margin: 28px 0 12px; scroll-margin-top: 80px; color: var(--ink); }
.prose a { color: var(--accent); }
.prose img { border-radius: 14px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose blockquote { border-left: 4px solid var(--accent); margin: 18px 0; padding: 6px 18px; background: var(--accent-soft); border-radius: 0 12px 12px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.prose code { background: var(--accent-soft); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose figure { margin: 18px 0; }

/* TOC */
.toc { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin: 26px 0; }
.toc__title { font-weight: 700; font-size: 14px; color: #6b6376; margin-bottom: 12px; }
.toc ol { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 9px; font-size: 15px; }
.toc a { color: var(--accent); text-decoration: none; font-weight: 600; }
.toc a:hover { text-decoration: underline; }

/* CTA */
.cta-box { background: var(--accent); border-radius: 22px; padding: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cta-box h2, .cta-box .cta-title { font-size: 24px; font-weight: 800; color: #fff; margin: 0 0 6px; }
.cta-box p { font-size: 15px; color: #f0d6ff; margin: 0; line-height: 1.5; }
.btn-cta { background: #fff; color: var(--accent); text-decoration: none; font-weight: 700; font-size: 15px; padding: 14px 26px; border-radius: 13px; white-space: nowrap; display: inline-block; }
.btn-cta:hover { background: var(--accent-soft); }
.cta-soft { background: var(--accent-soft); border-radius: 18px; padding: 26px; text-align: center; margin: 36px 0 0; }
.cta-soft .cta-title { color: var(--ink); }
.btn-accent { display: inline-block; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; padding: 13px 26px; border-radius: 13px; }
.btn-accent:hover { background: var(--accent-dark); }

/* Author box (E-E-A-T) */
.author-box { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin: 30px 0 0; }
.author-box__avatar { width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0; }
.author-box__name { font-weight: 800; font-size: 16px; color: var(--ink); margin-bottom: 4px; }
.author-box__bio { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.6; }

/* Follow on Google */
.gfollow-box { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin: 26px 0 0; }
.gfollow-box__text { font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.gfollow-box__text strong { color: var(--ink); }
.gfollow-btn { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; background: #fff; color: #3c4043; border: 1px solid #dadce0; border-radius: 999px; padding: 11px 20px; font-weight: 700; font-size: 14.5px; text-decoration: none; box-shadow: 0 1px 2px rgba(60,64,67,.1); }
.gfollow-btn:hover { background: #f8f9ff; border-color: #c7d2fe; box-shadow: 0 2px 6px rgba(60,64,67,.18); }
.gfollow-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 600; color: #d8d0e0; background: #3a3247; border: 1px solid #4a4159; padding: 7px 13px; border-radius: 999px; text-decoration: none; }
.gfollow-link:hover { background: #fff; color: #3c4043; border-color: #fff; }
.gfollow-link svg, .gfollow-btn svg { background: #fff; border-radius: 50%; padding: 1px; }

/* Related */
.related { margin: 44px 0 0; }
.related h3 { font-size: 21px; font-weight: 800; margin: 0 0 16px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.related-card { display: block; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 15px; padding: 16px; background: #fff; }
.related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.related-card__icon { font-size: 24px; margin-bottom: 8px; }
.related-card__title { font-weight: 700; font-size: 16px; margin-bottom: 3px; }
.related-card__sub { font-size: 13px; color: var(--muted2); }

/* Featured (news) */
.feature-card { display: grid; grid-template-columns: 1.1fr 1fr; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff; }
.feature-card:hover { border-color: var(--accent); box-shadow: 0 20px 50px -30px rgba(120, 0, 180, .4); }
.feature-card__media { background: var(--accent-soft); min-height: 280px; display: flex; align-items: center; justify-content: center; font-size: 72px; overflow: hidden; }
.feature-card__media img { width: 100%; height: 100%; object-fit: cover; }
.feature-card__body { padding: 32px; display: flex; flex-direction: column; justify-content: center; }
.feature-card__body h2 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 14px 0 10px; }
.feature-card__body p { font-size: 15px; color: var(--muted); line-height: 1.65; margin: 0 0 16px; }
.feature-card__date { font-size: 13px; color: var(--muted2); }

.post-row { display: flex; gap: 15px; text-decoration: none; color: inherit; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; }
.post-row:hover { border-color: var(--accent); }
.post-row__media { width: 78px; height: 78px; flex-shrink: 0; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 32px; overflow: hidden; }
.post-row__media img { width: 100%; height: 100%; object-fit: cover; }
.post-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-row__tag { font-size: 11px; font-weight: 700; color: var(--accent); margin-bottom: 5px; }
.post-row__title { font-weight: 700; font-size: 16px; line-height: 1.35; margin-bottom: auto; }
.post-row__date { font-size: 12.5px; color: var(--muted2); margin-top: 8px; }

/* Pagination */
.kitu-pagination { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 36px 0 0; }
.kitu-pagination .page-numbers { padding: 9px 15px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: #6b6376; font-weight: 600; background: #fff; }
.kitu-pagination .page-numbers.current { background: var(--accent); color: #fff; border-color: transparent; }
.kitu-pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }

/* 404 + search */
.notice-box { text-align: center; max-width: 560px; margin: 60px auto; padding: 0 20px; }
.notice-box__big { font-size: 90px; font-weight: 800; color: var(--accent); line-height: 1; letter-spacing: -.04em; }
.notice-box h1 { font-size: 28px; font-weight: 800; margin: 12px 0 8px; }
.notice-box p { color: var(--muted); margin: 0 0 22px; }
.search-form { display: flex; gap: 8px; max-width: 480px; margin: 0 auto; }
.search-form input[type=search] { flex: 1; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; }
.search-form input[type=search]:focus { outline: none; border-color: var(--accent); }
.search-form button { padding: 13px 22px; border: none; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; font-family: inherit; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: #d8d0e0; padding: 48px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 30px; }
.footer-brand { grid-column: 1 / -1; max-width: 320px; }
.footer-brand .site-brand__name { color: #fff; }
.footer-brand p { font-size: 14px; line-height: 1.65; color: #a89fb5; margin: 12px 0 0; }
.footer-col h3 { font-weight: 700; color: #fff; font-size: 14px; margin: 0 0 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.footer-col a { color: #a89fb5; text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-social { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.footer-social a { font-size: 12.5px; font-weight: 600; color: #d8d0e0; background: #3a3247; border: 1px solid #4a4159; padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.footer-trust { margin: 14px 0 0; font-size: 12.5px; color: #8a8197; line-height: 1.55; }
.footer-bottom { border-top: 1px solid #423a4f; margin-top: 34px; padding-top: 20px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 13px; color: #8a8197; }

@media (max-width: 720px) {
  .section { padding: 36px 0; }
  .section h2, .page-head h1 { font-size: 26px; }
  .article h1 { font-size: 30px; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card__media { min-height: 180px; font-size: 56px; }
  .hero h1 { font-size: 23px; }
}

/* Reclaim width on phones: thinner outer gutters + lighter nested frames */
@media (max-width: 600px) {
  .kitu-container { padding: 0 12px; }
  .hero { padding: 18px 0 10px; }
  .hero__inner { padding: 0 12px; }
  .section { padding: 30px 0; }
  .section-head { margin-bottom: 18px; }
  .panel { padding: 6px; border-radius: 16px; box-shadow: none; }
  .trend-row { padding: 10px; gap: 10px; }
  .topic-card__body { padding: 14px 14px 16px; }
  .guide-box { padding: 22px 18px; }
  .faq-q { padding: 15px 16px; font-size: 15px; }
  .faq-item.is-open .faq-a { padding: 0 16px 16px; }
  .article { padding: 14px 14px 30px; }
  .cta-box, .cta-soft { padding: 22px 18px; }
}
