@charset "UTF-8";

/* ==========================================================
   1. Basic Reset (keep independence from common.css)
========================================================== */
* { box-sizing: border-box; }
html, body {
    margin: 0; 
    padding: 0; 
    font-family: 'Pretendard', sans-serif; 
    background-color: #f5f7f9; 
    overflow-x: clip; 
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
p { margin: 0; }
ul, li { margin: 0; padding: 0; list-style: none; }

/* ==========================================================
   2. Header
   HTML structure: <header> > <h1.logo> + <div.header-nav>
   logo and header-nav are siblings — header itself is the flex container
========================================================== */
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: 1000 !important;
    height: 70px !important;
    display: block !important;
}

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

/* Override inline style on SVG (height: 35px; width: 89px) */
.main-header .logo svg,
.main-header .logo img {
    height: 42px !important;
    width: 105px !important;
    display: block !important;
}

/* Header nav: back button only, no positioning needed (flex handles it) */
.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;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
}

/* Back button: unified style with expert.css */
.main-header .btn-back {
    display: flex !important;
    align-items: center !important;
    color: #555 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    gap: 5px !important;
}

/* ==========================================================
   3. Board Main Content
========================================================== */
.board-container { max-width: 800px; margin: 40px auto 100px; background: #fff; border-radius: 15px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); overflow: hidden; border: 1px solid #e0e0e0; }

.expert-mini-profile { display: flex; align-items: center; gap: 20px; padding: 25px 30px; background: #0f4c3a; color: #fff; }
.expert-mini-profile img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.2); background: #fff; }
.expert-mini-info h2 { margin: 0 0 5px 0; font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.expert-mini-info h2 span { font-size: 13px; font-weight: 600; color: #a7f3d0; background: rgba(255,255,255,0.1); padding: 3px 8px; border-radius: 4px; }
.expert-mini-info p { margin: 0; font-size: 14px; color: rgba(255,255,255,0.8); }

/* Tab bar: sticky below 70px header */
.board-tabs { display: flex; background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 70px; z-index: 999; }
.tab-btn { flex: 1; padding: 18px 0; border: none; background: none; font-size: 16px; font-weight: 600; color: #888; cursor: pointer; transition: 0.2s; position: relative; }
.tab-btn.active { color: #222; font-weight: 800; }
.tab-btn.active::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 100%; height: 3px; background: #27ae60; }
.tab-count { color: #27ae60; margin-left: 4px; font-size: 14px; }

.tab-content { display: none; padding: 30px; }
.tab-content.active { display: block; }

/* ==========================================================
   4. Case Cards
========================================================== */
.case-list { display: flex; flex-direction: column; gap: 15px; }
.case-card { padding: 20px; border: 1px solid #eee; border-radius: 12px; display: flex; flex-direction: column; gap: 10px; transition: 0.2s; background: #fff; }
.case-card:hover { border-color: #27ae60; box-shadow: 0 4px 15px rgba(39,174,96,0.05); transform: translateY(-2px); }
.case-header { display: block; margin-bottom: 5px; }
.case-category { font-size: 12px; font-weight: 700; color: #27ae60; background: #f0fdf4; padding: 4px 10px; border-radius: 4px; display: inline-block; }
.case-title { font-size: 16px; font-weight: 700; color: #222; margin: 0; line-height: 1.4; word-break: keep-all; }
.case-preview { font-size: 14px; color: #666; line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================================
   5. Review Cards
========================================================== */
.review-list { display: flex; flex-direction: column; gap: 20px; }
.review-card { padding: 25px; border-bottom: 1px solid #f5f5f5; display: flex; flex-direction: column; gap: 12px; }
.review-card:last-child { border-bottom: none; }
.review-user-info { display: flex; align-items: center; gap: 10px; }
.review-user { font-size: 15px; font-weight: 700; color: #333; }
.review-product { font-size: 12px; color: #666; background: #f8f9fa; padding: 4px 8px; border-radius: 4px; }
.review-stars { color: #f1c40f; font-size: 13px; }
.review-text { font-size: 15px; color: #444; line-height: 1.6; margin: 0; word-break: keep-all; }

/* ==========================================================
   6. Load More Button & Footer
========================================================== */
.btn-load-more { display: block; width: 100%; padding: 18px; text-align: center; background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; color: #555; font-size: 15px; font-weight: 700; cursor: pointer; transition: 0.2s; margin-top: 20px; }
.btn-load-more:hover { background: #f1f3f5; color: #222; }

.board-footer { padding: 40px 20px 80px; background: #f5f7f9; text-align: center; }
.board-footer p { color: #ccc; font-size: 11px; margin: 0; }

/* ==========================================================
   7. Accordion UI (Case tab only)
========================================================== */
.accordion-card { cursor: pointer; position: relative; display: block; }
.accordion-icon { position: absolute; right: 20px; top: 22px; color: #aaa; transition: transform 0.3s ease; font-size: 14px; }
.accordion-card.open .accordion-icon { transform: rotate(180deg); color: #27ae60; }

/* Preview shown when accordion is closed */
.case-preview { display: -webkit-box; opacity: 1; transition: opacity 0.2s; }
.accordion-card.open .case-preview { display: none; opacity: 0; }

/* Expanded body area */
.accordion-body { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out, opacity 0.3s ease; opacity: 0; }
.accordion-card.open .accordion-body { opacity: 1; }
.accordion-content { padding-top: 20px; margin-top: 15px; border-top: 1px dashed #eee; }

/* Q&A text design */
.q-section, .a-section { margin-bottom: 20px; font-size: 14px; line-height: 1.6; color: #444; word-break: keep-all; }
.a-section { margin-bottom: 0; }
.q-section strong { color: #555; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 15px; }
.q-section strong::before { content: 'Q'; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background: #555; color: #fff; border-radius: 4px; font-size: 12px; }
.a-section strong { color: #27ae60; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 15px; }
.a-section strong::before { content: 'A'; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; background: #27ae60; color: #fff; border-radius: 4px; font-size: 12px; }

/* ==========================================================
   8. Mobile Responsive (768px and below)
========================================================== */
@media (max-width: 768px) {
    header.main-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 55px !important;
        z-index: 2147483647 !important;
    }
    body { padding-top: 55px !important; }
    .main-header .logo svg,
    .main-header .logo img {
        height: 35px !important;
        width: 89px !important;
    }
    
    /* Mobile logo size: override SVG inline style, match common.css */
    .main-header .logo svg,
    .main-header .logo img {
        height: 35px !important;
        width: 89px !important;
    }

    /* Tab bar: adjust sticky top for mobile header height */
    .board-tabs { top: 55px; }

    .board-container { margin: 15px; border-radius: 10px; }
    .expert-mini-profile { padding: 20px; }
    .expert-mini-profile img { width: 50px; height: 50px; }
    .expert-mini-info h2 { font-size: 18px; }
    .expert-mini-info p { font-size: 13px; }
    .tab-btn { padding: 15px 0; font-size: 15px; }
    .tab-content { padding: 20px 15px; }
    .case-card { padding: 15px; }
    .review-card { padding: 20px 0; }
}
