/*
Theme Name: CoupenYaari Theme
Theme URI: https://coupenyaari.com
Author: CoupenYaari
Author URI: https://coupenyaari.com
Description: A high-converting coupon, referral code, and online earning blog theme. Built for speed, SEO, and conversions.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coupenyaari
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, one-column, two-columns, right-sidebar, wide-blocks
*/

/* ========================================
   CSS CUSTOM PROPERTIES
======================================== */
:root {
  --primary:       #16a34a;   /* Green */
  --primary-dark:  #15803d;
  --primary-light: #bbf7d0;
  --secondary:     #2563eb;   /* Blue */
  --secondary-dark:#1d4ed8;
  --accent:        #f59e0b;   /* Amber */
  --bg:            #f8fafc;
  --bg-card:       #ffffff;
  --text:          #1e293b;
  --text-muted:    #64748b;
  --text-light:    #94a3b8;
  --border:        #e2e8f0;
  --shadow-sm:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow:        0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:     0 10px 30px rgba(0,0,0,0.12);
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --font-sans:     'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:     'Courier New', monospace;
  --max-width:     1200px;
  --sidebar-width: 320px;
  --transition:    all 0.2s ease;
}

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

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

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 0.75rem;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1.2rem; color: var(--text); }
ul, ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
li { margin-bottom: 0.4rem; }

blockquote {
  border-left: 4px solid var(--primary);
  padding: 1rem 1.5rem;
  background: var(--primary-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  font-style: italic;
}

pre, code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: #f1f5f9;
  border-radius: var(--radius-sm);
}
code { padding: 2px 6px; }
pre { padding: 1.2rem; overflow-x: auto; margin-bottom: 1.2rem; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
th, td { padding: 0.75rem 1rem; border: 1px solid var(--border); text-align: left; }
th { background: #f1f5f9; font-weight: 600; }
tr:nth-child(even) td { background: #f8fafc; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header .section-title { position: relative; display: inline-block; }
.section-header .section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
  margin: 0.5rem auto 0;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22,163,74,0.35);
}
.btn-secondary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-accent:hover { background: #d97706; color: #fff; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.85rem; }

/* ========================================
   HEADER
======================================== */
#masthead {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.site-logo { display: flex; align-items: center; gap: 0.6rem; }
.site-logo img { height: 42px; width: auto; }
.site-title-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.site-title-text span { color: var(--primary); }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav ul { display: flex; list-style: none; padding: 0; margin: 0; gap: 0.25rem; }
.main-nav ul li a {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}
.header-search input {
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.88rem;
  outline: none;
  width: 180px;
  transition: var(--transition);
}
.header-search input:focus {
  border-color: var(--primary);
  width: 220px;
}

/* ========================================
   HERO SECTION
======================================== */
.hero-section {
  background: linear-gradient(135deg, #064e3b 0%, #1e3a8a 100%);
  padding: 5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 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.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; display: inline-block; animation: pulse 1.5s infinite; }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 1.2rem;
  line-height: 1.2;
  position: relative;
}
.hero-title .highlight {
  color: #4ade80;
  position: relative;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,0.85);
  max-width: 580px;
  margin: 0 auto 2.2rem;
  position: relative;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }
.hero-stats {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
  position: relative;
}
.hero-stat { text-align: center; color: rgba(255,255,255,0.9); }
.hero-stat .stat-num { font-size: 1.8rem; font-weight: 800; color: #fff; display: block; }
.hero-stat .stat-label { font-size: 0.82rem; opacity: 0.75; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* ========================================
   AD SLOTS
======================================== */
.ad-slot {
  background: #f1f5f9;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-height: 90px;
  margin: 1.5rem 0;
}
.ad-slot-leaderboard { min-height: 90px; }
.ad-slot-rectangle { min-height: 250px; }
.ad-slot-banner { min-height: 60px; }

/* ========================================
   POSTS GRID / CARDS
======================================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.posts-grid-2 { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); }

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.post-card-thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; background: #f1f5f9; }
.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.05); }
.post-card-thumb .cat-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.post-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}
.post-card-meta svg { width: 13px; height: 13px; }
.post-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; flex: 1; margin-bottom: 1rem; }
.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.read-more:hover { color: var(--primary-dark); gap: 0.5rem; }

/* ========================================
   FEATURED POSTS
======================================== */
.featured-section { padding: 4rem 0; background: #fff; }
.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.5rem;
}
.featured-main {
  grid-column: 1 / 3;
  grid-row: 1 / 3;
}
.featured-main .post-card-thumb { aspect-ratio: 4/3; }
.featured-main .post-card-title { font-size: 1.35rem; }
.featured-side { }

/* ========================================
   REFER & EARN APPS SECTION
======================================== */
.apps-section { padding: 4rem 0; background: var(--bg); }
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.app-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.app-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}
.app-card-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--primary-light);
}
.app-card-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.3rem; }
.app-card-earn { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.app-card-amount {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
}

/* ========================================
   CATEGORIES SECTION
======================================== */
.categories-section { padding: 4rem 0; background: linear-gradient(135deg, #f0fdf4, #eff6ff); }
.cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.cat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.cat-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.cat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.cat-name { font-weight: 700; color: var(--text); font-size: 1.05rem; }
.cat-count { font-size: 0.82rem; color: var(--text-muted); }
.cat-green .cat-icon { background: #dcfce7; }
.cat-blue  .cat-icon { background: #dbeafe; }
.cat-purple .cat-icon { background: #ede9fe; }
.cat-orange .cat-icon { background: #ffedd5; }

/* ========================================
   LATEST POSTS SECTION
======================================== */
.latest-section { padding: 4rem 0; background: #fff; }

/* ========================================
   REFERRAL CODE BOX
======================================== */
.referral-box {
  background: linear-gradient(135deg, #f0fdf4, #eff6ff);
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 2rem 0;
  text-align: center;
}
.referral-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.referral-code-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  max-width: 420px;
  margin: 0 auto 1rem;
}
.referral-code {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 2px;
  text-align: left;
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
}
.copy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.copy-btn:hover { background: var(--primary-dark); }
.copy-btn.copied { background: #0f766e; }
.referral-note { font-size: 0.82rem; color: var(--text-muted); }
.referral-tip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #fef3c7;
  color: #92400e;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.75rem;
}

/* ========================================
   STEP-BY-STEP GUIDE
======================================== */
.steps-section { margin: 2rem 0; }
.steps-list { list-style: none; padding: 0; }
.step-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.step-item:last-child { border-bottom: none; }
.step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.step-content h4 { margin-bottom: 0.3rem; color: var(--text); font-size: 1rem; }
.step-content p { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* ========================================
   FAQ SECTION
======================================== */
.faq-section { margin: 2rem 0; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 0.75rem; overflow: hidden; }
.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}
.faq-question:hover { background: var(--primary-light); color: var(--primary-dark); }
.faq-question.active { background: var(--primary); color: #fff; }
.faq-icon { font-size: 1.2rem; transition: transform 0.2s; }
.faq-question.active .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 1rem 1.25rem; font-size: 0.9rem; color: var(--text-muted); background: #fff; }
.faq-answer.open { display: block; }

/* ========================================
   SINGLE POST LAYOUT
======================================== */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  align-items: start;
}
.main-content { min-width: 0; }
.sidebar { min-width: 0; }

/* Entry header */
.entry-header { margin-bottom: 2rem; }
.entry-cats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.entry-cat-link {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.entry-title { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 900; line-height: 1.25; margin-bottom: 1rem; }
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}
.entry-meta span { display: flex; align-items: center; gap: 0.3rem; }
.featured-image-wrap { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.featured-image-wrap img { width: 100%; }

/* Entry content */
.entry-content h2 { margin: 2rem 0 1rem; padding-top: 1rem; }
.entry-content h3 { margin: 1.5rem 0 0.75rem; }
.entry-content img { border-radius: var(--radius-sm); margin: 1rem 0; }
.entry-content a { color: var(--primary); text-decoration: underline; }

/* CTA Boxes */
.cta-box {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  text-align: center;
  margin: 2rem 0;
}
.cta-box h3 { color: #fff; font-size: 1.3rem; margin-bottom: 0.5rem; }
.cta-box p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }
.cta-box .btn { background: #fff; color: var(--primary); font-weight: 700; }
.cta-box .btn:hover { background: #f0fdf4; }

/* Breadcrumb */
.breadcrumb-bar { background: #f1f5f9; border-bottom: 1px solid var(--border); padding: 0.6rem 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { color: var(--text-muted); }
.breadcrumb .sep { color: var(--text-light); }

/* Tag list */
.entry-tags { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.entry-tags .tags-label { font-weight: 600; margin-right: 0.5rem; }
.tag-link {
  display: inline-block;
  background: #f1f5f9;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin: 0.2rem 0.2rem 0.2rem 0;
  transition: var(--transition);
}
.tag-link:hover { background: var(--primary-light); color: var(--primary-dark); }

/* ========================================
   RELATED POSTS
======================================== */
.related-posts { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--border); }
.related-posts h3 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }

/* ========================================
   SIDEBAR
======================================== */
.sidebar { position: sticky; top: 80px; }
.widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-light);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text); font-size: 0.9rem; }
.widget ul li a:hover { color: var(--primary); padding-left: 4px; }
.widget-search input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}
.widget-search input:focus { border-color: var(--primary); }

/* Telegram CTA widget */
.telegram-widget {
  background: linear-gradient(135deg, #0088cc, #005f8f);
  color: #fff;
  text-align: center;
}
.telegram-widget .widget-title { color: #fff; border-bottom-color: rgba(255,255,255,0.3); }
.telegram-widget p { color: rgba(255,255,255,0.9); font-size: 0.88rem; margin-bottom: 1rem; }
.telegram-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* ========================================
   ARCHIVE / SEARCH
======================================== */
.archive-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  padding: 3rem 1.25rem;
  text-align: center;
  margin-bottom: 0;
}
.archive-header h1 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.2rem); }
.archive-header p { color: rgba(255,255,255,0.85); }

.archive-layout { display: grid; grid-template-columns: 1fr var(--sidebar-width); gap: 2rem; padding: 2rem 1.25rem; max-width: var(--max-width); margin: 0 auto; }

/* ========================================
   PAGINATION
======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.5rem 0;
  flex-wrap: wrap;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
}
.page-numbers:hover, .page-numbers.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.page-numbers.dots { border: none; cursor: default; }

/* ========================================
   COMMENTS
======================================== */
.comments-area { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--border); }
.comments-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.comment-author { font-weight: 600; }
.comment-meta { font-size: 0.8rem; color: var(--text-muted); }
.comment-content { margin-top: 0.5rem; font-size: 0.92rem; }
#respond { margin-top: 2rem; }
#respond h3 { font-size: 1.2rem; margin-bottom: 1rem; }
.comment-form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  margin-bottom: 1rem;
  transition: var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--primary); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.comment-form .submit:hover { background: var(--primary-dark); }

/* ========================================
   FOOTER
======================================== */
#colophon {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 4rem;
}
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding: 3.5rem 1.25rem 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-brand .site-title-text { color: #fff; display: block; margin-bottom: 0.75rem; font-size: 1.4rem; }
.footer-brand p { color: #94a3b8; font-size: 0.88rem; line-height: 1.7; margin-bottom: 1.25rem; }
.footer-social { display: flex; gap: 0.6rem; }
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1rem;
  transition: var(--transition);
  text-decoration: none;
}
.social-link:hover { background: var(--primary); color: #fff; }
.footer-col h4 { color: #fff; font-size: 0.95rem; font-weight: 700; margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a { color: #94a3b8; font-size: 0.88rem; transition: var(--transition); }
.footer-col ul li a:hover { color: #4ade80; padding-left: 4px; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: #64748b;
  max-width: var(--max-width);
  margin: 0 auto;
}
.footer-bottom a { color: var(--primary); }

/* ========================================
   NO-CONTENT / 404
======================================== */
.no-results, .error-404 { text-align: center; padding: 4rem 1.25rem; }
.no-results h2, .error-404 h2 { font-size: 1.8rem; margin-bottom: 0.75rem; }
.no-results p, .error-404 p { color: var(--text-muted); max-width: 480px; margin: 0 auto 1.5rem; }

/* ========================================
   PAGE
======================================== */
.page-header { margin-bottom: 2rem; }
.page-header h1 { border-bottom: 2px solid var(--primary-light); padding-bottom: 0.75rem; }

/* ========================================
   SEARCH FORM
======================================== */
.search-form { display: flex; gap: 0.5rem; }
.search-field {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.search-field:focus { border-color: var(--primary); }
.search-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.65rem 1.2rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}
.search-submit:hover { background: var(--primary-dark); }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
  .featured-grid { grid-template-columns: 1fr 1fr; }
  .featured-main { grid-column: 1 / 3; grid-row: 1; }
  .footer-main { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .content-wrapper,
  .archive-layout { grid-template-columns: 1fr; }

  .sidebar { position: static; }

  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-top: 1px solid var(--border); box-shadow: var(--shadow); flex-direction: column; padding: 1rem; gap: 0; }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; width: 100%; }
  .main-nav ul li a { border-radius: 0; padding: 0.65rem 1rem; }

  .menu-toggle { display: flex; }
  .header-search { display: none; }

  .hero-section { padding: 3rem 1.25rem; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-stats { gap: 1.5rem; }

  .featured-grid { grid-template-columns: 1fr; }
  .featured-main { grid-column: 1; grid-row: 1; }

  .footer-main { grid-template-columns: 1fr; gap: 2rem; padding-bottom: 1.5rem; }
  .footer-brand { text-align: center; }
  .footer-social { justify-content: center; }
}

@media (max-width: 480px) {
  .posts-grid { grid-template-columns: 1fr; }
  .apps-grid { grid-template-columns: 1fr 1fr; }
  .cats-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .referral-code-wrap { flex-direction: column; }
  .referral-code { text-align: center; }
  .copy-btn { width: 100%; justify-content: center; }
}

/* ========================================
   UTILITY
======================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.py-4 { padding: 2rem 0; }
.hidden { display: none; }
