/* ===============================
   Table of Contents:
   1. Variables (CSS Custom Properties)
   2. Base Elements
   3. Layout & Structure
   4. Typography
   5. Sidebar & Filters
   6. Card Components
   7. Modals
   8. Interactive Elements
   9. Forms & Inputs
   10. Accessibility Improvements
   11. Utility Classes
   12. Media Queries
   =============================== */

/* ===============================
   1. Variables (CSS Custom Properties)
   =============================== */
:root {
  /* Colors */
  --primary: #0062cc;
  --primary-hover: #0056b3;
  --primary-light: rgba(0, 86, 179, 0.12);
  --secondary: #5a6268;
  --success: #1e7e34;
  --danger: #b02a37;
  --warning: #d39e00;
  --info: #117a8b;
  --light: #e9ecef;
  --dark: #343a40;
  --gray: #495057;
  --gray-light: #6c757d;
  --gray-dark: #212529;
  --white: #fff;
  --border-color: #adb5bd;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;

  /* Border radius */
  --border-radius: 4px;

  /* Transitions */
  --transition-speed: 0.2s;
}

/* ===============================
   2. Base Elements
   =============================== */
body {
  color: var(--gray-dark);
}

hr {
  border-top: 1px solid rgba(0, 0, 0, 0.2);
}

small {
  color: var(--gray);
}

/* ===============================
   3. Layout & Structure
   =============================== */
.sticky-search-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--white);
  transition: box-shadow 0.3s ease;
}

.sticky-search-container.scrolled {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding-top: 15px;
}

.content-padding-for-sticky {
  padding-top: 10px;
}

.results-stats-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===============================
   4. Typography
   =============================== */
.text-muted {
  color: var(--gray) !important;
}

.filter-header {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--dark);
}

/* ===============================
   5. Sidebar & Filters
   =============================== */
.sidebar-filter {
  position: sticky;
  top: 20px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  height: 100vh;
  overflow-y: scroll;
}

.filter-section {
  margin-bottom: 15px;
}

.filter-options {
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}

.custom-control {
  margin-bottom: 5px;
}

/* Category Styles */
.category-container {
  margin-bottom: 2px;
  width: 100%;
}

.category-item {
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.category-item:hover {
  background-color: var(--primary-light);
}

.category-item span {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9em;
}

.category-children .category-item span {
  font-size: 0.8em;
}

.category-item i {
  transition: transform var(--transition-speed) ease;
  font-size: 12px;
  color: var(--gray);
  flex-shrink: 0;
  margin-left: 5px;
}

.category-item i.fa-chevron-down {
  transform: rotate(90deg);
}

.category-children {
  padding-left: 15px;
  border-left: 1px dashed var(--light);
  margin-left: 10px;
}

.active-filter {
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-light);
}

.category-tags {
  display: flex;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

.category-tag {
  white-space: normal;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  font-size: 0.65rem;
  line-height: 1.2;
  background-color: var(--light);
  border: 1px solid #dae0e5;
  color: var(--gray);
}

.category-tag:hover {
  background-color: #dae0e5;
  color: var(--gray-dark);
}

/* Modal Categories (duplicating for mobile) */
#modalCategoryFilters .category-item,
#modalCategoryFilters .category-children,
#modalCategoryFilters .active-filter {
  /* Uses the same styles as sidebar categories */
}

/* ===============================
   6. Card Components
   =============================== */
.how-to-card {
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.how-to-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
/*
.card-img-top {
  height: auto;/*250px;*
  object-fit: cover;
}*//*

.card-classes .card-img-top {
  height: 350px;
}*/
.col-certification-timelines .card-img-top {
  width: 60%;
   display: block;        /* make it block-level */
  margin: 0 auto;
  
  }
.format-badge, .access-badge {
  position: absolute;
  z-index: 10;
  font-weight: 600;
}

.format-badge {
  top: 10px;
  right: 10px;
}

.access-badge {
  top: 10px;
  left: 10px;
}

.card-body {
  flex: 1 0 auto;
  padding-bottom: 0.75rem;
}

.card-footer-custom {
  background-color: var(--light);
  border-top: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  color: var(--gray);
}

/* Badge Classes */
.badge-primary {
  background-color: var(--primary);
  color: var(--white);
}

.badge-secondary {
  background-color: var(--secondary);
  color: var(--white);
}

.badge-success {
  background-color: var(--success);
  color: var(--white);
}

.badge-danger {
  background-color: var(--danger);
  color: var(--white);
}

.badge-warning {
  background-color: var(--warning);
  color: var(--gray-dark);
}

.badge-info {
  background-color: var(--info);
  color: var(--white);
}

.badge-light {
  background-color: var(--light);
  color: var(--gray-dark);
}

.badge-dark {
  background-color: var(--dark);
  color: var(--white);
}

/* ===============================
   7. Modals
   =============================== */
.modal-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
}

.modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.2);
}

.embed-responsive-container {
  position: relative;
  width: 100%;
  padding-bottom: 15px;
}

.embed-responsive-container iframe,
.embed-responsive-container audio {
  max-width: 100%;
}

.podcast-player {
  width: 100%;
  margin: 15px 0;
}

.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.membership-required {
  background-color: var(--light);
  border-color: #e9ecef !important;
  border-radius: 5px;
  padding: 1.5rem;
  text-align: center;
}

.membership-required .fa-lock {
  color: var(--warning);
  margin-bottom: 0.5rem;
}

.membership-required h5 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.membership-required p {
  margin-bottom: 1rem;
  color: var(--gray-light);
}

/* Toast notification styling */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1500;
}

.toast-header {
  background-color: rgba(255, 255, 255, 0.95);
  color: var(--gray-dark);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.toast-body {
  background-color: var(--white);
}

/* ===============================
   8. Interactive Elements
   =============================== */
/* Rating Stars */
.rating-stars .star,
.rating-stars-modal .star {
  color: var(--warning);
}

.rating-stars-interactive {
  display: none;
  margin-top: 5px;
}

.how-to-card:hover .rating-stars-interactive {
  display: block;
}

.rating-stars-interactive .star,
.rating-stars-modal .star {
  cursor: pointer;
  transition: transform var(--transition-speed);
}

.rating-stars-interactive .star:hover,
.rating-stars-modal .star:hover {
  transform: scale(1.2);
}

/* Contributor & Expert Info */
.contributor, .expert-info {
  cursor: pointer;
  transition: all var(--transition-speed);
  border-radius: var(--border-radius);
  padding: 4px;
}

.contributor:hover, .expert-info:hover {
  background-color: var(--primary-light);
}

.contributor img, .expert-info img {
  margin-left: 5px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info-container {
  background-color: var(--light);
  border-radius: var(--border-radius);
  padding: 0.5rem;
  border-left: 3px solid #e9ecef;
}

.author-info-container .contributor,
.author-info-container .expert {
  padding: 2px 0;
}

/* Pagination */
.pagination .page-link {
  color: var(--primary);
  border-color: var(--border-color);
}

.pagination .page-link:hover {
  color: var(--primary-hover);
  background-color: var(--light);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.pagination .page-item.disabled .page-link {
  color: var(--gray);
  background-color: var(--white);
  border-color: var(--light);
}

/* ===============================
   9. Forms & Inputs
   =============================== */
.form-control {
  color: var(--gray);
  border: 1px solid var(--border-color);
}

.form-control:focus {
  color: var(--gray);
  background-color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.35);
}

.form-control:disabled,
.form-control[readonly] {
  background-color: var(--light);
  color: var(--gray);
  opacity: 1;
}

::placeholder {
  color: var(--gray);
  opacity: 1;
}

.form-control.is-invalid {
  border-color: var(--danger);
  border-width: 2px;
}

.invalid-feedback {
  color: var(--danger) !important;
}

.invalid-feedback::before {
  content: "\f071";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 0.5rem;
}

.form-control.is-valid {
  border-color: var(--success);
  border-width: 2px;
}

.valid-feedback {
  color: var(--success) !important;
}

.valid-feedback::before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  margin-right: 0.5rem;
}

.form-label.required::after {
  content: " *";
  color: var(--danger);
  font-weight: bold;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.high-contrast-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.high-contrast-primary:hover, .high-contrast-primary:focus {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.btn-outline-secondary {
  color: var(--gray);
  border-color: var(--gray-light);
}

.btn-outline-secondary:hover {
  background-color: var(--secondary);
  border-color: var(--secondary);
  color: var(--white);
}

.btn.disabled, .btn:disabled {
  background-color: var(--light);
  color: var(--gray);
  opacity: 1;
}

/* Dropdown */
.dropdown-item {
  color: var(--gray-dark);
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--light);
  color: var(--gray-dark);
}

/* Alerts */
.alert {
  position: relative;
  padding-left: 2.5rem;
}

.alert::before {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.alert-danger {
  color: #58151c;
  background-color: #f1aeb5;
  border-color: #ea868f;
}

.alert-danger::before {
  content: "\f06a";
}

.alert-warning {
  color: #664d03;
  background-color: #ffe69c;
  border-color: #ffda6a;
}

.alert-warning::before {
  content: "\f071";
}

.alert-success {
  color: #0a3622;
  background-color: #a3cfbb;
  border-color: #75c095;
}

.alert-success::before {
  content: "\f058";
}

.alert-info {
  color: #055160;
  background-color: #9eeaf9;
  border-color: #7ddff8;
}



/* ===============================
   10. Accessibility Improvements
   =============================== */
.btn:focus,
.category-item:focus,
.page-link:focus,
.form-control:focus,
.quick-view-btn:focus,
.rate-article-btn:focus,
.category-tag:focus,
.contributor:focus,
.expert-info:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  box-shadow: none;
  position: relative;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ===============================
   11. Utility Classes
   =============================== */
.pointer {
  cursor: pointer;
}

.loading-spinner {
  text-align: center;
  padding: 10px;
  color: var(--gray-light);
}


/* Add these styles to your CSS file */

.active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
}

.active-filters-label {
  margin-right: 10px;
  color: #343a40;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background-color: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  margin-right: 5px;
  font-size: 0.85rem;
  color: #495057;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background-color: #dee2e6;
}

.filter-chip.category {
  background-color: #e0f7fa;
  border-color: #b2ebf2;
}

.filter-chip.format {
  background-color: #e8f5e9;
  border-color: #c8e6c9;
}

.filter-chip.access {
  background-color: #fff8e1;
  border-color: #ffecb3;
}

.filter-chip.search {
  background-color: #f3e5f5;
  border-color: #e1bee7;
}

.filter-chip .filter-name {
  font-weight: 600;
  margin-right: 5px;
}

.filter-chip .remove-filter {
  margin-left: 5px;
  cursor: pointer;
  color: #6c757d;
  transition: color 0.2s ease;
}

.filter-chip .remove-filter:hover {
  color: #dc3545;
}

.active-filters-clear {
  margin-left: auto;
}

/* Updated CSS for the horizontal active filters bar */

.active-filters-bar {
  padding: 10px 15px;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  background-color: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 1rem;
}

.filters-and-results-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.active-filters-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  flex: 1;
}

.results-count-section {
  display: flex;
  align-items: center;
  white-space: nowrap;
  margin-left: 15px;
  padding-left: 15px;
  border-left: 1px solid #e6e6e6;
}

.active-filters-label {
  margin-right: 10px;
  color: #343a40;
  white-space: nowrap;
}

.active-filter-chips {
  display: flex;
  flex-wrap: wrap;
  flex: 1;
  gap: 8px;
  min-height: 30px;
}

.no-filters-message {
  color: #6c757d;
  font-style: italic;
  padding: 4px 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background-color: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  margin-right: 5px;
  font-size: 0.85rem;
  color: #495057;
  transition: all 0.2s ease;
}

.filter-chip:hover {
  background-color: #dee2e6;
}

.filter-chip.category {
  background-color: #e0f7fa;
  border-color: #b2ebf2;
}

.filter-chip.format {
  background-color: #e8f5e9;
  border-color: #c8e6c9;
}

.filter-chip.access {
  background-color: #fff8e1;
  border-color: #ffecb3;
}

.filter-chip.search {
  background-color: #f3e5f5;
  border-color: #e1bee7;
}

.filter-chip .filter-name {
  font-weight: 600;
  margin-right: 5px;
}

.filter-chip .remove-filter {
  margin-left: 5px;
  cursor: pointer;
  color: #6c757d;
  transition: color 0.2s ease;
}

.filter-chip .remove-filter:hover {
  color: #dc3545;
}

.active-filters-clear {
  margin-left: 10px;
}

#clearAllFilters {
  visibility: hidden; /* Hide by default and show when filters are active */
}

.has-active-filters #clearAllFilters {
  visibility: visible;
}


/* Enhanced Category Tag Styling */
.category-tag {
  white-space: normal;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  font-size: 0.69rem;
  line-height: 1.3;
  padding: 0.35rem 0.5rem;
  background-color: var(--light);
  border: 1px solid #dae0e5;
  color: var(--gray);
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height:45px;
  vertical-align: middle;
}

.category-tag:hover {
  background-color: #dae0e5;
  color: var(--gray-dark);
}

.category-tag small {
  font-size: 0.80em;
  display: block;
  line-height: 1.2;
  margin-top: 2px;
  opacity: 1;
  color:#000000;
  font-weight:bold;
  white-space: wrap;
  /*overflow: hidden;
  text-overflow: ellipsis;*/
}

/* Simplified Clickable Text Tags for Categories */
.article-category-tags {
  margin-bottom: 10px;
}

.category-text-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-text-tag {
  color: #0056b3;
  background-color: #e9f2fd;
  padding: 4px 10px;
  border-radius: 30px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
  text-align: center;
  line-height: 1.2;
}

.category-text-tag:hover {
  background-color: #d1e6fb;
  transform: translateY(-1px);
}

.category-text-tag:active {
  transform: translateY(0px);
}

/* Adjustments for QuickView modal */
#quickViewModal .category-text-tags {
  margin-top: 5px;
}

/* Ensure consistent styling across different card sizes */
.how-to-card .article-category-tags {
  min-height: 40px;
}

/* Darker text on light backgrounds for better contrast */
.bg-light .category-text-tag {
  color: #004085;
}

/* Card hover shouldn't affect category tags */
.how-to-card:hover .category-text-tag {
  transform: none;
}

/* Breadcrumb Category Grouping Styles */
.article-category-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.category-breadcrumb-group {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.category-breadcrumb-group:hover {
  background-color: #e9ecef;
}

.category-breadcrumb-segment {
  color: #6c757d;
  cursor: pointer;
  transition: color 0.15s ease;
}

.category-breadcrumb-segment:hover {
  color: #0056b3;
  text-decoration: underline;
}

.category-breadcrumb-segment.last-segment {
  color: #0056b3;
  font-weight: 500;
}

.breadcrumb-separator {
  font-size: 0.7rem;
  color: #adb5bd;
  margin: 0 5px;
}

/* Improved Breadcrumb Category Styles with Text Wrapping */
.article-category-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.category-breadcrumb-group {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: baseline;
  max-width: 100%;
  flex-wrap: wrap;
  white-space: normal;
  transition: background-color 0.15s ease;
  line-height: 1.4;
}

.category-breadcrumb-group:hover {
  background-color: #e9ecef;
}

.category-breadcrumb-segment {
  color: #6c757d;
  cursor: pointer;
  transition: color 0.15s ease;
  display: inline;
  white-space: normal;
  word-break: break-word;
  margin-right: 5px;
}

.category-breadcrumb-segment:hover {
  color: #0056b3;
  text-decoration: underline;
}

.category-breadcrumb-segment.last-segment {
  color: #0056b3;
  font-weight: 500;
}

.breadcrumb-separator {
  font-size: 0.7rem;
  color: #adb5bd;
  margin: 0 5px 0 0;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* Card description styles to add to your resourceCenter.css file */

.card-description {
 /* font-size: 0.875rem;
  line-height: 1.4;*/
  color: var(--gray);
  /*display: -webkit-box;*/
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  /*max-height: 4.2em; /* Approximately 3 lines of text */
}
.description-auto .card-description{
	 max-height:none!important;
	  -webkit-line-clamp: none!important;
}

.card-expert .card-description p{
	margin-bottom:10px;
}

/* Ensure card height consistency */
.how-to-card .card-body {
  display: flex;
  flex-direction: column;
}

.how-to-card .card-title {
  margin-bottom: 0.5rem;
}

/* Improved spacing between elements in card */
.how-to-card .article-category-breadcrumbs {
  margin-top: 0.5rem;
}


/* Resource Detail Page Enhanced Styling */

/* ===============================
   Article Header Section
   =============================== */
.article-header-section {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #e9ecef;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  transition: box-shadow 0.3s ease;
}

.article-header-section:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ===============================
   Category Breadcrumb Navigation
   =============================== */
.category-breadcrumb-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.category-breadcrumb-link {
  color: #0056b3;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: #e9f2fd;
  border: 1px solid #b3d7ff;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 500;
  display: inline-block;
}

.category-breadcrumb-link:hover {
  background-color: #d1e6fb;
  text-decoration: none;
  color: #004085;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-breadcrumb-link.active {
  background-color: #0056b3;
  color: white;
  transform: scale(0.98);
}

/* ===============================
   Contributor and Expert Info
   =============================== */
.contributor-info, .expert-info {
  transition: all 0.2s ease;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
}

.contributor-info:hover, .expert-info:hover {
  background-color: rgba(0,123,255,0.1);
  border-color: rgba(0,123,255,0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contributor-info img, .expert-info img {
  transition: transform 0.2s ease;
}

.contributor-info:hover img, .expert-info:hover img {
  transform: scale(1.1);
}

/* ===============================
   Rating and Social Share Section
   =============================== */
.rating-display {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.rating-display .fa-star {
  margin-right: 2px;
  transition: color 0.2s ease;
}

.social-share-section h6 {
  color: #495057;
  margin-bottom: 12px;
}

.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-buttons .btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.share-buttons .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.share-buttons .btn:hover::before {
  left: 100%;
}

.share-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Specific social button colors */
.share-buttons .btn-primary {
  background: linear-gradient(45deg, #1877f2, #42a5f5);
}

.share-buttons .btn-info {
  background: linear-gradient(45deg, #1da1f2, #42a5f5);
}

.share-buttons .btn-secondary {
  background: linear-gradient(45deg, #6c757d, #adb5bd);
}

.share-buttons .btn-dark {
  background: linear-gradient(45deg, #343a40, #495057);
}

/* ===============================
   Badge Styling
   =============================== */
.badge {
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.badge i {
  margin-right: 4px;
}

/* ===============================
   Rating Modal Enhancements
   =============================== */
.rating-stars-modal {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.rating-stars-modal .star {
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 2rem;
  position: relative;
}

.rating-stars-modal .star:hover {
  transform: scale(1.2);
}

.rating-stars-modal .star:focus {
  outline: 2px solid #007bff;
  outline-offset: 4px;
  border-radius: 4px;
}

.rating-stars-modal .star.text-warning {
  color: #ffc107 !important;
  text-shadow: 0 0 8px rgba(255,193,7,0.5);
}

.rating-stars-modal .star::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255,193,7,0.3), transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
  z-index: -1;
}

.rating-stars-modal .star:hover::after {
  width: 120%;
  height: 120%;
}

/* ===============================
   Comments Section
   =============================== */
.comments-section {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 2rem;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.comments-section h4 {
  color: #343a40;
  font-weight: 600;
  border-bottom: 3px solid #007bff;
  padding-bottom: 8px;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.comment-item {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
  border-radius: 8px;
  overflow: hidden;
}

.comment-item:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border-left-color: #007bff;
  transform: translateX(4px);
}

.comment-avatar {
  font-weight: 600;
  font-size: 1.1rem;
  background: linear-gradient(45deg, #007bff, #0056b3) !important;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.comment-text {
  line-height: 1.6;
  color: #495057;
}

.comment-item .bg-light {
  background: linear-gradient(135deg, #e3f2fd, #f8f9fa) !important;
  border: 1px solid #e1f5fe;
  border-radius: 8px;
}

/* ===============================
   Comment Form Styling
   =============================== */
.comment-form-section {
  border: 2px dashed #dee2e6;
  transition: all 0.3s ease;
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.comment-form-section:hover {
  border-color: #007bff;
  border-style: solid;
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  box-shadow: 0 4px 12px rgba(0,123,255,0.1);
}

.comment-form-section h5 {
  color: #343a40;
  font-weight: 600;
  margin-bottom: 1rem;
}

.comment-form-section textarea {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  line-height: 1.5;
}

.comment-form-section textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
  transform: scale(1.01);
}

.comment-login-prompt {
  border: 2px dashed #dee2e6;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  transition: all 0.3s ease;
}

.comment-login-prompt:hover {
  border-color: #28a745;
  background: linear-gradient(135deg, #d4edda, #f8f9fa);
}

.comment-login-prompt .fa-user-circle {
  color: #6c757d;
  margin-bottom: 1rem;
}

/* ===============================
   Toast Notifications
   =============================== */
.toast-container {
  z-index: 1500;
}

.toast {
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  backdrop-filter: blur(10px);
}

.toast.bg-success {
  background: linear-gradient(45deg, #28a745, #20c997) !important;
}

.toast.bg-danger {
  background: linear-gradient(45deg, #dc3545, #fd7e14) !important;
}

.toast-header {
  border-bottom: none;
  background: transparent !important;
}

.toast-body {
  font-weight: 500;
}

/* ===============================
   Loading States
   =============================== */
.spinner-border {
  width: 2rem;
  height: 2rem;
  border-width: 3px;
}




@media (min-width: 1550px) {
    .col-xl-5ths {
        flex: 0 0 20%;
        max-width: 20%;
    }
    .badge {
  font-size: 0.6rem;
  }
  .category-breadcrumb-group {
  font-size: 0.6rem;
  }
}

@media (min-width: 1800px) {
    .col-xxl-2 {
        -ms-flex: 0 0 16.666667%;
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
    }
}

/* ===============================
   Responsive Design
   =============================== */
@media (max-width: 768px) {
  .article-header-section {
    padding: 1.5rem !important;
  }
  
  .category-breadcrumb-navigation {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  
  .share-buttons {
    justify-content: center;
  }
  
  .share-buttons .btn {
    width: 40px;
    height: 40px;
  }
  
  .rating-stars-modal .star {
    font-size: 1.5rem;
    margin: 0 4px;
  }
  
  .comments-section {
    padding: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .comment-form-section {
    padding: 1rem !important;
  }
  
  .contributor-info, .expert-info {
    margin-bottom: 1rem;
  }
}

@media (max-width: 576px) {
  .category-breadcrumb-link {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
  
  .badge {
    font-size: 0.7rem;
    padding: 4px 8px;
  }
  
  .social-share-section {
    text-align: center;
    margin-top: 1rem;
  }
  
  .rating-display {
    text-align: center;
    margin-bottom: 1rem;
  }
}

/* ===============================
   Accessibility Enhancements
   =============================== */
.category-breadcrumb-link:focus,
.contributor-info:focus,
.expert-info:focus,
.share-buttons .btn:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

.rating-stars-modal .star:focus {
  outline: 2px solid #007bff;
  outline-offset: 4px;
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===============================
   Animation Keyframes
   =============================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.comment-item {
  animation: fadeInUp 0.5s ease-out;
}

.rating-stars-modal .star.text-warning {
  animation: pulse 0.3s ease-in-out;
}

/* Responsive adjustments */

@media (max-width: 991px) {
  .card-description {
    -webkit-line-clamp: 2;
    max-height: 2.8em; /* Approximately 2 lines of text */
  }
}

@media (max-width: 767px) {
  .card-description {
    -webkit-line-clamp: 3;
    max-height: 4.2em; /* Back to 3 lines on smaller screens */
  }
}

/* Adjust for mobile and small screens */
@media (max-width: 576px) {
  .article-category-breadcrumbs {
    gap: 8px;
  }
  
  .category-breadcrumb-group {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
  
  .breadcrumb-separator {
    margin: 0 3px 0 0;
  }
}

/* Ensure category groups have adequate spacing */
.article-category-breadcrumbs {
  margin-top: 10px;
}

/* Specific styling for QuickView modal */
#quickViewModal .article-category-breadcrumbs {
  margin-top: 5px;
  max-width: 100%;
  word-wrap: break-word;
}

#quickViewModal .category-breadcrumb-group {
  max-width: 100%;
}

/* Card hover shouldn't affect breadcrumb groups */
.how-to-card:hover .category-breadcrumb-group {
  transform: none;
}

/* Adjust for mobile and small screens */
@media (max-width: 576px) {
  .article-category-breadcrumbs {
    gap: 8px;
  }
  
  .category-breadcrumb-group {
    font-size: 0.75rem;
    padding: 4px 10px;
  }
  
  .breadcrumb-separator {
    margin: 0 3px;
  }
}

/* Ensure category groups have adequate spacing */
.article-category-breadcrumbs {
  margin-top: 10px;
}

/* Specific styling for QuickView modal */
#quickViewModal .article-category-breadcrumbs {
  margin-top: 5px;
}

/* Card hover shouldn't affect breadcrumb groups */
.how-to-card:hover .category-breadcrumb-group {
  transform: none;
}

/* Show full breadcrumb path on hover */
/*.category-tag:hover small {
  white-space: normal;
  overflow: visible;
  max-width: none;
}*/
/* Responsive styles */
@media (max-width: 991px) {
  .filters-and-results-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .results-count-section {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e6e6e6;
    justify-content: space-between;
  }
  
  .active-filters-section {
    margin-bottom: 5px;
  }
}

@media (max-width: 767px) {
  .active-filters-section {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .active-filters-label {
    margin-bottom: 5px;
  }
  
  .filter-chip {
    font-size: 0.75rem;
    padding: 3px 8px;
    margin-bottom: 5px;
  }
}

@media (max-width: 576px) {
  .active-filters-bar {
    padding: 8px 10px;
  }
  
  .results-count-section {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .active-filters-clear {
    margin-left: 0;
    margin-top: 8px;
  }
}

/* ===============================
   12. Media Queries
   =============================== */
@media (min-width: 992px) {
  .modal-lg.media-modal {
    max-width: 900px;
  }
}

@media (max-width: 991.98px) {
  .sidebar-filter {
    position: static;
    margin-bottom: 20px;
  }

  .filter-options {
    max-height: none;
  }
/*
  .card-img-top {
    height: 300px;
  }*/

  #resource-center-sidebar {
    display: none;
  }

  #filterButton {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
    background-color: var(--light);
    border-color: #ced4da;
  }

  .input-group-prepend {
    margin-right: 5px;
  }

  .sticky-search-container {
    top: 0;
    padding: 10px 0;
  }

  .input-group .dropdown .btn {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (max-width: 767px) {
  .membership-required {
    padding: 15px !important;
  }

  .membership-required h5 {
    font-size: 1.1rem;
  }

  .quick-view-btn {
    padding: 0.25rem 0.4rem;
  }

  .card-footer .btn {
    padding: 0.25rem 0.4rem;
  }

  .rating-stars-interactive {
    display: block;
  }

  .modal-body {
    padding: 1rem;
  }

  #quickViewModal .col-md-4,
  #quickViewModal .col-md-8 {
    padding: 0.5rem;
  }

  #quickViewModal .embed-responsive-container {
    margin-top: 1rem;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    margin: 0.25rem 0;
    width: 100%;
  }

  .how-to-card {
    margin-bottom: 20px;
  }

  .navbar-brand {
    font-size: 1.1rem;
  }

  #pageLearningCenter .card img {
    display: block !important;
  }
/*
  .card-img-top {
    height: 225px;
  }*/

  .card-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .card-footer .contributor {
    margin-bottom: 0.75rem;
    width: 100%;
  }

  .card-footer .action-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
  }

  .card-footer .btn {
    padding: 0.375rem 0.5rem;
    margin-right: 0.25rem;
  }

  .sticky-search-container {
    padding: 10px 0;
  }

  .input-group {
    flex-wrap: nowrap;
  }

  .dropdown .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
  }

  #searchInput {
    height: calc(1.5em + 0.5rem + 2px);
  }

  #searchButton {
    padding: 0.25rem 0.5rem;
  }

  .dropdown-menu {
    min-width: 8rem;
  }

  #resultsCount {
    font-size: 0.875rem;
  }
}

@media (max-width: 576px) {
  .modal-dialog {
    margin: 0.5rem;
    max-width: none;
    height: calc(100% - 1rem);
  }

  .modal-content {
    height: 100%;
  }

  .modal-body {
    max-height: calc(100vh - 150px);
    overflow-y: auto;
  }

  .dropdown .btn #currentSort {
    display: none;
  }

  .dropdown .btn:before {
    content: "\f0dc";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0;
  }

  #searchInput::placeholder {
    content: "Search";
  }

  #searchButton span {
    display: none;
  }
    .active-filters-bar {
    padding: 8px 10px;
  }
  
  .active-filters-label {
    width: 100%;
    margin-bottom: 5px;
  }
  
  .active-filters-clear {
    margin-top: 8px;
    width: 100%;
    text-align: right;
  }
  
  .filter-chip {
    font-size: 0.75rem;
    padding: 3px 8px;
  }
}

@media (max-width: 400px) {
  #searchInput {
    max-width: 150px;
  }

  .dropdown .btn::after {
    display: none;
  }
}

@media (max-width: 600px) {
	/*
  .card-img-top {
    height: auto;
  }*/
}