.gallery-filter-heading {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 25px;
    color: #292929;
    margin-bottom: 59px;
    font-family: 'open_sansregular';
}
.gallery-filter-subheading {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 18px;
    color: #8a9baa;
    margin-bottom: 28px;
    font-weight: bold;
    font-family: 'montserratbold';
}
.project-type-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 0 30px;
    list-style: none;
    justify-content: center;
    align-items: center;
}
.project-type-card {
    position: relative;
    flex: 0 0 calc(25% - 15px);
    height: 150px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    text-decoration: none;
    cursor: pointer;
    background-color: #d0d5d8;
    transition: height 0.3s ease, margin 0.3s ease;
}
.project-type-card:hover {
    height: 190px;
    margin-top: -20px;
    margin-bottom: -20px;
}
.project-type-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-type-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgb(0 0 0 / 59%));
    transition: background-color 0.3s ease;
    z-index: 1;
}
.project-type-card:hover .project-type-card__overlay {
    background: linear-gradient(to bottom, rgba(var(--cat-color-rgb), 0.35), rgba(var(--cat-color-rgb), 0.98));
}
.project-type-card__content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    padding: 15px;
}
.project-type-card__title {
    color: #fff;
    font-size: 21px;
    line-height: 1.3;
    font-family: 'montserratbold';
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.project-type-card__arrow {
    flex-shrink: 0;
    margin-left: 10px;
    width: 18px;
    height: 14px;
    position: relative;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
    background: url('https://www.aquadam.net/content/themes/aquadam/assets/img/arrow_cool_down_white.png') no-repeat center / contain;
}
.project-type-card:hover .project-type-card__arrow {
    transform: rotate(90deg);
}
@media (max-width: 991px) {
    .project-type-card {
        flex: 0 0 calc(50% - 10px);
        height: 140px;
    }
    .project-type-card:hover {
        height: 180px;
        margin-top: -20px;
        margin-bottom: -20px;
    }
}
@media (max-width: 575px) {
    .project-type-card {
        flex: 0 0 100%;
        height: 120px;
    }
    .project-type-card:hover {
        height: 155px;
        margin-top: -4.5px;
        margin-bottom: -3.5px;
    }
}

/* Toggled / active parent card */
.project-type-card.toggled .project-type-card__overlay {
    background: linear-gradient(to bottom, rgba(var(--cat-color-rgb), 0.35), rgba(var(--cat-color-rgb), 0.98));
}
.project-type-card.toggled .project-type-card__arrow {
    transform: rotate(90deg);
}

/* Subcategory row */
.subcategory-row {
    text-align: center;
    padding: 10px 0 30px;
}

/* Subcategory pills */
.subcategory-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.subcategory-pill {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 8px;
    color: var(--active-color);
    background: rgba(var(--active-color-rgb), 0.12);
    text-decoration: none;
    font-family: 'montserratbold';
    font-size: 14px;
    transition: background 0.3s ease, color 0.3s ease;
}
.subcategory-pill:hover,
.subcategory-pill.active {
    background: var(--active-color);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

h1.gallery-filter-heading-main {
    text-align: center;
    font-size: 50px;
}

/* Results count */
.gallery-results-count {
    font-size: 18px;
    letter-spacing: 1px;
    color: #333;
    margin-bottom: 20px;
    font-family: 'montserratbold';
}

/* Gallery grid — 2-column masonry */
.gallery-grid {
    column-count: 2;
    column-gap: 16px;
}
.gallery-card {
    display: block;
    position: relative;
    break-inside: avoid;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    text-decoration: none;
    background: #d0d5d8;
    transition: transform 0.3s ease;
}
.gallery-card:hover {
    transform: scale(1.02);
    text-decoration: none;
    box-shadow: 0 4px 12px rgb(0 0 0 / 75%);
}
.gallery-card--hidden {
    display: none;
}

.gallery-grid--loading {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Card image */
.gallery-card__img {
    display: block;
    line-height: 0;
}
.gallery-card__img img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gradient overlay */
.gallery-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(var(--card-color-rgb), 0) 0%, rgba(var(--card-color-rgb), 0.29) 50%, rgba(var(--card-color-rgb), 0.85) 100%);
    z-index: 1;
    transition: background 0.3s ease;
}
.gallery-card:hover .gallery-card__overlay {
    background: linear-gradient(
        to bottom,
        rgba(var(--card-color-rgb), 0.25) 0%,
        rgba(var(--card-color-rgb), 0.6) 50%,
        rgba(var(--card-color-rgb), 0.95) 100%
    );
}

/* Card content (year, title, arrow) */
.gallery-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 20px;
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
}
.gallery-card__text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}
.gallery-card__year {
    display: block;
    color: #fff;
    font-size: 18px;
    font-family: 'open_sansregular', sans-serif;
    letter-spacing: 1px;
    margin-bottom: 0px;
    opacity: 0.9;
}
.gallery-card__title {
    display: block;
    color: #fff;
    font-size: 18px;
    line-height: 1.25;
    font-family: 'montserratbold', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}
.gallery-card__arrow {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    width: 20px;
    height: 14px;
    position: relative;
    margin-left: 12px;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    background: url('https://www.aquadam.net/content/themes/aquadam/assets/img/arrow_cool_down_white.png') no-repeat center / contain;
}
.gallery-card:hover .gallery-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Load More button */
.gallery-load-more-wrap {
    text-align: center;
    padding: 40px 0 20px;
}
.gallery-load-more {
    display: inline-block;
    padding: 14px 14px;
    background: #0097a7;
    color: #fff;
    border: none;
    border-radius: 11px;
    font-family: 'montserratbold', sans-serif;
    font-size: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;
    border: 2px solid #0097a7;
}
.gallery-load-more:hover {
    background-color: #fff;
    color: #0097a7;
}

/* Prevent 100vw from exceeding visible viewport on mobile devices */
.page-content.page-gallery {
    padding-bottom: 90px;
}

/* Gallery layout with sidebar */
.gallery-layout {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(220px, 1fr);
    gap: 16px;
    align-items: start;
}
.gallery-layout__main {
    grid-column: 1 / 3;
    grid-row: 1;
    min-width: 0;
    position: relative;
}
.gallery-results-count {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    margin: 0;
}
.gallery-grid::before {
    content: '';
    display: block;
    break-inside: avoid;
    height: 36px;
}
.gallery-layout__sidebar {
    grid-column: 3 / 4;
    grid-row: 1;
    background: #E7E7F1;
    border-radius: 16px;
    padding: 24px 36px;
    position: sticky;
    top: 100px;
}

/* Related Videos heading */
.related-videos__heading {
    font-family: 'merriweatherbold';
    font-size: 24px;
    line-height: 1.3;
    color: #292929;
    margin: 35px 0 30px;
    text-align: center;
}

/* Related Video list */
.related-videos__list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 20px;
}

/* Individual video card */
.related-video-card {
    display: block;
    position: relative;
    text-decoration: none;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.related-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-decoration: none;
}
.related-video-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 145px;
    background: linear-gradient(to bottom, rgba(var(--active-color-rgb), 0.35), rgba(var(--active-color-rgb), 0.98));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px 10px 0 0;
}
.related-video-card:hover::before {
    opacity: 1;
}
.related-video-card__img {
    display: block;
    width: 100%;
    height: 145px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}
.related-video-card__info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 12px;
    gap: 8px;
}
.related-video-card__title {
    font-family: 'montserratbold';
    font-size: 15px;
    line-height: 1.35;
    color: #292929;
    flex: 1;
    min-width: 0;
    transition: color 0.3s ease;
}
.related-video-card:hover .related-video-card__title {
    color: var(--active-color);
    font-family: 'montserratbold', sans-serif;
}
.related-video-card__arrow {
    flex-shrink: 0;
    width: 18px;
    height: 14px;
    position: relative;
    display: flex;
    align-items: center;
    background: url('https://www.aquadam.net/content/themes/aquadam/assets/img/arrow_cool_down_green.png') no-repeat center / contain;
}

/* Slider nav — hidden on desktop */
.rv-slider-nav {
    display: none;
}

/* CTA button */
.related-videos__cta {
    display: block;
    text-align: center;
    padding: 10px 19px;
    background: #0097a7;
    color: #fff;
    border-radius: 8px;
    font-family: 'montserratbold', sans-serif;
    font-size: 16px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s ease;
    border: 2px solid #0097a7;
    margin-bottom: 28px;
    margin-top: 30px;
}
.related-videos__cta:hover {
    background-color: #fff;
    color: #0097a7;
}

/* Loading / empty states */
.related-videos__loading,
.related-videos__empty {
    font-family: 'open_sansregular', sans-serif;
    font-size: 14px;
    color: #8a9baa;
    text-align: center;
    padding: 20px 0;
    margin: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .gallery-card__arrow {
        opacity: 1;
        transform: translateX(0);
    }
    .gallery-layout {
        grid-template-columns: 1fr;
    }
    .gallery-layout__main {
        grid-column: auto;
        grid-row: auto;
        position: static;
    }
    .gallery-results-count {
        position: static;
        margin-bottom: 20px;
    }
    .gallery-grid::before {
        display: none;
    }
    .gallery-layout__sidebar {
        grid-column: auto;
        grid-row: auto;
        position: static;
    }

    /* Related Videos — full-bleed background on mobile */
    .gallery-layout__sidebar {
        position: relative;
        left: 50%;
        right: 50%;
        width: 100vw;
        margin-left: -50vw;
        margin-right: -50vw;
        border-radius: 0;
        overflow: hidden;
        padding: 30px 20px;
        box-sizing: border-box;
    }
    .related-videos__heading {
        font-size: 28px;
    }
    .related-videos__heading br {
        display: none;
    }
    .related-videos__list {
        margin: 0 -20px 0;
    }
    .related-videos__list .slick-track {
        display: flex !important;
    }
    .related-videos__list .slick-slide {
        padding: 0 10px;
        height: auto !important;
    }
    .related-videos__list .slick-slide > div {
        height: 100%;
    }
    .related-videos__list .related-video-card {
        display: flex;
        flex-direction: column;
        height: 100%;
    }
    .related-videos__list .related-video-card__img {
        height: 160px;
    }
    .related-videos__list .related-video-card__title {
        font-size: 18px;
    }
    .related-videos__list .related-video-card__info {
        min-height: 130px;
        display: flex;
        align-items: center;
        padding: 8px 18px;
    }
    .related-videos__list .related-video-card__arrow {
        height: 21px;
    }

    /* Slider nav (arrows) */
    .rv-slider-nav {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 16px;
        margin: 24px 0;
    }
    .rv-slider-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: none;
        background: #fff;
        cursor: pointer;
        padding: 0;
        position: relative;
    }
    .rv-slider-arrow span {
        display: none;
    }
    .rv-slider-arrow--next {
        background: url('https://www.aquadam.net/content/themes/aquadam/assets/img/arrow_cool_down-teal-right.png') no-repeat center / 18px auto, #fff;
    }
    .rv-slider-arrow--prev {
        background: url('https://www.aquadam.net/content/themes/aquadam/assets/img/arrow_cool_down-teal-left.png') no-repeat center / 18px auto, #fff;
    }
}
@media (max-width: 575px) {
    .gallery-grid {
        column-count: 1;
    }
    .gallery-card__title {
        font-size: 16px;
    }
}

/* Lightbox thumbnail strip */
.goverlay {
    padding-bottom: 80px !important;
    box-sizing: border-box;
}
