/*
Theme Name: CleanPost Blog
Theme URI: https://example.com
Author: CleanPost
Description: A fast, clean, AdSense-ready WordPress blog theme. Minimal design, perfect readability, built for approval and earnings.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cleanpost
Tags: blog, clean, adsense, fast, minimal, two-column
*/

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

:root {
  --white:       #ffffff;
  --body-bg:     #f4f6f8;
  --card-bg:     #ffffff;
  --sidebar-bg:  #f8f9fa;
  --accent:      #2563eb;
  --accent-dark: #1d4ed8;
  --accent-lite: #dbeafe;
  --text-dark:   #1a1a1a;
  --text-mid:    #374151;
  --text-light:  #6b7280;
  --border:      #e5e7eb;
  --topbar:      #2563eb;
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body:    system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius:       6px;
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--body-bg);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  color: var(--text-dark);
  line-height: 1.25;
  font-weight: 700;
}
p { margin-bottom: 1rem; color: var(--text-mid); }
ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; color: var(--text-mid); }

/* ============================================================
   LAYOUT
   ============================================================ */
.container        { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.site-wrapper     { min-height: 100vh; display: flex; flex-direction: column; }
.site-content     { flex: 1; padding: 28px 0 48px; }
.content-wrap     { display: grid; grid-template-columns: 1fr 300px; gap: 28px; align-items: start; }

/* ============================================================
   TOP ACCENT BAR
   ============================================================ */
.topbar {
  height: 4px;
  background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 60%, #a78bfa 100%);
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 1160px;
  margin: 0 auto;
  gap: 20px;
}
.site-branding a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  gap: 1px;
}
.site-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -0.5px;
}
.site-name span { color: var(--accent); }
.site-tagline {
  font-size: 11px;
  color: var(--text-light);
  letter-spacing: 0.5px;
  font-family: var(--font-body);
}

/* ============================================================
   PRIMARY NAV
   ============================================================ */
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.primary-nav ul li a {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  padding: 7px 13px;
  border-radius: var(--radius);
  letter-spacing: 0.2px;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.primary-nav ul li a:hover,
.primary-nav ul li.current-menu-item > a {
  background: var(--accent-lite);
  color: var(--accent-dark);
  text-decoration: none;
}
.nav-mobile-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 18px;
  color: var(--text-mid);
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 12px;
  color: var(--text-light);
}
.breadcrumbs a { color: var(--text-light); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { margin: 0 6px; color: #d1d5db; }

/* ============================================================
   FEATURED POST (top of homepage)
   ============================================================ */
.featured-post {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.featured-post-img {
  background: #dbeafe;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.featured-post-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-post-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px; background: var(--accent-lite);
}
.featured-post-body {
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.featured-post-body h2 {
  font-size: 22px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.featured-post-body h2 a { color: var(--text-dark); text-decoration: none; }
.featured-post-body h2 a:hover { color: var(--accent); text-decoration: none; }
.featured-post-body p { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-light);
  flex-wrap: wrap;
}
.post-meta-row .cat-pill {
  background: var(--accent-lite);
  color: var(--accent-dark);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
}
.read-btn {
  display: inline-block;
  margin-top: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s;
  align-self: flex-start;
}
.read-btn:hover { background: var(--accent-dark); color: #fff; text-decoration: none; }

/* ============================================================
   AD AREAS
   ============================================================ */
.ad-area {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
}
.ad-label {
  font-size: 10px;
  color: #9ca3af;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ============================================================
   POST CARDS LIST
   ============================================================ */
.section-title-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.section-title-bar h2 {
  font-size: 16px;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--text-dark);
  padding-bottom: 4px;
  border-bottom: 2px solid var(--accent);
  flex-shrink: 0;
}
.section-title-bar .rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.posts-list { display: flex; flex-direction: column; gap: 20px; }
.post-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 200px 1fr;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card-thumb {
  background: var(--accent-lite);
  overflow: hidden;
}
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-thumb-placeholder {
  width: 100%; height: 100%;
  min-height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  background: var(--accent-lite);
}
.post-card-body { padding: 18px 20px; }
.post-card-body .post-meta-row { margin-bottom: 8px; }
.post-card-body h3 {
  font-size: 17px;
  margin-bottom: 8px;
  line-height: 1.35;
}
.post-card-body h3 a { color: var(--text-dark); text-decoration: none; }
.post-card-body h3 a:hover { color: var(--accent); text-decoration: none; }
.post-card-body p { font-size: 13px; color: var(--text-light); margin: 0; line-height: 1.6; }
.read-more {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.read-more:hover { text-decoration: underline; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 28px 0 8px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-mid);
  text-decoration: none;
  background: var(--white);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.pagination a:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar-bg);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}
.widget-body { padding: 12px 16px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-mid); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--text-mid); text-decoration: none; }
.widget ul li a:hover { color: var(--accent); text-decoration: none; }
.widget-search { padding: 12px 16px; display: flex; gap: 8px; }
.widget-search input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-dark);
  background: var(--sidebar-bg);
  outline: none;
  font-family: var(--font-body);
}
.widget-search input:focus { border-color: var(--accent); }
.widget-search button {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.widget-search button:hover { background: var(--accent-dark); }

/* Tags cloud */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; }
.tag-cloud a {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--accent-lite);
  background: var(--accent-lite);
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.tag-cloud a:hover { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-wrap { max-width: 780px; }
.post-header { margin-bottom: 20px; }
.post-header h1 {
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 12px;
  color: var(--text-dark);
}
.post-thumbnail {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--border);
}
.post-thumbnail img { width: 100%; height: auto; }
.post-body {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-mid);
}
.post-body h2 { font-size: 21px; margin: 28px 0 10px; color: var(--text-dark); }
.post-body h3 { font-size: 18px; margin: 22px 0 8px; color: var(--text-dark); }
.post-body p { margin-bottom: 1.1rem; }
.post-body a { color: var(--accent); }
.post-body strong { color: var(--text-dark); }
.post-body ul, .post-body ol { margin-bottom: 1rem; }
.post-body li { margin-bottom: 6px; }
.post-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-lite);
  padding: 14px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-mid);
}
.post-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.post-body table th { background: var(--accent); color: #fff; padding: 10px 14px; text-align: left; font-family: var(--font-body); font-size: 13px; }
.post-body table td { padding: 9px 14px; border: 1px solid var(--border); color: var(--text-mid); }
.post-body table tr:nth-child(even) td { background: var(--sidebar-bg); }
.post-body img { border-radius: var(--radius); margin: 16px 0; max-width: 100%; }
.post-body code {
  font-size: 13px;
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  color: #c0392b;
}
.post-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 16px 0;
  font-size: 13px;
}

/* Post tags */
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.post-tags a {
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-lite);
  border-radius: 20px;
  padding: 3px 12px;
  text-decoration: none;
  font-weight: 600;
}
.post-tags a:hover { background: var(--accent); color: #fff; text-decoration: none; }

/* Author box */
.author-box {
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-top: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.author-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent-lite); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.author-info h4 { font-size: 14px; font-family: var(--font-body); margin-bottom: 4px; }
.author-info p { font-size: 12px; color: var(--text-light); margin: 0; }

/* Related posts */
.related-posts { margin-top: 32px; }
.related-posts h3 { font-size: 17px; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.related-card-thumb { aspect-ratio: 16/9; background: var(--accent-lite); overflow: hidden; }
.related-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-card-body { padding: 10px 12px; }
.related-card-body h4 { font-size: 13px; font-family: var(--font-body); font-weight: 600; }
.related-card-body h4 a { color: var(--text-dark); text-decoration: none; }
.related-card-body h4 a:hover { color: var(--accent); }
.related-card-body .post-meta-row { font-size: 11px; margin-top: 5px; }

/* ============================================================
   ARCHIVE / CATEGORY PAGE
   ============================================================ */
.archive-header {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.archive-icon { font-size: 30px; }
.archive-header h1 { font-size: 20px; margin: 0; }
.archive-header p { font-size: 13px; color: var(--text-light); margin: 4px 0 0; }

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found {
  text-align: center;
  padding: 80px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.not-found h1 { font-size: 72px; color: var(--accent); margin-bottom: 8px; }
.not-found h2 { font-size: 22px; margin-bottom: 12px; }
.not-found p { color: var(--text-light); margin-bottom: 24px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #1e293b;
  color: #94a3b8;
  margin-top: auto;
}
.footer-top-bar { height: 3px; background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 60%, #a78bfa 100%); }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 40px 20px 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-about .footer-site-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: #f1f5f9; margin-bottom: 10px; }
.footer-about .footer-site-name span { color: #60a5fa; }
.footer-about p { font-size: 13px; color: #64748b; line-height: 1.7; margin: 0; }
.footer-col h4 { font-size: 12px; font-family: var(--font-body); font-weight: 700; color: #f1f5f9; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { font-size: 13px; color: #64748b; text-decoration: none; transition: color 0.15s; }
.footer-col ul li a:hover { color: #60a5fa; text-decoration: none; }
.footer-divider { border: none; border-top: 1px solid #334155; margin-bottom: 20px; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #475569; }
.footer-bottom a { color: #475569; text-decoration: none; }
.footer-bottom a:hover { color: #60a5fa; text-decoration: none; }
.footer-bottom-links { display: flex; gap: 20px; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-area { margin-top: 28px; }
.comments-title { font-size: 18px; margin-bottom: 20px; }
.comment-list { list-style: none; padding: 0; }
.comment { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; }
.comment-author { font-weight: 700; font-size: 14px; color: var(--text-dark); }
.comment-meta { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.comment-content p { font-size: 14px; margin: 0; color: var(--text-mid); }
.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--sidebar-bg);
  margin-bottom: 12px;
  outline: none;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--accent); }
.comment-form textarea { height: 120px; resize: vertical; }
.comment-form .submit {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.comment-form .submit:hover { background: var(--accent-dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post-img { aspect-ratio: 16/8; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card-thumb-placeholder { min-height: 180px; }
  .primary-nav { display: none; }
  .primary-nav.open { display: block; position: absolute; top: 60px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 12px 20px; box-shadow: var(--shadow-md); }
  .primary-nav.open ul { flex-direction: column; }
  .nav-mobile-btn { display: block; }
  .footer-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .post-body { padding: 20px 18px; }
}
