/* Sidebar — NCERT books + shared panel styling */

.index1 .sidebar-panel,
.index1 .news_box.sidebar-panel {
  margin-bottom: 14px;
  padding: 14px 12px 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.index1 .sidebar-panel:nth-of-type(1) {
  border-top: 3px solid #6366f1;
}

.index1 .sidebar-panel:nth-of-type(2) {
  border-top: 3px solid #8b5cf6;
}

.index1 .sidebar-panel:nth-of-type(3) {
  border-top: 3px solid #ec4899;
}

.index1 .sidebar-panel:nth-of-type(5) {
  border-top: 3px solid #f59e0b;
}

.index1 .sidebar-panel:nth-of-type(6) {
  border-top: 3px solid #10b981;
}

.index1 .sidebar-panel h3 {
  margin: 0 0 10px;
  padding: 0;
  font-size: 1rem;
  line-height: 1.35;
  color: #0f172a !important;
  font-weight: 700;
}

.index1 .sidebar-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.index1 .sidebar-panel li {
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
}

.index1 .sidebar-panel li:last-child {
  border-bottom: 0;
}

.index1 .sidebar-panel a {
  display: block;
  padding: 8px 6px;
  line-height: 1.4 !important;
  color: #1d4ed8 !important;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none !important;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.index1 .sidebar-panel a:hover {
  background: #eff6ff;
  color: #1e40af !important;
}

/* NCERT Books block */
.sidebar-books-block {
  margin-bottom: 14px;
  padding: 0;
  background: linear-gradient(180deg, #f0f9ff 0%, #fff 42%);
  border: 1px solid #bae6fd;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(14, 116, 144, 0.08);
}

.sidebar-books-head {
  padding: 14px 14px 8px;
}

.sidebar-books-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0c4a6e;
  letter-spacing: -0.01em;
}

.sidebar-books-kicker {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: #0369a1;
  font-weight: 600;
}

.sidebar-books-hub-btn {
  display: block;
  margin: 0 12px 12px;
  padding: 10px 12px;
  text-align: center;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff !important;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3 !important;
  text-decoration: none !important;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-books-hub-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  color: #fff !important;
}

.sidebar-books-sub {
  margin: 0;
  padding: 10px 14px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.sidebar-class-grid {
  list-style: none;
  margin: 0;
  padding: 0 10px 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.sidebar-class-grid li {
  margin: 0;
  border: 0;
}

.sidebar-class-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 4px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #0f766e !important;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2 !important;
  text-decoration: none !important;
  transition: all 0.15s ease;
}

.sidebar-class-grid a:hover {
  border-color: #5eead4;
  background: #f0fdfa;
  color: #0d9488 !important;
}

.sidebar-class-grid a.is-active {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

.sidebar-medium-tabs {
  display: flex;
  gap: 6px;
  margin: 0 12px 12px;
  padding: 4px;
  background: #e0f2fe;
  border-radius: 10px;
}

.sidebar-medium-tab {
  flex: 1;
  text-align: center;
  padding: 7px 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #0369a1 !important;
  text-decoration: none !important;
  line-height: 1.2 !important;
  border-radius: 7px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-medium-tab:hover {
  background: rgba(255, 255, 255, 0.65);
}

.sidebar-medium-tab.is-active {
  background: #fff;
  color: #0c4a6e !important;
  box-shadow: 0 1px 4px rgba(3, 105, 161, 0.15);
}

.sidebar-subject-grid {
  list-style: none;
  margin: 0;
  padding: 0 8px 12px;
}

.sidebar-subject-grid li {
  margin: 0;
  border-bottom: 1px solid #e2e8f0;
}

.sidebar-subject-grid li:last-child {
  border-bottom: 0;
}

.sidebar-subject-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 8px;
  color: #334155 !important;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35 !important;
  text-decoration: none !important;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-subject-grid a:hover {
  background: #f8fafc;
  color: #0f766e !important;
}

.sidebar-subject-grid a.is-active {
  background: #ecfdf5;
  color: #047857 !important;
  font-weight: 700;
}

.sidebar-subject-arrow {
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
}

.sidebar-subject-grid a:hover .sidebar-subject-arrow,
.sidebar-subject-grid a.is-active .sidebar-subject-arrow {
  color: #0d9488;
}

@media (max-width: 900px) {
  .sidebar-class-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 520px) {
  .sidebar-class-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
