.resources-breadcrumbs {
  padding: 15px;
  padding-left: 0;
  margin-bottom: 20px;
}

/* Resource Category Grid Styles */
.resource-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.resource-category-item {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.resource-category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.category-image-link {
  display: block;
  position: relative;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  overflow: hidden;
  background: #f5f5f5;
}

.category-image-link img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-image-link:hover img {
  transform: scale(1.05);
}

/* Category icon overlay styling for both archive and taxonomy pages */
.category-icon-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background-color: rgba(0, 0, 0, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
  z-index: 1;
}

.category-image-link:hover .category-icon-overlay,
.resource-category-featured-image:hover .category-icon-overlay {
  background-color: rgba(0, 0, 0, 1);
}

.category-icon-overlay img {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain !important;
  position: static !important;
  transform: none !important;
}

/* Styling for taxonomy featured image with icon overlay */
.resource-category-featured-image {
  position: relative;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 8px;
}

.resource-category-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.resource-category-featured-image .category-icon-overlay {
  width: 80px;
  height: 80px;
}

.resource-category-featured-image .category-icon-overlay img {
  width: 40px !important;
  height: 40px !important;
}

.category-image-link.no-image .placeholder-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #f5f5f5;
  background-image: linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0),
    linear-gradient(45deg, #e0e0e0 25%, transparent 25%, transparent 75%, #e0e0e0 75%, #e0e0e0);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}

.category-details {
  padding: 20px;
}

.category-icon {
  display: none;
}

.category-title {
  margin: 0 0 10px 0;
}

.category-title a {
  text-decoration: none;
}

.resource-count {
  display: inline-block;
  margin-bottom: 10px;
}

.category-description {
  margin-top: 10px;
}

@media (max-width: 768px) {
  .resource-categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .resource-categories-grid {
    grid-template-columns: 1fr;
  }
}

/* Layout styles for different resource types */
.videos-archive-content-area,
.calculators-archive-content-area,
.podcasts-archive-content-area,
.videos-archive-content-area,
.resources-archive-content-area,
.resource-archive-content-area,
.resource-category-archive-content-area,
.single-resource-content-area,
.single-calculator-content-area,
.single-video-content-area,
.single-podcast-content-area {
  max-width: 1368px;
  width: 95%;
  margin: 0 auto;
  padding: 20px 0;
}

/* Generic resource grid for taxonomy archives */
.resources-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.resource-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.resource-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.resource-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.resource-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.resource-item:hover .resource-thumbnail img {
  transform: scale(1.05);
}

.resource-content {
  padding: 1rem;
  text-align: center;
}

.resource-title {
  margin: 0;
  color: #000;
  transition: color 0.3s ease, text-decoration 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 3.9em;
}

.resource-item:hover .resource-title {
  color: #1c86ff;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .resources-items-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .resources-items-grid {
    grid-template-columns: 1fr;
  }
}

.resource-banner-content {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(226, 226, 226, 1);
  border-radius: 10px;
  gap: 0;
  padding: 2em;
}

.resource-banner-title {
  display: block;
  margin-bottom: 0.5em;
}

.resource-banner-desc {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  justify-content: space-between;
}

.resource-banner-desc-text {
  flex: 3;
  min-width: 300px;
}

.resource-banner-desc ul {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.resource-banner-desc-text li {
  display: flex;
  align-items: center;
  margin-bottom: 1em;
  gap: 0.75em;
  color: #33475b;
}

.resource-banner-desc-text li:last-child {
  margin-bottom: 0;
}

.resource-banner-desc-text li span {
  font-size: 18px;
  line-height: 1.7em;
  color: #33475b;
}

.resource-banner-desc-imgs {
  flex: none;
  min-width: 200px;
  display: flex;
  gap: 1em;
  align-items: center;
  justify-content: center;
}

.resource-banner-desc-imgs img {
  max-width: 234px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.resource-banner-button {
  display: inline-block;
  background-color: #1c86ff;
  color: #fff;
  padding: 8px 12px;
  font-size: 18px;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  text-align: center;
  max-width: 100%;
  align-self: flex-start;
}

.resource-banner-button:hover {
  background-color: #1c86ff;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 768px) {
  .resource-banner {
    padding: 1.5em;
  }

  .resource-banner-desc {
    flex-direction: column;
  }

  .resource-banner-desc-imgs {
    margin-top: 1em;
  }
}

.category-fallback-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

/* Common Two-column layout for resource pages */
.resource-columns,
.calculator-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.video-columns,
.podcast-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-bottom: 30px;
}

.resource-left-column,
.calculator-left-column {
  flex: 1 1 calc(50% - 15px);
  min-width: 0;
}

.resource-right-column,
.calculator-right-column {
  flex: 1 1 calc(50% - 15px);
  min-width: 0;
}

/* When right column is empty, left column takes full width */
.resource-right-column:empty,
.calculator-right-column:empty,
.video-right-column:empty,
.podcast-right-column:empty {
  display: none;
}

/* Class-based approach for full-width left column */
.resource-columns.full-width .resource-left-column,
.calculator-columns.full-width .calculator-left-column,
.video-columns.full-width .video-left-column,
.podcast-columns.full-width .podcast-left-column {
  flex: 1 1 100%;
}

.resource-columns.full-width .resource-right-column,
.calculator-columns.full-width .calculator-right-column,
.video-columns.full-width .video-right-column,
.podcast-columns.full-width .podcast-right-column {
  display: none;
}

/* JavaScript can add this class when right column is empty */
.no-right-column .resource-left-column,
.no-right-column .calculator-left-column,
.no-right-column .video-left-column,
.no-right-column .podcast-left-column {
  width: 100%;
  flex: 1 0 100%;
}

/* Common header styles */
.resource-header,
.video-header,
.podcast-header,
.calculator-header {
  text-align: left;
  margin-bottom: 20px;
}

.resource-title,
.video-title,
.podcast-title,
.calculator-title {
  color: #212529;
}

.resource-type-label,
.video-type-label,
.podcast-type-label,
.calculator-type-label {
  display: inline-block;
  font-size: 0.9em;
  margin-top: 10px;
}

/* Common description section */
.resource-description:not(:empty),
.video-description:not(:empty),
.podcast-description:not(:empty),
.calculator-description:not(:empty) {
  margin-bottom: 30px;
}

/* Common additional info section styles */
.resource-additional-info-wrapper,
.video-additional-info-wrapper,
.podcast-additional-info-wrapper,
.calculator-additional-info-wrapper {
  clear: both;
  width: 100%;
  margin-top: 30px;
}

.additional-info,
.additional-info-left,
.additional-info-right {
  overflow: auto;
}

/* Section content wrapper styles */
.section-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.section-content-wrapper.two-columns {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 30px;
}

.section-content-wrapper.two-columns .resource-column {
  flex: 1 1 calc(50% - 15px);
  margin-bottom: 30px;
}

/* Responsive adjustments for two-column layouts */
@media (max-width: 768px) {
  .resource-columns,
  .video-columns,
  .podcast-columns,
  .calculator-columns {
    flex-direction: column;
  }

  .section-content-wrapper.two-columns {
    flex-direction: column;
  }
}

@media screen and (min-width: 768px) {
  .section-content-wrapper.two-columns .resource-column {
    flex: 1 1 calc(50% - 15px);
  }
}

/* Related products and media styling */
.related-products-container,
.related-videos,
.related-podcasts {
  margin: 2rem 0;
}

.related-products-container h2,
.related-videos h2,
.related-podcasts h2 {
  margin-top: 0;
  color: #333;
  margin-bottom: 1.5rem;
}

/* Right column related content styling */
.video-right-column .related-products-container,
.video-right-column .related-videos,
.podcast-right-column .related-products-container,
.podcast-right-column .related-podcasts {
  margin: 0 0 2rem 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* Related products styling */
.related-products-grid {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.related-products-grid a {
  border: 1px dashed #127717;
  border-radius: 8px;
}

.related-product {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
  padding: 1rem;
  position: relative;
  min-height: 120px;
}

.related-product h3 {
  font-size: 0.9rem;
  color: #1c86ff;
  margin: 0 0 0.5rem 0;
  text-align: left;
  line-height: 1.4;
}

.product-sku {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.product-inventory {
  font-size: 0.8rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.related-product img {
  display: none; /* Hide images to match the screenshot */
}

.related-product-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 1rem;
}

.product-availability {
  font-size: 0.8rem;
  color: #333;
  display: flex;
  align-items: center;
}

.product-availability .stock {
  color: #008000;
  margin-left: 0.25rem;
}

.product-availability .out-of-stock {
  color: #cc0000;
  margin-left: 0.25rem;
}

.product-availability .on-backorder {
  color: #ff6600;
  margin-left: 0.25rem;
}

.product-price {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 0.5rem;
}

.product-price .amount {
  color: #333;
}

.contact-for-pricing-btn {
  color: #1c86ff;
  text-decoration: none;
  font-size: 0.85rem;
}

.contact-for-pricing-btn:hover {
  text-decoration: underline;
}

.view-product-btn {
  display: inline-block;
  background-color: #fff;
  border: 1px solid #46b74b;
  color: #46b74b;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  text-decoration: none;
  font-size: 0.9rem;
  text-align: center;
  align-self: flex-end;
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.view-product-btn:hover {
  background: #46b74b;
  color: white;
}

/* Related media items styling */
.related-videos-grid,
.related-podcasts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.related-video-item,
.related-podcast-item {
  display: block;
  text-decoration: none;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  width: calc(50% - 15px);
  position: relative;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-video-item:hover,
.related-podcast-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-video-item:hover img,
.related-podcast-item:hover img {
  opacity: 0.9;
}

.related-video-item img,
.related-podcast-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  transition: opacity 0.3s ease;
  position: relative;
}

.related-video-item h4,
.related-podcast-item h4 {
  padding: 0.75rem;
  margin: 0;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
  background: #fff;
  position: relative;
  z-index: 2;
}

/* Play button for video/podcast thumbnails */
.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.play-button:before {
  content: '';
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid #fff;
  margin-left: 3px;
}

/* Category icon overlay for related items */
.related-video-item .category-icon-overlay,
.related-podcast-item .category-icon-overlay {
  position: absolute;
  top: 30%; /* Position in the middle of the image area */
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.related-video-item .category-icon-overlay img,
.related-podcast-item .category-icon-overlay img {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain !important;
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Make sure the thumbnail container has position relative for proper overlay positioning */
.related-video-item > img,
.related-podcast-item > img,
.related-video-item > div,
.related-podcast-item > div {
  position: relative;
  display: block;
  width: 100%;
}

/* No thumbnail placeholder */
.no-thumbnail-placeholder {
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background-color: #f0f0f0;
  position: relative;
}

/* Responsive adjustments for related items */
@media (max-width: 767px) {
  .related-video-item,
  .related-podcast-item {
    width: 100%;
  }
}
