/* ── Project Detail – Editorial Layout ── */

.pd {
    padding: 6vh 0 10vh;
    width: 100%;
    margin: 0 -3vw;
}

/* ── Canvas: the full page area (text + images together) ── */
.pd__canvas {
    position: relative;
    width: 100%;
    min-height: 80vw;
    margin-bottom: 4vh;
}

/* ── Text column – positioned inside the canvas, top-right ── */
.pd__text-col {
    position: relative;
    z-index: 2;
    max-width: 50%;
    padding: 4vh 4vw 0;
    pointer-events: none;
    opacity: 0;
    transform: translateY(2vw);
    animation: pd-text-in 0.9s ease forwards;
    animation-delay: 0.2s;
}

@keyframes pd-text-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pd__title {
    font-family: var(--font-heading);
    font-size: 2.2vw;
    line-height: 1.15;
    margin-bottom: 2vh;
}

.pd__desc {
    font-family: var(--font-body);
    font-size: 0.9vw;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: 3vh;
}

.pd__desc p {
    margin-bottom: 0.8vh;
}

.pd__meta {
    display: flex;
    flex-direction: column;
    gap: 2.5vh;
    padding-top: 2vh;
}

.pd__meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.3vh;
}

.pd__meta-item h3 {
    font-family: var(--font-body);
    font-size: 0.9vw;
    font-weight: 600;
    color: var(--text-primary);
}

.pd__meta-item span {
    font-size: 0.9vw;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ── Free-positioned images (absolute inside canvas) ── */
.pd__free-slot {
    position: absolute;
    overflow: hidden;
    opacity: 0;
    transform: translateY(4vw);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.pd__free-slot.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pd__free-slot img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.pd__free-slot:hover img {
    transform: scale(1.03);
}

/* ── Fallback grid layout ── */
.pd__canvas--grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    min-height: auto;
}

.pd__grid-slot {
    flex: 0 0 50%;
    overflow: hidden;
    opacity: 0;
    transform: translateY(4vw);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.pd__grid-slot.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.pd__grid-slot:first-child {
    flex: 0 0 100%;
}

.pd__grid-slot img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.pd__grid-slot:hover img {
    transform: scale(1.03);
}

/* ── Actions ── */
.pd__actions {
    display: flex;
    justify-content: center;
    gap: 1.5vw;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .pd {
        padding: 4vh 4vw 8vh;
    }

    .pd__text-col {
        max-width: 100%;
        padding-top: 2vh;
    }

    .pd__title {
        font-size: 7vw;
    }

    .pd__desc {
        font-size: 3.5vw;
    }

    .pd__canvas {
        min-height: auto;
    }

    .pd__free-slot {
        position: relative !important;
        width: 100% !important;
        left: auto !important;
        top: auto !important;
        margin-bottom: 3vw;
    }

    .pd__canvas--grid .pd__grid-slot {
        flex: 0 0 100%;
    }

    .pd__actions {
        flex-direction: column;
        align-items: center;
        gap: 2vh;
    }
}
