

/* ========================================
   GALLERY : 기본 설정
======================================== */

.rac-gallery {
    --rac-scale-min: 0.72;
    --rac-gap: 18vh;
    --rac-visual-width: 68%;
    --rac-content-width: 32%;

    width: 100%;
    overflow: clip;
    color: #1d1d1f;
    background: #f1f1f1;
}

.rac-gallery,
.rac-gallery * {
    box-sizing: border-box;
}

.rac-gallery a {
    text-decoration: none;
}

/* ========================================
   상단 제목 영역
======================================== */

.rac-gallery .rac-gallery-heading {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 70px 5vw 45px;
}

.rac-gallery .rac-gallery-title {
    font-size: clamp(28px, 4vw, 56px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.05em;
    word-break: keep-all;
	
}

.rac-gallery .rac-gallery-title span {
    display: block;
    margin-top: 14px;
    font-size: clamp(14px, 1.5vw, 21px);
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.03em;
}

.rac-gallery .rac-gallery-more {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    border-radius: 30px;
    background: #1d30d4;
    color: #fff;
    font-size: 14px;
    transition: background 0.2s ease;
}

.rac-gallery .rac-gallery-more:hover {
    background: #1524a8;
}

/* ========================================
   갤러리 목록
======================================== */

.rac-gallery .rac-gallery-list {
    display: flex;
    flex-direction: column;
    gap: var(--rac-gap);
    margin: 0;
    padding: 5vh 0 15vh;
    list-style: none;
    background: #fff;
}

/* 항목 공통 */

.rac-gallery .rac-gallery-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    width: 92%;
    margin: 0;
    transform: none;
}

/* 이미지 왼쪽 / 내용 오른쪽 */

.rac-gallery .rac-gallery-item.rac-left {
    align-self: flex-start;
    margin-left: 2%;
    flex-direction: row;
}

/* 이미지 오른쪽 / 내용 왼쪽 */

.rac-gallery .rac-gallery-item.rac-right {
    align-self: flex-end;
    margin-right: 2%;
    flex-direction: row-reverse;
}

/* 가운데 정렬 */

.rac-gallery .rac-gallery-item.rac-center {
    align-self: center;
    margin-right: auto;
    margin-left: auto;
}

/* ========================================
   이미지 영역
======================================== */

.rac-gallery .rac-gallery-visual {
    position: relative;
    flex: 0 0 var(--rac-visual-width);
    width: var(--rac-visual-width);
    min-width: 0;
    margin: 0;
    padding: 0;
    transform: scale(var(--rac-scale, 0.72));
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.12s linear;
}

/* 이미지 왼쪽일 때 콘텐츠 쪽 가장자리를 고정 */

.rac-gallery .rac-gallery-item.rac-left .rac-gallery-visual {
    transform-origin: right center;
}

/* 이미지 오른쪽일 때 콘텐츠 쪽 가장자리를 고정 */

.rac-gallery .rac-gallery-item.rac-right .rac-gallery-visual {
    transform-origin: left center;
}

.rac-gallery .rac-gallery-image {
    display: block;
    width: 100%;
    height: 100vh;
    min-height: 420px;
    max-height: 1000px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #f0f0f0;
}

.rac-gallery .rac-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    object-fit: cover;
    object-position: center;
}

/* ========================================
   내용 영역
======================================== */

.rac-gallery .rac-gallery-content {
    flex: 0 0 var(--rac-content-width);
    width: var(--rac-content-width);
    min-width: 0;
    margin: 0;
    padding: 0;
    color: #b8b8b8;
    transform: none;
    transition: color 0.25s ease;
}

/* 이미지 왼쪽: 콘텐츠 왼쪽 정렬 */

.rac-gallery .rac-gallery-item.rac-left .rac-gallery-content,
.rac-gallery .rac-gallery-item.rac-left .rac-gallery-project-title,
.rac-gallery .rac-gallery-item.rac-left .rac-gallery-caption {
    text-align: left;
}

/* 이미지 오른쪽: 콘텐츠 오른쪽 정렬 */

rac-gallery .rac-gallery-item.rac-right .rac-gallery-content,
.rac-gallery .rac-gallery-item.rac-right .rac-gallery-project-title,
.rac-gallery .rac-gallery-item.rac-right .rac-gallery-caption {
    text-align: right;
}

.rac-gallery .rac-gallery-project-title {
    margin: 0 0 10px;
    padding: 0;
    color: #b8b8b8;
    font-size: 16px;
    font-family: "Noto Serif KR", serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    word-break: keep-all;
    overflow-wrap: anywhere;
    transition: color 0.25s ease;
	text-align: left;
}

.rac-gallery .rac-gallery-caption {
    margin: 0 0 24px;
    padding: 0;
    color: #b8b8b8;
    font-size: 15px;
    letter-spacing: 0.04em;
    line-height: 1.2;
    overflow-wrap: anywhere;
    transition: color 0.25s ease;
    font-style: italic;
}

/* ========================================
   링크 버튼
======================================== */

/* 이미지 왼쪽: 버튼 왼쪽 정렬 */

.rac-gallery .rac-gallery-item.rac-left .rac-gallery-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 0;
}

/* 이미지 오른쪽: 버튼 오른쪽 정렬 */

.rac-gallery .rac-gallery-item.rac-right .rac-gallery-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin: 0;
    padding: 0;
}

.rac-gallery .rac-action {
    display: inline-block;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0 solid #dedede;
    border-radius: 0;
    background: none;
    color: #333;
    font-size: 13px;
    font-family: "Noto Serif KR", serif;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: normal;
    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease;
}

.rac-gallery .rac-action:hover {
    background: none;
    color: #000;
}

/* ========================================
   활성 항목
======================================== */

.rac-gallery .rac-gallery-item.rac-is-active .rac-gallery-content {
    color: #1d1d1f;
}

.rac-gallery .rac-gallery-item.rac-is-active .rac-gallery-project-title {
    color: #1d1d1f;
}

.rac-gallery .rac-gallery-item.rac-is-active .rac-gallery-caption {
    color: #555;
}

.rac-gallery .rac-gallery-item.rac-is-active .rac-action {
    border-color: #1d1d1f;
    color: #1d1d1f;
}

.rac-gallery .rac-gallery-item.rac-is-active .rac-action:hover {
    background: none;
    color: #000;
}

/* 게시물이 없을 때 */

.rac-gallery .rac-empty-li {
    padding: 60px 20px;
    color: #777;
    text-align: center;
}

/* ========================================
   태블릿
======================================== */

@media (min-width: 768px) and (max-width: 1024px) {
    .rac-gallery {
        --rac-gap: 14vh;
        --rac-visual-width: 65%;
        --rac-content-width: 35%;
    }

    .rac-gallery .rac-gallery-heading {
        padding: 55px 4vw 35px;
    }

    .rac-gallery .rac-gallery-item {
        width: 94%;
    }

    .rac-gallery .rac-gallery-item.rac-left {
        margin-left: 2%;
    }

    .rac-gallery .rac-gallery-item.rac-right {
        margin-right: 2%;
    }

    .rac-gallery .rac-gallery-image {
        height: 62vh;
        min-height: 340px;
        max-height: 760px;
    }

    .rac-gallery .rac-gallery-project-title {
        font-size: 16px;
    }

    .rac-gallery .rac-gallery-caption {
        font-size: 14px;
    }
}

/* ========================================
   모바일
======================================== */

@media (max-width: 767px) {
    .rac-gallery {
        --rac-gap: 12vh;
        --rac-visual-width: 100%;
        --rac-content-width: 100%;
    }

    .rac-gallery .rac-gallery-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
        padding: 45px 5vw 30px;
    }

    .rac-gallery .rac-gallery-title {
        font-size: 30px;
    }

    .rac-gallery .rac-gallery-title span {
        margin-top: 10px;
        font-size: 15px;
        line-height: 1.5;
    }

    .rac-gallery .rac-gallery-more {
        padding: 10px 18px;
        font-size: 12px;
    }

    .rac-gallery .rac-gallery-list {
        gap: var(--rac-gap);
        padding: 3vh 0 10vh;
    }

    .rac-gallery .rac-gallery-item,
    .rac-gallery .rac-gallery-item.rac-left,
    .rac-gallery .rac-gallery-item.rac-right,
    .rac-gallery .rac-gallery-item.rac-center {
        align-self: center;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        width: 92%;
        margin-right: auto;
        margin-left: auto;
    }

    .rac-gallery .rac-gallery-visual {
        flex: 0 0 auto;
        width: 100%;
        transform: scale(var(--rac-scale, 0.72));
        transform-origin: center center;
        transition: transform 0.12s linear;
    }

    .rac-gallery .rac-gallery-image {
        height: 60vh;
        min-height: 320px;
        max-height: 650px;
    }

    .rac-gallery .rac-gallery-content {
        flex: 0 0 auto;
        width: 100%;
        text-align: left;
    }

.rac-gallery .rac-gallery-project-title,
.rac-gallery .rac-gallery-caption {
    text-align: left !important;
}
    /* 모바일에서는 버튼도 왼쪽 정렬 */

    .rac-gallery .rac-gallery-item.rac-left .rac-gallery-actions,
    .rac-gallery .rac-gallery-item.rac-right .rac-gallery-actions {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 7px;
    }

    .rac-gallery .rac-gallery-project-title {
        margin-bottom: 12px;
        font-size:16px;
    }

    .rac-gallery .rac-gallery-caption {
        margin-bottom: 18px;
        font-size: 14px;
        line-height: 1.7;
    }

    .rac-gallery .rac-action {
        padding: 9px 11px;
        font-size: 12px;
    }
}

/* ========================================
   작은 모바일
======================================== */

@media (max-width: 380px) {
    .rac-gallery .rac-gallery-title {
        font-size: 27px;
    }

    .rac-gallery .rac-gallery-image {
        height: 52vh;
        min-height: 280px;
    }

    .rac-gallery .rac-gallery-project-title {
        font-size: 16px;
    }

    .rac-gallery .rac-gallery-caption {
        font-size: 13px;
    }
}

/* ========================================
   모션 최소화 설정
======================================== */

@media (prefers-reduced-motion: reduce) {
    .rac-gallery .rac-gallery-visual {
        will-change: auto;
    }

    .rac-gallery .rac-gallery-content,
    .rac-gallery .rac-gallery-project-title,
    .rac-gallery .rac-gallery-caption,
    .rac-gallery .rac-action,
    .rac-gallery .rac-gallery-more {
        transition: none;
    }
}
