/* [SOMA] 사용자 제공 소스 유지 + 그림자 & 모달 버그 수정본 */
/* 1. 전체 구조를 Flex 레이아웃으로 변경 */
/* 1. 강제 높이 설정 모두 제거 (원상 복구) */
html, body { height: auto; margin: 0; }
#page, .site { display: block; min-height: auto; }



/* 2. 본문 영역: 콘텐츠 높이에 딱 맞게 조절 */
#content, .site-content, .soma-main-outer {
    flex: none; 
    min-height: auto !important;
}

/* 워드프레스 테마의 최상위 컨테이너 (테마에 따라 #page 또는 .site-container일 수 있음) */
#page, .site {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 화면 높이를 최소 100% 확보 */
}

/* 3. 푸터 설정 */
.site-footer, footer {
    flex-shrink: 0; /* 푸터가 찌그러지지 않게 설정 */
    width: 100%;
}
.soma-field-label {
    display: block;
    font-size: 11px;
    color: #475569;
    font-weight: 800;
    margin-bottom: 4px;
    margin-left: 5px;
}
.soma-form-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 12px;
}
#somaForm input, #somaForm select, #somaForm textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
}
#somaForm input:focus {
    border-color: #1e3a5a;
    outline: none;
}
/* 1. SOMA 영역을 감싸는 워드프레스 테마 박스들의 배경을 투명화 */
.posts-entry, 
.entry-content, 
.site-main, 
.content-area,
#primary {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* 2. 실제 배경색을 담당하는 outer 영역 확장 */
/* 1. 배경 설정: 전체 바닥은 회색, SOMA 콘텐츠는 흰색 박스 안에 */
.soma-main-outer {
    background-color: #f8fafc !important; /* 전체 바닥 회색 */
    padding: 40px 0 !important;
    display: flow-root !important;
}

/* 2. [핵심] 흰색 영역 복구: 카드들을 감싸는 깔끔한 박스 만들기 */
.soma-wrapper {
    max-width: 1240px !important;
    margin: 0 auto !important;
    background-color: #ffffff !important; /* 다시 흰색 판을 깝니다 */
    padding: 50px 40px !important;
    border-radius: 20px !important;       /* 모서리 둥글게 */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important; /* 부드러운 그림자 */
    box-sizing: border-box !important;
}
/* 3. 테마 본문 간섭 제거 (박스 안의 박스 현상 방지) */
.type-page.posts-entry, 
.entry-content {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* 4. 버튼 및 헤더 정렬 */
.soma-page-header {
    margin-bottom: 30px;
    text-align: center;
}

.soma-filter-container {
    background: #f1f5f9; /* 필터 영역은 살짝 구분감 있게 */
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 40px;
}
/* 1. 컨테이너를 세로 정렬(column)로 변경 */
.soma-filter-container { 
    display: flex; 
    flex-direction: column; /* 세로로 쌓기 */
    gap: 20px; 
    justify-content: center; 
    align-items: center; 
    margin-bottom: 50px; 
}
/* 3. 기수 필터(전체, 창립멤버 등): 두 번째 배치 */
.soma-filter:first-of-type { 
    order: 2 !important; 
}
.soma-filter { display: flex; gap: 10px; }
.soma-filter-btn { 
    padding: 8px 16px; /* 상하 12->8, 좌우 25->18로 축소 */
    border-radius: 20px; /* 사이즈에 맞춰 둥근 정도 조절 */
    background: #fff; 
    color: #1e3a5a; 
    border: 1px solid rgba(30, 58, 90, 0.1); 
    text-decoration: none; 
    font-size: 13px; /* 글자 크기 14->13으로 축소 */
    font-weight: 700; 
    transition: 0.3s; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.02); 
    display: inline-block; /* 크기 조절이 정확히 먹히도록 추가 */
}

/* 호버 및 활성화 상태 */
.soma-filter-btn.active, .soma-filter-btn:hover { 
    background: #1e3a5a; 
    color: #fff; 
    transform: translateY(-1px); /* 움직임도 살짝만 */
    text-decoration: none;
}
/* 2. 프로필 등록 버튼: 상단 문구 바로 밑(첫 번째)으로 배치 */
.btn-add-profile { 
    padding: 5px 12px; border-radius: 20px; background: transparent; border: none;
    color: #888; font-size: 11px; font-weight: 800; cursor: pointer; transition: 0.3s;
}
/* 4. 최신순, 거리순 등 정렬 필터: 세 번째(맨 아래) 배치 */
.soma-filter:last-of-type { 
    order: 3 !important; 
    justify-content: center; /* PC에서 가운데 정렬 */
    width: 100%;
}
/* [수정 1] 그림자 겹침 방지: gap을 늘리고 호버 시 z-index 부여 */
.soma-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 40px; /* 30px -> 40px로 늘려 그림자 간섭 방지 */
}

.soma-card { 
    position: relative; 
    overflow: hidden;
    /* 1. [Glassmorphism] 더 깊이감 있고 세련된 반투명 네이비 그라데이션 */
    background: linear-gradient(160deg, rgba(30, 58, 90, 0.9) 0%, rgba(10, 18, 30, 0.95) 100%); 
    /* 유리 질감을 위한 백드롭 필터 (지원하는 브라우저에서 작동) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border-radius: 30px; /* 약간 더 부드럽게 */
    padding: 40px 25px; /* 여백을 넓혀 여유롭게 */
    text-align: center; 
    cursor: pointer; 
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1); /* 더 부드럽고 고급스러운 애니메이션 */
    
    /* 2. [Soft Shadow] 아주 은은하고 자연스러운 기본 그림자 */
border: 1px solid rgba(255, 159, 67, 0.15) !important;
    
    /* 2. 그림자: 오렌지색을 섞어 은은하게 발산 (배경이 어두워도 입체감이 생김) */
    box-shadow: 0 10px 30px rgba(255, 159, 67, 0.08), 
                0 4px 10px rgba(0, 0, 0, 0.3) !important;

    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    
    /* 3. [Premium Border] 상단 하이라이트를 더 가늘고 밝게 (세련미) */
    border-top: 1.5px solid rgba(255, 255, 255, 0.4);
    /* 카드를 감싸는 아주 미세한 테두리 추가 */

    
    z-index: 1;
}

/* 4. [Neon Glow Hover] 호버 시 압도적인 비주얼 효과 */
.soma-card:hover { 
    transform: translateY(-15px) scale(1.02); /* 더 역동적으로 상승 */
    z-index: 10;
    
    /* 혼달 오렌지색으로 은은한 네온 그로우 효과 */
transform: translateY(-12px) scale(1.02) !important;
    border: 1px solid rgba(255, 159, 67, 0.5) !important;
    box-shadow: 0 20px 40px rgba(255, 159, 67, 0.25), 
                0 10px 20px rgba(0, 0, 0, 0.4) !important;
    /* 호버 시 테두리 오렌지색으로 살짝 강조 */
    border-color: rgba(255, 159, 67, 0.4);
    border-top-color: rgba(255, 159, 67, 0.6);
}

/* 5. [Typography] 내부 요소 디자인 미세 조정 */
.soma-profile-img { 
    width: 120px; height: 120px; /* 크기 키움 */
    border-radius: 50%; 
    object-fit: cover; 
    /* 이미지 테두리에 은은한 오렌지 그로우 */
    border: 4px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(255, 159, 67, 0.2);
    margin-bottom: 20px; 
    transition: all 0.5s ease;
}

.soma-card:hover .soma-profile-img {
    transform: scale(1.05); /* 호버 시 이미지 살짝 확대 */
    border-color: rgba(255, 159, 67, 0.5);
}

.card-name { 
    font-size: 26px; /* 더 크게 */
    font-weight: 900; 
    color: #fff !important; 
    margin: 8px 0; 
    /* 이름에 미세한 그림자로 가독성 향상 */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); 
}
/* 기수 정보 디자인 강화 */
.soma-card > div[style*="color:#94a3b8"] {
    color: #ff9f43 !important; /* 오렌지색으로 변경 */
    font-size: 11px; 
    font-weight: 900; 
    letter-spacing: 2px; /* 자간 넓힘 */
    text-transform: uppercase; 
    margin-top: 5px;
}
.card-pb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0; }
.card-pb-box { 
    flex: 1 1 0px !important; /* 강제 3등분 고정 */
    min-width: 0 !important; /* 내용물 길이에 반응하지 않음 */
    background: rgba(255,255,255,0.12); 
    padding: 12px 0 !important; 
    border-radius: 15px; 
    border: 1px solid rgba(255,255,255,0.15); 
    display: flex; flex-direction: column; align-items: center; /* 중앙 정렬 */
}
.card-pb-box span { 
    font-size: 14px !important; /* 숫자 크기 살짝 키움 */
    color: #fff; font-weight: 900; 
    white-space: nowrap !important; /* 줄바꿈 금지 */
    letter-spacing: -0.8px !important; /* 6자리 숫자(12:34:56) 대응용 자간 압축 */
}
.card-pb-box div { font-size: 10px; color: #ff9f43; font-weight: 800; margin-bottom: 3px; }

.tag-container { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 15px; }
.card-style-tag { padding: 5px 12px; background: rgba(255, 159, 67, 0.2); color: #ff9f43; border-radius: 12px; font-size: 12px; font-weight: 800; border: 1px solid rgba(255, 159, 67, 0.2); }

/* [수정 2] 모달 닫기 버튼 및 레이아웃 안정화 */
#somaFullModal { 
    display:none; 
    position:fixed; 
    z-index: 999999 !important; /* 워드프레스 관리바보다 높게 */
    left:0; top:0; width:100%; height:100%; 
    background:rgba(0,0,0,0.85); 
    backdrop-filter: blur(10px); 
    overflow-y:auto; 
}
.m-container { display: flex; width: 90%; max-width: 1000px; margin: 6vh auto; background: #fff; border-radius: 40px; overflow: hidden; position: relative; box-shadow: 0 30px 60px rgba(0,0,0,0.5); }
.m-left { width: 48%; background: #000; flex-shrink: 0; position: relative; }
.m-left img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* [수정] 모바일에서도 닫기 버튼이 항상 보이도록 */
.m-close-btn { 
    display: none !important; /* PC에서는 숨김 */
}

.m-right { width: 52%; padding: 60px 50px; color: #fff; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(135deg, #0f172a 0%, #1e3a5a 50%, #2d5a88 100%); }
.m-title { font-size: 48px; font-weight: 900; color: #fff !important; margin: 0; }
.m-motto { border-left: 5px solid #ff9f43; padding-left: 20px; margin: 25px 0; color: #cbd5e0; font-size: 18px; font-style: italic; }
.m-pb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
.m-pb-box { background: rgba(255,255,255,0.05); padding: 15px 5px; border-radius: 20px; text-align: center; border: 1px solid rgba(255,255,255,0.1); }
.m-pb-box small { display: block; font-size: 10px; color: #ff9f43; font-weight: 800; margin-bottom: 5px; }
.m-pb-box span { font-size: 17px; font-weight: 900; }
.m-info-list { list-style: none; padding: 20px 0 0 0; border-top: 1px solid rgba(255,255,255,0.1); }
.m-info-list li { margin-bottom: 12px; display: flex; align-items: flex-start; font-size: 14px; }
.m-info-list i { width: 25px; color: #ff9f43; font-size: 18px; }
.m-info-list .label { color: #94a3b8; width: 105px; font-weight: 600; flex-shrink: 0; }
.m-info-list .value { color: #f8fafc; font-weight: 700; flex: 1; }
#somaFormModal { display:none; position:fixed; z-index:1000000; left:0; top:0; width:100%; height:100%; background:rgba(0,0,0,0.8); backdrop-filter: blur(8px); overflow-y:auto; padding: 20px 0; }
.form-box { background:#fff; width:95%; max-width:550px; margin:auto; padding:35px; border-radius:30px; }
.soma-form-buttons { display: flex; justify-content: center; gap: 15px; margin-top: 30px; }
.soma-btn-save { background: #1e3a5a; color: #fff; padding: 15px 30px; border-radius: 12px; border: none; font-weight: 800; cursor: pointer; }
.soma-btn-delete { background: rgba(255, 75, 75, 0.1); color: #ff4b4b; padding: 15px 30px; border-radius: 12px; border: 1px solid rgba(255, 75, 75, 0.3); font-weight: 800; cursor: pointer; }
.soma-btn-cancel { background: #f1f5f9; color: #64748b; padding: 15px 30px; border-radius: 12px; border: none; font-weight: 800; cursor: pointer; }

.soma-filter { 
    display: flex; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; 
    padding-bottom: 5px; -webkit-overflow-scrolling: touch; 
}
.soma-filter::-webkit-scrollbar { display: none; }

.soma-main-title { font-size: 36px; font-weight: 900; color: #1e3a5a; text-transform: uppercase; }
.soma-title-line { width: 50px; height: 4px; background: #ff9f43; margin: 20px auto 0; border-radius: 10px; }

@media (max-width: 760px) {
    /* 1. 리스트 카드 가로 쏠림 방지 */
    .soma-main-outer { overflow-x: hidden !important; }
    .soma-wrapper { padding: 0 10px !important; }

    /* 2. 모바일 상세 모달 레이아웃 (세로 전환) */
    .m-container { 
        flex-direction: column !important; 
        width: 92% !important;
        margin: 4vh auto !important;
        max-height: 85vh !important;
        overflow-y: auto !important;
    }
    .m-left, .m-right { width: 100% !important; }
    .m-left { height: 250px !important; }
    .m-right { padding: 35px 20px !important; }
    .m-title { font-size: 32px !important; text-align: center; }
    .m-motto { font-size: 15px !important; text-align: center; padding: 0 10px; border: none; border-top: 2px solid #ff9f43; padding-top: 15px; }

    /* 3. [핵심] 모바일 상세페이지 PB 칸 3등분 고정 (6자리 숫자 대응) */
    .m-pb-grid { 
        display: flex !important; 
        gap: 8px !important; 
        margin-bottom: 25px !important; 
    }
    .m-pb-box { 
        flex: 1 1 0px !important; /* 강제 3등분 */
        min-width: 0 !important;
        padding: 12px 0 !important; 
    }
    .m-pb-box span { 
        font-size: 15px !important; 
        letter-spacing: -0.8px !important; /* 숫자 압축 */
        white-space: nowrap !important;
    }

    /* 4. X 버튼 (모바일에서 터치하기 편하게 조정) */
.m-close-btn { 
        display: flex !important; 
        position: fixed !important;
        top: 15px !important; 
        right: 15px !important; 
        width: 40px; height: 40px;
        background: rgba(0,0,0,0.7) !important;
        color: #fff !important;
        border-radius: 50%;
        z-index: 9999999 !important;
        font-size: 24px;
        align-items: center;
        justify-content: center;
    }
}