@charset "UTF-8";
/*
 * 写真のモーダル表示（ライトボックス）の共通スタイル。
 *
 * 事業内容ページの「物件写真」と、採用ページの「働く環境」で共用する。
 * 生成は各ページのJS（service-gallery.js / culture-modal.js）。
 * もとは service-gallery.css にあったが、採用ページでも使うため切り出した。
 */

.sg-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 88px 96px;
    background: rgba(18, 18, 18, 0.94);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.sg-modal.is-active {
    opacity: 1;
    visibility: visible;
}

.sg-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
}

.sg-modal-project {
    margin: 0 0 14px;
    font-family: "Noto Serif JP", serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.12em;
    color: #b39845;
    text-align: center;
}

.sg-modal-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.sg-modal-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 250px);
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.sg-modal-img.is-shown {
    opacity: 1;
    transform: scale(1);
}

.sg-modal-caption {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-top: 18px;
    min-height: 1.6em;
    color: #fff;
    text-align: left;
}

.sg-modal-count {
    flex-shrink: 0;
    font-family: "DM Sans", sans-serif;
    font-size: 13px;
    letter-spacing: 0.1em;
    color: #b39845;
}

.sg-modal-text {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 14px;
    line-height: 1.7;
    letter-spacing: 0.04em;
    color: #e6e6e6;
}

.sg-modal-close {
    position: absolute;
    top: 28px;
    right: 32px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.sg-modal-close span {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 1.5px;
    background: #fff;
    transition: background 0.3s ease;
}

.sg-modal-close span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.sg-modal-close span:nth-child(2) { transform: translate(-50%, -50%) rotate(-45deg); }
.sg-modal-close:hover span { background: #b39845; }

.sg-modal-prev,
.sg-modal-next {
    position: absolute;
    top: 50%;
    width: 56px;
    height: 56px;
    padding: 0;
    border: 0;
    background: none;
    color: #fff;
    cursor: pointer;
    transform: translateY(-50%);
    transition: color 0.3s ease, transform 0.3s ease;
}

.sg-modal-prev { left: 24px; }
.sg-modal-next { right: 24px; }

.sg-modal-prev:hover { color: #b39845; transform: translate(-5px, -50%); }
.sg-modal-next:hover { color: #b39845; transform: translate(5px, -50%); }

.sg-modal.is-single .sg-modal-prev,
.sg-modal.is-single .sg-modal-next { display: none; }

@media screen and (max-width: 1440px) {
    .sg-modal { padding: 76px 80px; }
}

@media screen and (max-width: 768px) {
    .sg-modal { padding: 64px 16px 96px; }

    .sg-modal-project {
        margin-bottom: 10px;
        font-size: 13px;
    }

    .sg-modal-img { max-height: calc(100vh - 260px); }

    .sg-modal-close {
        top: 14px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .sg-modal-close span { width: 22px; }

    .sg-modal-prev,
    .sg-modal-next {
        top: auto;
        bottom: 24px;
        width: 48px;
        height: 48px;
        transform: none;
    }

    .sg-modal-prev { left: 26%; }
    .sg-modal-next { right: 26%; }

    .sg-modal-prev:hover,
    .sg-modal-next:hover { transform: none; }

    .sg-modal-caption {
        gap: 10px;
        margin-top: 14px;
    }

    .sg-modal-count { font-size: 11px; }
    .sg-modal-text  { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .sg-modal-img { transition-duration: 0.01ms; }
}

/* ============================================================
 * 働く環境（採用ページ）の写真ボタン
 * もとは div だったものを button にしたため、見た目を揃える
 * ============================================================ */
button.culture-item__photo {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    cursor: zoom-in;
    -webkit-appearance: none;
    appearance: none;
}
