/* Page background: fixed like Concepts, but dimmed to 20% */
.print-page {
    min-height: 100vh;
    position: relative;
    background-color: #ffffff; /* fallback */
    overflow-x: hidden;

    /* create a stacking context */
    isolation: isolate;
}

/* Background layer with opacity */
.print-page::before {
    content: "";
    position: fixed;
    inset: 0;

    background-image: url("../assets/img/permanent/print/BG.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    opacity: 0.2; /* 20% */
    z-index: -1;
    pointer-events: none;
}

/* Ensure this page scrolls normally */
html, body {
    height: auto;
    overflow-y: auto;
}

/* Same idea as Concepts: fixed nav top-left */
.back-to-permanent {
    position: fixed;
    top: 22px;
    left: 22px;
    z-index: 50;

    text-decoration: none;
    color: #1b56ff; /* museum-ish blue; tweak if you use a token elsewhere */
    font-weight: 600;
    letter-spacing: 0.01em;

    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);

    padding: 8px 12px;
}

/* Header (like Concepts) */
.print-header {
    width: 100vw;
    margin: 120px auto 80px;
    padding: 0 24px;
    text-align: center;

    transition: opacity 300ms ease, transform 300ms ease;
}

.print-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    color: #1f5cff;
    margin-bottom: 18px;
}

.print-description {
    font-size: 18px;
    line-height: 1.5;
    color: #5b5b5b;
}

/* The stack of images */
.print-stack {
    width: 80vw;
    margin-left: auto;
    margin-right: auto;

    display: flex;
    flex-direction: column;
    align-items: center; /* ensures children align to center */
    gap: 0;

    /* optional: makes the center alignment rock-solid */
    box-sizing: border-box;
}

.print-item {
    width: 100%;
    display: block;
    margin: 0 0 64px; /* bigger vertical gap between works */
}

/* Desktop layout: image + sticker share 80vw */
@media (min-width: 769px) {
    .print-item {
        display: grid;
        grid-template-columns: 1fr clamp(220px, 20vw, 320px);
        grid-template-areas: "media caption";
        align-items: end;
        column-gap: 22px;
    }

    .print-item.is-even {
        grid-template-columns: clamp(220px, 20vw, 320px) 1fr;
        grid-template-areas: "caption media";
    }

    .print-media {
        grid-area: media;
        width: 100%;
    }

    .print-media img {
        width: 100%;
        height: auto;
        display: block;
    }

    .print-caption {
        grid-area: caption;
        margin-bottom: 1vh;
        padding: 18px;

        background: rgba(255, 255, 255, 0.75);
        backdrop-filter: blur(8px);
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.10);
        border-radius: 2px;

        /* IMPORTANT: do not force left/right with justify-self anymore */
        width: 100%;
        max-width: 32vw;

        font-size: clamp(14px, 1.15vw, 18px);
        line-height: 1.35;
        color: rgba(0, 0, 0, 0.62);
        white-space: pre-line;
    }
}

@media (max-width: 768px) {
    .print-stack {
        width: 92vw;
    }

    .print-item {
        margin-bottom: 40px;
    }

    .print-media img {
        width: 100%;
        height: auto;
        display: block;
    }

    .print-caption {
        margin-top: 10px; /* small gap to image */
        padding: 0 16%;
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        text-align: center;

        font-size: clamp(14px, 4vw, 18px);
        line-height: 1.35;
        color: rgba(0, 0, 0, 0.55);

        /* forced line breaks still respected */
        white-space: pre-line;
    }
}
