/* ============================================================
   369NETWORK CMS — FRONTEND CSS
   Super fast, mobile-first, AdX-optimized
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #2563eb;
  --dark:    #111827;
  --text:    #374151;
  --muted:   #6b7280;
  --border:  #e5e7eb;
  --bg:      #f9fafb;
  --white:   #ffffff;
  --radius:  10px;
}

body { font-family: 'Inter', -apple-system, sans-serif; font-size: 16px; color: var(--text); background: var(--bg); line-height: 1.7; }

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

/* CONTAINER */
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* HEADER */
.site-header { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; gap: 20px; height: 56px; }
.site-logo { font-size: 18px; font-weight: 800; color: var(--dark); white-space: nowrap; }
.nav-menu { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav-menu a { padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 500; color: var(--muted); transition: all .15s; }
.nav-menu a:hover { background: var(--bg); color: var(--dark); text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; padding: 4px; }

/* LAYOUT */
.content-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 28px; padding: 28px 0; }
.main-col { min-width: 0; }

/* HOME / LISTING */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; transition: box-shadow .2s; }
.post-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.post-card img { width: 100%; height: 180px; object-fit: cover; }
.post-card-body { padding: 16px; }
.post-card h2 { font-size: 15px; font-weight: 700; color: var(--dark); line-height: 1.4; margin-bottom: 8px; }
.post-card h2 a { color: inherit; }
.post-card h2 a:hover { color: var(--blue); text-decoration: none; }
.post-card-meta { font-size: 12px; color: var(--muted); }
.post-card-excerpt { font-size: 13px; color: var(--muted); margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* CATEGORY BADGE */
.cat-badge { display: inline-block; background: #eff6ff; color: var(--blue); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; margin-bottom: 10px; }
.cat-badge-sm { display: inline-block; background: #eff6ff; color: var(--blue); font-size: 11px; padding: 2px 8px; border-radius: 20px; }

/* BREADCRUMB */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--blue); }

/* ARTICLE */
.article { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 28px; }
.article-title { font-size: 26px; font-weight: 800; color: var(--dark); line-height: 1.3; margin-bottom: 12px; }
.article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.article-lead { font-size: 16px; color: var(--text); background: var(--bg); padding: 14px 16px; border-left: 4px solid var(--blue); border-radius: 0 8px 8px 0; margin-bottom: 20px; line-height: 1.6; }
.featured-img { width: 100%; border-radius: 8px; margin-bottom: 20px; max-height: 400px; object-fit: cover; }
.page-indicator { background: var(--bg); border-radius: 6px; padding: 6px 12px; font-size: 12px; color: var(--muted); display: inline-block; margin-bottom: 16px; }

/* ARTICLE BODY */
.article-body { font-size: 16px; line-height: 1.8; color: var(--text); }
.article-body h2 { font-size: 21px; font-weight: 700; color: var(--dark); margin: 28px 0 12px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.article-body h3 { font-size: 18px; font-weight: 700; color: var(--dark); margin: 22px 0 10px; }
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol { padding-left: 24px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--dark); font-weight: 600; }
.article-body blockquote { border-left: 4px solid var(--blue); padding: 12px 16px; margin: 20px 0; background: #eff6ff; border-radius: 0 8px 8px 0; font-style: italic; color: #1e40af; }
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.article-body th { background: var(--dark); color: #fff; padding: 10px 12px; text-align: left; }
.article-body td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.article-body tr:nth-child(even) td { background: var(--bg); }

/* PAGE NAV */
.page-nav { margin: 24px 0; padding: 16px; background: var(--bg); border-radius: 8px; }
.page-nav-label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.page-nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.page-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1.5px solid var(--border); font-size: 14px; font-weight: 600; color: var(--text); transition: all .15s; }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn.next { width: auto; padding: 0 14px; }
.page-btn:hover:not(.active) { border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* TAGS */
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0; }
.tag { background: var(--bg); border: 1px solid var(--border); padding: 4px 12px; border-radius: 20px; font-size: 12px; color: var(--muted); }

/* SHARE */
.share-bar { display: flex; align-items: center; gap: 10px; margin: 20px 0; font-size: 14px; }
.share-btn { padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; color: #fff; }
.share-btn.wa { background: #25d366; }
.share-btn.tw { background: #1da1f2; }

/* DISCLAIMER */
.disclaimer { background: #fef3c7; border: 1px solid #fcd34d; padding: 12px 16px; border-radius: 8px; font-size: 13px; color: #78350f; margin-top: 20px; line-height: 1.5; }

/* RELATED POSTS */
.related-posts { margin-top: 28px; }
.section-title { font-size: 18px; font-weight: 700; color: var(--dark); margin-bottom: 16px; }
.posts-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.post-card-sm { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--dark); }
.post-card-sm:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); text-decoration: none; }
.post-card-sm img { width: 100%; height: 120px; object-fit: cover; }
.pcs-body { padding: 12px; }
.pcs-body h3 { font-size: 13px; font-weight: 600; margin-top: 6px; line-height: 1.4; }

/* SIDEBAR */
.sidebar { }
.sidebar-sticky { position: sticky; top: 72px; }
.widget { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.widget-title { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 2px solid var(--border); }
.popular-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--bg); font-size: 13px; }
.popular-item:last-child { border: none; }
.pop-title { color: var(--text); flex: 1; padding-right: 8px; line-height: 1.4; }
.pop-views { color: var(--muted); font-size: 11px; white-space: nowrap; }
.cat-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--bg); font-size: 13px; color: var(--text); }
.cat-item:last-child { border: none; }
.cat-item span { color: var(--muted); font-size: 12px; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 32px 0; }
.pag-btn { display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 8px; border: 1.5px solid var(--border); font-size: 14px; color: var(--text); transition: all .15s; }
.pag-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.pag-btn:hover:not(.active) { border-color: var(--blue); color: var(--blue); text-decoration: none; }

/* FOOTER */
.site-footer { background: var(--dark); color: #9ca3af; padding: 48px 0 24px; margin-top: 48px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-logo { font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.footer-tagline { font-size: 13px; color: #6b7280; line-height: 1.5; }
.footer-heading { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .05em; }
.footer-link { display: block; font-size: 13px; color: #6b7280; padding: 4px 0; transition: color .15s; }
.footer-link:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid #374151; padding-top: 20px; font-size: 12px; color: #6b7280; }

/* 404 */
.not-found { text-align: center; padding: 80px 16px; }
.not-found h1 { font-size: 80px; font-weight: 800; color: var(--border); }
.not-found h2 { font-size: 24px; color: var(--dark); margin-bottom: 12px; }
.not-found p { color: var(--muted); margin-bottom: 24px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .content-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .posts-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .nav-menu { display: none; position: absolute; top: 56px; left: 0; right: 0; background: var(--white); border-bottom: 1px solid var(--border); padding: 10px; flex-direction: column; box-shadow: 0 4px 20px rgba(0,0,0,.1); }
  .nav-menu.open { display: flex; }
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid-2 { grid-template-columns: 1fr; }
  .article-title { font-size: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .article { padding: 16px; }
}
