/* =============================================
   MangoChat Thai – Main Stylesheet
   ============================================= */

/* ---------- Variables ---------- */
:root {
  --primary:       #FF8C00;
  --primary-lt:    #FFB347;
  --primary-dk:    #E07000;
  --dark:          #1a1a2e;
  --dark2:         #16213e;
  --dark3:         #0f3460;
  --accent:        #FF4757;
  --green:         #3DDC84;
  --text:          #2d2d2d;
  --text-lt:       #777;
  --bg-lt:         #f7f8fa;
  --white:         #ffffff;
  --border:        #e5e7eb;
  --radius:        16px;
  --shadow:        0 12px 40px rgba(0,0,0,.10);
  --shadow-dk:     0 20px 60px rgba(0,0,0,.40);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html   { scroll-behavior: smooth; font-size: 16px; }
body   { font-family: 'Sarabun', sans-serif; background: linear-gradient(135deg, #1a1a2e, #2d2d2d); color: var(--text); line-height: 1.7; overflow-x: hidden; position: relative; }

/* ===== Dynamic Animated Background (Global) ===== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(125deg, rgba(255,140,0,0.25), rgba(0,255,200,0.2), rgba(255,0,180,0.2));
    background-size: 400% 400%;
    animation: gradientMove 15s ease infinite;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 0% 50%; }
}

/* Floating Bubbles */
.bg-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    bottom: -80px;
    border-radius: 50%;
    opacity: 0.4;
    animation: floatBubble linear infinite;
}

.bubble:nth-child(1)  { width: 40px; height: 40px; left: 10%; animation-duration: 20s; background: rgba(255,140,0,0.3);   animation-delay: 0s; }
.bubble:nth-child(2)  { width: 25px; height: 25px; left: 25%; animation-duration: 24s; background: rgba(0,200,255,0.3);   animation-delay: 2s; }
.bubble:nth-child(3)  { width: 50px; height: 50px; left: 40%; animation-duration: 22s; background: rgba(255,0,180,0.25);  animation-delay: 4s; }
.bubble:nth-child(4)  { width: 35px; height: 35px; left: 55%; animation-duration: 26s; background: rgba(100,149,237,0.3); animation-delay: 1s; }
.bubble:nth-child(5)  { width: 20px; height: 20px; left: 70%; animation-duration: 18s; background: rgba(255,200,0,0.3);   animation-delay: 3s; }
.bubble:nth-child(6)  { width: 45px; height: 45px; left: 85%; animation-duration: 23s; background: rgba(0,255,150,0.25);  animation-delay: 5s; }
.bubble:nth-child(7)  { width: 30px; height: 30px; left:  5%; animation-duration: 21s; background: rgba(200,100,255,0.3); animation-delay: 7s; }
.bubble:nth-child(8)  { width: 55px; height: 55px; left: 60%; animation-duration: 25s; background: rgba(255,100,50,0.2);  animation-delay: 3s; }
.bubble:nth-child(9)  { width: 22px; height: 22px; left: 35%; animation-duration: 19s; background: rgba(0,200,100,0.3);   animation-delay: 6s; }
.bubble:nth-child(10) { width: 38px; height: 38px; left: 90%; animation-duration: 27s; background: rgba(255,140,0,0.25);  animation-delay: 8s; }

@keyframes floatBubble {
    0%   { transform: translateY(0) scale(1);        opacity: 0.4; }
    50%  { opacity: 0.6; transform: translateY(-110vh) scale(1.1); }
    100% { transform: translateY(-120vh) scale(0.9); opacity: 0; }
}
a      { color: inherit; text-decoration: none; }
img    { max-width: 100%; display: block; }

/* ---------- Utility ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.section-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.section-title { font-size: 32px; font-weight: 800; color: var(--dark); margin-bottom: 16px; line-height: 1.3; }
.section-title span { color: var(--primary); }
.section-desc { font-size: 15px; color: var(--text-lt); max-width: 560px; margin: 0 auto; line-height: 1.8; }
.text-center { text-align: center; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky; top: 0; z-index: 200;
  background: rgba(26,26,46,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 14px 0;
}
.navbar-inner { display: flex; align-items: center; gap: 12px; }
.navbar-logo  { width: 38px; height: 38px; flex-shrink: 0; }
.navbar-name  { font-size: 20px; font-weight: 800; color: var(--primary); text-decoration: none; }
.navbar-tag   { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--primary); text-decoration: none; transition: color .2s; }
.navbar-link  { margin-left: 20px; font-size: 14px; font-weight: 600; color: var(--primary); text-decoration: none; transition: color .2s; }
.navbar-link:hover { color: var(--primary-lt); }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(150deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
  padding: 96px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}


.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 30% 60%, rgba(255,140,0,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 75% 40%, rgba(255,71,87,.12) 0%, transparent 70%);
  animation: glowPulse 7s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100%{opacity:1} 50%{opacity:.6} }

.hero-inner  { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; }
.hero-logo   { width: 110px; height: 110px; margin: 0 auto 28px; filter: drop-shadow(0 10px 28px rgba(255,140,0,.45)); animation: floatY 3.5s ease-in-out infinite; }
@keyframes floatY { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

.hero-title  { font-size: 52px; font-weight: 800; color: var(--primary); text-shadow: 0 2px 24px rgba(255,140,0,.35); margin-bottom: 8px; }
.hero-sub    { font-size: 22px; font-weight: 300; color: rgba(255,255,255,.75); margin-bottom: 20px; }
.hero-desc   { font-size: 15px; color: rgba(255,255,255,.55); max-width: 580px; margin: 0 auto 44px; line-height: 2; }

/* Download Buttons */
.btn-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 72px; }
.btn-dl {
  display: inline-flex; flex-direction: column; align-items: center;
  min-width: 168px; padding: 14px 32px; border-radius: 50px;
  font-family: 'Sarabun', sans-serif; cursor: pointer; transition: all .3s ease;
  border: none; outline: none;
}
.btn-dl-label { font-size: 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; opacity: .8; }
.btn-dl-name  { font-size: 18px; font-weight: 800; margin-top: 2px; }
.btn-android {
  background: linear-gradient(135deg, #3DDC84, #28a745);
  color: #fff;
  box-shadow: 0 10px 28px rgba(61,220,132,.35);
}
.btn-android:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(61,220,132,.45); }
.btn-ios {
  background: linear-gradient(135deg, #636e88, #3a4257);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
.btn-ios:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.4); }

/* Phone stack in hero */
.hero-phones { display: flex; justify-content: center; align-items: flex-end; gap: 16px; }
.hphone {
  width: 150px;
  background: #111;
  border-radius: 22px;
  border: 3px solid rgba(255,255,255,.14);
  overflow: hidden;
  box-shadow: var(--shadow-dk);
  transition: transform .5s ease;
}
.hphone:nth-child(1) { transform: scale(.80) translateX(30px) rotate(-6deg); opacity: .65; }
.hphone:nth-child(2) { transform: scale(1) translateY(-16px); opacity: 1; z-index: 2; }
.hphone:nth-child(3) { transform: scale(.80) translateX(-30px) rotate(6deg); opacity: .65; }

/* ===== CHANGELOG ===== */
.changelog { padding: 80px 0; background: var(--bg-lt); }
.cl-list   { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.cl-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 22px 26px;
  border-left: 4px solid var(--primary);
  box-shadow: 0 2px 14px rgba(0,0,0,.05);
  transition: transform .25s ease, box-shadow .25s ease;
}
.cl-item:hover { transform: translateX(6px); box-shadow: 0 6px 24px rgba(0,0,0,.10); }
.cl-date {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; color: var(--primary);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
}
.cl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.cl-text { font-size: 14px; color: #555; line-height: 1.85; }

/* ===== STATS ===== */
.stats {
  background: linear-gradient(135deg, var(--dark), var(--dark3));
  padding: 72px 24px;
  text-align: center;
}
.stats-row   { display: flex; justify-content: center; flex-wrap: wrap; max-width: 860px; margin: 0 auto; }
.stat-cell   { flex: 1 1 220px; padding: 32px 20px; border-right: 1px solid rgba(255,255,255,.08); }
.stat-cell:last-child { border-right: none; }
.stat-num {
  display: block; font-size: 52px; font-weight: 800;
  color: var(--primary); line-height: 1; margin-bottom: 10px;
  font-feature-settings: 'tnum';
}
.stat-lbl { font-size: 14px; color: rgba(255,255,255,.55); }

/* ===== FEATURES ===== */
.features { padding: 88px 0; background: var(--white); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 52px;
}
.feat-card {
  background: var(--bg-lt);
  border-radius: 20px;
  padding: 36px 28px;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  transition: all .3s ease;
}
.feat-card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-lt));
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s ease;
}
.feat-card:hover { transform: translateY(-8px); background: var(--white); border-color: var(--border); box-shadow: var(--shadow); }
.feat-card:hover::after { transform: scaleX(1); }
.feat-icon {
  width: 60px; height: 60px; border-radius: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-lt));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(255,140,0,.28);
}
.feat-icon svg { width: 28px; height: 28px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feat-title { font-size: 19px; font-weight: 700; color: var(--dark); margin-bottom: 10px; }
.feat-desc  { font-size: 14px; color: var(--text-lt); line-height: 1.85; }

/* ===== SCREENSHOTS ===== */
.screenshots { padding: 88px 0; background: var(--bg-lt); overflow: hidden; }
.shots-track {
  display: flex; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 20px 24px 40px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.shots-track::-webkit-scrollbar { display: none; }
.shot-wrap { flex: 0 0 auto; scroll-snap-align: start; }
.shot-phone {
  width: 188px; height: 340px;
  background: #111; border-radius: 26px;
  border: 4px solid #222;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(0,0,0,.30);
  position: relative;
}
.shot-phone::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 72px; height: 20px;
  background: #111; border-radius: 0 0 14px 14px; z-index: 10;
}
.shot-phone svg { display: block; width: 100%; height: 100%; }

/* ===== SUPPORT ===== */
.support {
  background: linear-gradient(150deg, var(--dark2), var(--dark3));
  padding: 88px 24px; text-align: center;
}
.support .section-title { color: #fff; }
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px; margin-top: 52px;
}
.sup-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: var(--radius);
  padding: 30px 20px;
  transition: all .3s ease;
  display: block; color: #fff;
}
.sup-card:hover { background: rgba(255,140,0,.14); border-color: rgba(255,140,0,.4); transform: translateY(-5px); }
.sup-icon {
  width: 50px; height: 50px; margin: 0 auto 16px;
  background: rgba(255,140,0,.18); border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
}
.sup-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--primary-lt); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sup-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.sup-hint { font-size: 12px; color: rgba(255,255,255,.45); }

/* ===== FOOTER ===== */
.footer {
  background: #0d0d1c; padding: 40px 24px; text-align: center;
  border-top: 1px solid rgba(255,255,255,.05);
}
.footer-brand { font-size: 26px; font-weight: 800; color: var(--primary); display: block; margin-bottom: 10px; }
.footer-text  { font-size: 13px; color: rgba(255,255,255,.28); line-height: 1.8; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin: 16px 0; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,.40); transition: color .2s; }
.footer-links a:hover { color: var(--primary); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-title { font-size: 36px; }
  .hero-sub   { font-size: 17px; }
  .section-title { font-size: 24px; }
  .stat-num   { font-size: 38px; }
  .hphone:nth-child(1),
  .hphone:nth-child(3) { display: none; }
  .hphone:nth-child(2) { transform: none; }
  .navbar-tag { display: none; }
  .features-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero { padding: 64px 16px 56px; }
  .btn-group { flex-direction: column; align-items: center; }
  .stat-cell { flex: 1 1 100%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.08); }
  .stat-cell:last-child { border-bottom: none; }
}


/* =================================================================
   SITE HEADER (shared – archive & single)
   ================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--dark);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 0;
}
.site-header .container {
  padding: 14px 24px;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}
.site-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-header__logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.site-header__name {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.3px;
}

@media (max-width: 768px) {
  .site-header__name { font-size: 17px; }
  .site-header__logo { width: 30px; height: 30px; }
}

/* =================================================================
   BREADCRUMB BAR
   ================================================================= */
.breadcrumb-bar {
  background: var(--bg-lt);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  gap: 4px;
  padding: 0;
  margin: 0;
  font-size: 13px;
  color: var(--text-lt);
}
.breadcrumb__item a {
  color: var(--primary);
  font-weight: 500;
  transition: opacity .2s;
}
.breadcrumb__item a:hover { opacity: .75; }
.breadcrumb__item--current { color: var(--text); font-weight: 600; }
.breadcrumb__sep {
  color: var(--border);
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}

/* =================================================================
   SITE FOOTER (shared)
   ================================================================= */
.site-footer {
  background: #0d0d1c;
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.05);
  margin-top: auto;
}
.site-footer__brand {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}
.site-footer__text {
  font-size: 13px;
  color: rgba(255,255,255,.28);
  line-height: 1.8;
}

/* =================================================================
   ARCHIVE PAGE LAYOUT
   ================================================================= */
.archive-page,
.single-page {
  background: var(--bg-lt);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.archive-main,
.single-main {
  flex: 1;
  padding: 48px 0 72px;
}

/* Archive header */
.archive-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.archive-header__title {
  font-size: 30px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.3;
}
.archive-header__title span { color: var(--primary); }
.archive-header__desc {
  margin-top: 10px;
  font-size: 15px;
  color: var(--text-lt);
  max-width: 640px;
  line-height: 1.8;
}

/* =================================================================
   ARCHIVE GRID
   ================================================================= */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* =================================================================
   POST CARD
   ================================================================= */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

/* Thumbnail */
.post-card__thumb {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--dark2);
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.18);
}
.post-card__thumb-placeholder svg {
  width: 48px;
  height: 48px;
}

/* Card body */
.post-card__body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.post-card__cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(255,140,0,.1);
  border-radius: 20px;
  padding: 3px 10px;
  align-self: flex-start;
}
.post-card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--dark);
  margin: 0;
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--primary); }
.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-lt);
}
.post-card__meta-date,
.post-card__meta-author {
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-card__meta svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--primary);
}
.post-card__excerpt {
  font-size: 14px;
  color: var(--text-lt);
  line-height: 1.8;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__readmore {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
  transition: gap .2s;
}
.post-card__readmore:hover { gap: 9px; }
.post-card__readmore svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* =================================================================
   PAGINATION
   ================================================================= */
.pagination {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  transition: all .2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pagination .page-numbers.dots {
  background: transparent;
  border-color: transparent;
  color: var(--text-lt);
}

/* =================================================================
   NO POSTS
   ================================================================= */
.no-posts {
  text-align: center;
  padding: 80px 24px;
}
.no-posts__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  color: var(--border);
}
.no-posts__icon svg { width: 100%; height: 100%; }
.no-posts__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.no-posts__text {
  font-size: 15px;
  color: var(--text-lt);
  margin-bottom: 28px;
}
.btn-back {
  display: inline-block;
  padding: 12px 28px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  font-size: 14px;
  transition: background .2s, transform .2s;
}
.btn-back:hover { background: var(--primary-dk); transform: translateY(-2px); }

/* =================================================================
   SINGLE ARTICLE
   ================================================================= */
.single-article {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(0,0,0,.07);
  border: 1px solid var(--border);
  margin-bottom: 32px;
}

/* Header */
.single-article__header {
  padding: 40px 48px 32px;
}
.single-article__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.single-article__cat-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  background: rgba(255,140,0,.1);
  border-radius: 20px;
  padding: 4px 12px;
  transition: background .2s, color .2s;
}
.single-article__cat-badge:hover {
  background: var(--primary);
  color: #fff;
}
.single-article__title {
  font-size: 36px;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 20px;
}
.single-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-lt);
}
.single-article__meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.single-article__meta-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--primary);
}
.single-article__meta-item a {
  color: var(--primary);
  font-weight: 600;
}
.single-article__meta-item a:hover { text-decoration: underline; }
.single-article__meta-sep { color: var(--border); font-size: 16px; }

/* Featured image */
.single-article__thumb {
  width: 100%;
  max-height: 480px;
  overflow: hidden;
}
.single-article__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Content */
.single-article__content {
  padding: 40px 48px 40px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}
.single-article__content h1,
.single-article__content h2,
.single-article__content h3,
.single-article__content h4,
.single-article__content h5,
.single-article__content h6 {
  color: var(--dark);
  margin: 32px 0 14px;
  line-height: 1.35;
  font-weight: 700;
}
.single-article__content h2 { font-size: 24px; }
.single-article__content h3 { font-size: 20px; }
.single-article__content p { margin-bottom: 20px; }
.single-article__content a { color: var(--primary); text-decoration: underline; }
.single-article__content a:hover { color: var(--primary-dk); }
.single-article__content img {
  border-radius: 10px;
  margin: 24px 0;
  max-width: 100%;
  height: auto;
}
.single-article__content ul,
.single-article__content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.single-article__content li { margin-bottom: 6px; }
.single-article__content blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px;
  margin: 28px 0;
  background: rgba(255,140,0,.05);
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: var(--text-lt);
}
.single-article__content pre,
.single-article__content code {
  font-family: 'Courier New', monospace;
  background: var(--dark);
  color: #f0f0f0;
  border-radius: 8px;
}
.single-article__content pre {
  padding: 20px 24px;
  overflow-x: auto;
  margin: 24px 0;
}
.single-article__content code {
  padding: 2px 6px;
  font-size: 14px;
}

/* Page links */
.page-links {
  margin-top: 24px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-lt);
}
.page-links__item {
  display: inline-block;
  margin: 0 3px;
  padding: 3px 10px;
  background: var(--bg-lt);
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* Tags */
.single-article__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 24px 48px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.single-article__tags-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--text);
}
.single-article__tags-label svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
}
.single-article__tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-lt);
  background: var(--bg-lt);
  transition: all .2s;
}
.single-article__tag:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* =================================================================
   AUTHOR BOX
   ================================================================= */
.author-box {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 48px;
  border-top: 1px solid var(--border);
  background: var(--bg-lt);
}
.author-box__avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  flex-shrink: 0;
}
.author-box__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.author-box__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
}
.author-box__name {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
}
.author-box__name:hover { color: var(--primary); }
.author-box__bio {
  font-size: 13px;
  color: var(--text-lt);
  line-height: 1.7;
  margin-top: 2px;
}

/* =================================================================
   POST NAVIGATION
   ================================================================= */
.post-nav {
  margin-bottom: 32px;
}
.post-nav__inner {
  display: flex;
  gap: 16px;
}
.post-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
  transition: all .25s;
  min-width: 0;
}
.post-nav__item:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 24px rgba(255,140,0,.12);
  transform: translateY(-3px);
}
.post-nav__item--next { text-align: right; }
.post-nav__dir {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
}
.post-nav__item--next .post-nav__dir { justify-content: flex-end; }
.post-nav__dir svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.post-nav__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =================================================================
   COMMENTS AREA
   ================================================================= */
.comments-area {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 48px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,.05);
}
.comments-area .comments-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.comments-area .comment-list { list-style: none; padding: 0; margin: 0 0 32px; }
.comments-area .comment {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.comments-area .comment:last-child { border-bottom: none; }
.comments-area .comment-author .avatar {
  border-radius: 50%;
  border: 2px solid var(--border);
}
.comments-area .comment-meta {
  font-size: 13px;
  color: var(--text-lt);
  margin-bottom: 8px;
}
.comments-area .comment-body p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 8px;
  color: var(--text);
}
.comments-area .reply a {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-top: 4px;
}
.comments-area .comment-reply-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 20px;
}
.comments-area .comment-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.comments-area .comment-form input[type="text"],
.comments-area .comment-form input[type="email"],
.comments-area .comment-form input[type="url"],
.comments-area .comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Sarabun', sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-lt);
  transition: border-color .2s;
  outline: none;
  margin-bottom: 16px;
}
.comments-area .comment-form input:focus,
.comments-area .comment-form textarea:focus {
  border-color: var(--primary);
}
.comments-area .comment-form textarea { min-height: 130px; resize: vertical; }
.comments-area .comment-form .submit {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary);
  color: #fff;
  font-family: 'Sarabun', sans-serif;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.comments-area .comment-form .submit:hover {
  background: var(--primary-dk);
  transform: translateY(-2px);
}

/* =================================================================
   RESPONSIVE – ARCHIVE & SINGLE
   ================================================================= */
@media (max-width: 768px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }
  .single-article__header,
  .single-article__content,
  .single-article__tags,
  .author-box {
    padding-left: 20px;
    padding-right: 20px;
  }
  .single-article__title { font-size: 26px; }
  .post-nav__inner { flex-direction: column; }
  .comments-area { padding: 24px 20px; }
  .archive-main,
  .single-main { padding: 32px 0 48px; }
}
@media (max-width: 480px) {
  .archive-header__title { font-size: 22px; }
  .single-article__title { font-size: 22px; }
  .post-nav__item { padding: 16px 18px; }
}

/* ===== Latest Posts Section (Homepage) ===== */
.latest-posts {
    padding: 60px 24px;
    background: #f5f5f5;
    text-align: center;
}
.latest-posts__inner {
    max-width: 1200px;
    margin: 0 auto;
}
.latest-posts__heading {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 36px;
    text-align: center;
    color: var(--dark);
}
.latest-posts__heading a {
    color: var(--dark);
    text-decoration: none;
    transition: color .2s;
}
.latest-posts__heading a:hover {
    color: var(--primary);
}
.latest-posts__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.latest-post-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: box-shadow .25s, transform .25s;
    display: flex;
    flex-direction: column;
}
.latest-post-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}
.latest-post-card__thumb {
    display: block;
    width: 250px;
    height: 250px;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,140,0,0.12);
    flex-shrink: 0;
    margin: 0 auto;
}
.latest-post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.latest-post-card__thumb-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-lt));
    display: flex;
    align-items: center;
    justify-content: center;
}
.latest-post-card__thumb-placeholder::after {
    content: '';
    display: block;
    width: 26px;
    height: 26px;
    background: rgba(255,255,255,0.55);
    border-radius: 6px;
}
.latest-post-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.45;
    color: var(--dark);
    margin-top: 16px;
    margin-bottom: 0;
}
.latest-post-card__title a {
    color: inherit;
    text-decoration: none;
}
.latest-post-card__title a:hover {
    color: var(--primary);
}
.latest-post-card__date {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-top: 8px;
}

/* Responsive - Latest Posts */
@media (max-width: 992px) {
    .latest-posts__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .latest-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .latest-posts__grid {
        grid-template-columns: 1fr;
    }
}
