/*
Theme Name: Modelog
Theme URI: https://modelog.id
Author: Modelog Team
Author URI: https://modelog.id
Description: A professional SEO blog theme with clean, modern design inspired by modelog.id. Features article listings, category filters, reading time, and a bold typography system.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modelog
Tags: blog, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================
   CSS VARIABLES
   ========================================= */
:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --primary-light: #DBEAFE;
  --accent: #F97316;
  --accent-dark: #EA580C;
  --text-dark: #0F172A;
  --text-body: #374151;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --bg-white: #FFFFFF;
  --bg-light: #F8FAFC;
  --bg-blue-soft: #EFF6FF;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 40px rgba(37,99,235,0.12), 0 4px 16px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --font-heading: 'Sora', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'DM Sans', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
  --max-width: 1200px;
  --sidebar-width: 280px;
}

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-body);
  background: var(--bg-white);
  min-height: 100vh;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

/* =========================================
   TYPOGRAPHY
   ========================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; color: var(--text-dark); }

/* =========================================
   UTILITY CLASSES
   ========================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

.btn-white {
  background: white;
  color: var(--primary);
  border-color: white;
  font-weight: 700;
}

.btn-white:hover {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.btn-white-outline {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.6);
}

.btn-white-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: white;
  color: white;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

/* =========================================
   BADGES / LABELS
   ========================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-blue { background: var(--primary-light); color: var(--primary-dark); }
.badge-orange { background: #FFF7ED; color: var(--accent-dark); }
.badge-green { background: #F0FDF4; color: #15803D; }
.badge-purple { background: #FAF5FF; color: #7C3AED; }
.badge-gray { background: var(--border-light); color: var(--text-muted); }

/* =========================================
   SITE HEADER / NAVBAR
   ========================================= */
#masthead {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.2s ease;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

/* ---- Logo (kiri) ---- */
.site-branding { flex-shrink: 0; }

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-title {
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

/* ---- Nav + Contact (kanan, desktop only) ---- */
.header-right {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* Desktop nav */
#primary-navigation {
  display: flex;
  align-items: center;
}

#primary-navigation .primary-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#primary-navigation .primary-menu > li > a {
  display: block;
  padding: 8px 13px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

#primary-navigation .primary-menu > li > a:hover,
#primary-navigation .primary-menu > li.current-menu-item > a,
#primary-navigation .primary-menu > li.current-menu-ancestor > a {
  background: var(--primary-light);
  color: var(--primary);
}

/* Desktop dropdown */
#primary-navigation .primary-menu > li.menu-item-has-children {
  position: relative;
}

#primary-navigation .primary-menu > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 5px;
  opacity: 0.5;
  vertical-align: middle;
}

#primary-navigation .primary-menu > li > .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 6px;
  list-style: none;
  margin: 0;
  z-index: 300;
}

#primary-navigation .primary-menu > li:hover > .sub-menu,
#primary-navigation .primary-menu > li:focus-within > .sub-menu {
  display: block;
}

#primary-navigation .primary-menu > li > .sub-menu > li > a {
  display: block;
  padding: 9px 14px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

#primary-navigation .primary-menu > li > .sub-menu > li > a:hover {
  background: var(--bg-light);
  color: var(--primary);
}

/* Header Contact Button */
.header-contact-btn {
  margin-left: 8px;
  flex-shrink: 0;
}

/* Kunci scroll body saat drawer terbuka — KRITIS agar halaman tidak bergeser */
body.drawer-open {
  overflow: hidden;
  /* Kompensasi scrollbar width agar konten tidak melompat */
  padding-right: var(--scrollbar-width, 0px);
}

/* ---- Mobile Hamburger ---- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 9px 10px;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.burger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all 0.22s ease;
}

/* Active state - X icon */
.menu-toggle.is-active .burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-active .burger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-toggle.is-active .burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile Overlay ---- */
/* Elemen ini ada langsung di <body>, bukan di dalam header */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  pointer-events: none;
}

.mobile-nav-overlay.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ---- Mobile Drawer ---- */
/* Elemen ini ada langsung di <body>, position:fixed pasti bekerja */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 82vw);
  height: 100%;
  height: 100dvh;
  background: #ffffff;
  z-index: 999;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0 40px rgba(0, 0, 0, 0.2);
  /* Gunakan transform, bukan right, agar lebih performa */
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.mobile-drawer.is-open {
  transform: translateX(0%);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 64px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.mobile-drawer-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-dark);
}

.mobile-drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-light);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-body);
  transition: background var(--transition);
}

.mobile-drawer-close:hover { background: var(--border); }

.mobile-drawer-nav {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Mobile menu list */
.mobile-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-body);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
  text-decoration: none;
}

.mobile-menu > li > a:hover,
.mobile-menu > li.current-menu-item > a {
  background: var(--primary-light);
  color: var(--primary);
}

/* Mobile dropdown toggle arrow */
.mobile-menu > li.menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  opacity: 0.5;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu > li.menu-item-has-children.submenu-open > a::after {
  transform: rotate(180deg);
}

/* Mobile sub-menu: hidden by default, shown when parent .submenu-open */
.mobile-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-light);
  display: none; /* toggled by JS */
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu .sub-menu.is-open {
  display: block;
}

.mobile-menu .sub-menu li a {
  display: block;
  padding: 10px 20px 10px 36px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--transition);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu .sub-menu li:last-child a { border-bottom: none; }

.mobile-menu .sub-menu li a:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.mobile-drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
  flex-shrink: 0;
}

/* =========================================
   HERO - BLOG INDEX
   ========================================= */
.blog-hero {
  background: linear-gradient(160deg, #F0F6FF 0%, #EFF6FF 50%, #F8FAFC 100%);
  padding: 72px 0 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(37,99,235,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
}

.blog-hero h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.blog-hero h1 span {
  color: var(--primary);
}

.blog-hero .hero-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

/* Hero Search */
.hero-search-wrap {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.hero-search-wrap input[type="search"] {
  width: 100%;
  padding: 16px 56px 16px 48px;
  border: 2px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: white;
  box-shadow: var(--shadow-md);
  outline: none;
  transition: all var(--transition);
}

.hero-search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12), var(--shadow-md);
}

.hero-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
}

.hero-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition);
}

.hero-search-btn:hover {
  background: var(--primary-dark);
}

/* =========================================
   BLOG LAYOUT (sidebar + main)
   ========================================= */
.blog-layout {
  padding: 48px 0 80px;
}

.blog-layout-inner {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 40px;
  align-items: start;
}

/* =========================================
   SIDEBAR
   ========================================= */
.blog-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.widget-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
  display: block;
}

/* Sidebar Search */
.widget-search .search-form {
  display: flex;
  gap: 8px;
}

.widget-search input[type="search"] {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  color: var(--text-dark);
  transition: border-color var(--transition);
}

.widget-search input:focus {
  border-color: var(--primary);
}

.widget-search button {
  padding: 10px 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  transition: background var(--transition);
}

.widget-search button:hover { background: var(--primary-dark); }

/* Topics / Categories */
.topics-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-size: 0.875rem;
}

.topic-item:hover,
.topic-item.active {
  background: var(--primary-light);
}

.topic-item.active .topic-name { color: var(--primary); font-weight: 600; }
.topic-item.active .topic-count { background: var(--primary); color: white; }

.topic-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  margin-right: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.topic-item.active .topic-check {
  background: var(--primary);
  border-color: var(--primary);
}

.topic-name {
  flex: 1;
  color: var(--text-body);
}

.topic-count {
  background: var(--border-light);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
}

/* Reading Time widget */
.reading-time-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reading-time-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-body);
  transition: background var(--transition);
}

.reading-time-item:hover { background: var(--bg-light); }

.radio-dot {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all var(--transition);
}

.reading-time-item.active .radio-dot {
  border-color: var(--primary);
}

.reading-time-item.active .radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* =========================================
   BLOG MAIN AREA
   ========================================= */
.blog-main {}

.blog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.articles-count {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.articles-count strong {
  color: var(--text-dark);
  font-weight: 700;
}

.sort-select {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-body);
}

.sort-select select {
  padding: 8px 32px 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-dark);
  background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.sort-select select:focus { border-color: var(--primary); }

/* =========================================
   ARTICLE CARDS GRID
   ========================================= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.article-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

/* Card Thumbnail */
.card-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, #F59E0B 100%);
}

.card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .card-thumbnail img {
  transform: scale(1.04);
}

.card-thumbnail .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent) 0%, #F59E0B 50%, #DC2626 100%);
}

.no-image-text {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: rgba(255,255,255,0.35);
  letter-spacing: -0.04em;
  text-align: right;
  line-height: 1;
  padding: 0 16px 0 0;
}

.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.card-featured-dot {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

/* Card Body */
.card-body {
  padding: 18px 18px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-title a {
  color: inherit;
  text-decoration: none;
}

.card-title a:hover { color: var(--primary); }

.card-excerpt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
  flex: 1;
}

/* Card Footer */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}

.card-author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.author-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.author-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
}

.post-date-read {
  font-size: 0.6875rem;
  color: var(--text-light);
}

.card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
  font-size: 0.75rem;
}

.article-card:hover .card-arrow {
  background: var(--primary-dark);
  transform: translateX(2px);
}

/* =========================================
   PAGINATION
   ========================================= */
.pagination-wrap {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* WordPress injects .page-numbers as <a> and <span> inside <ul class="page-numbers"> */
/* Reset ul wrapper */
ul.page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.page-numbers li {
  display: flex;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  border: 1.5px solid var(--border);
  background: white;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
}

.page-numbers:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.page-numbers.current {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  font-weight: 700;
}

.page-numbers.dots {
  border-color: transparent;
  background: transparent;
  cursor: default;
  color: var(--text-light);
  min-width: 24px;
  padding: 0;
}

.page-numbers.prev,
.page-numbers.next {
  padding: 0 16px;
  font-size: 0.8125rem;
  gap: 4px;
  font-weight: 600;
}

/* =========================================
   SINGLE POST (old section - kept for post-content styles)
   The .single-wrap layout is defined later in the file
   ========================================= */

/* Table of Contents */
.toc-box {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 32px;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.toc-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 4px;
  display: flex;
  align-items: center;
}

.toc-list {
  font-size: 0.875rem;
  line-height: 1.8;
}

.toc-list > li > a {
  color: var(--text-body);
  font-weight: 500;
}

.toc-list > li > a:hover { color: var(--primary); }

.toc-list ul {
  margin: 4px 0 4px 16px;
}

.toc-list ul li a {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.toc-list ul li a:hover { color: var(--primary); }

.toc-list li { margin-bottom: 4px; }
.toc-list li::before { content: ''; }

/* Post content */
.post-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-body);
  max-width: 760px;
}

.post-content h2 {
  font-size: 1.75rem;
  margin: 40px 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

.post-content h3 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}

.post-content h4 {
  font-size: 1.0625rem;
  margin: 24px 0 10px;
}

.post-content p { margin-bottom: 1.25rem; }

.post-content a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(37,99,235,0.3);
  text-underline-offset: 3px;
}

.post-content a:hover {
  text-decoration-color: var(--primary);
}

.post-content ul, .post-content ol {
  margin: 0 0 1.25rem 1.25rem;
  list-style: initial;
}

.post-content ol { list-style: decimal; }

.post-content li { margin-bottom: 6px; }

.post-content blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg-blue-soft);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--text-body);
}

.post-content pre {
  background: var(--text-dark);
  color: #E2E8F0;
  padding: 20px 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  margin: 24px 0;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--border-light);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--primary-dark);
}

.post-content pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.post-content img {
  border-radius: var(--radius);
  margin: 24px 0;
  box-shadow: var(--shadow-md);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9375rem;
}

.post-content table th {
  background: var(--bg-light);
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--border);
}

.post-content table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  color: var(--text-body);
}

.post-content table tr:hover td { background: var(--bg-light); }

/* Info/tip boxes */
.info-box {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  display: flex;
  gap: 12px;
  font-size: 0.9375rem;
}

.info-box.tip {
  background: var(--bg-blue-soft);
  border: 1px solid var(--primary-light);
}

.info-box.warning {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
}

.info-box.danger {
  background: #FEF2F2;
  border: 1px solid #FECACA;
}

.info-box-icon { flex-shrink: 0; font-size: 1.125rem; }

/* Read More box */
.read-more-box {
  background: var(--bg-blue-soft);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.875rem;
}

.read-more-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin-bottom: 6px;
}

.read-more-box a {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.9375rem;
  text-decoration: none;
}

.read-more-box a:hover { color: var(--primary); }

/* post-cta-box, related-posts - now handled by .single-cta-box and .single-related */

.related-card-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.related-card-title a { color: inherit; }
.related-card-title a:hover { color: var(--primary); }

.related-card-meta {
  font-size: 0.6875rem;
  color: var(--text-light);
}

/* =========================================
   CTA SECTION (full width)
   ========================================= */
.cta-section {
  background: linear-gradient(135deg, #1D4ED8 0%, var(--primary) 50%, #2563EB 100%);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.cta-inner { position: relative; z-index: 1; }

.cta-icon {
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 1.75rem;
}

.cta-section h2 {
  color: white;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: 16px;
}

.cta-section p {
  color: rgba(255,255,255,0.8);
  font-size: 1.0625rem;
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.65;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* =========================================
   FOOTER
   ========================================= */
#colophon {
  background: white;
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all var(--transition);
}

.footer-social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.footer-contact {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-contact a {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-links a {
  color: var(--text-muted);
}

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

.footer-sep { color: var(--border); }

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-light);
}

.footer-bottom strong {
  color: var(--text-body);
  display: block;
  margin-bottom: 6px;
  font-size: 0.9375rem;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .blog-layout-inner {
    grid-template-columns: 240px 1fr;
    gap: 28px;
  }

  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet: hide desktop nav, show hamburger */
@media (max-width: 768px) {
  :root { --sidebar-width: 100%; }

  /* Hide desktop nav and contact button */
  .header-right {
    display: none;
  }

  /* Show hamburger */
  .menu-toggle {
    display: flex;
  }

  .blog-layout-inner {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    order: 2;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .cta-buttons { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .blog-hero { padding: 48px 0 40px; }
  .blog-toolbar { flex-direction: column; align-items: flex-start; }
}

/* =========================================
   WORDPRESS DEFAULTS
   ========================================= */
.alignleft {
  float: left;
  margin: 0 24px 16px 0;
}

.alignright {
  float: right;
  margin: 0 0 16px 24px;
}

.aligncenter {
  display: block;
  margin: 0 auto 16px;
}

.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}

.screen-reader-text { @extend .sr-only; }

/* Comments */
.comments-area {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 2px solid var(--border-light);
}

.comments-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 28px;
}

/* Reset WP default list styling */
.comment-list,
.comment-list .children {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Each comment item — block, full width */
.comment-list > li,
.comment-list .children > li {
  display: block !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--border-light);
}

.comment-list > li:last-child {
  border-bottom: none;
}

/* Wrapper div inside each li */
.comment {
  display: flex;
  flex-direction: row;
  gap: 14px;
  padding: 20px 0;
  width: 100%;
}

/* Nested replies - indented below parent */
.comment-list .children {
  margin-left: 48px !important;
  border-left: 2px solid var(--border-light);
  padding-left: 20px !important;
}

.comment-list .children > li {
  border-bottom: 1px solid var(--border-light);
}
.comment-list .children > li:last-child {
  border-bottom: none;
}

/* Avatar */
.comment-author-avatar {
  flex-shrink: 0;
}

.comment-author-avatar img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* Content */
.comment-content {
  flex: 1;
  min-width: 0;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.comment-author-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-dark);
}

.comment-author-name a {
  color: inherit;
  text-decoration: none;
}

.comment-date {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.comment-text {
  font-size: 0.9375rem;
  color: var(--text-body);
  line-height: 1.65;
}

.comment-text p { margin-bottom: 0.75rem; }
.comment-text p:last-child { margin-bottom: 0; }

/* Reply link */
.comment-reply-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 10px;
  text-decoration: none;
  transition: color var(--transition);
}

.comment-reply-link:hover { color: var(--primary-dark); }

/* Comment form */
.comment-respond {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.comment-reply-title {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: white;
  outline: none;
  transition: border-color var(--transition);
  margin-bottom: 16px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.comment-form textarea { min-height: 120px; resize: vertical; }

.form-submit input[type="submit"] {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.form-submit input[type="submit"]:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.3);
}

/* =========================================
   SEARCH RESULTS PAGE
   ========================================= */
.search-header {
  background: var(--bg-light);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--border);
}

.search-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.search-header .search-count {
  color: var(--text-muted);
  font-size: 1rem;
}

/* =========================================
   404 PAGE
   ========================================= */
.error-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.error-404 .error-code {
  font-family: var(--font-heading);
  font-size: 7rem;
  font-weight: 800;
  color: var(--primary-light);
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h2 { margin-bottom: 12px; }

.error-404 p {
  color: var(--text-muted);
  max-width: 420px;
  margin: 0 auto 32px;
}

/* =========================================
   SKIP LINK ACCESSIBILITY
   ========================================= */
.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.skip-link:focus {
  left: 6px;
  top: 6px;
  z-index: 9999;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.875rem;
}

/* =========================================
   SINGLE POST & PAGE - 750px CENTERED
   ========================================= */

/* Shared wrapper for single post & page */
.single-page {
  background: var(--bg-white);
}

.single-wrap {
  max-width: 750px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Breadcrumb */
.single-wrap .post-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.single-wrap .post-breadcrumb a { color: var(--text-muted); }
.single-wrap .post-breadcrumb a:hover { color: var(--primary); }
.single-wrap .post-breadcrumb .sep { color: var(--border); font-size: 0.75rem; }
.single-wrap .post-breadcrumb .current { color: var(--text-body); }

/* Single article */
.single-article {}

/* Category badge */
.single-cat-badge {
  display: inline-block;
  margin-bottom: 14px;
}

/* Post title */
.single-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

/* Meta row */
.single-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.single-meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-body);
  font-weight: 500;
}

.author-ava img,
.single-meta-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.single-meta-sep {
  width: 4px;
  height: 4px;
  background: var(--border);
  border-radius: 50%;
  display: inline-block;
}

.single-meta-date,
.single-meta-read {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Featured image */
.single-featured-img {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  box-shadow: var(--shadow-md);
}

.single-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* TL;DR box */
.tldr-box {
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-left: 4px solid #F59E0B;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 28px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tldr-icon { font-size: 1.125rem; flex-shrink: 0; margin-top: 2px; }

.tldr-title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: #92400E;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.tldr-text {
  font-size: 0.9375rem;
  color: #78350F;
  line-height: 1.65;
  margin: 0;
}

/* Post content */
.single-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-body);
}

/* Post tags */
.single-tags {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.single-tags .tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.single-tags a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.single-tags a:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* In-post CTA box */
.single-cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 40px 0;
}

@media (max-width: 600px) {
  .single-cta-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 24px 20px;
  }
  .single-cta-box .btn-primary {
    width: 100%;
    justify-content: center;
  }
}

.single-cta-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.single-cta-text strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: white;
  display: block;
}

.single-cta-text span {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  display: block;
}

.single-cta-box .btn-primary {
  background: white;
  color: var(--primary);
  border-color: white;
  flex-shrink: 0;
  font-weight: 700;
}

.single-cta-box .btn-primary:hover {
  background: var(--primary-light);
  box-shadow: none;
  transform: translateY(-1px);
}

/* Related posts */
.single-related {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 2px solid var(--border-light);
}

.single-related-title {
  font-size: 1.125rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.single-related-title::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
  display: block;
}

.single-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.22s ease;
}

.related-item:hover {
  border-color: transparent;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-item-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, #F59E0B 100%);
}

.related-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.related-item:hover .related-item-thumb img {
  transform: scale(1.05);
}

.related-item-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent), #F59E0B);
}

.related-item-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(37,99,235,0.9);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
}

.related-item-body {
  padding: 12px 14px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-item-title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item-meta {
  font-size: 0.6875rem;
  color: var(--text-light);
}

/* Comments section */
.single-comments {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 2px solid var(--border-light);
}

/* Responsive single */
@media (max-width: 800px) {
  .single-wrap {
    padding: 32px 20px 60px;
  }
  .single-related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .single-cta-box {
    flex-direction: column;
    text-align: center;
    align-items: flex-start;
  }
}

@media (max-width: 500px) {
  .single-related-grid {
    grid-template-columns: 1fr;
  }
  .single-meta {
    gap: 8px;
  }
}

/* old single post section removed - see new .single-wrap above */

/* =========================================
   FOOTER - 3 COLUMNS + COPYRIGHT
   ========================================= */

#colophon {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}

/* Hide the old footer-inner if it exists */
.site-footer .footer-inner { display: none !important; }

/* 3-column widget grid */
.footer-widgets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  padding: 56px 0 44px;
  border-bottom: 1px solid var(--border-light);
}

.footer-col {
  min-width: 0; /* prevent overflow in grid */
}

/* Widget title — WP injeksi h2.widget-title atau h3.widgettitle
   Samakan tampilannya dengan .footer-col-title (widget LAYANAN bawaan theme) */
.footer-col-title,
.footer-col .widget-title,
.footer-col .widgettitle,
.footer-col h2.widget-title,
.footer-col h3.widget-title,
.footer-col h4.widget-title,
.footer-col .widget > h2,
.footer-col .widget > h3,
.footer-col .widget > h4 {
  font-family: var(--font-heading) !important;
  font-size: 0.8125rem !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.07em !important;
  margin: 0 0 16px !important;
  padding: 0 0 12px !important;
  border: none !important;
  border-bottom: 2px solid var(--border-light) !important;
  background: none !important;
  line-height: 1.3 !important;
}

/* Description text in col 1 */
.footer-col-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}

/* Social icons */
.footer-socials {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.footer-social-link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: all var(--transition);
}

.footer-social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Contact list */
.footer-contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-contact-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--primary);
}

.footer-contact-list li a {
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-contact-list li a:hover { color: var(--primary); }

/* Nav list (col 2) */
.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
  padding: 0;
}

.footer-nav-list li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-nav-list li a::before {
  content: '›';
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
}

.footer-nav-list li a:hover { color: var(--primary); }

/* WP default ul inside widget — same style as footer-nav-list */
.footer-col .widget ul,
.footer-col .widget_nav_menu ul,
.footer-col .widget_pages ul,
.footer-col .widget_categories ul,
.footer-col .widget_archive ul,
.footer-col .widget_meta ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-col .widget ul li a,
.footer-col .widget_nav_menu ul li a,
.footer-col .widget_pages ul li a,
.footer-col .widget_categories ul li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color var(--transition);
  text-decoration: none;
}

.footer-col .widget ul li a::before,
.footer-col .widget_nav_menu ul li a::before,
.footer-col .widget_pages ul li a::before,
.footer-col .widget_categories ul li a::before {
  content: '›';
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.footer-col .widget ul li a:hover,
.footer-col .widget_nav_menu ul li a:hover,
.footer-col .widget_pages ul li a:hover,
.footer-col .widget_categories ul li a:hover {
  color: var(--primary);
}

/* WP Recent Posts widget */
.footer-col .widget_recent_entries ul {
  gap: 14px !important;
}

.footer-col .widget_recent_entries ul li {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-col .widget_recent_entries ul li a {
  font-weight: 500;
  color: var(--text-body) !important;
  line-height: 1.4;
}

.footer-col .widget_recent_entries ul li a::before {
  display: none !important;
}

.footer-col .widget_recent_entries ul li .post-date {
  font-size: 0.6875rem;
  color: var(--text-light);
  display: block;
  margin-top: 2px;
}

/* WP Text widget */
.footer-col .widget_text p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* Widget: remove WP default margins */
.footer-col .widget {
  margin: 0;
  padding: 0;
}

.footer-col .widget select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-body);
  background: white;
  outline: none;
  cursor: pointer;
}

/* Recent posts (col 3) */
.footer-recent-posts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-recent-posts li {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.footer-recent-posts li a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  line-height: 1.4;
  transition: color var(--transition);
  text-decoration: none;
  display: block;
}

.footer-recent-posts li a:hover { color: var(--primary); }

.footer-recent-posts li span {
  font-size: 0.6875rem;
  color: var(--text-light);
}

/* Copyright */
.footer-copyright {
  text-align: center;
  padding: 18px 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Footer responsive */
@media (max-width: 960px) {
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

@media (max-width: 600px) {
  .footer-widgets {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 0 28px;
  }
}

/* =========================================
   POST NAVIGATION (Prev / Next)
   ========================================= */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 36px;
  border-top: 2px solid var(--border-light);
}

/* Jika hanya ada satu (prev atau next saja) */
.post-nav:has(.post-nav-prev:only-child) {
  grid-template-columns: 1fr;
}
.post-nav:has(.post-nav-next:only-child) {
  grid-template-columns: 1fr;
}
.post-nav-next:only-child {
  grid-column: 1 / -1;
  text-align: right;
  align-items: flex-end;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.22s ease;
  background: var(--bg-white);
  min-width: 0;
}

.post-nav-item:hover {
  border-color: var(--primary-light);
  background: var(--bg-blue-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Label "Artikel Sebelumnya / Selanjutnya" */
.post-nav-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
}

.post-nav-next .post-nav-label {
  justify-content: flex-end;
}

/* Content row: thumbnail + text */
.post-nav-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-nav-next .post-nav-content {
  flex-direction: row-reverse;
}

/* Thumbnail */
.post-nav-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  background-color: var(--border-light);
  flex-shrink: 0;
}

/* Text block */
.post-nav-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.post-nav-next .post-nav-text {
  text-align: right;
}

.post-nav-cat {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  display: block;
}

.post-nav-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-nav-item:hover .post-nav-title {
  color: var(--primary);
}

.post-nav-date {
  font-size: 0.6875rem;
  color: var(--text-light);
  display: block;
  margin-top: 2px;
}

/* Responsive */
@media (max-width: 560px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
  .post-nav-next:only-child {
    text-align: left;
  }
  .post-nav-next .post-nav-label {
    justify-content: flex-start;
  }
  .post-nav-next .post-nav-content {
    flex-direction: row;
  }
  .post-nav-next .post-nav-text {
    text-align: left;
  }
}

/* =========================================
   LOGO CUSTOM — AUTO SIZE
   ========================================= */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
}

/* Logo gambar: tinggi dari Customizer via inline CSS,
   width menyesuaikan otomatis (aspect ratio terjaga) */
.logo-wrap .custom-logo-link {
  display: flex;
  align-items: center;
  line-height: 1;
}

.logo-wrap .custom-logo,
.logo-wrap .custom-logo-link img {
  display: block;
  max-height: 40px;   /* default, override by inline CSS dari Customizer */
  width: auto;
  height: auto;
  object-fit: contain;
}

/* =========================================
   SEARCH INPUT — ISOLATION (Override konflik plugin/theme lain)
   Semua input di dalam .modelog-search-form menggunakan
   gaya khusus theme ini, tidak terpengaruh CSS global lain
   ========================================= */

/* Sidebar search form */
.widget-box.widget-search .search-form,
.modelog-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Reset semua kemungkinan konflik dari plugin/theme lain */
.widget-box.widget-search .search-form input[type="search"],
.widget-box.widget-search .search-form input[type="text"],
.hero-search-wrap input[type="search"],
.modelog-search-form input {
  /* Reset total */
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;

  /* Layout */
  flex: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  display: block !important;
  box-sizing: border-box !important;

  /* Spacing */
  padding: 10px 14px !important;
  margin: 0 !important;

  /* Typography */
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  color: var(--text-dark) !important;

  /* Visual */
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: none !important;
  outline: none !important;

  /* Behavior */
  transition: border-color 0.2s ease !important;
  vertical-align: middle !important;
}

.widget-box.widget-search .search-form input[type="search"]:focus,
.widget-box.widget-search .search-form input[type="text"]:focus,
.hero-search-wrap input[type="search"]:focus,
.modelog-search-form input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
  outline: none !important;
}

/* Search button di sidebar */
.widget-box.widget-search .search-form button,
.widget-box.widget-search .search-form input[type="submit"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  flex-shrink: 0 !important;
  padding: 10px 14px !important;
  margin: 0 !important;
  background: var(--primary) !important;
  background-color: var(--primary) !important;
  color: white !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  line-height: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s ease !important;
  box-shadow: none !important;
}

.widget-box.widget-search .search-form button:hover,
.widget-box.widget-search .search-form input[type="submit"]:hover {
  background: var(--primary-dark) !important;
  background-color: var(--primary-dark) !important;
}

/* Hero search */
.hero-search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.hero-search-wrap form {
  display: flex;
  align-items: center;
  position: relative;
}

.hero-search-wrap input[type="search"] {
  padding: 16px 130px 16px 48px !important;
  border-radius: 999px !important;
  border: 2px solid var(--border) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
  font-size: 0.9375rem !important;
}

.hero-search-wrap input[type="search"]:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(37,99,235,0.12), 0 4px 16px rgba(0,0,0,0.08) !important;
}

.hero-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 1;
}

.hero-search-btn {
  position: absolute !important;
  right: 8px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 8px 20px !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
  white-space: nowrap !important;
  line-height: 1.5 !important;
}

.hero-search-btn:hover {
  background: var(--primary-dark) !important;
}

/* =========================================
   FIX HORIZONTAL OVERFLOW — AdSense & Plugin
   Mencegah iklan atau elemen lain melebarkan halaman
   Catatan: TIDAK mengubah max-width container desktop
   ========================================= */

/* Hanya kunci overflow, jangan ubah max-width */
html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
}

/* Media & embed tidak boleh melebihi parent-nya */
img,
video,
iframe,
embed,
object {
  max-width: 100%;
}

/* Tabel tetap bisa scroll horizontal di dalam container-nya */
table {
  max-width: 100%;
}

/* AdSense — batasi ke lebar parent, bukan viewport penuh */
ins.adsbygoogle {
  max-width: 100% !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

/* Mobile only: perbaiki elemen yang bisa melebar */
@media (max-width: 768px) {

  /* Semua elemen anak tidak boleh melebihi viewport di mobile */
  .site-header,
  .site-header-inner,
  #primary,
  .blog-layout,
  .blog-layout-inner,
  .blog-main,
  .blog-sidebar,
  .single-wrap,
  .article-card,
  .card-thumbnail,
  .card-body,
  .single-article,
  .single-content,
  .post-content,
  .related-item,
  .single-related-grid,
  .footer-widgets,
  .footer-col,
  .hero-search-wrap,
  #colophon {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    word-break: break-word;
  }

  /* pre/code: scroll horizontal di dalam box, tidak melebarkan halaman */
  pre {
    max-width: 100% !important;
    overflow-x: auto !important;
    white-space: pre !important;
    word-break: normal !important;
  }

  code {
    word-break: break-all !important;
  }

  /* Tabel: scroll di dalam wrapper, tidak melebarkan halaman */
  .post-content table,
  .single-content table {
    display: block !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* AdSense di mobile: paksa masuk viewport */
  .adsbygoogle,
  ins.adsbygoogle,
  [id^="google_ads_iframe"],
  [id^="google_ads"],
  [class*="adsbygoogle"] {
    max-width: 100vw !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    left: auto !important;
    right: auto !important;
    position: relative !important;
  }
}
