.youtube-video {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.youtube-thumbnail-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.youtube-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background-color: rgba(31, 31, 31, 0.8);
    border-radius: 14px;
    transition: background-color 0.3s;
}

.youtube-play-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent #fff;
}

.youtube-thumbnail-wrapper:hover .youtube-play-button {
    background-color: #ff0000;
}

.youtube-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube-container {
  display: block;
  margin: 20px auto;
  max-width: 600px;
  width: 100%;

  &.shorts {
    height: 450px;

    .youtube-video {
      padding-bottom: 0;
      overflow: visible;

      .youtube-thumbnail {
        width: 100%;
        height: 450px;
      }
    }
  }
}

.youtube-video {
  display: block;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

img.youtube-thumbnail {
  display: block;
  margin: auto;
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 10px;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

div.youtube-play {
  height: 68px;
  width: 68px;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -34px;
  opacity: 1;
  background: url('/wp-content/themes/understrap-child/images/icons/play.svg') no-repeat center center;
  transition: opacity 0.2s;
  /* Add a smooth hover effect */
}

div.youtube-play:hover {
  opacity: 1;
}

#youtube-iframe {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* Mobile menu styles */
#mobile-menu .menu-item {
    @apply block px-3 py-2 text-base font-medium text-gray-700 hover:text-primary hover:bg-gray-50 rounded-lg transition-colors;
}

#mobile-menu .current-menu-item {
    @apply text-primary bg-primary/5;
}

/* Animation for mobile menu */
#mobile-menu div:not(.hidden) {
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pagination styles (Tailwind-compatible for Understrap) */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-item .page-link:hover {
    color: var(--color-primary, #3b82f6);
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.page-item.active .page-link {
    color: #fff;
    background-color: var(--color-primary, #3b82f6);
    border-color: var(--color-primary, #3b82f6);
}

.page-item.disabled .page-link {
    color: #9ca3af;
    background-color: #f9fafb;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
}

/* Prev/Next arrows */
.page-item:first-child .page-link,
.page-item:last-child .page-link {
    padding: 0.5rem 1rem;
}

/* Screen reader text */
.page-link .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}