/* 언어설정 */
@charset 'utf-8';

@font-face {
    font-family: 'SUIT-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'KCCHyerim-Regular';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/2411-3@1.0/KCCHyerim-Regular.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* 전체설정 */
* {
    margin: 0;
    padding: 0;
    font-family: 'SUIT-Regular';
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--main-text);
}

img {
    vertical-align: bottom;
}

html,
body {
    overflow-x: hidden;
    scroll-behavior: smooth;

}

.body {
    max-width: 100%;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
    /* 스크롤 막기 */
    touch-action: none;
    /* 터치 시 흔들림 방지 (모바일 UX 향상) */
}

/* 색상설정 */
:root {
    --main-navi: #204B62;
    --main-text: #333;
    --main-white: #fff;
}


/* 상세설정 ---------------------------------------------------------------------------- */

.expert-section {
    max-width: 95.25rem;
    margin: 2.5rem auto 0.0rem;
    padding: 0 1.25rem;
    scroll-snap-align: start;
    height: 100vh;
    padding-top: 50px;
}

.expert-title {
    font-size: 2.5875rem;
    color: #333;
    font-weight: bold;
    display: inline-block;
    padding: 0.3125rem 0;
    /* ✅ 아래 배경 bar */
    margin-bottom: 2.5rem;
}

.expert-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: space-between;
    /* ✅ 전문가 카드 간격 조정 */
}

.expert-card {
    flex: 1 1 calc(20% - 1.25rem);
    /* 5개씩 한 줄 */
    max-width: calc(20% - 1.25rem);
    overflow: hidden;
    /* 이미지 튀어나오는 것 방지 */
}

.expert-card img {
    width: 100%;
    height: 20.0rem;
    object-fit: cover;
    object-position: center top;
    /* ✅ 인물 얼굴 쪽에 포커스 */
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.expert-card:hover img {
    transform: scale(1.05);
    /* ✅ 확대 효과도 함께 */
}

.expert-card a {
    display: block;
    text-decoration: none;
    text-align: right;
    /* 텍스트 정렬도 유지 */
}

.expert-card strong {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 0.9375rem;
    color: var(--main-navi);
}

.expert-card span {
    display: block;
    font-size: 1.0rem;
    color: #555;
    margin-top: 0.3125rem;
}

/* 흐르는 슬라이드 */
.lawyer-slide-wrap {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 1.25rem 0;
    margin-top: 3.75rem;
}


.lawyer-slide-track {
    display: flex;
    gap: 1.25rem;
    animation: slideLoop 10s linear infinite;
    /* ✅ 무한 반복 */
    transition: margin-left 0.5s ease;
}

.lawyer-slide-track img {
    width: 6.25rem;
    height: 6.25rem;
    object-fit: cover;
    object-position: top;
    flex-shrink: 0;
    filter: grayscale(100%);
    transition: filter 0.3s ease;

}

.lawyer-slide-track img:hover {
    filter: grayscale(0%);
}

/* 애니메이션 */
@keyframes slideLoop {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}



/* 변호사 소개 롤링 슬라이드 전용 스타일 */
.expert-section {
    position: relative;
    overflow: hidden;
}

.expert-list {
    display: flex;
    gap: 1.25rem;
    animation: rollingSlide 12s linear infinite;
    width: max-content; /* 내용 크기만큼만 너비 설정 */
}

/* 무한 슬라이드를 위한 설정 */
.expert-card {
    flex: 0 0 auto; /* 크기 자동 조절 방지 */
    width: 15rem; /* 카드 너비 */
    box-sizing: border-box;
}

/* 롤링 애니메이션 정의 */
@keyframes rollingSlide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
/* 지그재그 롤링 슬라이드 스타일 */
.expert-zigzag-slide {
    margin-top: 9rem;
    display: flex;
    gap: 1rem;
    animation: slideZigzag 130s linear infinite;
    width: max-content;
}

.zigzag-card {
    width: 15rem;
    position: relative;
    box-sizing: border-box;
    overflow: hidden; /* ✅ 추가 */
}


.zigzag-card img {
    width: 100%;
    height: 20rem;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
}

/* 아래처럼 수정! */
.zigzag-card:hover .lawyer-photo-img {
    transform: scale(1.01);
}

.background-img {
    transition: transform 0.3s ease;
}

.zigzag-card strong {
    display: block;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--main-navi);
    margin-top: 0.5rem;
    text-align: center;
}

.zigzag-card span {
    display: block;
    font-size: 1rem;
    color: #555;
    text-align: center;
}

/* 슬라이드 애니메이션 */
@keyframes slideZigzag {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.lawyer-image-wrapper {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    width: 100%;
    height: 100%;
}


.lawyer-background-box {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #263F51; /* 원하는 색상 */
    z-index: 0;
}

.lawyer-photo-img {
    position: relative; /* 또는 absolute */
    z-index: 2;
    width: 100%;
    height: auto;
}
.lawyer-image-wrapper {
    height: 350px; /* 또는 rem, vh 단위 */
}

/* 배경 이미지는 오른쪽 정렬되게 트릭 */
.background-img {
    width: 200%;
    height: 120%; /* ✅ 세로만 늘리기 */
    transform: translateX(0%);
    z-index: 1;
    border-radius: 30px;
    background: linear-gradient(168deg, rgba(38, 63, 81, 1) 0%, rgba(32, 74, 97, 1) 100%);
}

/* 실제 변호사 사진은 앞에 오도록 */
.lawyer-image-wrapper .lawyer-photo-img {
    width: 90%;
    height: 90%;
    object-fit: cover;
    margin-top: 40px;
    margin-left: 15px;
    margin-right: auto;
    display: block;
    z-index: 2;
}

/* ✅ 텍스트 오버레이: 오른쪽 아래 배치 + 반투명 배경 */
.lawyer-text-overlay {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #fff;
    z-index: 2;
    text-align: right;
}
.lawyer-text-overlay strong,
.lawyer-text-overlay span {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);  /* ✅ 테두리처럼 그림자 */
    color: #ffffff;
    text-align: right;
}

.lawyer-text-overlay strong {
    display: block;
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.lawyer-text-overlay span {
    font-size: 1rem;
    opacity: 0.9;
}
/* 미디어 쿼리 구간------------------------------------------------------------------------------------- */


/* PC 전용 */
@media screen and (min-width: 90.0rem) {
    .expert-sub-title{
        text-decoration: none;
        margin-left: 15px;
    }
}

/* 노트북 전용 */
@media screen and (min-width: 64.0625rem) and (max-width: 89.9375rem) {
    .expert-sub-title{
        text-decoration: none;
        margin-left: 15px;
    }
}

/* 태블릿 전용 */
@media screen and (min-width: 48.0rem) and (max-width: 64.0rem) {

    .expert-sub-title{
        text-decoration: none;
        margin-left: 15px;
    }

    .expert-section{
        margin: 10.5rem auto 0.0rem;
    }

}

/* 모바일 전용 */
@media screen and (min-width: 30.0625rem) and (max-width: 47.9375rem) {
    .expert-section{
        margin-top: 30rem;
        height: 80vh;
    }
    .expert-zigzag-slide {
        gap: 0rem;
        animation-duration: 140s; /* 모바일에서 너무 느리면 속도 약간 조정 */
    }


    .zigzag-card img {
        height: 14rem; /* 이미지 높이 축소 */
        width: 11rem;
    }

    .zigzag-card strong {
        font-size: 1rem; /* 이름 글씨 크기 축소 */
    }

    .zigzag-card span {
        font-size: 0.875rem; /* 전문 분야 글씨도 약간 축소 */
    }
    .expert-zigzag-slide{
        margin-top: 0;
    }

    .lawyer-image-wrapper{
        height: 200px;
        width: 180px;
    }
    .lawyer-image-wrapper .lawyer-photo-img{
        margin-top: 40px;
        object-fit: contain;
        height: 100%;
    }

    .lawyer-text-overlay{

        bottom: 0rem;
    }
    .expert-title{
        font-size: 1.6rem;
    }
    .expert-sub-title{
        font-size: 14px;
        text-decoration: none;
        margin-left: 15px;
    }

}

@media screen and (max-width: 30rem) and (orientation: portrait) {

    .expert-section{
        margin-top: 15rem;
        height: 60vh;
    }
    .expert-zigzag-slide {
        margin-top: 0;
        gap: 0rem;
        animation-duration: 140s; /* 모바일에서 너무 느리면 속도 약간 조정 */
    }

    .zigzag-card {
        width: 12rem; /* 카드 너비 줄이기 */
    }

    .zigzag-card img {
        height: 14rem; /* 이미지 높이 축소 */
        width: 11rem;
    }

    .zigzag-card strong {
        font-size: 1rem; /* 이름 글씨 크기 축소 */
    }

    .zigzag-card span {
        font-size: 0.875rem; /* 전문 분야 글씨도 약간 축소 */
    }

    .lawyer-image-wrapper{
        height: 200px;
        width: 150px;
    }

    .lawyer-image-wrapper .lawyer-photo-img{
        margin-top: 40px;
        object-fit: contain;
        height: 100%;
        margin-left: 5px;
    }

    .lawyer-text-overlay{
        bottom: 0rem;
    }
    .expert-title{
        font-size: 1.8rem;
    }
    .expert-sub-title{
        font-size: 11px;
        text-decoration: none;
    }
}