/**
 * SiHu Baby - Article Enhancements (TOC, Key Takeaways & Conversion CTA)
 * Version: 2.3.0
 */

/* ==========================================================================
   1. TABLE OF CONTENTS (MỤC LỤC BÀI VIẾT TỰ ĐỘNG)
   ========================================================================== */
.sihu-toc-wrapper {
    background: #FFF9F4;
    border: 1px solid #FFE4E8;
    border-radius: 14px;
    padding: 18px 22px;
    margin: 28px 0 35px 0;
    box-shadow: 0 4px 16px rgba(255, 126, 149, 0.06);
    font-family: inherit;
    transition: all 0.3s ease;
}

.sihu-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.sihu-toc-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    color: #E0315A;
}

.sihu-toc-icon {
    font-size: 19px;
    line-height: 1;
}

.sihu-toc-toggle {
    font-size: 13px;
    font-weight: 600;
    color: #8C98A4;
    background: #FFFFFF;
    border: 1px solid #FFE4E8;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.sihu-toc-header:hover .sihu-toc-toggle {
    color: #E0315A;
    border-color: #FF7E95;
}

.sihu-toc-content {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 126, 149, 0.25);
    max-height: 1000px;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

.sihu-toc-content.collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.sihu-toc-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sihu-toc-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 15px;
    line-height: 1.5;
}

.sihu-toc-bullet {
    color: #FF7E95;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.sihu-toc-link {
    color: #334155 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    font-weight: 500;
}

.sihu-toc-link:hover {
    color: #E0315A !important;
    text-decoration: underline !important;
}


/* ==========================================================================
   2. KEY TAKEAWAYS (TÓM TẮT 30 GIÂY CHO MẸ BẬN RỘN)
   ========================================================================== */
.sihu-key-takeaways {
    background: linear-gradient(135deg, #FFF5F7 0%, #FFFDF9 100%);
    border-left: 4px solid #FF7E95;
    border-radius: 0 12px 12px 0;
    padding: 18px 22px;
    margin: 25px 0 30px 0;
    box-shadow: 0 4px 14px rgba(255, 126, 149, 0.05);
}

.sihu-takeaway-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 16.5px;
    color: #E0315A;
    margin-bottom: 10px;
}

.sihu-takeaway-header span.dashicons,
.sihu-takeaway-header span.icon {
    font-size: 20px;
    color: #FFB800;
}

.sihu-takeaway-list {
    margin: 0;
    padding-left: 20px;
    color: #334155;
    font-size: 15px;
    line-height: 1.65;
}

.sihu-takeaway-list li {
    margin-bottom: 6px;
}
.sihu-takeaway-list li:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   3. ARTICLE CONVERSION CTA BOX (KHỐI KÊU GỌI HÀNH ĐỘNG CUỐI BÀI)
   ========================================================================== */
.sihu-article-cta-box {
    background: linear-gradient(135deg, #FFF9F4 0%, #FFF0F3 100%);
    border: 1.5px dashed #FF7E95;
    border-radius: 16px;
    padding: 32px 24px;
    margin: 40px 0 30px 0;
    text-align: center;
    box-shadow: 0 8px 24px rgba(255, 126, 149, 0.08);
    position: relative;
    overflow: hidden;
}

.sihu-cta-badge {
    display: inline-block;
    background: #FFE4E8;
    color: #E0315A;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
}

.sihu-cta-title {
    font-size: 22px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.sihu-cta-desc {
    font-size: 15.5px;
    color: #4B5563;
    max-width: 620px;
    margin: 0 auto 22px auto;
    line-height: 1.65;
}

.sihu-cta-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.sihu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.sihu-btn-zalo {
    background: linear-gradient(135deg, #0180C7 0%, #0068FF 100%);
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(0, 104, 255, 0.25);
}

.sihu-btn-zalo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 104, 255, 0.35);
    color: #FFFFFF !important;
}

.sihu-btn-shopee {
    background: linear-gradient(135deg, #EE4D2D 0%, #F05D40 100%);
    color: #FFFFFF !important;
    box-shadow: 0 4px 14px rgba(238, 77, 45, 0.25);
}

.sihu-btn-shopee:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 77, 45, 0.35);
    color: #FFFFFF !important;
}

.sihu-cta-trust {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    border-top: 1px solid rgba(255, 126, 149, 0.15);
    padding-top: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.sihu-cta-trust span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Screen reader text for semantic SEO */
.screen-reader-text.sihu-seo-h1 {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================================================
   4. MOBILE TOUCH OPTIMIZATIONS
   ========================================================================== */
@media (max-width: 768px) {
    .sihu-toc-wrapper {
        padding: 15px 18px;
    }
    .sihu-article-cta-box {
        padding: 24px 16px;
    }
    .sihu-cta-title {
        font-size: 19px;
    }
    .sihu-cta-desc {
        font-size: 14.5px;
    }
    .sihu-cta-buttons {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    .sihu-btn {
        width: 100%;
        min-height: 48px; /* Mobile touch ergonomic 48px */
    }
    .sihu-cta-trust {
        gap: 12px;
        font-size: 12px;
    }
}
