body {
    font-family: 'M PLUS 1p', sans-serif;
}

.recruit-intro-section {
    padding: 30px 20px 0px;
    background: linear-gradient(to bottom right,
            #f9f6f1 50%,
            #fafafa 50%);
    text-align: center;
}

.recruit-intro-heading {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: bold;
    margin-bottom: clamp(30px, 5vw, 55px);
    position: relative;
}

.recruit-intro-heading::after {
    content: "";
    display: block;
    width: 85px;
    height: 8px;
    background-color: #0054a7;
    margin: 10px auto 0;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

#mainImage {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    padding-top: 35px;
    aspect-ratio: 3 / 3.2;
}

.thumbnail-row .thumb.active-thumb {
    position: relative;
    opacity: 0.6;
    z-index: 1;
}

.thumbnail-row {
    display: flex;
}

.thumbnail-row .thumb {
    width: 50%;
    max-width: 125px;
    height: auto;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease;
    aspect-ratio: 3 / 3.5;
}

.thumbnail-row .thumb:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

.staff-hobby,
.staff-car,
.staff-message {
    display: inline-block;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #333;
}

.photo-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 900px;
    padding-bottom: 50px;
}

.photo-grid-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.grid-item {
    opacity: 0;
    transition: opacity 2.5s ease-out, transform 2.5s ease-out;
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow:
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 3px 6px rgba(0, 0, 0, 0.05);
    border: 3px solid #ffffff;
    box-sizing: border-box;
    box-shadow:
        0 8px 15px rgba(0, 0, 0, 0.15),
        0 2px 4px rgba(0, 0, 0, 0.05);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 1.5s ease-in-out;
}

.grid-item:not(.center-shifted) {
    transform: translateY(20px);
}

.center-shifted {
    transform: translateY(90px);
}

.grid-item.fade-in {
    opacity: 1;
}

.grid-item:not(.center-shifted).fade-in {
    transform: translateY(0);
}

.center-shifted.fade-in {
    transform: translateY(70px);
}

.recruit-section {
    background-color: #fafafa;
    padding: clamp(40px, 5vw, 60px) 20px;
}

.recruit-box {
    background: #fffefc;
    padding: clamp(30px, 5vw, 40px) 20px clamp(40px, 6vw, 60px);
    margin: clamp(40px, 6vw, 60px) auto;
    max-width: 800px;
    box-shadow: 4px 8px 10px rgba(0, 0, 0, 0.25);
    text-align: center;
    position: relative;
}

.recruit-label {
    position: absolute;
    top: 0;
    left: 0;
    background-color: #0061bc;
    color: #fff;
    font-weight: bold;
    font-size: clamp(0.95rem, 1.4vw, 1.3rem);
    padding: clamp(8px, 2vw, 13px) clamp(25px, 6vw, 45px);
}

.recruit-title {
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    font-weight: bold;
    margin-top: clamp(20px, 4vw, 30px);
    margin-bottom: clamp(10px, 3vw, 15px);
    position: relative;
    display: inline-block;
    letter-spacing: 0.05em;
}

.recruit-title::after {
    content: "";
    position: absolute;
    left: -28px;
    right: -28px;
    height: clamp(3px, 0.8vw, 5px);
    background-color: #fff580;
    bottom: -4px;
}

.recruit-message {
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    color: #333;
    margin-bottom: clamp(25px, 4vw, 35px);
    letter-spacing: 0.03em;
}

.recruit-button {
    display: inline-block;
    background: #fff;
    font-size: clamp(1rem, 2vw, 1.3rem);
    border: 2px solid #707070;
    border-radius: 10px;
    padding: clamp(6px, 1vw, 8px) clamp(20px, 6vw, 30px);
    color: #000;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.recruit-button:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
}

.visual-banner {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    aspect-ratio: 16 / 5;
    overflow: hidden;
}

.visual-banner__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.visual-banner__inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    text-align: center;
}

.visual-banner__inner p {
    color: #fff;
    font-size: 1.3rem;
    font-family: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
}

.visual-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

@media screen and (max-width: 768px) {
    .visual-banner {
        height: 200px;
    }

    .visual-banner__inner p {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .visual-banner__inner p {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .grid-item {
        height: 220px;
    }

    .recruit-box {
        max-width: 600px;
        padding: 40px 24px 50px;
    }

    .recruit-label {
        font-size: 1.2rem;
        padding: 12px 40px;
    }

    .recruit-title {
        font-size: 1.5rem;
    }

    .recruit-message {
        font-size: 1rem;
    }

    .recruit-button {
        font-size: 1.1rem;
        padding: 10px 28px;
    }
}

@media screen and (max-width: 1024px) {
    .staff-title::after {
        width: 75px;
        height: 7px;
    }
}


@media screen and (max-width: 768px) {
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }
    .grid-item {
        height: 200px;
    }
    .grid-item:not(.center-shifted) {
        transform: translateY(20px);
    }

    .center-shifted {
        transform: translateY(35px);
    }

    .center-shifted.fade-in {
        transform: translateY(45px);
    }

    .recruit-box {
        padding: 30px 20px 50px;
        margin: 40px auto;
        max-width: 75%;
    }

    .recruit-label {
        font-size: 1.1rem;
        padding: 10px 30px;
    }

    .recruit-title {
        font-size: 1.4rem;
        margin-top: 24px;
        margin-bottom: 12px;
        white-space: normal;
        text-align: center;
    }

    .recruit-title::after {
        left: -20px;
        right: -20px;
        height: 4px;
    }

    .recruit-message {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 30px;
        text-align: center;
    }

    .recruit-button {
        font-size: 1.2rem;
        padding: 10px 28px;
        width: auto;
        max-width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .body-no-scroll {
        overflow: hidden;
        height: 100vh;
        touch-action: none;
        position: fixed;
        width: 100%;
    }

    .staff-title {
        font-size: clamp(1.3rem, 5vw, 1.6rem);
    }

    .staff-title::after {
        width: 65px;
        height: 6px;
    }

    .thumbnail-row .thumb {
        width: 25%;
    }

    #mainImage {
        padding: 0;
    }

    .staff-area-list {
        font-size: 0.75rem;
    }

    .photo-grid-container {
        display: flex;
        grid-template-columns: unset;
        gap: 15px;
        max-width: 100%;
        overflow-x: scroll;
        overflow-y: hidden;
        white-space: nowrap;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 15px 20px;
    }

    .grid-item {
        flex-shrink: 0;
        width: 85%;
        height: auto;
        aspect-ratio: 3 / 3.2;
        scroll-snap-align: center;
        transform: translateY(0) !important;
    }

    .grid-item:not(.center-shifted),
    .center-shifted,
    .center-shifted.fade-in {
        transform: translateY(0) !important;
    }

    .recruit-box {
        max-width: 100%;
    }

    .recruit-label {
        font-size: 0.9rem;
        padding: 8px 26px;
    }

    .recruit-title {
        font-size: 1rem;
    }

    .recruit-title::after {
        left: -10px;
        right: -10px;
    }

    .recruit-message {
        font-size: 0.8rem;
        line-height: 1.7;
    }

    .recruit-button {
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px),
(width: 1024px) and (height: 600px),
(width: 1280px) and (height: 800px) {

    @keyframes smoothDropFade {
        0% {
            transform: translateY(50px);
            opacity: 0;
        }

        20% {
            opacity: 1;
        }

        80% {
            opacity: 1;
        }

        100% {
            transform: translateY(-40px);
            opacity: 0;
        }
    }

    @keyframes fadeOut {
        to {
            opacity: 0;
            visibility: hidden;
        }
    }

}

@media screen and (max-width: 480px) {
    .grid-item {
        opacity: 1 !important;
        transform: translateY(0) !important;
        transition: none !important;
    }
    .grid-item.fade-in {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}
