/* ==========================================================================
   COCKROACH JOBS PORTAL (कॉकरोच जॉब्स पोर्टल)
   Official Production Stylesheet - Ultra-Fast & Responsive
   ========================================================================== */

:root {
  /* DARK THEME (DEFAULT) */
  --bg: #090d16;
  --bg-secondary: #0f1624;
  --card-bg: #141d30;
  --card-hover: #1b2640;
  --border-color: #22304d;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #f59e0b; /* Amber / Cockroach Gold */
  --accent-hover: #d97706;
  --accent-light: rgba(245, 158, 11, 0.12);
  
  /* SarkariResult Color Coding */
  --sarkari-red: #ef4444;
  --sarkari-blue: #3b82f6;
  --sarkari-green: #10b981;
  --sarkari-purple: #a855f7;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-secondary: #f1f5f9;
  --card-bg: #ffffff;
  --card-hover: #f8fafc;
  --border-color: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --accent: #d97706;
  --accent-hover: #b45309;
  --accent-light: rgba(217, 119, 6, 0.08);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   TICKER BAR (MARQUEE)
   ========================================================================== */
.ticker-bar {
  background: #1c1917;
  color: #fef3c7;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  padding: 6px 0;
  font-size: 0.85rem;
  overflow: hidden;
}

[data-theme="light"] .ticker-bar {
  background: #fef3c7;
  color: #78350f;
}

.ticker-flex {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-badge {
  background: var(--accent);
  color: #000000;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.ticker-track {
  display: flex;
  gap: 25px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.ticker-item {
  display: inline-block;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.95);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  font-size: 1.6rem;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand-name span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  gap: 18px;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.nav-item:hover {
  color: var(--accent);
}

.btn-theme {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-theme:hover {
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .desktop-only { display: none; }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  text-align: center;
  padding: 40px 0 25px;
}

.hero-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 900;
  line-height: 1.25;
  margin-bottom: 12px;
}

.gradient-text {
  background: linear-gradient(135deg, #f59e0b 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 25px;
}

/* Search Wrapper */
.search-wrapper {
  max-width: 620px;
  margin: 0 auto 20px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 15px 45px 15px 46px;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 30px;
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.clear-search-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px;
}

/* Social Bar */
.social-bar {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: transform 0.15s ease;
}

.social-btn:hover {
  transform: translateY(-2px);
}

.btn-whatsapp {
  background: #15803d;
  color: #ffffff;
}

.btn-telegram {
  background: #0284c7;
  color: #ffffff;
}

/* ==========================================================================
   AD CONTAINERS (FOR ADSTERRA / MONETAG / AFFILIATES)
   ========================================================================== */
.ad-wrapper {
  margin: 20px auto;
}

.ad-slot {
  background: var(--card-bg);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ad-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.ad-placeholder {
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.ad-placeholder p {
  color: var(--text-main);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

/* ==========================================================================
   SARKARIRESULT ICONIC 3-COLUMN BOXES
   ========================================================================== */
.sarkari-boxes-section {
  margin: 35px auto 25px;
}

.section-title-wrap {
  margin-bottom: 18px;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-main);
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sarkari-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .sarkari-columns-grid {
    grid-template-columns: 1fr;
  }
}

.sarkari-column {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
}

.sarkari-column:hover {
  transform: translateY(-2px);
}

.column-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.column-header h3 {
  font-size: 1.15rem;
}

.col-icon {
  font-size: 1.25rem;
}

/* Distinct Column Colors matching SarkariResult */
.box-results {
  border-color: #dc2626;
}
.box-results .column-header {
  background: #dc2626;
  color: #ffffff;
}

.box-admit {
  border-color: #2563eb;
}
.box-admit .column-header {
  background: #2563eb;
  color: #ffffff;
}

.box-jobs {
  border-color: #16a34a;
}
.box-jobs .column-header {
  background: #16a34a;
  color: #ffffff;
}

/* Quick Links List */
.quick-links-list {
  list-style: none;
  padding: 8px 12px;
  flex: 1;
}

.quick-links-list li {
  border-bottom: 1px solid var(--border-color);
}

.quick-links-list li:last-child {
  border-bottom: none;
}

.quick-links-list a {
  display: block;
  padding: 9px 4px;
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
  transition: color 0.15s, padding-left 0.15s;
  position: relative;
}

.quick-links-list a:hover {
  color: var(--accent);
  padding-left: 6px;
}

.column-footer {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.view-more-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 8px;
}

.view-more-btn:hover {
  text-decoration: underline;
}

/* Secondary Boxes */
.secondary-boxes-section {
  margin-bottom: 35px;
}

.secondary-columns-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .secondary-columns-grid {
    grid-template-columns: 1fr;
  }
}

.secondary-column {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.column-header.sm {
  background: var(--bg-secondary);
  padding: 8px 12px;
  font-size: 0.95rem;
  font-weight: 800;
  border-bottom: 1px solid var(--border-color);
}

.quick-links-list.sm a {
  font-size: 0.82rem;
  padding: 6px 4px;
}

/* ==========================================================================
   MAIN CARDS EXPLORER & TABS
   ========================================================================== */
.explorer-section {
  margin: 30px auto;
}

.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.tab-btn {
  background: var(--card-bg);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-main);
  border-color: var(--accent);
}

.tab-btn.active {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

.results-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.results-count-badge {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.state-filter-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.select-inline {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  outline: none;
}

/* Job Cards Grid */
.jobs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 16px;
}

@media (max-width: 600px) {
  .jobs-grid {
    grid-template-columns: 1fr;
  }
}

.job-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color 0.2s, transform 0.2s;
  cursor: pointer;
}

.job-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.badge-job { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge-result { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-admit { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.badge-key { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.badge-syllabus { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-admission { background: rgba(14, 165, 233, 0.15); color: #0ea5e9; }

.card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--text-main);
}

.card-dept {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 12px;
}

.card-meta-list {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex: 1;
}

.card-meta-list li {
  margin-bottom: 4px;
}

.card-meta-list strong {
  color: var(--text-main);
}

.card-btn {
  width: 100%;
  background: var(--bg-secondary);
  color: var(--accent);
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.job-card:hover .card-btn {
  background: var(--accent);
  color: #000000;
  border-color: var(--accent);
}

/* ==========================================================================
   FULL DETAIL MODAL (SARKARIRESULT STYLE TABLE POPUP)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}

.modal-dialog {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 850px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: modalEnter 0.2s ease-out;
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main);
  margin-top: 4px;
  line-height: 1.3;
}

.modal-dept {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 700;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s;
}

.modal-close-btn:hover {
  color: var(--sarkari-red);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  line-height: 1.6;
}

.modal-section-box {
  background: var(--bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.modal-section-box.info-box {
  border-left: 4px solid var(--accent);
}

.modal-section-box h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-main);
}

.modal-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 700px) {
  .modal-grid-2 { grid-template-columns: 1fr; }
}

.modal-table-box {
  background: var(--bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table-heading {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 800;
}

.dates-head { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.fee-head { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.age-head { color: #f59e0b; margin-bottom: 10px; }
.vacancy-head { color: var(--accent); margin-bottom: 10px; }

/* Authentic Sarkari Table */
.sarkari-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.sarkari-table th,
.sarkari-table td {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.sarkari-table th {
  background: var(--bg-secondary);
  font-weight: 700;
}

.age-content-flex {
  font-size: 0.88rem;
  color: var(--text-main);
}

/* Modal Action Links Grid */
.modal-links-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 20px;
}

.links-heading {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 12px;
  text-align: center;
}

.action-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 600px) {
  .action-buttons-grid { grid-template-columns: 1fr; }
}

.btn-primary-action,
.btn-secondary-action,
.btn-outline-action,
.btn-share-whatsapp {
  display: inline-block;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.9rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary-action {
  background: var(--sarkari-green);
  color: #ffffff;
}

.btn-primary-action:hover {
  background: #059669;
}

.btn-secondary-action {
  background: #2563eb;
  color: #ffffff;
}

.btn-secondary-action:hover {
  background: #1d4ed8;
}

.btn-outline-action {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline-action:hover {
  background: var(--card-bg);
}

.btn-share-whatsapp {
  background: #15803d;
  color: #ffffff;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-color);
  text-align: right;
  background: var(--bg-secondary);
}

.btn-footer-close {
  background: var(--card-bg);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 10px;
  max-width: 420px;
}

.footer-links-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-main);
}

.footer-links-col ul {
  list-style: none;
}

.footer-links-col li {
  margin-bottom: 8px;
}

.footer-links-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s;
}

.footer-links-col a:hover {
  color: var(--accent);
}

.copyright-bar {
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.disclaimer-note {
  font-size: 0.75rem;
  margin-top: 6px;
  opacity: 0.75;
}
