/*
 * 목차:
 * 1. 테마 정보 및 전체 스타일 초기화
 * 2. 전문가 목록 및 카드 스타일 
 * 3. 전문가 프로필 및 카드 스타일
 * 4. 페이지네이션 스타일
 * 5. 반응형 디자인
 * 6. 프로필 레이아웃 스타일( 프로필 컨테이너의 플렉스 레이아웃,*참고: 채팅 관련 스타일은 chat.css로 이동)
 */

/*
 * 1. 테마 정보 및 전체 스타일 초기화
 * - 테마 메타 정보
 * - 기본 폰트, 여백, 박스 모델 설정
 * - !important 제거로 테마와 Elementor 스타일 유지
 */
/*
 Theme Name:   Songil Astra Child
 Theme URI:    https://songilhelp.com/
 Description:  Astra Child Theme for Songil
 Author:       Songil
 Author URI:   https://songilhelp.com/
 Template:     astra
 Version:      1.0.18
 Text Domain:  astra-child
*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
}

/*
 * 2. 전문가 목록 및 카드 스타일
 * - 전문가 목록 컨테이너 및 그리드 레이아웃
 * - 전문가 카드 디자인 및 버튼 스타일
 */
.expert-listing {
    padding: 20px;
    max-width: 85%;
    margin: 0 auto;
    text-align: center;
}

.expert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.expert-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    max-width: 300px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.expert-photo {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-bottom: 10px;
}

.expert-card h2 {
    font-size: 18px;
    margin: 10px 0;
}

.expert-card p {
    font-size: 14px;
    color: #666;
}

.expert-card .button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.expert-card .button:hover {
    background-color: #218838;
}

/*
 * 3. 전문가 프로필 및 카드 스타일
 * - 프로필 컨테이너 및 카드 디자인
 * - 프로필 이미지 및 평점 스타일
 */
.expert-profile {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #f9f9f9;
}

.profile-card {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.profile-card h2 {
    font-size: 28px;
    margin: 0 0 10px;
    color: #333333;
}

.profile-image img,
.profile-image .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
}

.rating {
    color: #f39c12;
    font-size: 16px;
    margin-bottom: 15px;
}

.profile-card p {
    font-size: 16px;
    color: #555555;
    margin: 10px 0;
}

.profile-card p strong {
    color: #333333;
}



/*
 * 4. 페이지네이션 스타일
 * - 페이지네이션 레이아웃 및 버튼 스타일
 * - 활성 페이지 및 화살표 스타일
 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.pagination-page {
    display: inline-block;
    padding: 8px 12px;
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.pagination-page.active {
    background: #28a745;
    color: #fff;
    border: 2px solid #28a745;
}

.pagination-page:hover {
    background: #ddd;
}

.pagination-arrow {
    display: inline-block;
    padding: 8px 12px;
    background: #f1f1f1;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.pagination-arrow:hover {
    background: #ddd;
}

.pagination-arrow.disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.pagination-arrow.disabled:hover {
    background: #e9ecef;
}



/*
 * 5. 반응형 디자인
 * - 태블릿 및 모바일 환경에 맞춘 스타일 조정
 */
@media (max-width: 1024px) {
    .services-section .elementor-column {
        width: 33.33%;
    }
    .services-section .elementor-image {
        max-width: 250px;
    }
}

@media (max-width: 768px) {
    .services-section .elementor-column {
        width: 100%;
        margin-bottom: 20px;
    }
    .services-section .elementor-image {
        max-width: 200px;
    }
    .menu-item-has-children .sub-menu.elementor-nav-menu--dropdown {
        display: none;
    }
    .menu-item-has-children.active .sub-menu.elementor-nav-menu--dropdown {
        display: block;
    }
    .elementor-nav-menu .menu-item-has-children > a .user-avatar {
        width: 33.6px;
        height: 33.6px;
        margin-right: 6px;
    }
    .elementor-nav-menu .menu-item-has-children > a .user-name {
        font-size: 15.6px;
    }
    .elementor-item-anchor.has-submenu::after {
        margin-left: 6px;
    }
    .expert-profile {
        padding: 20px 10px;
    }
    .profile-card {
        padding: 15px;
    }
    .profile-card h2 {
        font-size: 24px;
    }
    .profile-image img,
    .profile-image .avatar {
        width: 100px;
        height: 100px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-item {
        padding-bottom: 40px;
        width: 100%;
    }
    .gallery-item img {
        max-width: none;
        object-fit: contain;
    }
    .review-form {
        padding: 15px;
    }
    .expert-listing {
        max-width: 90%;
    }
    .expert-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    .expert-card {
        max-width: 250px;
    }
    .profile-container {
        flex-direction: column;
        align-items: center;
        padding-bottom: 150px !important; /* 수정: 모바일에서도 하단 여백 추가 */
    }
    .expert-profile {
        width: 100%;
        max-height: none;
    }
    .chat-container {
        width: 100% !important;
        position: static !important;
        justify-content: flex-start !important;
        align-items: flex-start !important;
        overflow-y: visible !important;
        background: #fff !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: 690px !important;
        z-index: 100000 !important;
    }
    footer, .site-footer, .footer, .ast-footer, #colophon {
        position: relative !important;
        z-index: 1 !important;
        margin-top: 150px !important;
    }
    .image-modal {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
    }
    .chat-requests-container {
        flex-direction: column;
        align-items: center;
    }
    .guest-list {
        width: 100%;
        max-height: 300px;
    }
    .chat-container {
        width: 100%;
        position: static !important;
        height: 690px !important;
    }
}


/*
 * 6. 프로필 레이아웃 스타일
 * - 프로필 컨테이너의 플렉스 레이아웃
 * - 참고: 채팅 관련 스타일은 chat.css로 이동
 */
.profile-container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 100px !important; /* 하단 여백 추가하여 푸터와 겹치지 않도록 */
}

.expert-profile {
    width: 700px;
    overflow-y: auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}
