/* ==========================================================================
   Media grid (videos + photo albums): category filters, "load more" button, album card
   ========================================================================== */

/* ---------- Category filters ---------- */
.media-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 24px;
}

.media-filters__btn {
    appearance: none;
    padding: 6px 14px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: var(--Mapping-Text-Heading-text-heading-secondary, #19421F);
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s, color .2s;
}



.media-filters__btn.is-active {
    background: #6F9B7A;
    color: #fff;
}



/* While the new cards are loading. */
.media-grid {
    transition: opacity .2s;
}

.media-grid.is-loading {
    opacity: .5;
    pointer-events: none;
}

/* Tablet and mobile: the filters scroll sideways in one line. */
@media (max-width: 992px) {
    .media-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .media-filters::-webkit-scrollbar {
        display: none;
    }

    .media-filters__btn {
        flex: 0 0 auto;
        padding: 12px 14px;

    }
}

/* ---------- "Load more" button ---------- */
.media-more {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

/* The display above must not beat the hidden attribute. */
.media-more[hidden] {
    display: none;
}

.media-more__btn {
    appearance: none;
    padding: 12px 32px;
    color: #177D43;
    font-family: inherit;
    font-size: 14px;
    line-height: 22px;
    font-weight: 600;
    cursor: pointer;
    border: 0;
    background: transparent;
    text-decoration: underline;
}


.media-more__btn:focus-visible {
    outline: 2px solid var(--Brand-Clover-Green-400, #54A65F);
    outline-offset: 2px;
}

.media-more__btn.is-loading {
    opacity: .6;
    cursor: progress;
}

/* ---------- Album card (format Gallery) ---------- */
.media-grid.gallery-grid{
    gap:24px !important
}


#main-content .media-grid__item.media-grid__item--gallery{
   width: calc((100% - var(--custom-gap-24)) / 2) !important;
}
.gallery-card {
    display: flex;
    flex-direction: column;

    height: 100%;
}

.gallery-card.is-loading {
    opacity: .7;
    cursor: progress;
}

.gallery-card__cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 9;
    background: #E6EAE4;
    margin-bottom: 12px;
}
.gallery-card__cover:after {
    content: "";
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.00) 45%, rgba(0, 0, 0, 0.56) 70%, rgba(8, 12, 10, 0.80) 100%);
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

.gallery-card__trigger {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.gallery-card__cover:hover .gallery-card__img {
    transform: scale(1.04);
}

.gallery-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

/* Number of photos: the lime badge next to the category badge. */
.gallery-card__count {
    display: inline-block;
    padding: 2px 8px 4px 8px;
    border-radius: 4px;
    background: var(--Gradient-brand-lime-to-clover, linear-gradient(90deg, var(--Brand-Lemon-Lime-400, #CEDE47) 0%, var(--Brand-Clover-Green-400, #54A65F) 100%));
    color: var(--Mapping-Text-Heading-text-heading-primary, #0E391C);
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
}

.gallery-card__title {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    color: var(--Mapping-Text-Heading-text-heading-primary, #19421F);

}

.gallery-card__title-link {
    color: var(--Mapping-Text-Heading-text-heading-secondary, #19421F);
    text-decoration: none;
}

.gallery-card__title-link:hover {
    color: var(--Mapping-Text-Heading-text-heading-primary, #0E391C);
}
@media (min-width: 992px) {
.is-sticky .site-navigation .navbar-nav .nav-item.dropdown.mega-menu-parent > .dropdown-menu{
    right: -80px !important;
}
}

@media (max-width: 992px) {
  .media-grid{
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    gap: 16px;
    justify-content: flex-start !important;
    -webkit-overflow-scrolling: touch;
}  
    .media-grid .media-grid__item{
    min-width: 340px !important;
    max-width: 340px !important;
    flex: 0 0 340px !important;
    scroll-snap-align: start;
    margin: 0 !important;

}
  .media-grid .video-card__cover,
  .media-grid .gallery-card__cover{
    height: 163px; 
  }

  .media-grid::-webkit-scrollbar {
        display: none;
        width: 0 !important;
   }

   .gallery-card__title {
    font-size: 14px;
    line-height: 22px;
   }

   .media-grid .video-card__title {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 22px;
  color: var(--Mapping-Text-Heading-text-heading-secondary, #19421F);

}

}

@media (max-width: 767px) {
.media-grid  .media-grid__item{
    min-width: 290px !important;
    max-width: 290px !important;
    flex: 0 0 290px !important;
    scroll-snap-align: start;

}
}