:root {
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --shadow-sm: 0 2px 15px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 5px 25px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* ----------------------- SECTION HEADERS (Shared: manual, featured, video) ---------------------- */
.manual_section_header,
.featured_section_header,
.video_section_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color, #eee);
}

.manual_section_header h4,
.featured_section_header h4,
.video_section_header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark, #333);
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured_section_header h4 i {
  color: #ffc107;
  font-size: 20px;
}

.video_section_header h4 i {
  color: #e4002b;
  font-size: 22px;
}

/* -------------------------------------- CATEGORY GROUP ----------------------------------- */
.category_group {
  margin-bottom: 35px;
  background: var(--background-light, #fff);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
}

.category_group:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category_header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  color: var(--text-dark);
}

.category_header i {
  font-size: 20px;
  opacity: 0.9;
}

.category_header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-dark);
}

/* -------------------------- MANUAL LIST & ITEMS -------------------------- */
.manual_list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.manual_item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-color, #eee);
  transition: all 0.25s ease;
  position: relative;
}

.manual_item:last-child {
  border-bottom: none;
}

.manual_item:hover {
  background-color: var(--gray-light, #f8f8f8);
  padding-left: 30px;
}

.manual_content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.manual_info {
  flex: 1;
  min-width: 0;
}

.manual_title {
  margin: 0 0 6px 0;
}

.manual_title a {
  color: var(--text-dark, #333);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.manual_title a:hover {
  color: var(--primary-brand, #e4002b);
}

.manual_meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.manual_meta span {
  font-size: 12px;
  color: var(--text-gray, #666);
}

.manual_meta i {
  margin-right: 4px;
  opacity: 0.7;
}

.manual_keywords {
  color: var(--text-gray, #888) !important;
}

/* Format Badges */
.format_badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.format_badge i {
  font-size: 10px;
}

.format-full {
  background: #fce4ec;
  color: #c2185b;
}

.format-quick {
  background: #ffebee;
  color: #e4002b;
}

/* -------------------------- SEARCH HIGHLIGHT & MATCHED KEYWORDS -------------------------- */
.highlight {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
  color: #856404;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.matched_keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color, #e0e0e0);
}

.matched_keywords .label {
  font-size: 11px;
  color: var(--text-gray, #888);
  margin-right: 4px;
}

.matched_keyword {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f5f5f5;
  border-radius: 3px;
  color: var(--text-gray, #888);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
}

.matched_keyword i {
  font-size: 10px;
  opacity: 0.8;
}

/* -------------------------- FEATURED SECTION -------------------------- */
.featured_section {
  margin-bottom: 40px;
}

.featured_wrapper {
  position: relative;
}

.featured_grid {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.featured_grid::-webkit-scrollbar {
  display: none;
}

/* Nav Buttons */
.featured_nav_btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--background-light, #fff);
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.featured_nav_btn:hover {
  background: var(--primary-brand, #e4002b);
  border-color: var(--primary-brand, #e4002b);
  color: #fff;
  cursor: pointer;
}

.featured_nav_btn:hover i {
  color: #fff;
}

.featured_nav_btn.prev {
  left: -20px;
}

.featured_nav_btn.next {
  right: -20px;
}

.featured_nav_btn i {
  font-size: 16px;
  color: var(--text-dark, #333);
}

.featured_nav_btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.featured_nav_btn:disabled:hover {
  background: var(--background-light, #fff);
  border-color: var(--border-color, #e0e0e0);
}

.featured_nav_btn:disabled:hover i {
  color: var(--text-dark, #333);
}

/* Cards (Shared base for featured & video) */
.featured_card,
.video_card {
  background: var(--background-light, #fff);
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.featured_card:hover,
.video_card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.featured_card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
}

.featured_badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.featured_title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark, #333);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.featured_category {
  font-size: 12px;
  color: var(--text-gray, #666);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.featured_category i {
  font-size: 11px;
}

.featured_actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.featured_actions a {
  text-align: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all var(--transition-fast);
}

/* -------------------------- VIDEO SECTION -------------------------- */
.video_section {
  margin-bottom: 40px;
}

.video_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.video_card {
  cursor: pointer;
}

.video_thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  overflow: hidden;
}

.video_thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.video_card:hover .video_thumbnail img {
  transform: scale(1.05);
}

.video_play_btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: rgba(228, 0, 43, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.video_play_btn i {
  color: #fff;
  font-size: 24px;
  margin-left: 4px;
}

.video_card:hover .video_play_btn {
  background: #e4002b;
  transform: translate(-50%, -50%) scale(1.1);
}

.video_info {
  padding: 16px;
}

.video_title {
  margin: 0 0 8px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark, #333);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video_category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-gray, #666);
}

.video_category i {
  font-size: 11px;
}

/* -------------------------- MODALS (Base + Video + PDF) -------------------------- */
.video_modal,
.pdf_modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video_modal.show,
.pdf_modal.show {
  display: flex;
}

/* Video Modal */
.video_modal_content {
  position: relative;
  width: 90%;
  max-width: 900px;
}

.video_modal_close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.video_modal_close:hover {
  color: #e4002b;
  transform: scale(1.1);
}

.video_modal_frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.video_modal_frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video_modal_title {
  color: #fff;
  margin-top: 15px;
  font-size: 16px;
  text-align: center;
}

/* PDF Modal */
.pdf_modal {
  padding: 20px;
}

.pdf_modal_content {
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 90vh;
  display: flex;
  flex-direction: column;
}

.pdf_modal_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  margin-bottom: 10px;
}

.pdf_modal_title {
  color: #fff;
  font-size: 16px;
  margin: 0;
  flex: 1;
}

.pdf_modal_actions {
  display: flex;
  gap: 10px;
  align-items: center;
  cursor: pointer;
}

.pdf_modal_actions a,
.pdf_modal_actions button.btn_share {
  padding: 8px 16px;
  background: #e4002b;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.pdf_modal_actions a:hover,
.pdf_modal_actions button.btn_share:hover {
  background: #c00025;
  cursor: pointer;
}

.pdf_modal_close {
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  margin-left: 15px;
  transition: all var(--transition-fast);
}

.pdf_modal_close:hover {
  color: #e4002b;
  transform: scale(1.1);
}

.pdf_modal_frame {
  flex: 1;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.pdf_modal_frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Toast Notification */
.toast_notification {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #333;
  color: #fff;
  padding: 14px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.toast_notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast_notification.success {
  background: #28a745;
}

.toast_notification.error {
  background: #dc3545;
}

.toast_notification i {
  font-size: 18px;
}

/* -------------------------- BUTTONS -------------------------- */
.manual_actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 16px;
}

.manual_actions a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn_view {
  background: var(--gray-light, #f5f5f5);
  color: var(--text-dark, #333);
  border: 1px solid var(--border-color, #ddd);
  cursor: pointer;
}

.btn_view:hover {
  background: var(--primary-brand, #e4002b);
  color: var(--text-white, #fff) !important;
  border-color: var(--primary-brand, #e4002b);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.25);
  cursor: pointer;
}

.btn_download {
  background: var(--primary-brand, #e4002b);
  color: var(--text-white, #fff);
  border: 1px solid var(--primary-brand, #e4002b);
}

.btn_download:hover {
  background: #c30024;
  border-color: #c30024;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.25);
}

.btn_reset {
  display: inline-block;
  padding: 10px 24px;
  background: var(--primary-brand, #e4002b);
  color: var(--text-white, #fff);
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all var(--transition-normal);
}

.btn_reset:hover {
  background: var(--secondary-brand, #941515);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.25);
  color: var(--text-white, #fff);
}

/* -------------------------- UTILITIES -------------------------- */
.no_results,
.no_videos {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-gray, #666);
}

.no_results i,
.no_videos i {
  font-size: 48px;
  color: var(--border-color, #ddd);
  margin-bottom: 20px;
  display: block;
  opacity: 0.5;
}

.no_results h3 {
  margin: 0 0 10px 0;
  color: var(--text-dark, #333);
  font-size: 18px;
}

.no_results p,
.no_videos p {
  margin: 0 0 20px 0;
}

/* Quick Navigation */
.quick_nav {
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.quick_nav_btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--background-light, #fff);
  border: 2px solid var(--border-color, #e0e0e0);
  border-radius: 8px;
  color: var(--text-dark, #333);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.quick_nav_btn:hover {
  border-color: var(--primary-brand, #e4002b);
  color: var(--primary-brand, #e4002b);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.15);
}

.quick_nav_btn.active {
  background: var(--primary-brand, #e4002b);
  border-color: var(--primary-brand, #e4002b);
  color: #fff;
}

.quick_nav_btn i {
  font-size: 16px;
}

.quick_nav_btn .badge {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.quick_nav_btn.active .badge {
  background: rgba(255, 255, 255, 0.2);
}

/* -------------------------- RESPONSIVE -------------------------- */
@media (max-width: 768px) {
  .quick_nav_btn .badge {
    display: none;
  }

  .manual_item {
    padding: 12px 16px;
    gap: 10px;
  }

  .manual_item:hover {
    padding-left: 16px;
  }

  .manual_actions {
    margin-left: 10px;
    gap: 6px;
  }

  .manual_actions a {
    padding: 10px 12px;
    font-size: 12px;
  }

  .manual_actions a span {
    display: none;
  }

  .category_header {
    padding: 14px 18px;
  }

  .category_header h5 {
    font-size: 14px;
  }

  .featured_nav_btn {
    width: 32px;
    height: 32px;
  }

  .featured_nav_btn.prev {
    left: -10px;
  }

  .featured_nav_btn.next {
    right: -10px;
  }

  .featured_nav_btn i {
    font-size: 14px;
  }

  .video_grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .video_play_btn {
    width: 50px;
    height: 50px;
  }

  .video_play_btn i {
    font-size: 20px;
  }

  .pdf_modal_content {
    height: 90vh;
  }

  .pdf_modal_header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .pdf_modal_title {
    width: 100%;
    font-size: 14px;
  }

  .quick_nav {
    gap: 8px;
  }

  .quick_nav_btn {
    padding: 10px 16px;
    font-size: 13px;
    flex: 1;
    justify-content: center;
  }

  .filter_options select {
    min-width: 100px;
  }
}
