/* ========================================================
   GOVT JOBS - MODERN HIGH-DENSITY "NCLI" AESTHETIC
   Replaces the classic RojgarResult look with a premium UI
======================================================== */

:root {
  --rr-primary: #2563eb;
  --rr-secondary: #0f172a;
  --rr-accent: #e11d48;
  
  --rr-bg: #f8fafc;
  --rr-card-bg: #ffffff;
  --rr-border: #e2e8f0;
  
  --rr-text-main: #334155;
  --rr-text-muted: #64748b;
  
  --rr-link: #2563eb;
  --rr-link-hover: #1d4ed8;
  
  --rr-radius: 12px;
  --rr-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --rr-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
  background-color: var(--rr-bg);
  color: var(--rr-text-main);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body.dark {
  --rr-bg: #0f172a;
  --rr-card-bg: #1e293b;
  --rr-border: #334155;
  --rr-text-main: #f8fafc;
  --rr-text-muted: #94a3b8;
  --rr-link: #60a5fa;
  --rr-link-hover: #93c5fd;
  --rr-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* --- Layout Wrapper --- */
.gj-page-wrapper {
  max-width: 1400px;
  margin: 30px auto 50px;
  padding: 0 15px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.gj-main-container {
  flex: 1;
  min-width: 0; /* prevents flex blowout */
}

.rr-page-title {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius);
  background: var(--rr-card-bg);
  color: var(--rr-secondary);
  box-shadow: var(--rr-shadow);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.2;
  font-weight: 900;
}

body.dark .rr-page-title {
  color: #f8fafc;
}

/* --- Left Sidebar --- */
.rr-left-panel {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rr-sidebar-widget {
  background: var(--rr-card-bg);
  border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius);
  box-shadow: var(--rr-shadow);
  overflow: hidden;
}

.rr-sw-head {
  background: var(--rr-bg);
  color: var(--rr-text-main);
  padding: 15px 20px;
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid var(--rr-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.rr-sw-head i {
  color: var(--rr-primary);
}

.rr-sw-body {
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--rr-text-muted);
}

.rr-sw-body strong {
  color: var(--rr-text-main);
  font-size: 16px;
}

.rr-sw-body ul {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 0;
}

.rr-sw-body ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--rr-border);
  color: var(--rr-text-main);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rr-sw-body ul li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rr-sw-body ul li i {
  color: var(--rr-primary);
  font-size: 12px;
}

/* --- Marquee (Modern Ticker) --- */
.rr-marquee {
  background: var(--rr-card-bg);
  border: 1px solid var(--rr-border);
  border-radius: 50px;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--rr-shadow);
}
.rr-marquee-label {
  background: linear-gradient(135deg, var(--rr-accent), #be123c);
  color: white;
  padding: 8px 20px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 50px 0 0 50px;
}
.rr-marquee marquee {
  padding: 0 15px;
  flex: 1;
}
.rr-marquee marquee a {
  color: var(--rr-text-main);
  font-weight: 600;
  text-decoration: none;
  margin-right: 40px;
  transition: color 0.2s;
}
.rr-marquee marquee a:hover {
  color: var(--rr-primary);
}

/* --- Top Quick Links (Modern Pills) --- */
.rr-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 25px;
}
.rr-ql-box {
  background: var(--rr-card-bg);
  color: var(--rr-primary);
  border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius);
  padding: 12px 15px;
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.rr-ql-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--rr-shadow-hover);
  background: var(--rr-primary);
  color: white;
  border-color: var(--rr-primary);
}

/* --- Data Grid Columns --- */
.rr-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}
.rr-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

/* --- Modern Card Boxes --- */
.rr-box {
  background: var(--rr-card-bg);
  border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius);
  box-shadow: var(--rr-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.rr-box:hover {
  box-shadow: var(--rr-shadow-hover);
}

/* Headers */
.rr-box-head {
  padding: 15px 20px;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--rr-text-main);
  border-bottom: 1px solid var(--rr-border);
  background: var(--rr-bg);
  position: relative;
}

/* Color coding using left border instead of full background */
.rr-head-res  { border-left: 5px solid #e11d48; } /* Red for Result */
.rr-head-adm  { border-left: 5px solid #16a34a; } /* Green for Admit Card */
.rr-head-job  { border-left: 5px solid #2563eb; } /* Blue for Latest Jobs */
.rr-head-syl  { border-left: 5px solid #8b5cf6; } /* Purple for Syllabus */
.rr-head-ans  { border-left: 5px solid #f59e0b; } /* Orange for Answer Key */
.rr-head-imp  { border-left: 5px solid #ec4899; } /* Pink for Admission */
.rr-head-couns { border-left: 5px solid #d946ef; } /* Fuchsia for Counselling */

/* The Lists inside boxes */
.rr-list {
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.rr-list li {
  border-bottom: 1px solid var(--rr-border);
  transition: background 0.2s ease, padding-left 0.2s ease;
}
.rr-list li:last-child {
  border-bottom: none;
}
.rr-list li:hover {
  background: var(--rr-bg);
  padding-left: 5px;
}

.rr-list li a {
  display: block;
  padding: 12px 15px;
  color: var(--rr-link);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.rr-list li a:hover {
  color: var(--rr-link-hover);
}

/* Fire Icon for important links */
.rr-fire {
  display: inline-block;
  margin-right: 5px;
  color: #ff4500;
  animation: rr-flicker 1.5s infinite alternate;
}
@keyframes rr-flicker {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.1); }
}

/* View More Button */
.rr-view-all {
  display: block;
  text-align: center;
  padding: 12px;
  background: var(--rr-bg);
  color: var(--rr-primary);
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  border-top: 1px solid var(--rr-border);
  transition: all 0.2s ease;
}
.rr-view-all:hover {
  background: var(--rr-primary);
  color: white;
}


/* ===================================================
   MODERN DASHBOARD-STYLE JOB DETAILS MODAL
=================================================== */

.nj-modal-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0; visibility: hidden;
  transition: all 0.3s ease;
}
.nj-modal-overlay.open { opacity: 1; visibility: visible; }

.nj-drawer {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.95);
  width: 90%;
  max-width: 1000px;
  height: 85vh;
  background: var(--rr-card-bg);
  z-index: 10000;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  opacity: 0; visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--rr-border);
}
.nj-drawer.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.njd-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--rr-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--rr-bg);
}
.njd-title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: var(--rr-text-main);
}
.njd-close {
  background: var(--rr-border);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--rr-text-main);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.njd-close:hover {
  background: #ef4444;
  color: white;
}

.njd-body {
  padding: 30px;
  overflow-y: auto;
  flex: 1;
}
.njd-body::-webkit-scrollbar { width: 8px; }
.njd-body::-webkit-scrollbar-track { background: transparent; }
.njd-body::-webkit-scrollbar-thumb { background: var(--rr-border); border-radius: 4px; }

/* Modern Typography Inside Modal */
.rr-job-header {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  color: var(--rr-primary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.rr-job-subhead {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  color: var(--rr-text-main);
  margin-bottom: 30px;
  line-height: 1.3;
}

/* Modern Tables */
.rr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 30px;
  border: 1px solid var(--rr-border);
  border-radius: 12px;
  overflow: hidden;
}
.rr-table th {
  background: var(--rr-bg);
  color: var(--rr-text-main);
  padding: 15px 20px;
  font-weight: 700;
  font-size: 16px;
  text-align: left;
  border-bottom: 1px solid var(--rr-border);
}
.rr-table th:not(:last-child) {
  border-right: 1px solid var(--rr-border);
}
.rr-table td {
  padding: 20px;
  background: var(--rr-card-bg);
  color: var(--rr-text-main);
  vertical-align: top;
  border-bottom: 1px solid var(--rr-border);
}
.rr-table td:not(:last-child) {
  border-right: 1px solid var(--rr-border);
}
.rr-table tr:last-child td {
  border-bottom: none;
}

.rr-table ul {
  padding-left: 20px;
  margin: 0;
}
.rr-table ul li {
  margin-bottom: 10px;
  line-height: 1.6;
}
.rr-table ul li:last-child {
  margin-bottom: 0;
}
.rr-table strong {
  font-weight: 700;
  color: var(--rr-text-main);
}

/* Action Buttons Grid */
.rr-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 20px;
}
.rr-btn {
  display: block;
  text-align: center;
  padding: 15px;
  color: white !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--rr-radius);
  transition: all 0.3s;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.rr-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.15);
}
.rr-btn-apply { background: linear-gradient(135deg, #10b981, #059669); }
.rr-btn-notif { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.rr-btn-off   { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.rr-btn-syl   { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

/* Responsive adjustments */
/* Ticker Container & Animation (Accessible CSS horizontal ticker) */
.rr-ticker-container {
  display: flex;
  align-items: center;
  background: var(--rr-card-bg);
  border: 1px solid var(--rr-border);
  border-radius: 30px;
  margin-bottom: 25px;
  overflow: hidden;
  box-shadow: var(--rr-shadow);
  height: 44px;
}
.rr-ticker-label {
  background: linear-gradient(135deg, var(--rr-accent), #be123c);
  color: #fff;
  padding: 0 20px;
  font-weight: 800;
  font-size: 13px;
  height: 100%;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 30px 0 0 30px;
  z-index: 10;
  flex-shrink: 0;
}
.rr-ticker-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}
.rr-ticker-track {
  display: inline-flex;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker-slide 30s linear infinite;
  align-items: center;
}
.rr-ticker-track a {
  color: var(--rr-text-main);
  font-weight: 700;
  text-decoration: none;
  margin-right: 50px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  transition: color 0.2s ease;
}
.rr-ticker-track a:hover {
  color: var(--rr-primary);
}
@keyframes ticker-slide {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}
.rr-ticker-content:hover .rr-ticker-track {
  animation-play-state: paused;
}

/* Premium Search & Filter Bar */
.rr-search-filter-container {
  margin-bottom: 25px;
}
.rr-search-filter-form {
  display: flex;
  gap: 12px;
  background: var(--rr-card-bg);
  border: 1px solid var(--rr-border);
  border-radius: var(--rr-radius);
  padding: 12px;
  box-shadow: var(--rr-shadow);
}
.rr-search-input-wrap {
  flex: 2;
  position: relative;
  display: flex;
  align-items: center;
}
.rr-search-input-wrap i {
  position: absolute;
  left: 15px;
  color: var(--rr-text-muted);
  font-size: 15px;
}
.rr-search-input-wrap input {
  width: 100%;
  padding: 12px 15px 12px 42px;
  border: 1.5px solid var(--rr-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--rr-bg);
  color: var(--rr-text-main);
  outline: none;
  transition: all 0.2s ease;
}
.rr-search-input-wrap input:focus {
  border-color: var(--rr-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.rr-type-select-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}
.rr-type-select-wrap select {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--rr-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--rr-bg) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  background-size: 16px;
  appearance: none;
  color: var(--rr-text-main);
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.rr-type-select-wrap select:focus {
  border-color: var(--rr-primary);
}
.rr-search-btn {
  background: var(--rr-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 25px;
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s ease;
}
.rr-search-btn:hover {
  background: var(--rr-link-hover);
}

/* 5 Column Grid Layout */
.rr-row-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

/* Colors for New Types */
.rr-head-link { border-left: 5px solid #64748b; } /* Grey/Blue for Important Links */

/* Badges and tags */
.badge.orange { background: #ffedd5; color: #ea580c; border: 1.5px solid #fed7aa; }
.badge.gray { background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0; }

.modal-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.modal-link-btn:hover {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* Empty State Styling */
.rr-empty-state {
  padding: 25px 20px;
  text-align: center;
  color: var(--rr-text-muted);
  font-size: 14px;
  font-weight: 600;
  font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .rr-row-4 { grid-template-columns: repeat(2, 1fr); }
  .rr-row-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 992px) {
  .gj-page-wrapper { flex-direction: column; }
  .rr-left-panel { width: 100%; }
}
@media (max-width: 768px) {
  .rr-row-3 { grid-template-columns: 1fr; }
  .rr-row-4 { grid-template-columns: 1fr; }
  .rr-row-5 { grid-template-columns: 1fr; }
  .nj-drawer { width: 95%; height: 90vh; }
  .rr-table th, .rr-table td { padding: 12px; }
  .rr-actions { grid-template-columns: 1fr; }
  .rr-search-filter-form { flex-direction: column; }
}
