/* ===================================
   NEXUS COMMUNITY — Main Styles
   Developed by Iqra Saleem
   https://iqrasaleem.com
   =================================== */

:root {
  --nexus-primary: #003366;
  --nexus-accent: #CC0000;
  --nexus-light: #f4f7fb;
  --nexus-border: #e2e8f0;
  --nexus-text: #1a202c;
  --nexus-muted: #718096;
  --nexus-white: #ffffff;
  --nexus-radius: 8px;
  --nexus-shadow: 0 4px 24px rgba(0,51,102,0.10);
}

/* ---- RESET ---- */
.nexus-wrap * { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- FORMS ---- */
.nexus-form-wrap {
  max-width: 480px;
  margin: 40px auto;
  background: var(--nexus-white);
  border-radius: var(--nexus-radius);
  box-shadow: var(--nexus-shadow);
  overflow: hidden;
}
.nexus-form-header {
  background: var(--nexus-primary);
  padding: 32px 36px 24px;
  text-align: center;
}
.nexus-form-header h2 {
  color: var(--nexus-white);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.nexus-form-header p {
  color: rgba(255,255,255,0.75);
  font-size: 14px;
  margin-top: 6px;
}
.nexus-form-body { padding: 32px 36px; }
.nexus-field { margin-bottom: 18px; }
.nexus-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--nexus-text);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}
.nexus-field input,
.nexus-field textarea,
.nexus-field select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--nexus-border);
  border-radius: var(--nexus-radius);
  font-size: 14px;
  color: var(--nexus-text);
  transition: border-color 0.2s;
  background: var(--nexus-white);
}
.nexus-field input:focus,
.nexus-field textarea:focus,
.nexus-field select:focus {
  border-color: var(--nexus-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,51,102,0.08);
}
.nexus-btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: var(--nexus-radius);
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.nexus-btn-primary {
  background: var(--nexus-primary);
  color: var(--nexus-white);
  width: 100%;
  text-align: center;
}
.nexus-btn-primary:hover { background: #002244; }
.nexus-btn-danger { background: var(--nexus-accent); color: #fff; }
.nexus-btn-danger:hover { background: #aa0000; }
.nexus-btn-outline {
  background: transparent;
  border: 1.5px solid var(--nexus-primary);
  color: var(--nexus-primary);
}
.nexus-btn-outline:hover { background: var(--nexus-primary); color: #fff; }

/* ---- ALERTS ---- */
.nexus-alert {
  padding: 12px 16px;
  border-radius: var(--nexus-radius);
  font-size: 14px;
  margin-bottom: 16px;
  display: none;
}
.nexus-alert.show { display: block; }
.nexus-alert-success { background: #f0fff4; color: #276749; border: 1px solid #9ae6b4; }
.nexus-alert-error   { background: #fff5f5; color: #9b2c2c; border: 1px solid #feb2b2; }

/* ---- BLOG FEED ---- */
.nexus-blog-feed { padding: 20px 0; }
.nexus-feed-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px;
  align-items: center;
}
.nexus-cat-filter {
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--nexus-border);
  background: var(--nexus-white);
  color: var(--nexus-text);
  transition: all 0.2s;
  text-decoration: none;
}
.nexus-cat-filter:hover,
.nexus-cat-filter.active {
  background: var(--nexus-primary);
  color: var(--nexus-white);
  border-color: var(--nexus-primary);
}
.nexus-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.nexus-blog-card {
  background: var(--nexus-white);
  border-radius: var(--nexus-radius);
  box-shadow: var(--nexus-shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.nexus-blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,51,102,0.15);
}
.nexus-card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--nexus-light);
}
.nexus-card-img-placeholder {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--nexus-primary) 0%, #336699 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}
.nexus-card-body { padding: 18px; }
.nexus-card-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.nexus-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--nexus-text);
  margin-bottom: 8px;
  line-height: 1.4;
  text-decoration: none;
  display: block;
}
.nexus-card-title:hover { color: var(--nexus-primary); }
.nexus-card-excerpt {
  font-size: 13px;
  color: var(--nexus-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}
.nexus-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--nexus-muted);
  border-top: 1px solid var(--nexus-border);
  padding-top: 12px;
}
.nexus-avatar-sm {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--nexus-primary);
}

/* ---- SINGLE BLOG ---- */
.nexus-single-blog {
  max-width: 780px;
  margin: 40px auto;
  padding: 0 20px;
}
.nexus-blog-header { margin-bottom: 30px; }
.nexus-blog-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--nexus-text);
  line-height: 1.3;
  margin-bottom: 16px;
}
.nexus-blog-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--nexus-muted);
  margin-bottom: 20px;
}
.nexus-featured-img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--nexus-radius);
  margin-bottom: 30px;
}
.nexus-blog-content {
  font-size: 16px;
  line-height: 1.8;
  color: #2d3748;
}
.nexus-blog-content h2, .nexus-blog-content h3 {
  color: var(--nexus-primary);
  margin: 24px 0 12px;
}
.nexus-blog-content p { margin-bottom: 16px; }
.nexus-blog-content img { max-width: 100%; border-radius: 6px; }

/* ---- SOCIAL SHARE ---- */
.nexus-social-share {
  display: flex;
  gap: 10px;
  margin: 30px 0;
  flex-wrap: wrap;
}
.nexus-share-btn {
  padding: 8px 18px;
  border-radius: var(--nexus-radius);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nexus-share-twitter  { background: #1da1f2; }
.nexus-share-linkedin { background: #0077b5; }
.nexus-share-facebook { background: #1877f2; }
.nexus-share-copy     { background: #718096; cursor: pointer; border: none; }

/* ---- COMMENTS ---- */
.nexus-comments { margin-top: 40px; padding-top: 30px; border-top: 2px solid var(--nexus-border); }
.nexus-comments h3 { font-size: 20px; color: var(--nexus-text); margin-bottom: 20px; }
.nexus-comment {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--nexus-light);
  border-radius: var(--nexus-radius);
}
.nexus-comment-pending { opacity: 0.6; border-left: 3px solid #f6ad55; }
.nexus-comment-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--nexus-primary); flex-shrink: 0; object-fit: cover; }
.nexus-comment-author { font-size: 13px; font-weight: 700; color: var(--nexus-text); }
.nexus-comment-time   { font-size: 12px; color: var(--nexus-muted); margin-left: 8px; }
.nexus-comment-text   { font-size: 14px; color: #4a5568; margin-top: 6px; line-height: 1.6; }
.nexus-comment-actions { margin-top: 8px; display: flex; gap: 8px; }
.nexus-comment-approve, .nexus-comment-reject {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.nexus-comment-approve { background: #c6f6d5; color: #276749; }
.nexus-comment-reject  { background: #fed7d7; color: #9b2c2c; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .nexus-blog-grid { grid-template-columns: 1fr; }
  .nexus-form-wrap { margin: 20px 16px; }
  .nexus-form-body { padding: 20px; }
  .nexus-blog-title { font-size: 24px; }
}
