.navbar-nav {
  font-family: "Poppins", serif;
	font-style: normal;
  font-size: larger;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Alegreya", serif;
}

.card a {
  text-decoration: none;
  color: #222;
}

/* Smooth zoom effect on hover */
.hover-zoom {
    transition: transform 0.3s ease; /* smooth animation */
}

.hover-zoom:hover {
    transform: scale(1.05); /* slightly zoom in */
}

.card-body {
  padding: 0.5rem !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Slider container */
#year-slider {
  margin-top: 1rem;
  height: 24px;       /* total height including handles */
  padding: 0;         /* remove horizontal padding */
  box-sizing: border-box;
}

/* Track background */
#year-slider .noUi-target {
  height: 6px;               /* slim track */
  border-radius: 3px;
  background: #dee2e6;       /* light gray track */
  position: relative;
  top: 50%;                  /* align track vertically */
  transform: translateY(-50%);
}

/* Connected range (blue line) */
#year-slider .noUi-connect {
  background: var(--bs-secondary);
  height: 6px;
  border-radius: 3px;
}

/* Handles */
#year-slider .noUi-handle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bs-secondary);
  border: none;
  box-shadow: none;
  cursor: pointer;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Remove default handle bars */
#year-slider .noUi-handle::before,
#year-slider .noUi-handle::after {
  display: none;
}

/* Optional hover effect */
#year-slider .noUi-handle:hover {
  background: var(--bs-secondary-border-subtle);
}

/* Ensure slider fills container fully */
#year-slider .noUi-target,
#year-slider .noUi-connects {
  width: 100%;
}

.noUi-tooltip {
  bottom: 0;
}

#year-slider .noUi-target.slider-active .noUi-connect {
  background: var(--bs-success);
}

#year-slider .noUi-target.slider-active .noUi-handle {
  background: var(--bs-success);
  border-color: var(--bs-success);
}

.badge:has(> span#year-min-val), .badge:has(> span#year#year-max-val) {
  display: none;
}

.card-footer .badge, .card-footer a.badge {
  font-size: 0.7em;
  font-weight: 600;
}

.card-image-container {
    position: relative;
}

.card-excerpt {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #222;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    overflow-y: auto;
    max-height: 100%;
    transform: translateY(100%);
}

.card-image-container:hover .card-excerpt {
    opacity: 1;
    transform: translateY(0);
    height: 101%;
}

/* Aspect ratio containers */
.aspect-ratio-square {
    padding-bottom: 100%; /* 1:1 Aspect Ratio */
}

.aspect-ratio-blade {
    padding-bottom: 200%; /* 1:2 Aspect Ratio (height is double width) */
}

.aspect-ratio-poster {
    padding-bottom: 150%; /* 2:3 Aspect Ratio (height is 1.5 times width) */
}

.card-image-container.aspect-ratio-square,
.card-image-container.aspect-ratio-blade,
.card-image-container.aspect-ratio-poster {
    height: 0;
    position: relative;
    overflow: hidden;
}

.card-image-container.aspect-ratio-square img,
.card-image-container.aspect-ratio-blade img,
.card-image-container.aspect-ratio-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Scale up smaller images, crop larger ones */
    object-position: center; /* Center the image within the container */
}



/* Caret rotation for collapse */
.btn[aria-expanded="true"] .fa-caret-down {
    transform: rotate(180deg);
}
.btn .fa-caret-down {
    transition: transform 0.3s ease;
}

/* Text wrap around featured image */
.alignright {
    float: right;
    margin-left: 1.5em; /* Adjust as needed */
    margin-bottom: 1.5em; /* Adjust as needed */
    /* Removed max-width */
}

@media (max-width: 767.98px) { /* For mobile */
    .alignright {
        float: none;
        margin-left: 0;
        margin-bottom: 1em;
        max-width: 100%;
    }
}

/* Ensure oEmbed iframes are visible and correctly sized */
.wp-block-embed-youtube .wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000; /* Fallback background */
}

.wp-block-embed-youtube .wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.sub-category-card .card {
    border-top-right-radius: 0.375rem;
}

/* Styles for sub-category cards to ensure titles are visible */
.sub-category-card .card-image-container img {
    height: auto;
    object-fit: contain;
    object-position: center;
}

/* Folder-style notch for subcategory cards */
.sub-category-card .card-image-container::before {
    content: '';
    position: absolute;
    top: -1px;
    right: -1px;
    width: 45px;
    height: 30px;
    background-color: var(--bs-primary);
    border-bottom-left-radius: 0.375rem;
    border-top-right-radius: 0.375rem;
    box-shadow: -2px 2px 5px rgba(0,0,0,0.05);
}

.sub-category-card .folder-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    color: white;
    font-size: 1rem;
}
