@charset "UTF-8";

/* ==========================================================
   1. Basic Reset (Independent from common.css)
========================================================== */
* { box-sizing: border-box; }
html {
    overflow-x: hidden; /* Apply only to html — body overflow breaks sticky */
}
body {
    margin: 0; 
    padding: 0; 
    font-family: 'Pretendard', sans-serif; 
    background: #fff;
    overflow: visible !important; /* Override common.css: body overflow kills sticky */
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
p { margin: 0; }
ul, li { margin: 0; padding: 0; list-style: none; }

/* ==========================================================
   2. Header (Absolute right-aligned back button)
========================================================== */
body header.main-header {
    width: 100% !important;
    max-width: 100% !important;
    background: #ffffff !important;
    border-bottom: 1px solid #eee !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
    height: 70px !important;
    display: block !important;
}

body header.main-header .header-nav {
    max-width: 1100px !important;
    margin: 0 auto !important;
    display: flex !important;
    flex-direction: row !important; 
    justify-content: space-between !important; 
    align-items: center !important;
    height: 100% !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    /* Force override: undo .header-nav hide from common.css @840px */
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
}

header.main-header .logo {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

header.main-header .logo svg,
header.main-header .logo img {
    height: 42px !important;  /* PC: match common.css */
    width: 105px !important;
}

header.main-header .btn-back {
    display: flex !important;
    align-items: center !important;
    color: #555 !important;        /* #333 → #555 */
    font-size: 14px !important;    /* 15px → 14px */
    font-weight: 600 !important;   /* add */
    text-decoration: none !important;
    white-space: nowrap !important; 
}

/* ==========================================================
   3. Main Layout & Sticky Menu
========================================================== */
.profile-container { 
    max-width: 1100px; 
    margin: 40px auto; 
    display: flex; 
    align-items: flex-start; /* Core for Sticky behavior */
    gap: 30px; 
    padding: 0 20px; 
    min-height: 800px; 
}
.profile-main { flex: 1; min-width: 0; }

.sticky-sidebar { 
    position: sticky; 
    top: 100px; 
    align-self: flex-start; 
    flex-shrink: 0; 
    width: 300px; 
    z-index: 10; 
}

/* ==========================================================
   4. Profile Details Content
========================================================== */
.expert-header { display: flex; gap: 30px; padding-bottom: 30px; border-bottom: 2px solid #333; align-items: center; }
.expert-photo { width: clamp(100px, 25vw, 140px); flex-shrink: 0; aspect-ratio: 3/4; background-color: #f1f3f5; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.08); display: flex; align-items: center; justify-content: center; }
.expert-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

.expert-intro { flex: 1; min-width: 0; }
.badge-group { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; }
.badge.veteran { background-color: #fff3e0; color: #e67e22; border: 1px solid #f39c12; }
.badge.cert { background-color: #f0f4f8; color: #34495e; border: 1px solid #bdc3c7; }
.badge.major { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #81c784; }

.expert-intro h2 { margin: 0 0 5px 0; font-size: 22px; color: #222; word-break: keep-all; font-weight: 800; }
.expert-intro .office { margin: 0 0 15px 0; color: #666; font-size: 14px; word-break: keep-all; }
.expert-intro .summary { margin: 0; line-height: 1.6; color: #444; font-size: 15px; word-break: keep-all; }
.highlight { color: #27ae60; font-weight: bold; }

.detail-section { padding: 40px 0; border-bottom: 1px solid #eee; }
.no-border-bottom { border-bottom: none; padding-bottom: 100px; }
.detail-section h3 { font-size: 20px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; font-weight: 800; color: #333; }
.icon-green { color: #27ae60; }

.tag-group { display: flex; gap: 10px; flex-wrap: wrap; }
.tag-group span { background: #f0f7f2; color: #27ae60; padding: 8px 15px; border-radius: 20px; font-weight: 600; font-size: 14px; }

.career-container { display: flex; flex-direction: column; gap: 40px; margin-top: 20px; }
.career-block h4 { font-size: 16px; color: #333; margin-bottom: 15px; border-bottom: 2px solid #27ae60; padding-bottom: 8px; display: inline-block; font-weight: 700; }
.info-list { padding-left: 20px; color: #555; line-height: 1.8; font-size: 15px; }
.info-list li { position: relative; margin-bottom: 10px; }
.info-list li::before { content: ""; position: absolute; left: -16px; top: 10px; width: 6px; height: 6px; background-color: #27ae60; border-radius: 50%; }

.map-wrapper { display: flex; gap: 20px; background: #f9f9f9; padding: 25px; border-radius: 12px; }
.map-info { flex: 1; min-width: 240px; word-break: keep-all; display: flex; flex-direction: column; justify-content: center; }
.office-name { font-weight: bold; font-size: 18px; margin-bottom: 10px; color: #333; display: flex; align-items: center; gap: 8px; }
.office-address { color: #666; font-size: 15px; line-height: 1.8; margin-bottom: 20px; }
.subway-info { color: #27ae60; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.btn-map-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; background: #fff; color: #333; border-radius: 8px; font-size: 14px; font-weight: bold; border: 1px solid #ccc; box-shadow: 0 2px 4px rgba(0,0,0,0.05); align-self: flex-start; }

.expert-map-wrapper { flex: 1.5; min-width: 250px; border-radius: 12px; border: 1px solid #e0e0e0; background: #eaeaea; }
.map-placeholder { display: flex; align-items: center; justify-content: center; color: #999; }
.placeholder-content { text-align: center; }

.case-list { display: flex; flex-direction: column; gap: 10px; }
.case-item-row { display: flex; align-items: center; padding: 16px 20px; background: #fff; border: 1px solid #f0f0f0; border-radius: 10px; transition: all 0.2s; }
.case-item-row:hover { border-color: #27ae60; box-shadow: 0 4px 12px rgba(39, 174, 96, 0.1); }
.case-category { font-size: 13px; font-weight: 800; color: #27ae60; background: #f0fdf4; padding: 4px 10px; border-radius: 6px; margin-right: 15px; white-space: nowrap; }
.case-title-text { font-size: 15px; color: #333; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.review-card { background: #fff; border: 1px solid #eee; border-radius: 15px; padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column; gap: 15px; }
.review-card-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f5f5f5; padding-bottom: 12px; }
.review-user { font-size: 14px; font-weight: 800; color: #333; }
.review-type { font-size: 12px; color: #666; background: #f5f5f5; padding: 4px 8px; border-radius: 4px; }
.review-body { font-size: 15px; color: #555; line-height: 1.6; word-break: keep-all; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }

.btn-more-view { display: block; width: 220px; margin: 30px auto 0; padding: 14px; text-align: center; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; color: #555; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.btn-more-view:hover { background: #f1f3f5; color: #333; }

/* ==========================================================
   5. Sidebar Payment Button
========================================================== */
.consult-card { display: flex; flex-direction: column; gap: 12px; background: #fff; border: 1px solid #e1e1e1; border-radius: 15px; padding: 20px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.consult-card h4 { margin: 0 0 15px 0; font-size: 18px; font-weight: 800; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.btn-consult { height: 50px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 15px; border-radius: 8px; font-weight: bold; font-size: 15px; border: none; cursor: pointer; }
.btn-060 { background: #fff; color: #d32f2f; border: 1px solid #d32f2f; width: 100%; }
.secondary-buttons { display: flex; flex-direction: column; gap: 12px; }
.btn-hipass { background: #27ae60; color: #fff; width: 100%; }
.btn-online { background: #333; color: #fff; width: 100%; }

/* ==========================================================
   6. Footer
========================================================== */
.expert-footer { padding: 40px 20px 120px; background: #f9f9f9; text-align: center; border-top: 1px solid #eee; }
.expert-footer p { color: #999; font-size: 12px; margin: 0; }
.expert-footer .copyright { color: #ccc; font-size: 11px; margin-top: 5px; }

/* ==========================================================
   7. Mobile Responsive Settings (900px and below)
========================================================== */
@media (max-width: 900px) {
    .profile-container { padding-bottom: 20px; }  /* 100px → 20px */
    .no-border-bottom { padding-bottom: 20px; }   /* 100px → 20px */
    .map-wrapper { flex-direction: column; }
    .map-info, .expert-map-wrapper { min-width: 100%; width: 100%; }
    .expert-header { flex-direction: row; align-items: flex-start; gap: 15px; padding-bottom: 20px; }
    .expert-photo { width: 100px; height: 130px; }
    .expert-intro h2 { font-size: 20px; margin: 0 0 5px 0; }
    .expert-intro .office, .expert-intro .summary { font-size: 14px; }
    /* 모바일 인사말 2줄 클램프 해제 — 전체 표시 */
    
    .sticky-sidebar { 
        position: fixed; bottom: 0; left: 0; width: 100%; top: auto; 
        padding: 10px 15px calc(env(safe-area-inset-bottom) + 10px); 
        background: #fff; box-shadow: 0 -4px 15px rgba(0,0,0,0.08); 
        z-index: 9999; margin: 0;
    }
    .consult-card { gap: 8px; padding: 0; background: transparent; box-shadow: none; border: none; }
    .consult-card h4 { display: none; }
    .secondary-buttons { flex-direction: row; }
    .secondary-buttons .btn-consult { flex: 1; height: 45px; font-size: 13px; margin: 0; }
    
    /* Fixed mobile footer cutoff */
    .expert-footer { padding-bottom: 90px !important; }
}

/* ==========================================================
   Mobile Responsive Settings (768px and below)
========================================================== */
@media (max-width: 768px) {
    /* Review and Case List Layouts */
    .review-grid { grid-template-columns: 1fr; }
    .case-item-row { flex-direction: column; align-items: flex-start; gap: 8px; }
    .case-category { margin-right: 0; }
    .case-title-text { white-space: normal; line-height: 1.4; overflow: visible; }
    
    /* Header overrides to prevent conflicts with common.css */
    body {
        padding-top: 55px !important;  
    }

    body header.main-header {
        position: fixed !important; 
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 55px !important; 
        background: #ffffff !important;
        z-index: 2147483647 !important; 
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    body header.main-header .header-nav {
        display: flex !important;
        padding: 0 15px !important;
        justify-content: space-between !important; 
        align-items: center !important;
        height: 100% !important;
        /* Undo common.css mobile hide */
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
    }
    
    /* Logo: Left-aligned and size optimized for mobile */
    header.main-header .logo {
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
    header.main-header .logo a, 
    header.main-header .logo svg,       
    header.main-header .logo img {
        display: block !important;
        visibility: visible !important;
        height: 35px !important; 
        width: auto !important;
        opacity: 1 !important;
    }

    /* Back Button: Right-aligned, text size adjusted */
    header.main-header .btn-back {
        position: relative !important; 
        left: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important; 
        color: #333 !important;
        height: 100% !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }
}


.no-data-box { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 36px 20px; border: 1.5px dashed #e0e0e0; border-radius: 12px; gap: 8px; text-align: center; }
.no-data-box .nd-icon { font-size: 28px; color: #ddd; }
.no-data-box .nd-text { font-size: 14px; color: #bbb; font-weight: 600; }
.no-data-box .nd-sub { font-size: 12px; color: #ddd; }
.no-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.no-data-grid .no-data-box { cursor: pointer; transition: border-color 0.2s; }
.no-data-grid .no-data-box:hover { border-color: #27ae60; }
.badge.major { background-color: #e8f5e9; color: #2e7d32; border: 1px solid #81c784; }
