/* ============================================
   Scrapbook Gallery – Block Component
   Polaroid-style photo gallery with tape,
   rotations, and stagger effects
   ============================================ */

.scrapbook-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-4);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

@media (min-width: 768px) {
    .scrapbook-gallery {
        gap: var(--space-8);
    }
}

/* Individual polaroid card */
.scrapbook-gallery__item {
    position: relative;
    background-color: var(--color-white);
    padding: var(--space-3);
    padding-bottom: var(--space-8);
    box-shadow: var(--shadow-floating);
    border: 1px solid var(--color-ink-10);
    width: 16rem;
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    z-index: 1;
}

.scrapbook-gallery__item:hover {
    transform: rotate(0deg) scale(1.05) !important;
    z-index: 20;
    box-shadow: var(--shadow-xl);
}

/* Tape decoration on each card */
.scrapbook-gallery__item::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    width: 100px;
    height: 30px;
    background-color: var(--color-tape);
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    border-left: 1px solid var(--color-tape-border);
    border-right: 1px solid var(--color-tape-border);
    z-index: 10;
}

/* Rotation variants */
.scrapbook-gallery__item--rotate-left {
    transform: rotate(-2deg);
}

.scrapbook-gallery__item--rotate-right {
    transform: rotate(3deg);
}

.scrapbook-gallery__item--straight {
    transform: rotate(-1deg);
}

/* Offset variant for stagger effect */
.scrapbook-gallery__item--offset {
    margin-top: var(--space-8);
}

/* Image area */
.scrapbook-gallery__image {
    aspect-ratio: 1 / 1;
    background-color: var(--color-ink-10);
    overflow: hidden;
}

.scrapbook-gallery__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Caption below the image */
.scrapbook-gallery__caption {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    color: var(--color-ink-70);
    text-align: center;
    margin-top: var(--space-3);
    line-height: 1.3;
}
