/* =========================================================
   교회 홈페이지 행사앨범 최신글
========================================================= */

.church-album-latest {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 96px 24px 108px;
    background: #ffffff;
}

.church-album-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

/* =========================================================
   썸네일 배열
========================================================= */

.church-album-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.church-album-item {
    min-width: 0;
}

.church-album-item > a {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid #ececec;
    background: #f5f5f5;
    text-decoration: none;
}

.church-album-image {
    width: 100%;
    height: 100%;
}

.church-album-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition:
        transform 0.55s ease,
        filter 0.4s ease;
}

.church-album-item > a:hover .church-album-image img {
    transform: scale(1.08);
    filter: brightness(0.72);
}

/* =========================================================
   썸네일 마우스 오버 제목
========================================================= */

.church-album-hover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 7px;
    padding: 18px 15px;
    color: #ffffff;
    background:
        linear-gradient(
            to top,
            rgba(0, 0, 0, 0.72) 0%,
            rgba(0, 0, 0, 0.12) 54%,
            rgba(0, 0, 0, 0) 100%
        );
    opacity: 0;
    transform: translateY(8px);
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.church-album-item > a:hover .church-album-hover {
    opacity: 1;
    transform: translateY(0);
}

.church-album-hover strong {
    overflow: hidden;
    display: -webkit-box;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    letter-spacing: -0.04em;
    text-overflow: ellipsis;
    word-break: keep-all;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.church-album-hover span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    letter-spacing: 0.02em;
}

/* =========================================================
   이미지가 없을 때
========================================================= */

.church-album-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #9faab0;
    background:
        linear-gradient(
            135deg,
            #f4f7f8 0%,
            #eef3f5 100%
        );
}

.church-album-noimage span {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

/* =========================================================
   오른쪽 행사앨범 카드
========================================================= */

.church-album-more {
    position: relative;
    min-width: 0;
    padding: 14px 14px 0 0;
}

.church-album-more::before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 14px;
    left: 14px;
    z-index: 0;
    border: 1px solid #e4e4e4;
    background: #ffffff;
    content: "";
}

.church-album-more > a {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    padding: 14px;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    background:
        linear-gradient(
            145deg,
            #694157 0%,
            #694157 100%
        );
    box-shadow: 9px 12px 12px rgba(0, 0, 0, 0.14);
    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.church-album-more > a::before,
.church-album-more > a::after {
    position: absolute;
    content: "";
    opacity: 0.11;
}

.church-album-more > a::before {
    top: 0;
    left: 0;
    width: 72%;
    height: 56%;
    background: rgba(255, 255, 255, 0.45);
    clip-path: polygon(
        0 0,
        100% 0,
        45% 100%,
        0 66%
    );
}

.church-album-more > a::after {
    right: 0;
    bottom: 0;
    width: 82%;
    height: 52%;
    background: rgba(0, 84, 135, 0.5);
    clip-path: polygon(
        40% 0,
        100% 33%,
        100% 100%,
        0 100%
    );
}

.church-album-more > a:hover {
    transform: translateY(-7px);
    box-shadow: 11px 17px 17px rgba(0, 0, 0, 0.17);
}

.church-album-more__church,
.church-album-more__title,
.church-album-more__line,
.church-album-more__view {
    position: relative;
    z-index: 2;
}

.church-album-more__church {
    font-size: 19px;
    font-weight: 400;
    letter-spacing: -0.06em;
}

.church-album-more__title {
    margin-top: 9px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.07em;
}

.church-album-more__line {
    width: 25px;
    height: 1px;
    margin-top: 17px;
    background: rgba(255, 255, 255, 0.72);
}

.church-album-more__view {
    margin-top: 11px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.16em;
    opacity: 0;
    transform: translateY(5px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.church-album-more > a:hover .church-album-more__view {
    opacity: 0.85;
    transform: translateY(0);
}

/* =========================================================
   배경 장식
========================================================= */

.church-album-deco {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.deco-circle,
.deco-leaf {
    position: absolute;
    display: block;
}

.deco-circle {
    border-radius: 50%;
}

.deco-circle--01 {
    top: 43%;
    left: 14%;
    width: 26px;
    height: 26px;
    background: #8aad74;
}

.deco-circle--02 {
    top: 52%;
    left: 13%;
    width: 43px;
    height: 43px;
    background: rgba(235, 186, 192, 0.6);
}

.deco-circle--03 {
    top: 37%;
    right: 13%;
    width: 19px;
    height: 19px;
    background: rgba(168, 117, 190, 0.72);
}

.deco-circle--04 {
    right: 8%;
    bottom: 25%;
    width: 32px;
    height: 32px;
    background: rgba(241, 180, 107, 0.62);
}

.deco-leaf {
    width: 32px;
    height: 64px;
    border-radius: 100% 0 100% 0;
}

.deco-leaf--01 {
    bottom: 14%;
    left: 4%;
    background: rgba(232, 154, 81, 0.48);
    transform: rotate(34deg);
}

.deco-leaf--02 {
    top: 17%;
    right: 7%;
    width: 25px;
    height: 52px;
    background: rgba(108, 153, 88, 0.34);
    transform: rotate(-40deg);
}

/* =========================================================
   태블릿
========================================================= */

@media screen and (max-width: 1024px) {
    .church-album-latest {
        padding: 76px 22px 88px;
    }

    .church-album-grid {
        gap: 12px;
    }

    .church-album-more__church {
        font-size: 17px;
    }

    .church-album-more__title {
        font-size: 23px;
    }
}

/* =========================================================
   모바일
========================================================= */

@media screen and (max-width: 767px) {
    .church-album-latest {
        padding: 52px 16px 68px;
    }

    .church-album-inner {
        max-width: 520px;
    }

    .church-album-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    /*
       모바일에서는 터치 환경이므로
       제목을 항상 은은하게 표시합니다.
    */
    .church-album-hover {
        gap: 3px;
        padding: 12px 10px;
        opacity: 1;
        transform: none;
    }

    .church-album-hover strong {
        font-size: 13px;
    }

    .church-album-hover span {
        font-size: 10px;
    }

    /*
       마지막 행사앨범 카드는 가운데에 배치합니다.
    */
    .church-album-more {
        grid-column: 1 / -1;
        justify-self: center;
        width: min(100%, 245px);
        margin-top: 8px;
    }

    .church-album-more__church {
        font-size: 18px;
    }

    .church-album-more__title {
        font-size: 25px;
    }

    .deco-circle--01 {
        top: 43%;
        left: 3%;
        width: 18px;
        height: 18px;
    }

    .deco-circle--02 {
        top: 50%;
        left: 1%;
        width: 28px;
        height: 28px;
    }

    .deco-circle--03 {
        top: 35%;
        right: 2%;
        width: 15px;
        height: 15px;
    }

    .deco-leaf--01 {
        bottom: 6%;
        left: -7px;
        width: 24px;
        height: 48px;
    }

    .deco-leaf--02 {
        top: 9%;
        right: -7px;
    }
}