/*
Theme Name: ExamGuru
Theme URI: https://yoursite.com
Author: ExamGuru Team
Author URI: https://yoursite.com
Description: A professional, SEO-optimized educational blog theme for Exam Updates and Current Affairs. Google AdSense ready and policy compliant.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: examguru
Tags: education, blog, seo, adsense, current-affairs, exam-updates, responsive
*/

/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
  --primary: #1a56db;
  --primary-dark: #1240a8;
  --primary-light: #e8f0fe;
  --secondary: #f97316;
  --secondary-dark: #ea580c;
  --dark: #0f172a;
  --dark-2: #1e293b;
  --text: #334155;
  --text-light: #64748b;
  --muted: #94a3b8;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #ffffff;
  --success: #10b981;
  --exam-color: #7c3aed;
  --current-color: #dc2626;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --font-main: 'Hind', 'Noto Sans Devanagari', sans-serif;
  --font-heading: 'Mukta', 'Hind', sans-serif;
  --transition: all 0.22s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-main);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--dark);
  line-height: 1.35;
  font-weight: 700;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.45rem); }
h4 { font-size: 1.15rem; }
p { margin-bottom: 1rem; }

/* =============================================
   LAYOUT
   ============================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.content-area { flex: 1; }

.main-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  padding: 28px 0 40px;
}
@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
}

/* =============================================
   TOP BAR
   ============================================= */
.top-bar {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  padding: 6px 0;
  border-bottom: 2px solid var(--primary);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.top-bar a { color: rgba(255,255,255,0.7); }
.top-bar a:hover { color: var(--white); }
.breaking-news {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}
.breaking-label {
  background: var(--secondary);
  color: white;
  padding: 2px 10px;
  border-radius: 3px;
  font-weight: 700;
  font-size: 0.73rem;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.breaking-ticker {
  overflow: hidden;
  flex: 1;
}
.breaking-ticker marquee { color: rgba(255,255,255,0.85); }
.top-bar-right { display: flex; align-items: center; gap: 14px; }
.top-date { font-size: 0.75rem; }
.social-links { display: flex; gap: 10px; }
.social-links a {
  width: 26px; height: 26px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  transition: var(--transition);
}
.social-links a:hover { background: var(--primary); color: white; }

/* =============================================
   HEADER
   ============================================= */
#site-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 999;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 20px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 48px; width: auto; }
.site-title-wrap {}
.site-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.1;
  letter-spacing: -0.5px;
}
.site-title span { color: var(--primary); }
.site-tagline {
  font-size: 0.72rem;
  color: var(--text-light);
  font-weight: 400;
}

/* Search in header */
.header-search { display: flex; align-items: center; }
.header-search form {
  display: flex;
  border: 2px solid var(--border);
  border-radius: 25px;
  overflow: hidden;
  transition: var(--transition);
}
.header-search form:focus-within { border-color: var(--primary); }
.header-search input {
  border: none; outline: none;
  padding: 8px 16px;
  font-size: 0.88rem;
  width: 200px;
  font-family: var(--font-main);
  background: transparent;
}
.header-search button {
  background: var(--primary);
  border: none;
  color: white;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}
.header-search button:hover { background: var(--primary-dark); }

/* =============================================
   NAVIGATION
   ============================================= */
#main-nav { background: var(--primary); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#primary-menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0; padding: 0;
}
#primary-menu > li { position: relative; }
#primary-menu > li > a {
  display: block;
  color: rgba(255,255,255,0.92);
  padding: 13px 17px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a,
#primary-menu > li.current-menu-ancestor > a {
  background: rgba(255,255,255,0.15);
  color: white;
}
/* Category badge colors */
#primary-menu > li.cat-exam > a { border-bottom: 3px solid var(--exam-color); }
#primary-menu > li.cat-current > a { border-bottom: 3px solid var(--current-color); }

/* Dropdown */
#primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}
#primary-menu li:hover > .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
#primary-menu .sub-menu li a {
  display: block;
  padding: 10px 18px;
  color: var(--text);
  font-size: 0.87rem;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
#primary-menu .sub-menu li:last-child a { border-bottom: none; }
#primary-menu .sub-menu li a:hover { background: var(--primary-light); color: var(--primary); padding-left: 24px; }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 10px;
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  #primary-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--primary-dark);
  }
  #primary-menu.active { display: flex; }
  #primary-menu > li > a { padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.1); }
  .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: rgba(0,0,0,0.2); }
  .nav-inner { flex-wrap: wrap; }
  .header-search { display: none; }
  .header-search input { width: 140px; }
}

/* =============================================
   BREADCRUMB
   ============================================= */
.breadcrumb-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 0.82rem;
  color: var(--text-light);
}
.breadcrumb-wrap a { color: var(--primary); }
.breadcrumb-wrap span.sep { margin: 0 6px; }

/* =============================================
   HOMEPAGE - HERO SECTION
   ============================================= */
.hero-section {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 50%, #1a2f6b 100%);
  padding: 40px 0 0;
  overflow: hidden;
  position: relative;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}
.hero-main-post { position: relative; }
.hero-main-post .post-thumb { aspect-ratio: 16/9; overflow: hidden; }
.hero-main-post .post-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.hero-main-post:hover .post-thumb img { transform: scale(1.03); }
.hero-main-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.88));
  padding: 40px 24px 24px;
  color: white;
}
.hero-cat-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}
.cat-exam-badge { background: var(--exam-color); }
.cat-current-badge { background: var(--current-color); }
.hero-main-overlay h2 {
  color: white;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  margin-bottom: 10px;
  line-height: 1.3;
}
.hero-main-overlay h2 a { color: white; }
.hero-main-overlay h2 a:hover { color: var(--secondary); }
.hero-meta { font-size: 0.78rem; color: rgba(255,255,255,0.7); }
.hero-meta span { margin-right: 12px; }

.hero-side-posts { display: flex; flex-direction: column; gap: 2px; }
.hero-side-post {
  position: relative;
  flex: 1;
  overflow: hidden;
}
.hero-side-post .post-thumb { height: 100%; min-height: 140px; }
.hero-side-post .post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.hero-side-post:hover .post-thumb img { transform: scale(1.05); }
.hero-side-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.82));
  padding: 24px 14px 14px;
  color: white;
}
.hero-side-overlay h3 { font-size: 0.92rem; color: white; line-height: 1.35; }
.hero-side-overlay h3 a { color: white; }
.hero-side-overlay h3 a:hover { color: var(--secondary); }

@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-side-posts { display: grid; grid-template-columns: 1fr 1fr; }
}

/* =============================================
   CATEGORY STRIP (below hero)
   ============================================= */
.category-strip {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.cat-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}
.cat-tab:hover, .cat-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.cat-tab.exam { color: var(--exam-color); }
.cat-tab.exam:hover, .cat-tab.exam.active { border-bottom-color: var(--exam-color); }
.cat-tab.current { color: var(--current-color); }
.cat-tab.current:hover, .cat-tab.current.active { border-bottom-color: var(--current-color); }
.cat-count {
  background: var(--border);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 0.72rem;
}

/* =============================================
   SECTION TITLES
   ============================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.section-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  display: block;
  width: 5px;
  height: 22px;
  background: var(--primary);
  border-radius: 3px;
}
.section-title.exam-title::before { background: var(--exam-color); }
.section-title.current-title::before { background: var(--current-color); }
.view-all {
  font-size: 0.83rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.view-all:hover { color: var(--primary-dark); }

/* =============================================
   POST CARDS
   ============================================= */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.posts-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .posts-grid, .posts-grid-2 { grid-template-columns: 1fr; } }

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border);
}
.post-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.post-card-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.post-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }
.post-card-badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}
.badge-exam { background: var(--exam-color); }
.badge-current { background: var(--current-color); }
.badge-general { background: var(--primary); }
.post-card-body { padding: 16px; }
.post-card-meta {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.post-card-meta i { margin-right: 3px; }
.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card-title a { color: var(--dark); }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt {
  font-size: 0.84rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 12px;
}
.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.read-more-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.read-more-link:hover { gap: 8px; }

/* List-style post card (for sidebar) */
.post-list-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.post-list-item:last-child { border-bottom: none; }
.post-list-thumb {
  width: 80px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.post-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-list-info {}
.post-list-title {
  font-size: 0.87rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.35;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-list-title a { color: var(--dark); }
.post-list-title a:hover { color: var(--primary); }
.post-list-meta { font-size: 0.74rem; color: var(--muted); }

/* =============================================
   ADZONE
   ============================================= */
.adzone {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin: 20px 0;
  overflow: hidden;
}
.adzone-728 { min-height: 90px; }
.adzone-300 { min-height: 250px; }
.adzone-336 { min-height: 280px; }

/* =============================================
   SINGLE POST
   ============================================= */
.post-header { margin-bottom: 24px; }
.post-categories { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.cat-link {
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  transition: var(--transition);
}
.cat-link:hover { background: var(--primary); color: white; }
.post-title { margin-bottom: 14px; }
.post-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  font-size: 0.83rem;
  color: var(--text-light);
}
.post-meta-bar a { color: var(--text-light); }
.post-meta-bar a:hover { color: var(--primary); }
.post-meta-author { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--dark); }
.post-meta-author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.post-featured-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}
.post-featured-image img { width: 100%; max-height: 480px; object-fit: cover; }
.post-summary-box {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 20px;
  margin-bottom: 24px;
  font-size: 0.93rem;
  color: var(--dark);
}
.post-summary-box strong { display: block; margin-bottom: 6px; font-size: 1rem; color: var(--primary); }

/* Article content */
.entry-content { font-size: 1rem; line-height: 1.8; color: var(--text); }
.entry-content h2 { font-size: 1.45rem; margin: 28px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary-light); }
.entry-content h3 { font-size: 1.2rem; margin: 22px 0 10px; color: var(--dark); }
.entry-content h4 { font-size: 1.05rem; margin: 18px 0 8px; }
.entry-content p { margin-bottom: 16px; }
.entry-content ul, .entry-content ol { padding-left: 22px; margin-bottom: 18px; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 6px; }
.entry-content a { color: var(--primary); text-decoration: underline; }
.entry-content strong { font-weight: 700; color: var(--dark); }
.entry-content blockquote {
  border-left: 4px solid var(--secondary);
  background: #fff8f0;
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--dark-2);
}
.entry-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.92rem; }
.entry-content th { background: var(--primary); color: white; padding: 10px 14px; text-align: left; }
.entry-content td { padding: 9px 14px; border-bottom: 1px solid var(--border); }
.entry-content tr:nth-child(even) td { background: var(--bg); }
.entry-content img { border-radius: var(--radius-sm); margin: 16px 0; }
.entry-content .highlight-box {
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
}

/* Table of Contents */
.toc-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 24px 0;
}
.toc-box .toc-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dark);
}
.toc-box ol { list-style: decimal; padding-left: 20px; }
.toc-box ol li { margin-bottom: 5px; font-size: 0.9rem; }
.toc-box ol li a { color: var(--primary); }

/* Tags */
.post-tags { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-tags .tags-label { font-size: 0.85rem; font-weight: 700; color: var(--dark); }
.tag-link {
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text);
  transition: var(--transition);
}
.tag-link:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* Share buttons */
.share-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.share-label { font-size: 0.88rem; font-weight: 700; color: var(--dark); margin-right: 4px; }
.share-btn {
  padding: 7px 16px;
  border-radius: 25px;
  font-size: 0.82rem;
  font-weight: 600;
  color: white;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.share-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.share-fb { background: #1877f2; }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }
.share-tg { background: #0088cc; }
.share-copy { background: var(--text-light); }

/* Author box */
.author-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 28px 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.author-avatar img {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}
.author-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.author-bio { font-size: 0.88rem; color: var(--text-light); line-height: 1.6; }
@media (max-width: 540px) { .author-box { flex-direction: column; } }

/* =============================================
   RELATED POSTS
   ============================================= */
.related-posts { margin: 32px 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 700px) { .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .related-grid { grid-template-columns: 1fr; } }

/* =============================================
   COMMENTS
   ============================================= */
.comments-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 28px 0;
}
.comments-title { font-size: 1.25rem; margin-bottom: 24px; padding-bottom: 12px; border-bottom: 2px solid var(--border); }
.comment-list { list-style: none; padding: 0; margin-bottom: 32px; }
.comment {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-avatar img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.comment-author-name { font-weight: 700; font-size: 0.95rem; }
.comment-date { font-size: 0.76rem; color: var(--muted); margin-bottom: 6px; }
.comment-content { font-size: 0.9rem; color: var(--text); line-height: 1.65; }
.comment-reply-link { font-size: 0.78rem; color: var(--primary); font-weight: 600; margin-top: 6px; display: inline-block; }
.children { padding-left: 40px; list-style: none; }

/* Comment Form */
.comment-form-wrap h3 { font-size: 1.1rem; margin-bottom: 18px; }
.comment-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.comment-form .form-field { display: flex; flex-direction: column; gap: 6px; }
.comment-form label { font-size: 0.83rem; font-weight: 600; color: var(--dark); }
.comment-form input, .comment-form textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: var(--font-main);
  color: var(--text);
  outline: none;
  transition: var(--transition);
  background: var(--bg);
}
.comment-form input:focus, .comment-form textarea:focus {
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.btn-submit {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 28px;
  border-radius: 25px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-main);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-1px); }
@media (max-width: 540px) { .comment-form .form-row { grid-template-columns: 1fr; } }

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar { display: flex; flex-direction: column; gap: 22px; }
.widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.widget-header {
  padding: 14px 18px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 8px;
}
.widget-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: 2px;
}
.widget-body { padding: 16px 18px; }

/* Search widget */
.widget-search form {
  display: flex;
  border: 2px solid var(--border);
  border-radius: 25px;
  overflow: hidden;
}
.widget-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 14px;
  font-size: 0.88rem;
  font-family: var(--font-main);
  background: transparent;
}
.widget-search button {
  background: var(--primary);
  border: none;
  color: white;
  padding: 9px 16px;
  cursor: pointer;
  transition: var(--transition);
}
.widget-search button:hover { background: var(--primary-dark); }

/* Category widget */
.widget-categories ul { padding: 0; }
.widget-categories li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.widget-categories li:last-child { border-bottom: none; }
.widget-categories a { color: var(--text); font-weight: 500; }
.widget-categories a:hover { color: var(--primary); }
.cat-count-badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Popular Posts */
.widget-popular .post-list-item { padding: 10px 0; }
.post-number {
  width: 26px; height: 26px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}
.post-number.top3 { background: var(--secondary); color: white; }

/* Tags widget */
.widget-tags .tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }

/* Newsletter */
.widget-newsletter { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; border: none; }
.widget-newsletter .widget-title { color: white; }
.widget-newsletter .widget-title::before { background: white; }
.newsletter-text { font-size: 0.88rem; color: rgba(255,255,255,0.88); margin-bottom: 14px; line-height: 1.6; }
.newsletter-form { display: flex; flex-direction: column; gap: 10px; }
.newsletter-form input {
  border: none;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.9rem;
  font-family: var(--font-main);
  outline: none;
}
.newsletter-form button {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-main);
  transition: var(--transition);
}
.newsletter-form button:hover { background: var(--secondary-dark); }

/* =============================================
   PAGINATION
   ============================================= */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 28px 0;
}
.page-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  cursor: pointer;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.page-btn.dots { cursor: default; border: none; background: transparent; }

/* =============================================
   FOOTER
   ============================================= */
#site-footer { background: var(--dark); color: rgba(255,255,255,0.8); margin-top: auto; }
.footer-main { padding: 48px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 36px;
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-about {}
.footer-logo { font-size: 1.4rem; font-weight: 800; color: white; margin-bottom: 12px; }
.footer-logo span { color: var(--secondary); }
.footer-desc { font-size: 0.85rem; line-height: 1.7; color: rgba(255,255,255,0.65); margin-bottom: 18px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: white; }
.footer-widget-title { font-size: 1rem; font-weight: 700; color: white; margin-bottom: 16px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.65); font-size: 0.87rem; transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: white; padding-left: 6px; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 12px; font-size: 0.87rem; color: rgba(255,255,255,0.65); align-items: flex-start; }
.footer-contact i { color: var(--secondary); margin-top: 2px; }

.footer-bottom {
  background: rgba(0,0,0,0.3);
  padding: 14px 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.65); }
.footer-bottom a:hover { color: white; }
.footer-bottom-links { display: flex; gap: 16px; }

/* =============================================
   NOTICE / ALERT BOXES
   ============================================= */
.notice-box {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 16px 0;
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.notice-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.notice-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.notice-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }

/* =============================================
   SCROLL TO TOP
   ============================================= */
#scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px; height: 42px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 998;
}
#scroll-top.visible { opacity: 1; visibility: visible; }
#scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* =============================================
   UTILITY
   ============================================= */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mb-3 { margin-bottom: 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: var(--font-main);
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }

/* =============================================
   ACCESSIBILITY
   ============================================= */
.skip-link {
  position: absolute;
  top: -50px;
  left: 0;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* =============================================
   PRINT
   ============================================= */
@media print {
  #site-header, #main-nav, .sidebar, #site-footer, .adzone, .share-box { display: none !important; }
  .main-grid { grid-template-columns: 1fr; }
}
