/* Shared album cards (home Photo Gallery carousel + /gallery page) */
.home-gallery-card-wrap {
    padding: 8px 6px 16px;
    height: 100%;
}

.home-gallery-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8ece9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform .25s ease, box-shadow .25s ease;
}

.home-gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(18, 107, 54, 0.18);
}

.home-gallery-thumb {
    display: block;
    overflow: hidden;
    height: 200px;
    background: #eef2ef;
}

.home-gallery-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform .4s ease;
}

.home-gallery-card:hover .home-gallery-thumb img {
    transform: scale(1.06);
}

.home-gallery-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 16px 16px 18px;
    border-top: 3px solid #126b36;
}

/* description: max 3 lines, then ... */
.home-gallery-desc {
    margin: 0 0 14px;
    font-size: 14.5px;
    line-height: 1.5;
    color: #444;
    text-align: left;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    min-height: 4.5em; /* always reserve 3 lines so all cards are equal */
}

.home-gallery-link {
    margin-top: auto;
    align-self: flex-start;
    font-size: 14px;
    font-weight: 700;
    color: #126b36;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}

.home-gallery-link i {
    margin-left: 4px;
    transition: margin-left .2s ease;
}

.home-gallery-link:hover,
.home-gallery-link:focus {
    color: #f08c00;
    border-bottom-color: #f08c00;
    text-decoration: none;
}

.home-gallery-link:hover i {
    margin-left: 9px;
}

@media (max-width: 575px) {
    .home-gallery-thumb {
        height: 220px;
    }
}

/* Grid layout used on the /gallery page */
.gallery-cards-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.gallery-cards-grid .home-gallery-card-wrap {
    width: 25%;
    padding: 10px;
    display: flex;
}

@media (max-width: 991px) {
    .gallery-cards-grid .home-gallery-card-wrap {
        width: 50%;
    }
}

@media (max-width: 575px) {
    .gallery-cards-grid .home-gallery-card-wrap {
        width: 100%;
    }
}
