/*
Theme Name: HTKNT Editorial Child
Template: generatepress
Version: 2.0.0
Text Domain: htknt-gp
Description: Giao diện tạp chí kỹ thuật Thiết kế Nội thất, Kiến trúc, CAD/BIM & Diễn họa 3D — HTKNT Lab.
*/

:root {
  --htknt-primary: #1B4332;
  --htknt-primary-dark: #122E22;
  --htknt-primary-soft: #E9F5EE;
  --htknt-accent: #D4A373;
  --htknt-accent-soft: #FDF8F2;
  --htknt-surface: #FAF9F6;
  --htknt-ink: #111827;
  --htknt-muted: #4b5563;
  --htknt-line: #e5e7eb;
  --htknt-max: 1160px;
  --htknt-read: 760px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--htknt-ink);
  background: #ffffff;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

.site-header,
.main-navigation,
.site-footer {
  display: none;
}

.site.grid-container {
  max-width: var(--htknt-max);
  margin: 0 auto;
  padding: 28px 20px 64px;
}

body.page-template-template-clean-editorial .site.grid-container,
body.home .site.grid-container,
body.page-id-636 .site.grid-container {
  max-width: none;
  padding: 0;
}

.htknt-skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 10px 14px;
  background: var(--htknt-ink);
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
}

.htknt-skip-link:focus {
  left: 12px;
}

.htknt-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 249, 246, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--htknt-line);
}

.htknt-header__inner {
  max-width: var(--htknt-max);
  margin: 0 auto;
  min-height: 72px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.htknt-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--htknt-ink);
  text-decoration: none;
  min-width: 0;
}

.htknt-brand__icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: var(--htknt-primary);
  color: var(--htknt-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.htknt-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.htknt-brand__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--htknt-primary);
  letter-spacing: -0.01em;
}

.htknt-brand__sub {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--htknt-muted);
}

.htknt-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.htknt-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.htknt-nav__list a {
  display: inline-flex;
  align-items: center;
  padding: 8px 11px;
  border-radius: 8px;
  color: #1f2937;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}

.htknt-nav__list a:hover,
.htknt-nav__list .current-menu-item > a {
  color: var(--htknt-primary);
  background: var(--htknt-primary-soft);
}

.htknt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border-radius: 8px;
  border: 1px solid var(--htknt-primary);
  background: var(--htknt-primary);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.htknt-btn:hover {
  background: var(--htknt-primary-dark);
  border-color: var(--htknt-primary-dark);
}

.htknt-btn--ghost {
  background: #ffffff;
  color: var(--htknt-primary) !important;
  border-color: var(--htknt-primary);
}

.htknt-btn--ghost:hover {
  background: var(--htknt-primary-soft);
}

.htknt-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border: 1px solid var(--htknt-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--htknt-ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.entry-content,
.entry-header,
.htknt-reading {
  max-width: var(--htknt-read);
  margin-left: auto;
  margin-right: auto;
}

.htknt-page .entry-header,
body.page-template-template-clean-editorial .entry-header {
  display: none;
}

.htknt-page,
.entry-content:has(> .htknt-page) {
  max-width: none;
}

.entry-title,
h1 {
  color: var(--htknt-ink);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.entry-content h2 {
  font-size: clamp(1.35rem, 2.2vw, 1.75rem);
  line-height: 1.3;
  margin: 2.1em 0 0.65em;
  color: var(--htknt-primary);
}

.entry-content h3 {
  font-size: clamp(1.12rem, 1.8vw, 1.32rem);
  line-height: 1.38;
  margin: 1.6em 0 0.5em;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content table,
.entry-content blockquote,
.entry-content figure {
  margin: 0 0 1.15em;
}

.entry-content a {
  color: var(--htknt-primary);
  text-underline-offset: 3px;
  font-weight: 500;
}

.entry-content img,
.post-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.htknt-inline-cta {
  max-width: var(--htknt-read);
  margin: 36px auto;
  padding: 22px 24px;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--htknt-primary);
  border-radius: 12px;
  background: var(--htknt-surface);
}

.htknt-inline-cta h2 {
  margin: 0 0 8px !important;
  font-size: 1.2rem !important;
  color: var(--htknt-primary);
}

.htknt-inline-cta p {
  margin: 0 0 14px !important;
  color: var(--htknt-muted);
}

.htknt-inline-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.htknt-footer {
  border-top: 1px solid var(--htknt-line);
  background: var(--htknt-surface);
  color: var(--htknt-muted);
  font-size: 15px;
}

.htknt-footer__inner {
  max-width: var(--htknt-max);
  margin: 0 auto;
  padding: 44px 20px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 28px;
}

.htknt-footer h2,
.htknt-footer h3 {
  color: var(--htknt-primary);
  font-size: 16px;
  margin: 0 0 10px;
}

.htknt-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.htknt-footer a {
  color: #1f2937;
  text-decoration: none;
}

.htknt-footer a:hover {
  color: var(--htknt-primary);
}

/* Archive & Blog Cards */
body.blog .site-main,
body.archive .site-main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 24px;
}

body.blog .page-header,
body.archive .page-header,
body.blog .paging-navigation,
body.archive .paging-navigation {
  grid-column: 1 / -1;
}

body.blog .post,
body.archive .post {
  border: 1px solid var(--htknt-line);
  border-radius: 12px;
  padding: 20px;
  background: #ffffff;
  margin: 0;
}

body.blog .entry-title,
body.archive .entry-title {
  font-size: 1.2rem;
  line-height: 1.38;
}

/* Editorial Article Layout (.htknt-* & legacy alias support) */
.htknt-article,
.htknt-editorial,
.arc-article,
.arc-editorial {
  color: var(--htknt-ink);
  background: #ffffff;
  font-size: 17px;
  line-height: 1.75;
}

.htknt-article .htknt-shell,
.arc-article .arc-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.htknt-editorial,
.arc-editorial {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.htknt-breadcrumb,
.arc-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--htknt-muted);
  font-size: 14px;
}

.htknt-breadcrumb a,
.arc-breadcrumb a {
  color: var(--htknt-muted);
  text-decoration: none;
}

.htknt-article-head,
.htknt-hero,
.arc-article-head,
.arc-hero {
  max-width: 820px;
  margin: 0 0 24px;
}

.htknt-kicker,
.arc-kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--htknt-primary-soft);
  color: var(--htknt-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.htknt-dek,
.htknt-lead,
.arc-dek,
.arc-lead {
  margin: 0;
  color: #374151;
  font-size: clamp(1.03rem, 1.5vw, 1.18rem);
  line-height: 1.65;
}

.htknt-featured,
.htknt-media,
.htknt-content figure,
.arc-featured,
.arc-media,
.arc-content figure {
  margin: 22px 0 28px;
  border: 1px solid var(--htknt-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--htknt-surface);
}

.htknt-featured img,
.htknt-media img,
.htknt-content figure img,
.arc-featured img,
.arc-media img,
.arc-content figure img {
  display: block;
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 0;
}

.htknt-featured figcaption,
.htknt-media figcaption,
.htknt-content figcaption,
.arc-featured figcaption,
.arc-media figcaption,
.arc-content figcaption {
  padding: 10px 14px;
  color: var(--htknt-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.htknt-article-grid,
.arc-article-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}

.htknt-toc,
.arc-toc {
  position: sticky;
  top: 92px;
  padding: 16px 18px;
  border: 1px solid var(--htknt-line);
  border-radius: 12px;
  background: var(--htknt-surface);
  font-size: 14px;
  line-height: 1.5;
}

.htknt-toc strong,
.arc-toc strong {
  display: block;
  margin-bottom: 10px;
  color: var(--htknt-primary);
}

.htknt-toc ol,
.arc-toc ol {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.htknt-toc a,
.arc-toc a {
  color: #374151;
  text-decoration: none;
}

.htknt-toc a:hover,
.arc-toc a:hover {
  color: var(--htknt-primary);
}

.htknt-content,
.arc-content {
  min-width: 0;
  max-width: 760px;
}

.htknt-content section,
.htknt-editorial section,
.arc-content section,
.arc-editorial section {
  scroll-margin-top: 92px;
  margin-bottom: 28px;
}

.htknt-table-wrap,
.arc-table-wrap {
  overflow-x: auto;
  margin: 18px 0 24px;
  border: 1px solid var(--htknt-line);
  border-radius: 12px;
}

.htknt-table-wrap table,
.htknt-content table,
.arc-table-wrap table,
.arc-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 15px;
}

.htknt-table-wrap th,
.htknt-table-wrap td,
.htknt-content th,
.htknt-content td,
.arc-table-wrap th,
.arc-table-wrap td,
.arc-content th,
.arc-content td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--htknt-line);
  text-align: left;
  vertical-align: top;
}

.htknt-table-wrap th,
.htknt-content th,
.arc-table-wrap th,
.arc-content th {
  background: var(--htknt-primary-soft);
  color: var(--htknt-primary);
  font-weight: 700;
}

.htknt-note,
.htknt-checklist,
.htknt-cta,
.arc-note,
.arc-checklist,
.arc-cta {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--htknt-primary);
  border-radius: 12px;
  background: var(--htknt-surface);
}

/* Home & About Page Components */
.htknt-home-hero {
  background: linear-gradient(135deg, #122E22 0%, #1B4332 65%, #2D6A4F 100%);
  color: #ffffff;
  padding: 64px 20px;
}

.htknt-home-hero__inner {
  max-width: var(--htknt-max);
  margin: 0 auto;
}

.htknt-home-hero h1 {
  color: #ffffff;
  max-width: 820px;
  margin-bottom: 16px;
}

.htknt-home-hero p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 740px;
  font-size: 1.12rem;
}

.htknt-home-section {
  padding: 52px 20px;
}

.htknt-home-section--alt {
  background: var(--htknt-surface);
  border-top: 1px solid var(--htknt-line);
  border-bottom: 1px solid var(--htknt-line);
}

.htknt-home-shell {
  max-width: var(--htknt-max);
  margin: 0 auto;
}

.htknt-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 22px;
  margin-top: 26px;
}

.htknt-card {
  border: 1px solid var(--htknt-line);
  border-radius: 12px;
  padding: 22px;
  background: #ffffff;
}

.htknt-card h3 {
  margin-top: 0;
  color: var(--htknt-primary);
}

@media (max-width: 900px) {
  .htknt-nav-toggle {
    display: inline-flex;
  }

  .htknt-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--htknt-line);
    flex-direction: column;
    align-items: stretch;
  }

  .htknt-header.is-open .htknt-nav {
    display: flex;
  }

  .htknt-nav__list {
    flex-direction: column;
    align-items: stretch;
  }

  .htknt-footer__inner,
  .htknt-article-grid,
  .arc-article-grid {
    grid-template-columns: 1fr;
  }

  .htknt-toc,
  .arc-toc {
    position: static;
  }
}