/* ============================================
   SR Digital Zone - Main Stylesheet
   Author: Aditya Mishra
   ============================================ */

:root {
  --primary:    #c0392b;
  --primary-dk: #96281b;
  --secondary:  #e74c3c;
  --accent:     #f39c12;
  --dark:       #1a1a2e;
  --text:       #333333;
  --text-muted: #777;
  --border:     #e0e0e0;
  --bg:         #f5f5f5;
  --white:      #ffffff;
  --shadow:     0 2px 8px rgba(0,0,0,0.08);
  --radius:     6px;
}

* { box-sizing: border-box; }
body {
  font-family: 'Noto Sans', Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  margin: 0;
  padding: 0;
}

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

/* ---- Top Bar ---- */
.top-bar {
  background: var(--primary);
  color: #fff;
  padding: 6px 0;
  font-size: 12px;
}
.top-bar a { color: #fff; }
.top-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 12px;
  margin-left: 4px;
  transition: background 0.2s;
  text-decoration: none;
}
.top-social:hover { background: rgba(255,255,255,0.3); color: #fff; }

/* ---- Header ---- */
.main-header {
  background: #fff;
  padding: 10px 0;
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.header-logo { text-decoration: none; display: inline-block; }
.logo-box { display: flex; align-items: center; gap: 10px; }
.logo-sr {
  background: var(--primary);
  color: #fff;
  font-size: 26px;
  font-weight: 900;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -1px;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; }
.logo-main { font-size: 20px; font-weight: 800; color: var(--primary); line-height: 1.2; }
.logo-sub  { font-size: 11px; color: #888; }

.header-search .form-control {
  border-radius: var(--radius) 0 0 var(--radius);
  border: 2px solid var(--border);
  border-right: none;
  font-size: 14px;
  padding: 8px 14px;
}
.header-search .form-control:focus { border-color: var(--primary); box-shadow: none; }
.btn-search {
  background: var(--primary);
  color: #fff;
  border-radius: 0 var(--radius) var(--radius) 0;
  border: 2px solid var(--primary);
  font-weight: 600;
  padding: 8px 16px;
}
.btn-search:hover { background: var(--primary-dk); color: #fff; }
.btn-subscribe {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-weight: 600;
  font-size: 13px;
}
.btn-subscribe:hover { background: #e67e22; color: #fff; }

/* ---- Navigation ---- */
.main-nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  overflow-x: auto;
}
.nav-list li a {
  display: block;
  padding: 11px 14px;
  color: #ddd;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  text-decoration: none;
  border-bottom: 3px solid transparent;
}
.nav-list li a:hover,
.nav-list li a.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-bottom-color: var(--accent);
}
.nav-toggler {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
}

/* ---- Main Content ---- */
.main-content { padding: 0 0 30px; }

/* ---- Category Cards ---- */
.category-section { margin-top: 10px; }
.category-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cat-bg, #e74c3c);
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 60px;
}
.category-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); color: #fff; text-decoration: none; }
.cat-card-icon { font-size: 22px; opacity: 0.9; flex-shrink: 0; }
.cat-card-info { display: flex; flex-direction: column; }
.cat-card-name { font-size: 13px; font-weight: 700; line-height: 1.3; }
.cat-card-count { font-size: 11px; opacity: 0.8; }

/* ---- Stats Bar ---- */
.stats-bar {
  background: var(--primary);
  border-radius: var(--radius);
  color: #fff;
  padding: 12px 0;
}
.stat-item { padding: 5px 10px; }
.stat-number { display: block; font-size: 22px; font-weight: 800; }
.stat-label  { display: block; font-size: 11px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }
.border-x { border-left: 1px solid rgba(255,255,255,0.2); border-right: 1px solid rgba(255,255,255,0.2); }

/* ---- Section Box ---- */
.section-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.section-header {
  background: var(--section-color, var(--primary));
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.section-header a {
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
}
.section-header a:hover { color: #fff; text-decoration: underline; }

/* ---- Post List ---- */
.post-list { }
.post-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
  position: relative;
}
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: #fafafa; }

.post-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.post-new-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #27ae60;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
  animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.5} }

.post-title {
  display: block;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}
.post-title:hover { color: var(--primary); text-decoration: none; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ---- Category Header ---- */
.category-header-box {
  background: var(--cat-color, var(--primary));
  color: #fff;
  padding: 20px;
  border-radius: var(--radius);
}
.category-header-box h1 { font-size: 20px; font-weight: 800; color: #fff; }
.cat-header-icon {
  width: 60px;
  height: 60px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

/* ---- Post Detail ---- */
.post-detail-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.post-detail-header {
  padding: 20px;
  border-bottom: 2px solid #f0f0f0;
}
.post-cat-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.post-detail-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin: 8px 0;
  line-height: 1.4;
}
.post-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.quick-info-table { padding: 15px; }
.post-section { padding: 5px 15px 15px; }
.post-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  border-left: 4px solid var(--primary);
  padding-left: 10px;
  margin-bottom: 12px;
}
.post-content {
  padding: 5px 15px 15px;
  line-height: 1.7;
  color: var(--text);
}
.post-content h1,.post-content h2,.post-content h3 { color: var(--primary); }
.post-content table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.post-content table td,.post-content table th { padding: 8px; border: 1px solid #ddd; }
.post-content table th { background: #f8d7da; }
.post-tags { padding: 10px 15px; border-top: 1px solid #f0f0f0; }
.tag-badge {
  display: inline-block;
  background: #f0f0f0;
  color: #555;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  margin: 2px;
}
.tag-badge:hover { background: var(--primary); color: #fff; text-decoration: none; }
.share-buttons {
  padding: 12px 15px;
  border-top: 1px solid #f0f0f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
}
.share-btn:hover { opacity: 0.9; color: #fff; text-decoration: none; }
.share-fb { background: #3b5998; }
.share-tw { background: #1da1f2; }
.share-tg { background: #0088cc; }
.share-wa { background: #25d366; }

/* ---- Sidebar ---- */
.sidebar { }
.widget {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  overflow: hidden;
}
.widget-title {
  background: var(--primary);
  color: #fff;
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
}
.widget-search { padding: 14px; }
.widget-search .widget-title { margin: -14px -14px 14px; }

.widget-subscribe { padding: 0; }
.subscribe-box {
  background: linear-gradient(135deg, var(--primary) 0%, #922b21 100%);
  color: #fff;
  padding: 18px;
  text-align: center;
}
.subscribe-icon { font-size: 36px; margin-bottom: 10px; opacity: 0.9; }
.subscribe-box h5 { color: #fff; font-weight: 800; }
.subscribe-box p  { color: rgba(255,255,255,0.85); }
.subscribe-box .form-control {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
}
.subscribe-box .form-control::placeholder { color: rgba(255,255,255,0.6); }
.subscribe-box .form-control:focus { background: rgba(255,255,255,0.25); border-color: #fff; box-shadow: none; color: #fff; }

.widget-category-list { list-style: none; margin: 0; padding: 0; }
.widget-category-list li a {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid #f5f5f5;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s;
}
.widget-category-list li a:hover { background: #fef9f9; color: var(--primary); }
.cat-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  flex-shrink: 0;
  margin-right: 10px;
}
.cat-name { flex: 1; font-size: 13px; font-weight: 500; }
.cat-count { background: #f0f0f0; color: #666; font-size: 11px; padding: 1px 7px; border-radius: 10px; }

.widget-post {
  padding: 10px 14px;
  border-bottom: 1px solid #f5f5f5;
}
.widget-post:last-child { border-bottom: none; }
.widget-post-badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 2px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  margin-bottom: 3px;
}
.widget-post-title {
  display: block;
  font-size: 12.5px;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 3px;
}
.widget-post-title:hover { color: var(--primary); text-decoration: none; }
.widget-post-date { font-size: 11px; color: var(--text-muted); }

.widget-notice { }
.notice-box { padding: 12px 14px; background: #fff8e1; }
.notice-box p { color: #7c6000; }

/* ---- Footer ---- */
.main-footer { background: #1a1a2e; margin-top: 30px; }
.footer-top { padding: 40px 0 30px; }
.footer-title {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 2px solid rgba(255,255,255,0.1);
  padding-bottom: 10px;
  margin-bottom: 15px;
}
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li a {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-links li a:hover { color: var(--accent); text-decoration: none; }
.logo-sr-sm {
  background: var(--primary);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social-links { display: flex; flex-wrap: wrap; gap: 8px; }
.social-icon {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: background 0.2s;
  text-decoration: none;
}
.social-icon:hover { background: var(--primary); color: #fff; text-decoration: none; }
.footer-subscribe-form .form-control {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
}
.footer-subscribe-form .form-control::placeholder { color: rgba(255,255,255,0.4); }
.footer-bottom {
  background: rgba(0,0,0,0.3);
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* ---- Subscribe Page ---- */
.subscribe-page-box {
  background: #fff;
  padding: 35px 30px;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.subscribe-big-icon {
  width: 80px;
  height: 80px;
  background: var(--primary);
  color: #fff;
  font-size: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}
.subscribe-features { border-top: 1px solid #f0f0f0; padding-top: 15px; }
.sub-feature { font-size: 13px; color: #555; padding: 5px 0; }

/* ---- Contact ---- */
.contact-info-box { }
.contact-info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.ci-icon {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.ci-text h6 { font-size: 12px; color: #888; margin: 0 0 2px; text-transform: uppercase; }
.ci-text p  { font-size: 14px; font-weight: 600; margin: 0; color: var(--text); }

/* ---- Breadcrumb ---- */
.breadcrumb { background: transparent; padding: 0; font-size: 12px; }
.breadcrumb-item + .breadcrumb-item::before { color: #aaa; }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: #777; }

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(192,57,43,0.4);
  z-index: 999;
  transition: background 0.2s;
}
.back-to-top:hover { background: var(--primary-dk); }
.back-to-top.show { display: flex; }

/* ---- Featured Item ---- */
.featured-item { background: #fffbf5; }
.featured-item:hover { background: #fff8ed; }

/* ---- Pagination ---- */
.pagination .page-link { color: var(--primary); border-color: #ddd; font-size: 13px; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-link:hover { background: #f8d7da; color: var(--primary); }

/* ---- Tables ---- */
.table-danger thead { --bs-table-bg: #c0392b; color: #fff; }
.table-danger thead th { color: #fff; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .main-header { padding: 8px 0; }
  .logo-sr { width: 40px; height: 40px; font-size: 20px; }
  .logo-main { font-size: 16px; }
  .logo-sub { display: none; }
  .nav-list { display: none; flex-direction: column; width: 100%; }
  .nav-list.open { display: flex; }
  .nav-list li a { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
  .post-detail-title { font-size: 16px; }
  .stat-number { font-size: 18px; }
  .category-card { padding: 10px; }
  .cat-card-icon { font-size: 18px; }
}

@media (max-width: 576px) {
  .share-buttons { gap: 5px; }
  .share-btn { padding: 4px 8px; font-size: 11px; }
  .subscribe-page-box { padding: 20px 15px; }
}
