/* ==========================================
   大師詳情頁 - 專屬樣式
   ========================================== */

body {
    background-color: var(--light-bg);
    color: var(--dark-bg);
}

.serif {
    font-family: 'Noto Serif TC', serif;
}

/* Hero */
.hero-bg {
    background: linear-gradient(135deg, rgba(234, 176, 135, 0.3) 0%, rgba(199, 128, 75, 0.3) 100%),
                url('https://images.unsplash.com/photo-1518531933037-91b2f5f229cc?w=1600&h=400&fit=crop') center/cover;
    position: relative;
    /*height: 320px;*/
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 36, 27, 0.4);
}

/* Profile Card */
.profile-card-wrap{
    transform: translateY(4vw);
}
.profile-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(44, 36, 27, 0.12);
    position: relative;
    z-index: 10;
}

.avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

.masters-main-content-wrap{
    margin-top: 7vw;
}

/* Service Cards (Detail) */
.service-card-detail {
    background: white;
    border-radius: 12px;
    border: 2px solid #f4d0b8;
    padding: 24px;
    transition: all 0.3s ease;
}

.service-card-detail:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(234, 176, 135, 0.2);
    transform: translateY(-2px);
}

/* Reviews */
.review-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #f4d0b8;
    padding: 20px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

/* Rating Bar */
.rating-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    background: var(--accent-gold);
    height: 100%;
    transition: width 0.5s ease;
}

/* Sidebar Cards */
.sidebar-card {
    background: white;
    border-radius: 12px;
    border: 2px solid #f4d0b8;
    padding: 24px;
    margin-bottom: 20px;
}

/* Section Title */
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark-bg);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

/* ══════════════════════════════════════════
   RWD — 各斷點細調
   ══════════════════════════════════════════ */

/* ── Tablet：768px – 1023px ──────────────── */
@media (min-width: 768px) and (max-width: 1023px) {
    /*.hero-bg {
        height: 220px;
    }*/

    /* profile card 往上位移少一點 */
    .profile-card-wrap {
        bottom: -60px !important;
    }

    .main-content-wrap {
        margin-top: 100px !important;
    }

    .profile-card {
        padding: 24px 20px;
    }

    .avatar {
        width: 110px;
        height: 110px;
    }
}

/* ── Mobile：< 768px ─────────────────────── */
@media (max-width: 767px) {

    /* Hero：固定裝飾高度，profile card 會往下流 */
    /*.hero-bg {
        height: 100px;
        overflow: visible;
    }*/

    /* Profile card wrap：脫離 absolute，回正常文件流
       margin-top 負值讓它疊在 hero 下緣，但文件流位置正確 */
    /*.profile-card-wrap {
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        margin: -24px 12px 0;
        padding: 0;
    }*/

    /* Main content：profile card 已在流中，只需小間距 */
    /*.main-content-wrap {
        margin-top: 0 !important;
        padding-top: 20px !important;
    }*/

    /* Profile card 內部：垂直置中排列 */
    .profile-card {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
        padding: 20px 16px;
        gap: 12px !important;
    }

    /* 上半段（頭像 + 文字）也改直排 */
    .profile-card > .flex:first-child {
        flex-direction: column !important;
        align-items: center !important;
        width: 100%;
        gap: 12px !important;
    }

    /* 頭像縮小 */
    .avatar {
        width: 88px;
        height: 88px;
    }

    /* 姓名縮小 */
    .profile-card h1 {
        font-size: 1.4rem;
    }

    /* 評分列允許換行、置中 */
    .profile-card .flex.items-center.gap-4 {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px 8px;
        font-size: 0.8rem;
    }

    /* 「|」分隔符在換行後很醜，隱藏 */
    .profile-card .flex.items-center.gap-4 > span:not(:first-child):not(.flex) {
        display: none;
    }

    /* 按鈕列改橫排 */
    .profile-card .flex.flex-col.gap-3 {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        margin-left: 0 !important;
        width: 100%;
        margin-top: 4px;
    }

    .profile-card .flex.flex-col.gap-3 button {
        flex: 1;
        min-width: 80px;
        max-width: 130px;
        font-size: 0.82rem;
        padding: 9px 6px;
    }

    /* Section title 縮小 */
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 16px;
    }

    /* About 區塊 padding 縮小 */
    .bg-white.rounded-xl.p-8 {
        padding: 16px !important;
    }

    /* 服務卡片 padding */
    .service-card-detail {
        padding: 16px;
    }

    /* 服務卡片最底行：改直排 */
    .service-card-detail .flex.items-center.justify-between {
        flex-wrap: wrap;
        gap: 8px;
    }

    .service-card-detail .flex.items-center.justify-between .btn-primary {
        width: 100%;
    }

    /* Sidebar 在手機排在下面，不需要特別處理（已是 flex-col）*/
    .sidebar-card {
        padding: 16px;
    }
}

/* ── 極窄：< 400px ───────────────────────── */
@media (max-width: 399px) {
    .profile-card {
        padding: 16px 12px;
    }

    .avatar {
        width: 76px;
        height: 76px;
    }

    .profile-card h1 {
        font-size: 1.2rem;
    }
}
