/*
Theme Name: Socially
Theme URI: https://southpik.com
Author: Southpik
Description: A modern, colorful, lightweight, and fast news theme.
Version: 1.3
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: socially
Tags: news, blog, custom-logo, custom-menu, featured-images, responsive-layout, translation-ready
*/

/* ── DESIGN SYSTEM TOKENS ───────────────────────── */
:root {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --text: #1E293B;
  --muted: #64748B;
  --border: #E2E8F0;
  --accent: #2563EB;
  
  /* Status Colors */
  --primary: #2563EB;
  --secondary: #F97316;
  --success: #16A34A;
  --danger: #DC2626;
  
  /* Typography */
  --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Merriweather', Georgia, serif;
  --font-ml: 'Noto Sans Malayalam', 'Manjari', sans-serif;
  
  /* Shadow Elevation */
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.08);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max: 1200px;
}

/* ── DARK MODE OVERRIDES ────────────────────────── */
body.dark-mode {
  --bg: #0F172A;
  --surface: #1E293B;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --border: #334155;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.2);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.35), 0 4px 6px -4px rgb(0 0 0 / 0.35);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
}

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

html {
  overflow-x: hidden;
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

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

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

/* ── ACCESSIBILITY & FOCUS OUTLINES ──────────────── */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute !important;
  word-wrap: normal !important;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── TYPOGRAPHY ─────────────────────────────────── */
:lang(ml), .ml-content, .art-body, .art-title, .card-title, .related-title {
  font-family: var(--font-ml);
  line-height: 1.8;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* ── HEADER ─────────────────────────────────────── */
.site-header {
  background: #000000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 500;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s, border-color 0.3s, height 0.3s;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  height: 80px; /* Increased header height for desktop */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 20px;
}

/* Logo */
.site-logo-wrap {
  flex-shrink: 0;
}

.site-logo-wrap a {
  font-weight: 800;
  font-size: 26px;
  color: #FFFFFF;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
}

.site-logo-wrap a span {
  color: var(--accent);
}

.site-logo-wrap img {
  max-height: 48px;
  width: auto;
  transition: var(--transition);
}

/* Primary Nav */
.primary-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.primary-nav ul {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.primary-nav ul li a {
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  padding: 10px 16px;
  border-radius: 8px;
  display: block;
}

.primary-nav ul li a:hover,
.primary-nav ul li.current-menu-item > a,
.primary-nav ul li.current-cat > a {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.search-toggle,
.dark-mode-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  cursor: pointer;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  transition: var(--transition);
}

.search-toggle:hover,
.dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  cursor: pointer;
  padding: 10px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  transition: var(--transition);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: var(--transition);
}

/* Search Dropdown */
.header-search {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  z-index: 499;
  box-shadow: var(--shadow-md);
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.header-search.open {
  display: block;
}

.header-search form {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  gap: 12px;
}

.header-search input[type="search"] {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-family: var(--font-ui);
  outline: none;
}

.header-search input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.header-search button[type="submit"] {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.header-search button[type="submit"]:hover {
  opacity: 0.9;
}

/* ── MOBILE NAV PANEL ───────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 600;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 300px;
  background: var(--surface);
  overflow-y: auto;
  padding: 24px;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: slideRight 0.3s ease-out;
}

.mobile-nav-panel .dark-mode-toggle {
  display: flex;
  margin-bottom: 10px;
  align-self: flex-start;
  color: var(--text);
  border-color: var(--border);
}

.mobile-nav-panel .dark-mode-toggle:hover {
  background: var(--border);
  color: var(--accent);
}

@keyframes slideRight {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.mobile-nav-close {
  align-self: flex-end;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav ul li a {
  display: block;
  padding: 14px 18px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  border-bottom: 1px solid var(--border);
}

.mobile-nav ul li a:hover,
.mobile-nav ul li.current-menu-item > a {
  color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

/* ── LAYOUT ─────────────────────────────────────── */
.main-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  width: 100%;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.section-label::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.section-label h2 {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── ARTICLE CARDS & GRID ───────────────────────── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.article-card {
  background: var(--surface);
  border-radius: 14px; /* Rounded corners 10-14px */
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  height: 100%;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-thumb {
  position: relative;
  aspect-ratio: 1.91 / 1; /* 1200x630 (1.91:1) ratio */
  overflow: hidden;
  background: var(--border);
}

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

.article-card:hover .card-thumb img {
  transform: scale(1.05); /* Slight zoom on hover */
}

.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #E2E8F0, #CBD5E1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Badges */
.card-cat-wrapper {
  margin-bottom: 12px;
}

.category-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #FFFFFF;
}

.category-badge.badge-blue { background-color: var(--primary); }
.category-badge.badge-orange { background-color: var(--secondary); }
.category-badge.badge-green { background-color: var(--success); }
.category-badge.badge-red { background-color: var(--danger); }
.category-badge.badge-purple { background-color: #8B5CF6; }

.card-title {
  font-family: var(--font-ml);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 12px;
  
  /* Text clamping with ellipsis */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 3.2em;
}

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

.card-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.card-meta-sep {
  width: 3px;
  height: 3px;
  background: var(--muted);
  border-radius: 50%;
  opacity: 0.5;
}

/* ── HOMEPAGE ROW SPECIFICS ─────────────────────── */
.homepage-row {
  margin-bottom: 30px;
}

.homepage-row.row-1,
.homepage-row.row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.homepage-row.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}

.homepage-row.row-2.no-ad {
  grid-template-columns: 1fr 1fr;
}

/* Centered Ad Slot on Homepage */
.homepage-ad-card {
  background: var(--surface);
  border-radius: 14px;
  border: 1px dashed var(--border);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  min-height: 300px;
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 100%;
}

.homepage-ad-card::before {
  content: 'ADVERTISEMENT';
  position: absolute;
  top: 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 1px;
}

.homepage-ad-card .ad-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.homepage-ad-card .ad-placeholder {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
  background: var(--bg);
}

/* ── SINGLE ARTICLE PAGE ────────────────────────── */
.page-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 40px;
  align-items: start;
}

.art-col {
  min-width: 0;
}

/* Breadcrumbs */
.breadcrumb {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
}

.breadcrumb-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.breadcrumb-inner::-webkit-scrollbar {
  display: none;
}

.breadcrumb-sep {
  opacity: 0.5;
}

.breadcrumb-cur {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Header */
.art-header {
  margin-bottom: 24px;
}

.art-header .category-badge {
  margin-bottom: 14px;
}

.art-title {
  font-size: clamp(24px, 4.5vw, 36px);
  font-weight: 800;
  line-height: 1.4;
  color: var(--text);
  margin-bottom: 16px;
}

.art-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

.art-meta-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
}

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

.meta-share {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-share-label {
  font-weight: 600;
}

/* Feat Image */
.feat-img {
  margin-bottom: 28px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Article Body */
.art-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.9;
  color: var(--text);
}

.art-body p {
  margin-bottom: 24px;
}

.art-body h2 {
  font-size: 26px;
  font-weight: 800;
  margin: 40px 0 16px;
  line-height: 1.4;
}

.art-body h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 32px 0 14px;
}

.art-body ul, .art-body ol {
  margin: 0 0 24px 28px;
}

.art-body li {
  margin-bottom: 10px;
}

.art-body blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  background: var(--bg);
  font-style: italic;
  margin: 32px 0;
  border-radius: 0 12px 12px 0;
}

.art-body pre {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 24px;
  font-size: 14px;
}

.art-body img {
  border-radius: 12px;
  margin: 28px 0;
}

/* Tags */
.art-tags {
  margin: 30px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.art-tags a {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 30px;
  color: var(--muted);
  background: var(--surface);
}

.art-tags a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37, 99, 235, 0.05);
}

/* Share buttons */
.share-icon-btn, .s-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.share-icon-btn:hover, .s-icon-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sib-copy:hover, .s-copy:hover { background: var(--text); color: var(--surface); border-color: var(--text); }
.sib-fb:hover, .s-fb:hover { background: #1877F2; color: #fff; border-color: #1877F2; }
.sib-wa:hover, .s-wa:hover { background: #25D366; color: #fff; border-color: #25D366; }

.copy-wrap {
  position: relative;
  display: inline-flex;
}

.copy-tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--surface);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

.copy-wrap.show .copy-tip {
  opacity: 1;
}

.share-bar {
  margin: 30px 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.share-bar-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.share-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.share-btn-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* ── SIDEBAR ────────────────────────────────────── */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.sidebar-hd {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-hd::before {
  content: '';
  width: 4px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

.sidebar-hd h3 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.side-trending-list {
  display: flex;
  flex-direction: column;
}

.side-trending-item {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.side-trending-item:last-child {
  border-bottom: none;
}

.side-trending-item:hover .s-t-title {
  color: var(--accent);
}

.s-t-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--muted);
  opacity: 0.4;
  width: 24px;
}

.s-t-thumb {
  width: 80px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.s-t-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s-t-info {
  flex: 1;
  min-width: 0;
}

.s-t-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.s-t-date {
  font-size: 11px;
  color: var(--muted);
}

/* ── ARCHIVE & SEARCH PAGES ─────────────────────── */
.archive-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px;
}

.archive-header, .search-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.archive-header h1, .search-header h1 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
}

.archive-header p, .search-header p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 6px;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.search-form-wrap {
  margin-bottom: 30px;
}

.search-form-wrap form {
  display: flex;
  gap: 12px;
  max-width: 500px;
}

.search-form-wrap input[type="search"] {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  outline: none;
}

.search-form-wrap input[type="search"]:focus {
  border-color: var(--accent);
}

.search-form-wrap button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-weight: 600;
  cursor: pointer;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.no-results h2 {
  font-size: 22px;
  color: var(--text);
  margin-bottom: 8px;
}

/* ── PAGINATION ─────────────────────────────────── */
.np-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.np-pagination a, .np-pagination span {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.np-pagination a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(37, 99, 235, 0.05);
}

.np-pagination .current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.np-pagination .dots {
  border: none;
  background: none;
  color: var(--muted);
}

/* ── COMMENTS ───────────────────────────────────── */
#comments {
  margin-top: 40px;
}

.comment-respond {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  margin-top: 30px;
}

.comment-reply-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 20px;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comment-form p {
  display: flex;
  flex-direction: column;
  gap: 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);
  background: var(--bg);
  color: var(--text);
  border-radius: 8px;
  font-family: var(--font-ui);
  outline: none;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
  border-color: var(--accent);
}

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

.comment-form .submit {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.comment-form .submit:hover {
  opacity: 0.9;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 30px 0 0;
}

.comment-body {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.comment-author {
  font-weight: 700;
  color: var(--text);
}

.comment-list .children {
  list-style: none;
  padding-left: 24px;
}

/* ── YOU MAY ALSO LIKE ──────────────────────────── */
.you-may-like-section {
  margin-top: 40px;
}

.you-may-like-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* Sticky sidebar on desktop */
@media (min-width: 901px) {
  .sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
  }
}

/* ── FOOTER ─────────────────────────────────────── */
.site-footer {
  background: #000000;
  color: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 32px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.footer-copyright {
  margin: 0;
  font-weight: 600;
  color: #FFFFFF;
  text-align: center;
}

.footer-nav ul {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  display: inline-block;
  font-size: 13.5px;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.12);
}

/* ── WP CORE BLOCKS ─────────────────────────────── */
.alignleft { float: left; margin: 0 24px 16px 0; max-width: 50%; }
.alignright { float: right; margin: 0 0 16px 24px; max-width: 50%; }
.aligncenter { margin: 0 auto 20px; display: block; }
.wp-caption { max-width: 100%; text-align: center; }
.wp-caption-text { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.gallery-item img { border-radius: 8px; width: 100%; height: auto; }

/* ── RESPONSIVE STYLES ──────────────────────────── */

/* Desktop & Large Tablet */
@media (max-width: 1100px) {
  .articles-grid,
  .archive-grid,
  .homepage-row.row-1,
  .homepage-row.row-3,
  .homepage-row.row-2 {
    gap: 20px;
  }
}

/* Tablet (max-width: 900px) */
@media (max-width: 900px) {
  .header-inner {
    height: 70px;
  }
  .header-search {
    top: 70px;
  }
  
  .page-wrap {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .sidebar {
    display: none;
  }
  
  .sidebar-mobile {
    display: flex !important;
    margin-top: 30px;
  }
  
  /* Grid layouts change to 2 columns on Tablet */
  .articles-grid,
  .archive-grid,
  .homepage-row.row-1,
  .homepage-row.row-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .homepage-row.row-2 {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Place AdSense block centered or naturally between items */
  .homepage-row.row-2 .homepage-ad-card {
    grid-column: span 2;
    min-height: 200px;
  }
  
  .you-may-like-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Header Trigger (max-width: 768px) */
@media (max-width: 768px) {
  .primary-nav {
    display: none;
  }
  .menu-toggle {
    display: flex;
  }
}

/* Mobile (max-width: 600px) */
@media (max-width: 600px) {
  .header-inner {
    height: 60px;
    padding: 0 16px;
  }
  .header-search {
    top: 60px;
    padding: 12px 16px;
  }
  .site-logo-wrap a {
    font-size: 20px;
  }
  .site-logo-wrap img {
    max-height: 36px;
  }
  
  /* Grid layouts change to 1 column on Mobile */
  .articles-grid,
  .archive-grid,
  .homepage-row.row-1,
  .homepage-row.row-3,
  .homepage-row.row-2 {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .homepage-row.row-2 .homepage-ad-card {
    grid-column: span 1;
    min-height: 250px;
  }
  
  .you-may-like-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .main-wrap {
    padding: 20px 16px;
  }
  
  .art-title {
    font-size: 22px;
  }
  
  .art-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .meta-share {
    width: 100%;
    justify-content: flex-start;
    padding-top: 8px;
    border-top: 1px dashed var(--border);
  }
  
  .site-header .dark-mode-toggle {
    display: none !important;
  }

  .sidebar-mobile {
    display: none !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
