@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;600;700;800&display=swap');

/* [1] 공통 초기화 */
.p_skin_wrap, .p_view_wrapper { max-width: 1200px; margin: 40px auto; padding: 0 25px; font-family: 'Pretendard', sans-serif; color: #111; line-height: 1.6; }
.p_skin_wrap * { box-sizing: border-box; letter-spacing: -0.5px; }

/* [2] 헤더 공통 */
.p_header, .p_view_header { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 25px; border-bottom: 3px solid #111; margin-bottom: 40px; flex-wrap: wrap; gap: 20px; }
.p_header .p_sub, .p_sub_tit { display: block; font-size: 14px; color: #888; font-weight: 700; margin-bottom: 5px; }
.p_header .p_title, .p_main_tit { font-size: 2.5rem; font-weight: 800; margin: 0; line-height: 1.2; }

/* [3] 리스트 페이지 디자인 */
.p_header_right { display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
.p_search_form { display: flex; gap: 5px; align-items: center; background: #f4f4f4; padding: 5px; border-radius: 12px; }
.p_input_select { border: none; background: none; font-weight: 700; padding: 0 10px; font-size: 13px; outline: none; height: 35px; }
.p_input_text { border: none; background: #fff; padding: 0 15px; border-radius: 8px; width: 150px; outline: none; height: 35px; }
.p_search_btn { border: none; width: 35px; height: 35px; border-radius: 8px; color: #fff; cursor: pointer; }

.p_dropdown_group { display: flex; gap: 8px; }
.p_dropbtn { border: none; padding: 10px 18px; border-radius: 8px; font-weight: 800; font-size: 12px; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.winter_btn { background: #111; color: #fff; }
.summer_btn { background: #eee; color: #666; }

.p_dropdown { position: relative; }
.p_dropdown_content { display: none; position: absolute; right: 0; top: 100%; background: #fff; min-width: 140px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-radius: 10px; z-index: 100; margin-top: 5px; border: 1px solid #eee; overflow: hidden; }
.p_dropdown_content.show { display: block; }
.p_dropdown_content a { display: block; padding: 10px 15px; text-decoration: none; color: #444; font-size: 13px; font-weight: 600; }
.p_dropdown_content a:hover { background: #f8f9fa; color: #e63946; }

.p_list_grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.p_card { display: block; text-decoration: none; background: #fff; border-radius: 25px; overflow: hidden; border: 1px solid #eee; transition: 0.3s; height: 100%; }
.p_card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.p_card_img { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.p_card_img img { width: 100%; height: 100%; object-fit: cover; }
.p_badge { position: absolute; top: 20px; left: 20px; color: #fff; padding: 5px 15px; border-radius: 50px; font-weight: 700; font-size: 12px; }
.p_card_txt { padding: 25px; }
.p_card_name { font-size: 1.4rem; font-weight: 800; color: #000; margin-bottom: 8px; }
.p_card_slogan { color: #888; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* [4] 뷰 페이지 디자인 */
.p_view_container { display: flex; gap: 60px; align-items: flex-start; }
.p_side_profile { flex: 0 0 320px; position: sticky; top: 20px; }
.p_profile_box { background: #fff; border-radius: 30px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.08); border: 1px solid #f0f0f0; }
.p_profile_img { width: 100%; aspect-ratio: 3/4; overflow: hidden; position: relative; background: #f8f8f8; }
.p_profile_img img { width: 100%; height: 100%; object-fit: cover; }
.p_cat_badge { position: absolute; top: 20px; left: 20px; padding: 5px 15px; border-radius: 20px; color: #fff; font-size: 12px; font-weight: 700; z-index: 2; }
.p_profile_info { padding: 30px; }
.p_athlete_name { font-size: 28px; font-weight: 800; margin: 0 0 15px 0; }
.p_athlete_desc { background: #f4f6f9; padding: 20px; border-radius: 15px; font-size: 14px; color: #444; margin-bottom: 25px; line-height: 1.5; border-left: 4px solid #ddd; }
.p_athlete_meta { display: flex; border-top: 1px solid #eee; padding-top: 20px; gap: 10px; }
.p_meta_col { flex: 1; }
.p_lbl { display: block; font-size: 11px; color: #aaa; margin-bottom: 5px; font-weight: 600; }
.p_val { font-size: 14px; font-weight: 700; color: #333; }

.p_main_details { flex: 1; min-width: 0; }
.p_tab_group { display: flex; background: #eee; padding: 6px; border-radius: 12px; margin-bottom: 30px; }
.p_tab_item { flex: 1; border: none; background: none; padding: 14px; font-weight: 700; color: #888; cursor: pointer; border-radius: 8px; font-size: 15px; transition: 0.2s; }
.p_tab_item.active { background: #fff; color: #000; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

/* 경력 텍스트 제한 및 더보기 스타일 */
.career_limited { max-height: 400px; overflow: hidden; position: relative; }
.career_limited::after { content: ""; position: absolute; bottom: 0; left: 0; width: 100%; height: 100px; background: linear-gradient(transparent, #fff); pointer-events: none; }

.p_tab_content { display: none; }
.p_tab_content.active { display: block; animation: fadeIn 0.4s ease; }

.p_media_grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.p_media_img { aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; cursor: pointer; border: 1px solid #eee; }
.p_media_img img { width: 100%; height: 100%; object-fit: cover; transition: 0.3s; }
.p_media_img:hover img { transform: scale(1.1); }
.p_video_list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 20px; }
.p_v_iframe { position: relative; padding-bottom: 56.25%; height: 0; border-radius: 15px; overflow: hidden; background: #000; }
.p_v_iframe iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* [5] 글쓰기 페이지 디자인 */
.p_form_grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.p_form_group { margin-bottom: 20px; }
.p_label { display: block; font-weight: 700; margin-bottom: 8px; color: #555; font-size: 14px; }
.p_input { width: 100%; border: 1px solid #ddd; padding: 12px 15px; border-radius: 10px; font-size: 15px; outline: none; transition: 0.2s; }
.p_input:focus { border-color: #111; box-shadow: 0 0 0 3px rgba(0,0,0,0.03); }

/* [6] 공통 버튼 및 페이지네이션 */
.p_btn { background: #111; color: #fff; border: none; padding: 12px 25px; border-radius: 10px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; transition: 0.2s; }
.p_pagination { margin-top: 60px; display: flex; justify-content: center; gap: 8px; }
.p_pagination a, .p_pagination span { display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid #eee; text-decoration: none; color: #666; font-weight: 700; background: #fff; }
.p_pagination .pg_current { background: #111; color: #fff; border-color: #111; }

/* [7] 애니메이션 및 반응형 강화 */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 992px) {
    .p_view_container { flex-direction: column; }
    .p_side_profile { flex: none; width: 100%; max-width: 400px; margin: 0 auto 40px; position: static; }
    .p_header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .p_header_right { width: 100%; align-items: flex-start; }
    .p_form_grid { grid-template-columns: 1fr; }
}

/* 모바일 전용 최적화 (768px 이하) */
@media (max-width: 768px) {
    .p_header .p_title { font-size: 1.8rem; } /* 타이틀 크기 축소 */
    
    .p_header_right { gap: 10px; }
    .p_search_form { width: 100%; display: flex; } /* 검색창 가로 꽉 차게 */
    .p_input_text { flex: 1; width: auto; } /* 입력창 유연하게 확장 */
    
    .p_dropdown_group { width: 100%; justify-content: space-between; } /* 버튼들 정렬 */
    .p_dropdown { flex: 1; }
    .p_dropbtn { width: 100%; justify-content: center; padding: 12px 0; }
    .p_dropdown_content { width: 100%; } /* 드롭다운 메뉴도 넓게 */

    /* 리스트 그리드 조정: 모바일에서는 2열 혹은 1열 */
    .p_list_grid { 
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); 
        gap: 15px; 
    }
    .p_card { border-radius: 15px; }
    .p_card_txt { padding: 15px; }
    .p_card_name { font-size: 1.1rem; }
    .p_card_slogan { font-size: 12px; }
    .p_badge { top: 10px; left: 10px; padding: 3px 10px; font-size: 10px; }
}

/* 초소형 기기 (480px 이하) */
@media (max-width: 480px) {
    .p_list_grid { grid-template-columns: 1fr 1fr; } /* 무조건 2열 유지 */
}

/* 검색 폼 내부 레이아웃 수정 */
.p_search_form { 
    display: flex; 
    gap: 5px; 
    align-items: center; 
    background: #f4f4f4; 
    padding: 5px; 
    border-radius: 12px;
    width: 100%; /* 부모 너비에 맞춤 */
}

/* 입력창 너비 최적화 */
.p_input_text { 
    border: none; 
    background: #fff; 
    padding: 0 15px; 
    border-radius: 8px; 
    flex: 1; /* 남은 공간 모두 차지 */
    min-width: 0; /* flex 환경에서 찌그러짐 방지 */
    height: 35px; 
    outline: none; 
    font-size: 14px;
}

/* 검색 버튼 정렬 및 크기 고정 */
.p_search_btn { 
    border: none; 
    width: 35px; 
    height: 35px; 
    border-radius: 8px; 
    color: #fff; 
    cursor: pointer; 
    flex-shrink: 0; /* 버튼 크기 유지 */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* style.css 수정 */

@media (max-width: 992px) {
    .p_side_profile { 
        flex: none; 
        width: 100%; 
        max-width: 400px; /* 박스 최대 너비 제한 */
        margin: 0 auto 40px; /* 사이드바 자체를 중앙으로 */
        position: static; 
    }

    .p_profile_box {
        margin: 0 auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center; /* 내부 요소들 중앙 정렬 */
    }

    .p_profile_img {
        margin: 0 auto !important; /* 이미지 컨테이너 중앙 정렬 */
        width: 100% !important;
        max-width: 320px; /* 기존 디자인의 비율 유지 */
    }
    
    /* 슬라이더 내부의 개별 아이템들이 왼쪽으로 쏠리지 않도록 교정 */
    .profile-slider .slide-item {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .profile-slider .slide-item img {
        margin: 0 auto !important;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}