/* ==========================================================
   GearGuideDaily - Main Stylesheet
   Clean, modern, conversion-friendly design
   ========================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #f97316;
  --text-dark: #1e293b;
  --text-gray: #64748b;
  --bg-light: #f8fafc;
  --border: #e2e8f0;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.5px;
}
.logo span { color: var(--primary); }
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  color: var(--text-dark);
  font-weight: 500;
  font-size: 15px;
}
.nav-actions { display: flex; gap: 12px; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: none;
  transition: all .15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: #eff6ff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}
.hero h1 { font-size: 38px; font-weight: 800; margin-bottom: 12px; letter-spacing: -1px; }
.hero p { font-size: 17px; opacity: 0.92; max-width: 600px; margin: 0 auto; }

/* ---------- Post grid / cards ---------- */
.section-title {
  font-size: 24px;
  font-weight: 800;
  margin: 40px 0 20px;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 5px;
  height: 24px;
  background: var(--primary);
  border-radius: 3px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.post-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card img { width: 100%; height: 180px; object-fit: cover; }
.post-card-body { padding: 18px; }
.post-card-category {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.post-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.post-card h3 a { color: var(--text-dark); }
.post-card p { color: var(--text-gray); font-size: 14px; margin-bottom: 12px; }
.post-meta { display: flex; gap: 14px; font-size: 13px; color: var(--text-gray); align-items: center; }

/* ---------- Layout: content + sidebar ---------- */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}
@media (max-width: 900px) {
  .content-layout { grid-template-columns: 1fr; }
}

/* ---------- Single post ---------- */
.post-header { margin-bottom: 24px; }
.post-header .post-card-category { margin-bottom: 14px; }
.post-header h1 { font-size: 34px; font-weight: 800; line-height: 1.25; margin-bottom: 10px; }
.post-header .subtitle { font-size: 18px; color: var(--text-gray); font-weight: 400; margin-bottom: 16px; }
.post-featured-img { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow); }
.post-body { font-size: 17px; line-height: 1.8; color: #334155; }
.post-body h2 { font-size: 24px; font-weight: 700; margin: 32px 0 14px; }
.post-body h3 { font-size: 19px; font-weight: 700; margin: 24px 0 10px; }
.post-body p { margin-bottom: 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px 24px; }
.post-body li { margin-bottom: 8px; }
.post-body img { border-radius: 8px; margin: 20px 0; }

/* ---------- Share buttons ---------- */
.share-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 28px 0;
  flex-wrap: wrap;
}
.share-bar span { font-weight: 600; font-size: 14px; color: var(--text-gray); margin-right: 6px; }
.share-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  transition: opacity .15s ease;
}
.share-btn:hover { opacity: 0.85; }
.share-fb { background: #1877f2; }
.share-tw { background: #000; }
.share-wa { background: #25d366; }
.share-li { background: #0a66c2; }
.share-copy { background: var(--text-gray); }
.share-email { background: var(--warning); }

/* ---------- Comments ---------- */
.comments-section { margin-top: 40px; }
.comment-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
}
.comment-form input {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 10px;
  width: 100%;
}
.comment-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-author { font-weight: 700; font-size: 14px; }
.comment-date { color: var(--text-gray); font-size: 12px; margin-left: 8px; }
.comment-text { margin-top: 6px; font-size: 15px; color: #334155; }

/* ---------- Sidebar ---------- */
.sidebar-widget {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.sidebar-widget h4 { font-size: 15px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-gray); }
.sidebar-post { display: flex; gap: 12px; margin-bottom: 14px; }
.sidebar-post img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sidebar-post h5 { font-size: 13.5px; font-weight: 600; line-height: 1.4; }
.sidebar-post h5 a { color: var(--text-dark); }

/* ---------- Ad slots ---------- */
.ad-slot {
  text-align: center;
  margin: 24px 0;
  min-height: 50px;
}
.ad-slot-label {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

/* ---------- Forms (auth, dashboards) ---------- */
.auth-wrap {
  max-width: 420px;
  margin: 60px auto;
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.auth-wrap h2 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.auth-wrap .sub { color: var(--text-gray); font-size: 14px; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color .15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-group textarea { min-height: 300px; resize: vertical; font-family: inherit; }

.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 14px; margin-bottom: 18px; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; }

/* ---------- Dashboard layout ---------- */
.dash-body { display: flex; min-height: 100vh; background: var(--bg-light); }
.dash-sidebar {
  width: 240px;
  background: #0f172a;
  color: #cbd5e1;
  flex-shrink: 0;
  padding: 24px 0;
}
.dash-sidebar .brand { padding: 0 24px 24px; font-weight: 800; font-size: 18px; color: #fff; border-bottom: 1px solid #1e293b; margin-bottom: 16px; }
.dash-sidebar a {
  display: block;
  padding: 11px 24px;
  color: #cbd5e1;
  font-size: 14.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.dash-sidebar a:hover { background: #1e293b; color: #fff; }
.dash-sidebar a.active { background: #1e293b; color: #fff; border-left-color: var(--primary); }
.dash-sidebar .divider { padding: 16px 24px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: #475569; }

.dash-main { flex: 1; padding: 28px 32px; max-width: calc(100% - 240px); }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.dash-topbar h1 { font-size: 24px; font-weight: 800; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.stat-card .num { font-size: 28px; font-weight: 800; color: var(--text-dark); }
.stat-card .label { font-size: 13px; color: var(--text-gray); font-weight: 600; margin-top: 4px; }

.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 24px; }
.panel h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th {
  text-align: left;
  padding: 10px 12px;
  background: #f1f5f9;
  font-weight: 700;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-gray);
}
table.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:hover td { background: #fafbfc; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-published { background: #f0fdf4; color: var(--success); }
.badge-draft { background: #f1f5f9; color: var(--text-gray); }
.badge-pending { background: #fffbeb; color: var(--warning); }
.badge-rejected { background: #fef2f2; color: var(--danger); }
.badge-active { background: #f0fdf4; color: var(--success); }
.badge-suspended { background: #fffbeb; color: var(--warning); }
.badge-banned { background: #fef2f2; color: var(--danger); }
.badge-admin { background: #eff6ff; color: var(--primary); }
.badge-ai { background: #f5f3ff; color: #7c3aed; }
.badge-manual { background: #f1f5f9; color: var(--text-gray); }

.action-links a { font-size: 13px; font-weight: 600; margin-right: 10px; }
.action-links .del { color: var(--danger); }

.checkbox-cell { width: 34px; }
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #eff6ff;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #94a3b8; padding: 40px 20px 24px; margin-top: 60px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.footer-links a { color: #cbd5e1; margin-right: 18px; font-size: 14px; }
.footer-bottom { text-align: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid #1e293b; font-size: 13px; }

@media (max-width: 768px) {
  .main-nav { display: none; }
  .dash-sidebar { display: none; }
  .dash-main { max-width: 100%; padding: 20px; }
  .hero h1 { font-size: 28px; }
}
