.album-card {
    cursor: pointer;
}

.album-card:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

.album-card .album-body::after {
    content: "Открыть альбом →";
    display: inline-block;
    margin-top: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--blue);
    transition: transform var(--transition);
}

.album-card:hover .album-body::after {
    transform: translateX(4px);
}

.album-view {
    animation: albumFadeIn 0.35s ease;
}

.album-view[hidden] {
    display: none;
}

@keyframes albumFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.album-view-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px 28px;
    margin-bottom: 24px;
}

.album-view-back {
    cursor: pointer;
    font-family: inherit;
}

.album-view-titles {
    flex: 1 1 260px;
}

.album-view-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1.25;
    margin-bottom: 4px;
    text-align: left;
}

.photo-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 185px;
    grid-auto-flow: dense;
    gap: 14px;
}

.photo-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: none;
    padding: 0;
    background: #0f1f36;
    box-shadow: 0 6px 18px rgba(15, 31, 54, 0.12);
    cursor: zoom-in;
    font-family: inherit;
    display: block;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.4s ease, transform 0.4s ease, box-shadow var(--transition);
}

.photo-thumb.is-in {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.photo-thumb--featured {
    grid-column: span 2;
    grid-row: span 2;
}

.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.photo-thumb-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 14px 11px;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 22, 40, 0.86) 100%);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

@media (hover: hover) {
    .photo-thumb:hover {
        box-shadow: 0 14px 32px rgba(15, 31, 54, 0.24);
    }

    .photo-thumb:hover img {
        transform: scale(1.04);
    }

    .photo-thumb:hover .photo-thumb-caption {
        opacity: 1;
    }
}

.photo-thumb:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 2px;
}

.photo-thumb:focus-visible .photo-thumb-caption {
    opacity: 1;
}
