/* ==========================================================================
   SINGLE-POST.CSS - GIAO DIỆN BÀI VIẾT TIN TỨC & KIẾN THỨC Y KHOA CHUẨN 2026
   Dự án: Nâng cấp Website Hệ thống IVF Phương Châu 2026
   Áp dụng: Toàn bộ Single Post (Tin tức, Kiến thức y khoa, Cẩm nang điều trị)
   Đặc tính:
   - Chuẩn E-E-A-T (Medical Reviewer Card, Key Takeaways, Sticky TOC)
   - Nhận diện thương hiệu IVF Phương Châu (Quicksand, Plum #A44683, Teal #0E8885)
   - Tối ưu trải nghiệm đọc y khoa (Font 16.5px, line-height 1.85, Callout Box)
   ========================================================================== */

/* 0. BỐ CỤC KHUNG CHÍNH (CONTAINER) & TRIỆT TIÊU KHOẢNG TRẮNG / BANNER THEME CHA */
body.single-post .mediz-page-title-wrap,
.single-post .mediz-page-title-wrap {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

body.single-post .mediz-page-wrapper,
body.single-post #mediz-page-wrapper,
.single-post .mediz-page-wrapper,
.single-post #mediz-page-wrapper {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.ivf-single-post-wrapper {
    background-color: #F8FAFC !important;
    padding: 24px 0 60px 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334155;
}

.ivf-single-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Ẩn các đoạn text thô "Cố vấn chuyên môn" ở đầu bài viết vì đã có thẻ Reviewer Card 2026 */
.ivf-article-entry-content > p.has-text-align-right:first-of-type,
.ivf-article-entry-content > p.has-text-align-right:nth-of-type(2),
.ivf-article-entry-content > p.has-text-align-right {
    display: none !important;
}


/* 1. THANH ĐIỀU HƯỚNG BREADCRUMBS */
.ivf-subpage-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #64748B;
    margin-bottom: 24px;
}

.ivf-subpage-breadcrumbs a {
    color: #64748B !important;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.ivf-subpage-breadcrumbs a:hover {
    color: #A44683 !important;
}

.ivf-subpage-breadcrumbs .sep {
    color: #CBD5E1;
    font-size: 14px;
}

.ivf-subpage-breadcrumbs .current {
    color: #0F172A;
    font-weight: 700;
    max-width: 480px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 2. KHỐI HEADER BÀI VIẾT (TRUST & E-E-A-T HEADER) */
.ivf-single-header-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 36px 36px 30px 36px;
    border: 1.5px solid #F1F5F9;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
    margin-bottom: 30px;
}

.ivf-single-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.ivf-single-cat-badge {
    display: inline-flex;
    align-items: center;
    background: #FDF2F8;
    color: #A44683;
    font-size: 12.5px;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid #FBCFE8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ivf-single-cat-badge:hover {
    background: #A44683;
    color: #FFFFFF !important;
}

.ivf-single-reading-time,
.ivf-single-post-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #64748B;
    font-weight: 600;
}

.ivf-single-meta-dot {
    color: #CBD5E1;
}

.ivf-single-title {
    font-family: 'Quicksand', sans-serif !important;
    font-size: 32px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    color: #0F172A !important;
    margin: 0 0 24px 0 !important;
    letter-spacing: -0.3px;
}

/* THẺ THẨM ĐỊNH Y KHOA (MEDICAL REVIEWER BADGE) */
.ivf-medical-reviewer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 12px 18px;
}

.ivf-reviewer-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ivf-reviewer-avatar-wrap {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.ivf-reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FFFFFF;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ivf-reviewer-verified-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #0E8885;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #FFFFFF;
}

.ivf-reviewer-info {
    display: flex;
    flex-direction: column;
}

.ivf-reviewer-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #0E8885;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.ivf-reviewer-name {
    font-family: 'Quicksand', sans-serif;
    font-size: 15.5px;
    font-weight: 700;
    color: #0F172A;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.ivf-reviewer-name:hover {
    color: #A44683;
}

.ivf-reviewer-role {
    font-size: 12.5px;
    color: #64748B;
}

.ivf-reviewer-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ivf-eeat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

/* 3. LƯỚI NỘI DUNG 2 CỘT (DESKTOP: 72% / 28%) */
.ivf-single-main-layout {
    display: flex;
    align-items: flex-start;
    gap: 36px;
}

.ivf-single-content-col {
    flex: 1 1 0%;
    min-width: 0;
    background: #FFFFFF;
    border-radius: 20px;
    padding: 40px;
    border: 1.5px solid #F1F5F9;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.03);
}

.ivf-single-sidebar-col {
    width: 340px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 4. KHỐI TÓM TẮT NHANH (KEY TAKEAWAYS) */
.ivf-single-key-takeaways {
    background: linear-gradient(135deg, #FDF2F8 0%, #FFF1F2 100%);
    border: 1.5px solid #FBCFE8;
    border-left: 5px solid #A44683;
    border-radius: 16px;
    padding: 22px 26px;
    margin-bottom: 30px;
}

.ivf-key-takeaways-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 16.5px;
    font-weight: 800;
    color: #831843;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ivf-key-takeaways-content {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

/* 5. ẢNH ĐẠI DIỆN NỔI BẬT (FEATURED IMAGE) */
.ivf-single-featured-wrap {
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.ivf-single-featured-wrap img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 6. TYPOGRAPHY CHI TIẾT NỘI DUNG BÀI VIẾT */
.ivf-article-entry-content {
    font-size: 16.5px;
    line-height: 1.85;
    color: #334155;
}

.ivf-article-entry-content p {
    margin-bottom: 20px;
}

.ivf-article-entry-content strong {
    color: #0F172A;
}

.ivf-article-entry-content h2 {
    font-family: 'Quicksand', sans-serif !important;
    font-size: 23px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    color: #0F172A !important;
    margin: 36px 0 16px 0 !important;
    padding-left: 14px;
    border-left: 4px solid #A44683;
    scroll-margin-top: 105px; /* Tránh bị header che khi click TOC */
}

.ivf-article-entry-content h3 {
    font-family: 'Quicksand', sans-serif !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    color: #1E293B !important;
    margin: 28px 0 14px 0 !important;
    scroll-margin-top: 105px;
}

.ivf-article-entry-content ul,
.ivf-article-entry-content ol {
    margin: 0 0 24px 0;
    padding-left: 24px;
}

.ivf-article-entry-content li {
    margin-bottom: 10px;
    line-height: 1.75;
}

.ivf-article-entry-content blockquote {
    background: #F8FAFC;
    border-left: 4px solid #0E8885;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 24px 0;
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-style: italic;
    color: #0F172A;
}

.ivf-article-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.ivf-article-entry-content figure {
    margin: 24px 0;
}

.ivf-article-entry-content figcaption {
    font-size: 13.5px;
    color: #64748B;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* 7. KHỐI DOCTOR BIO CUỐI BÀI VIẾT (AUTHOR / CONSULTANT BIO CARD) */
.ivf-single-doctor-box {
    background: #FFFFFF;
    border: 1.5px solid #FBCFE8;
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 8px 30px rgba(164, 70, 131, 0.06);
    display: flex;
    align-items: center;
    gap: 24px;
}

.ivf-docbox-avatar {
    width: 85px;
    height: 85px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FDF2F8;
    box-shadow: 0 4px 14px rgba(164, 70, 131, 0.15);
    flex-shrink: 0;
}

.ivf-docbox-content {
    flex: 1 1 auto;
}

.ivf-docbox-tag {
    font-size: 12px;
    font-weight: 800;
    color: #A44683;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ivf-docbox-name {
    font-family: 'Quicksand', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: #0F172A;
    margin: 0 0 4px 0;
}

.ivf-docbox-role {
    font-size: 13.5px;
    color: #64748B;
    margin-bottom: 12px;
}

.ivf-docbox-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.ivf-btn-book-doc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #A44683 0%, #8A265E 100%);
    color: #FFFFFF !important;
    font-family: 'Quicksand', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 999px;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(164, 70, 131, 0.25);
    transition: all 0.25s ease;
}

.ivf-btn-book-doc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(164, 70, 131, 0.35);
}

.ivf-btn-profile-doc {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #FDF2F8;
    color: #A44683 !important;
    font-family: 'Quicksand', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid #FBCFE8;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.ivf-btn-profile-doc:hover {
    background: #FCE7F3;
}

/* 8. THANH CHIA SẺ & TAGS */
.ivf-single-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 0 0 0;
    margin-top: 30px;
    border-top: 1px solid #E2E8F0;
}

.ivf-share-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ivf-share-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #64748B;
}

.ivf-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #F1F5F9;
    color: #475569;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ivf-share-btn:hover {
    background: #A44683;
    color: #FFFFFF;
    transform: translateY(-2px);
}

/* 9. SIDEBAR: MỤC LỤC THÔNG MINH (SMART STICKY TOC) */
.ivf-toc-widget-card {
    background: #FFFFFF;
    border-radius: 18px;
    padding: 24px 22px;
    border: 1.5px solid #F1F5F9;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.ivf-toc-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #F1F5F9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ivf-toc-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.ivf-toc-list li a {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: #64748B;
    text-decoration: none !important;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
}

.ivf-toc-list li a:hover,
.ivf-toc-list li.active a {
    color: #A44683;
    background: #FDF2F8;
    border-left-color: #A44683;
    font-weight: 700;
    padding-left: 12px;
}

/* SIDEBAR: WIDGET TƯ VẤN & HOTLINE NHANH */
.ivf-sidebar-cta-card {
    background: linear-gradient(135deg, #5E1A45 0%, #3B0D2A 100%);
    border-radius: 18px;
    padding: 22px 18px;
    color: #FFFFFF;
    text-align: center;
    box-shadow: 0 8px 24px rgba(94, 26, 69, 0.18);
    overflow: hidden;
    box-sizing: border-box;
}

.ivf-sidebar-cta-card h3.ivf-sidebar-cta-title,
.ivf-sidebar-cta-title {
    font-family: 'Quicksand', sans-serif !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    margin: 0 0 8px 0 !important;
    color: #FFFFFF !important;
}

.ivf-sidebar-cta-card p.ivf-sidebar-cta-desc,
.ivf-sidebar-cta-desc {
    font-size: 13.5px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.55 !important;
    margin: 0 0 16px 0 !important;
}

.ivf-sidebar-hotline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #FFFFFF;
    color: #A44683 !important;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none !important;
    margin-bottom: 8px;
    box-sizing: border-box;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.ivf-sidebar-hotline-btn:hover {
    background: #FDF2F8;
    transform: translateY(-2px);
}

.ivf-sidebar-booking-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #FFFFFF !important;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: 999px;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

.ivf-sidebar-booking-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.6);
}

/* 10. KHỐI BÀI VIẾT LIÊN QUAN (RELATED POSTS 2026) */
.ivf-related-posts-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1.5px solid #E2E8F0;
}

.ivf-related-sec-header {
    text-align: center;
    margin-bottom: 32px;
}

.ivf-related-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: #FDF2F8;
    color: #A44683;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    border: 1px solid #FBCFE8;
}

.ivf-related-sec-title {
    font-family: 'Quicksand', sans-serif !important;
    font-size: 26px !important;
    font-weight: 800 !important;
    color: #0F172A !important;
    margin: 0 !important;
}

.ivf-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.ivf-related-card {
    background: #FFFFFF;
    border-radius: 18px;
    overflow: hidden;
    border: 1.5px solid #F1F5F9;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ivf-related-card:hover {
    transform: translateY(-6px);
    border-color: #FBCFE8;
    box-shadow: 0 14px 30px rgba(164, 70, 131, 0.12);
}

.ivf-related-thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
    background: #E2E8F0;
}

.ivf-related-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ivf-related-card:hover .ivf-related-thumb {
    transform: scale(1.05);
}

.ivf-related-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.ivf-related-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748B;
    margin-bottom: 8px;
}

.ivf-related-title {
    font-family: 'Quicksand', sans-serif !important;
    font-size: 16.5px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    line-height: 1.4 !important;
    margin: 0 0 10px 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ivf-related-desc {
    font-size: 13.5px;
    color: #64748B;
    line-height: 1.6;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ivf-related-link {
    font-size: 13px;
    font-weight: 700;
    color: #A44683;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 11. MOBILE STICKY BOTTOM BAR */
.ivf-mobile-action-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #E2E8F0;
    padding: 10px 16px;
    box-sizing: border-box;
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

.ivf-mobile-action-bar-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.ivf-mob-btn-call {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #FDF2F8;
    color: #A44683 !important;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid #FBCFE8;
    text-decoration: none !important;
}

.ivf-mob-btn-book {
    flex: 1.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, #A44683 0%, #8A265E 100%);
    color: #FFFFFF !important;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(164, 70, 131, 0.3);
}

/* 12. RESPONSIVE QUY CHUẨN TABLET & MOBILE */
@media screen and (max-width: 992px) {
    .ivf-single-main-layout {
        flex-direction: column;
    }

    .ivf-single-sidebar-col {
        width: 100%;
        position: static;
    }

    .ivf-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .ivf-single-content-col {
        padding: 24px 18px;
    }

    .ivf-single-header-card {
        padding: 24px 18px;
    }

    .ivf-single-title {
        font-size: 24px !important;
    }

    .ivf-single-doctor-box {
        flex-direction: column;
        text-align: center;
        padding: 22px 18px;
    }

    .ivf-docbox-actions {
        justify-content: center;
    }

    .ivf-related-grid {
        grid-template-columns: 1fr;
    }

    .ivf-mobile-action-bar {
        display: block;
    }

    /* Padding đáy để tránh nội dung bị che bởi mobile action bar */
    .ivf-single-post-wrapper {
        padding-bottom: 90px !important;
    }
}
