/* =========================================================
   IMAGE PDS
========================================================= */

.wm-pds-section {
    width: 100%;
}


/* =========================================================
   MASONRY GALLERY
========================================================= */

.wm-pds-gallery {
    column-count: 4;
    column-gap: 14px;
    margin-top: 24px;
}

.wm-pds-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 14px;

    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

.wm-pds-link {
    position: relative;

    display: block;
    width: 100%;

    overflow: hidden;

    border-radius: 8px;
    background: #f3f3f3;

    text-decoration: none;
}


/* =========================================================
   IMAGE
========================================================= */

.wm-pds-image {
    display: block;

    width: 100%;
    height: auto;

    transition: transform 0.25s ease;
}


/* =========================================================
   HOVER OVERLAY
========================================================= */

.wm-pds-overlay {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    box-sizing: border-box;

    width: 100%;

    padding: 50px 14px 12px;

    color: #fff;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0),
            rgba(0, 0, 0, 0.72)
        );

    opacity: 0;

    transition: opacity 0.2s ease;
}


.wm-pds-link:hover .wm-pds-overlay {
    opacity: 1;
}


.wm-pds-link:hover .wm-pds-image {
    transform: scale(1.02);
}


/* =========================================================
   TITLE
========================================================= */

.wm-pds-title {
    display: block;

    min-width: 0;

    overflow: hidden;

    padding-right: 15px;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;

    color: #fff;

    white-space: nowrap;
    text-overflow: ellipsis;

    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}


/* =========================================================
   WRITER
========================================================= */

.wm-pds-writer {
    flex: 0 0 auto;

    display: block;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;

    color: #fff;

    white-space: nowrap;

    opacity: 0.9;

    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1280px) {

    .wm-pds-gallery {
        column-count: 4;
    }

}


@media (max-width: 1024px) {

    .wm-pds-gallery {
        column-count: 3;
    }

}


@media (max-width: 768px) {

    .wm-pds-gallery {
        column-count: 2;
        column-gap: 10px;
    }

    .wm-pds-item {
        margin-bottom: 10px;
    }

}


@media (max-width: 600px) {

    .wm-pds-gallery {
        column-gap: 8px;
    }

    .wm-pds-item {
        margin-bottom: 8px;
    }

    .wm-pds-overlay {
        padding: 40px 10px 9px;

        /*
         * 모바일은 hover가 없으므로 항상 표시
         */
        opacity: 1;
    }

    .wm-pds-title {
        padding-right: 8px;

        font-size: 13px;
    }

    .wm-pds-writer {
        font-size: 11px;
    }

}


@media (max-width: 480px) {

    .wm-pds-gallery {
        column-count: 2;
        column-gap: 6px;

        margin-top: 16px;
    }

    .wm-pds-item {
        margin-bottom: 6px;
    }

    .wm-pds-link {
        border-radius: 5px;
    }

}