/*
Theme Name: Content Online Pro
Theme URI: https://colcperba.top/
Author: Content Online
Description: قالب RTL سبک و بهینه برای تولید محتوا و نویسندگی
Version: 1.0.0
Text Domain: content-online-pro
*/

@import url("https://cdn.jsdelivr.net/npm/vazirmatn@33.003/Vazirmatn-font-face.css");

:root {
  --bg: #f4f6fa;
  --panel: #ffffff;
  --panel-2: #f8fafc;
  --ink: #1a2332;
  --muted: #64748b;
  --line: rgba(26, 35, 50, 0.1);
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --blue-soft: #dbeafe;
  --ink-soft: #e8eef8;
  --shadow: 0 12px 32px rgba(26, 45, 80, 0.08);
  --radius: 16px;
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  direction: rtl;
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(37, 99, 235, 0.1), transparent 55%),
    radial-gradient(ellipse 40% 30% at 0% 10%, rgba(14, 165, 160, 0.07), transparent 50%),
    linear-gradient(180deg, #eef2f8 0%, var(--bg) 40%, #eef1f6 100%);
  line-height: 1.8;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; border: 0; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--blue-deep); }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; line-height: 1.45; color: #0f172a; }
p { margin: 0 0 1rem; }

.co-wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.co-topbar {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(26, 45, 80, 0.04);
}
.co-topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px; flex-wrap: wrap;
}
.co-brand { display: flex; align-items: center; gap: .7rem; color: inherit; }
.co-logo {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px;
  background: linear-gradient(145deg, var(--blue) 0%, #0ea5a0 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
  display: grid; place-items: center;
}
.co-logo svg { width: 24px; height: 24px; display: block; }
.co-brand-text { display: flex; flex-direction: column; gap: .05rem; }
.co-brand-name { color: #0f172a; font-size: 1.12rem; font-weight: 900; line-height: 1.25; }
.co-brand-sub { color: var(--muted); font-size: .75rem; }
.co-nav { display: flex; flex-wrap: wrap; gap: .3rem; }
.co-nav a {
  color: #334155; font-weight: 650; font-size: .88rem;
  padding: .42rem .78rem; border-radius: 999px;
}
.co-nav a:hover, .co-nav a.is-active {
  background: var(--blue-soft); color: var(--blue-deep);
}
.co-search {
  display: flex; align-items: center;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; overflow: hidden;
}
.co-search input {
  background: transparent; border: 0; color: var(--ink);
  padding: .62rem 1rem; min-width: 150px; font-family: inherit; outline: none;
}
.co-search button {
  border: 0; background: var(--blue); color: #fff; font-weight: 800;
  padding: .62rem 1rem; cursor: pointer; font-family: inherit;
}
.co-search button:hover { background: var(--blue-deep); }

.co-hero {
  position: relative; overflow: hidden;
  padding: 2.6rem 0 2.8rem; margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(37, 99, 235, 0.1), rgba(14, 165, 160, 0.06) 45%, transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f3f6fb 100%);
}
.co-hero-inner { position: relative; z-index: 1; max-width: 40rem; }
.co-hero h1 { font-size: clamp(1.45rem, 3.5vw, 2.2rem); margin-bottom: .5rem; }
.co-hero p { color: var(--muted); font-size: 1.02rem; margin-bottom: 1.1rem; }
.co-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .72rem 1.2rem; border-radius: 999px; font-weight: 800; font-size: .95rem;
  background: var(--blue); color: #fff !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}
.co-btn:hover { background: var(--blue-deep); color: #fff !important; }

.co-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.35rem;
  padding-bottom: 2.4rem;
  align-items: start;
}
.co-side { position: sticky; top: 88px; }

.co-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem; margin-bottom: 1.35rem;
}
.co-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  display: flex; flex-direction: column;
}
.co-card:hover {
  transform: translateY(-3px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 16px 36px rgba(26, 45, 80, 0.12);
}
.co-card-thumb {
  aspect-ratio: 16/10; background: #e2e8f0; overflow: hidden; display: block;
}
.co-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.co-card:hover .co-card-thumb img { transform: scale(1.04); }
.co-card-body { padding: 1rem 1.05rem 1.15rem; flex: 1; display: flex; flex-direction: column; }
.co-card-meta { color: var(--muted); font-size: .8rem; margin-bottom: .35rem; }
.co-card-title { font-size: 1.02rem; }
.co-card-title a { color: #0f172a; }
.co-card-title a:hover { color: var(--blue); }
.co-excerpt { color: #475569; font-size: .92rem; margin-top: .4rem; flex: 1; }
.co-readmore {
  display: inline-flex; margin-top: .75rem;
  color: var(--blue); font-weight: 800; font-size: .88rem;
}

.co-article {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 1.2rem;
}
.co-article-thumb { max-height: 380px; overflow: hidden; background: #e2e8f0; }
.co-article-thumb img { width: 100%; max-height: 380px; object-fit: cover; }
.co-article-body { padding: 1.35rem 1.35rem 1.6rem; }
.co-article-body h1 { font-size: clamp(1.25rem, 3vw, 1.85rem); margin-bottom: .5rem; }
.co-content { color: #243044; font-size: 1.02rem; }
.co-content a { color: var(--blue); border-bottom: 1px solid rgba(37, 99, 235, 0.25); }
.co-content img { border-radius: 12px; margin: 1rem 0; }
.co-content h2, .co-content h3 { margin: 1.25rem 0 .5rem; }
.co-content ul, .co-content ol { margin: 0 0 1rem 1.2rem; list-style: disc; }
.co-content ol { list-style: decimal; }

.widget, .co-widget, .header-widget {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.05rem 1.1rem; margin-bottom: 1rem;
}
.widget-header, .widget-title, .co-widget-title {
  font-size: 1rem; margin-bottom: .7rem; padding-bottom: .45rem;
  border-bottom: 2px solid var(--blue); color: #0f172a;
}
.widget a { color: var(--blue-deep); font-weight: 650; font-size: .9rem; }
.widget a:hover { color: #0ea5a0; }
.widget ul li { margin: .35rem 0; }

.behtarinseo, .execphpwidget .behtarinseo {
  background: var(--panel-2) !important; border: 1px solid var(--line) !important;
  border-radius: 12px !important; padding: .85rem 1rem !important;
  overflow: visible !important; height: auto !important;
}
.behtarinseo a, .execphpwidget a {
  color: var(--blue-deep) !important; font-weight: 700 !important;
  display: inline-block; line-height: 1.8;
}
.behtarinseo a:hover { color: #0ea5a0 !important; }

.co-footer {
  background: #0f172a; color: rgba(255, 255, 255, 0.7);
  padding: 1.7rem 0 2.1rem; text-align: center;
  border-top: 3px solid var(--blue);
}
.co-footer strong { color: #fff; }
.co-footer a { color: #93c5fd; }

.co-pager, .navigation.pagination {
  display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.4rem;
}
.co-pager a, .co-pager .current, .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.3rem; height: 2.3rem; padding: 0 .65rem; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink); font-weight: 700;
}
.co-pager .current, .page-numbers.current {
  background: var(--blue); border-color: var(--blue); color: #fff;
}

@media (max-width: 960px) {
  .co-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .co-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .co-layout { grid-template-columns: 1fr; }
  .co-main { order: 1; }
  .co-side { order: 2; position: static; }
  .co-search { width: 100%; }
  .co-search input { flex: 1; min-width: 0; }
  .co-nav { width: 100%; }
}
