/*
Theme Name: VisaPK Theme
Theme URI: https://visapk.com
Author: VisaPK
Author URI: https://visapk.com
Description: Ultra-fast, SEO-optimized, AdSense-ready WordPress theme for VisaPK.com
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: visapk-theme
*/

/* ============================================
   CSS VARIABLES
============================================ */
:root {
  --green-dark:    #0d5c2e;
  --green-main:    #1a7a3e;
  --green-light:   #22a052;
  --green-pale:    #e8f5ee;
  --orange:        #e07b1a;
  --orange-light:  #fff3e0;
  --white:         #ffffff;
  --gray-100:      #f8f9fa;
  --gray-200:      #e9ecef;
  --gray-300:      #dee2e6;
  --gray-500:      #6c757d;
  --gray-700:      #495057;
  --text-main:     #1e2a1e;
  --text-light:    #4a5568;
  --border:        #d4e6d9;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 12px rgba(0,0,0,0.1);
  --radius:        6px;
  --radius-lg:     10px;
  --font-main:     'Georgia', 'Times New Roman', serif;
  --font-ui:       -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --max-width:     1200px;
  --content-width: 760px;
}

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

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

body {
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-main);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green-main);
  text-decoration: none;
}

a:hover { color: var(--green-dark); text-decoration: underline; }

ul, ol { padding-left: 1.5rem; }

/* ============================================
   TOP BAR
============================================ */
.top-bar {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.78rem;
  font-family: var(--font-ui);
  padding: 6px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar a {
  color: rgba(255,255,255,0.85);
  margin-left: 16px;
}

.top-bar a:hover { color: #fff; text-decoration: none; }

.top-bar .whatsapp-link {
  background: #25d366;
  color: #fff;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
}

/* ============================================
   HEADER
============================================ */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--green-main);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: var(--green-main);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green-dark);
  letter-spacing: -0.5px;
  font-family: var(--font-ui);
}

.logo-name span { color: var(--green-light); }

.logo-tagline {
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Header Search */
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form-header {
  display: flex;
  border: 2px solid var(--border);
  border-radius: 25px;
  overflow: hidden;
  transition: border-color 0.2s;
}

.search-form-header:focus-within {
  border-color: var(--green-main);
}

.search-form-header input {
  border: none;
  outline: none;
  padding: 7px 14px;
  font-size: 0.85rem;
  width: 220px;
  font-family: var(--font-ui);
  background: var(--gray-100);
}

.search-form-header button {
  background: var(--green-main);
  border: none;
  color: white;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.search-form-header button:hover { background: var(--green-dark); }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--green-main);
  border-radius: var(--radius);
  color: var(--green-main);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

/* ============================================
   NAVIGATION
============================================ */
.main-nav {
  background: var(--green-main);
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.main-nav > .container > ul > li {
  position: relative;
}

.main-nav > .container > ul > li > a {
  display: block;
  color: #fff;
  padding: 12px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--font-ui);
  transition: background 0.2s;
  white-space: nowrap;
}

.main-nav > .container > ul > li > a:hover,
.main-nav > .container > ul > li.current-menu-item > a {
  background: var(--green-dark);
  text-decoration: none;
}

/* Dropdown */
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green-main);
  box-shadow: var(--shadow-md);
  min-width: 200px;
  z-index: 999;
  padding: 6px 0;
}

.main-nav li:hover > .sub-menu { display: block; }

.main-nav .sub-menu li a {
  display: block;
  padding: 9px 16px;
  color: var(--text-main);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--gray-200);
  transition: background 0.15s;
}

.main-nav .sub-menu li:last-child a { border-bottom: none; }
.main-nav .sub-menu li a:hover {
  background: var(--green-pale);
  color: var(--green-dark);
  text-decoration: none;
}

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

/* ============================================
   BREADCRUMB
============================================ */
.breadcrumb-wrap {
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  padding: 8px 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--gray-500);
  font-family: var(--font-ui);
  list-style: none;
  padding: 0;
}

.breadcrumb a { color: var(--green-main); }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--gray-300); }
.breadcrumb .current { color: var(--text-light); }

/* ============================================
   HERO AD BAR (Header ke neeche)
============================================ */
.hero-ad {
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  text-align: center;
  padding: 10px 0;
}

/* ============================================
   MAIN LAYOUT — Content + Sidebar
============================================ */
.site-main {
  padding: 28px 0 40px;
}

.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
  align-items: start;
}

/* ============================================
   HOMEPAGE — POST CARDS
============================================ */
.posts-grid {
  display: grid;
  gap: 24px;
}

.post-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card-image {
  position: relative;
  overflow: hidden;
}

.post-card-image img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card-image img { transform: scale(1.04); }

.post-card-body {
  padding: 16px 16px 16px 0;
  display: flex;
  flex-direction: column;
}

.post-card-category {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 8px;
  font-family: var(--font-ui);
}

.post-card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  font-family: var(--font-ui);
}

.post-card-title a {
  color: var(--text-main);
}

.post-card-title a:hover { color: var(--green-main); text-decoration: none; }

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--gray-500);
  font-family: var(--font-ui);
}

.read-more-btn {
  display: inline-block;
  background: var(--green-main);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 10px;
  align-self: flex-start;
  transition: background 0.2s;
}

.read-more-btn:hover {
  background: var(--green-dark);
  color: white;
  text-decoration: none;
}

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

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.2s;
  font-family: var(--font-ui);
}

.pagination a:hover,
.pagination .current {
  background: var(--green-main);
  border-color: var(--green-main);
  color: white;
  text-decoration: none;
}

/* ============================================
   SINGLE ARTICLE
============================================ */
.article-header { margin-bottom: 24px; }

.article-category-label {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
  font-family: var(--font-ui);
}

.article-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--text-main);
  margin-bottom: 14px;
  font-family: var(--font-ui);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--gray-500);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  font-family: var(--font-ui);
  flex-wrap: wrap;
}

.article-meta span { display: flex; align-items: center; gap: 4px; }

.article-featured-image {
  margin-bottom: 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: cover;
}

/* Table of Contents */
.toc-box {
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green-main);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 24px 0;
}

.toc-box h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ui);
}

.toc-list {
  list-style: none;
  padding: 0;
  counter-reset: toc;
}

.toc-list li {
  counter-increment: toc;
  padding: 4px 0;
  font-size: 0.85rem;
  border-bottom: 1px dashed var(--border);
}

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

.toc-list li::before {
  content: counter(toc) ". ";
  color: var(--green-main);
  font-weight: 700;
}

.toc-list a { color: var(--green-dark); }
.toc-list a:hover { text-decoration: underline; }

/* Article Content Typography */
.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-main);
  max-width: var(--content-width);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-pale);
  font-family: var(--font-ui);
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 24px 0 10px;
  font-family: var(--font-ui);
}

.article-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--green-dark);
  margin: 18px 0 8px;
  font-family: var(--font-ui);
}

.article-content p { margin-bottom: 18px; }

.article-content ul,
.article-content ol {
  margin: 16px 0 20px 1.5rem;
}

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

.article-content a {
  color: var(--green-main);
  border-bottom: 1px solid var(--green-pale);
}

.article-content a:hover {
  color: var(--green-dark);
  border-bottom-color: var(--green-main);
}

.article-content strong { color: var(--text-main); }

.article-content blockquote {
  background: var(--green-pale);
  border-left: 4px solid var(--green-main);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-light);
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
  font-family: var(--font-ui);
}

.article-content th {
  background: var(--green-main);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
}

.article-content td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.article-content tr:nth-child(even) td { background: var(--green-pale); }

.article-content img {
  border-radius: var(--radius);
  margin: 16px auto;
}

/* In-article Ad */
.in-article-ad {
  text-align: center;
  margin: 28px 0;
  padding: 10px;
  background: var(--gray-100);
  border-radius: var(--radius);
  border: 1px dashed var(--gray-300);
}

.in-article-ad::before {
  content: 'Advertisement';
  display: block;
  font-size: 0.65rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-family: var(--font-ui);
}

/* FAQ Section */
.faq-section {
  margin: 36px 0;
}

.faq-section h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--text-main);
  font-family: var(--font-ui);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  background: var(--gray-100);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-ui);
  user-select: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--green-main);
  flex-shrink: 0;
}

.faq-item.open .faq-question::after { content: '−'; }

.faq-answer {
  display: none;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  line-height: 1.7;
}

.faq-item.open .faq-answer { display: block; }

/* Article Tags */
.article-tags {
  margin: 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-family: var(--font-ui);
}

.article-tags .label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-500);
}

.tag-link {
  display: inline-block;
  background: var(--gray-100);
  border: 1px solid var(--border);
  color: var(--text-light);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  transition: all 0.2s;
}

.tag-link:hover {
  background: var(--green-pale);
  border-color: var(--green-main);
  color: var(--green-dark);
  text-decoration: none;
}

/* Author Box */
.author-box {
  display: flex;
  gap: 16px;
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 28px 0;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green-main);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  flex-shrink: 0;
  font-family: var(--font-ui);
}

.author-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
  font-family: var(--font-ui);
}

.author-info p {
  font-size: 0.83rem;
  color: var(--text-light);
  margin: 0;
  line-height: 1.5;
}

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

.related-posts h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 18px;
  color: var(--text-main);
  font-family: var(--font-ui);
}

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

.related-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.related-card:hover { box-shadow: var(--shadow-md); }

.related-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.related-card-body {
  padding: 10px 12px;
}

.related-card-body a {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-ui);
}

.related-card-body a:hover { color: var(--green-main); text-decoration: none; }

/* ============================================
   SIDEBAR
============================================ */
.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
}

.widget-title {
  background: var(--green-main);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  font-family: var(--font-ui);
}

.widget-body { padding: 14px 16px; }

/* Sidebar Ad */
.sidebar-ad {
  text-align: center;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px;
  margin-bottom: 20px;
}

.sidebar-ad::before {
  content: 'Advertisement';
  display: block;
  font-size: 0.65rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-family: var(--font-ui);
}

/* Recent Posts Widget */
.recent-posts-list {
  list-style: none;
  padding: 0;
}

.recent-posts-list li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: flex-start;
}

.recent-posts-list li:last-child { border-bottom: none; padding-bottom: 0; }

.recent-posts-list img {
  width: 60px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.recent-post-text a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-family: var(--font-ui);
}

.recent-post-text a:hover { color: var(--green-main); text-decoration: none; }

.recent-post-date {
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-top: 3px;
  font-family: var(--font-ui);
}

/* Categories Widget */
.categories-list {
  list-style: none;
  padding: 0;
}

.categories-list li {
  border-bottom: 1px solid var(--gray-200);
}

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

.categories-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  font-size: 0.85rem;
  color: var(--text-main);
  font-family: var(--font-ui);
  transition: color 0.2s;
}

.categories-list a:hover {
  color: var(--green-main);
  text-decoration: none;
}

.categories-list .count {
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
}

/* Search Widget */
.search-form-widget {
  display: flex;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-form-widget input {
  flex: 1;
  border: none;
  outline: none;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: var(--font-ui);
}

.search-form-widget button {
  background: var(--green-main);
  border: none;
  color: white;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}

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

/* ============================================
   FOOTER
============================================ */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  margin-top: 40px;
}

.footer-widgets {
  padding: 40px 0 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-widget-title {
  color: white;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--green-light);
  font-family: var(--font-ui);
}

.footer-about p {
  font-size: 0.83rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.75);
}

.footer-logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 10px;
  display: block;
  font-family: var(--font-ui);
}

.footer-logo span { color: var(--green-light); }

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.footer-links a::before {
  content: '›';
  color: var(--green-light);
  font-weight: 700;
}

.footer-links a:hover {
  color: white;
  text-decoration: none;
}

.footer-bottom {
  background: rgba(0,0,0,0.25);
  padding: 14px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-ui);
}

.footer-bottom a {
  color: rgba(255,255,255,0.7);
  margin-left: 16px;
}

.footer-bottom a:hover { color: white; text-decoration: none; }

/* ============================================
   BACK TO TOP
============================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: var(--green-main);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--green-dark); }

/* ============================================
   NOTICE BOX
============================================ */
.notice-box {
  background: var(--orange-light);
  border: 1px solid #f5c57a;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.88rem;
  color: #7a4a00;
  font-family: var(--font-ui);
}

.notice-box strong { color: var(--orange); }

/* ============================================
   CATEGORY PAGE
============================================ */
.category-header {
  background: var(--green-pale);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.category-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 6px;
  font-family: var(--font-ui);
}

.category-header p {
  font-size: 0.88rem;
  color: var(--text-light);
  margin: 0;
}

/* ============================================
   404 PAGE
============================================ */
.not-found-section {
  text-align: center;
  padding: 60px 20px;
}

.not-found-section h1 {
  font-size: 5rem;
  color: var(--green-main);
  font-weight: 900;
  font-family: var(--font-ui);
}

.not-found-section h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  font-family: var(--font-ui);
}

.not-found-section p {
  color: var(--text-light);
  margin-bottom: 24px;
}

/* ============================================
   RESPONSIVE — MOBILE
============================================ */
@media (max-width: 1024px) {
  .content-sidebar-wrap {
    grid-template-columns: 1fr 280px;
  }
  .footer-widgets {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  :root { font-size: 16px; }

  /* Header mobile */
  .top-bar .container { flex-direction: column; gap: 4px; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .header-search { display: none; }
  .menu-toggle { display: flex; align-items: center; }

  /* Mobile nav */
  .main-nav > .container > ul {
    display: none;
    flex-direction: column;
    padding: 8px 0;
  }

  .main-nav > .container > ul.nav-open { display: flex; }

  .main-nav > .container > ul > li > a {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .main-nav .sub-menu {
    position: static;
    border: none;
    border-top: none;
    box-shadow: none;
    background: rgba(0,0,0,0.15);
    display: none !important;
  }

  /* Content layout mobile */
  .content-sidebar-wrap {
    grid-template-columns: 1fr;
  }

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

  /* Post cards mobile */
  .post-card {
    grid-template-columns: 1fr;
  }

  .post-card-image img { height: 200px; }
  .post-card-body { padding: 14px; }

  /* Article */
  .article-title { font-size: 1.5rem; }
  .article-content h2 { font-size: 1.25rem; }

  /* Related posts */
  .related-grid { grid-template-columns: 1fr; }

  /* Footer */
  .footer-widgets { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .article-title { font-size: 1.3rem; }
  .logo-name { font-size: 1.2rem; }
  .back-to-top { bottom: 16px; right: 16px; }
}

/* ============================================
   PRINT
============================================ */
@media print {
  .site-header, .main-nav, .sidebar,
  .site-footer, .back-to-top,
  .in-article-ad, .sidebar-ad { display: none !important; }
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .article-content { max-width: 100%; }
}
