/**
 * Album stack cards (twisted effect inspired by Elements-Stack-Effect-with-Pure-CSS3).
 */
.album-stack {
    margin-bottom: 24px;
}

.album-stack__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.album-stack__item {
    margin: 0;
}

.album-stack__card {
    position: relative;
    z-index: 1;
    display: block;
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    text-decoration: none;
    color: #173750;
    box-shadow: 0 8px 22px rgba(23, 55, 80, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-stack__card::before,
.album-stack__card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: #fff;
    border: 1px solid rgba(23, 55, 80, 0.08);
    box-shadow: 0 8px 22px rgba(23, 55, 80, 0.12);
    pointer-events: none;
    transition: transform 0.3s ease;
    z-index: -1;
}

.album-stack__card--twisted::before {
    transform: rotate(4deg);
}

.album-stack__card--twisted::after {
    transform: rotate(-4deg);
}

.album-stack__card:hover,
.album-stack__card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(23, 55, 80, 0.16);
}

.album-stack__card:hover::before,
.album-stack__card:hover::after,
.album-stack__card:focus-visible::before,
.album-stack__card:focus-visible::after {
    transform: rotate(0deg);
}

.album-stack__media {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f6fa;
}

.album-stack__media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.album-stack__meta {
    display: block;
    padding: 12px 6px 4px;
}

.album-stack__title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    color: #173750;
}

.album-stack__hidden {
    display: none;
}

.album-gallery__caption {
    color: #173750;
    text-align: left;
}

.album-gallery__caption h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
}

.album-gallery__caption p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #3c4a5a;
}

@media (max-width: 991.98px) {
    .album-stack__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .album-stack__list {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .album-stack__card,
    .album-stack__card::before,
    .album-stack__card::after {
        transition: none;
    }
}
