/* ============================================================
   SC EXCELLENCE - CONTENT COMPONENTS CSS
   File: assets/css/blog-content-components.css
   Đặt trong: wp-content/themes/flatsome-child/assets/css/blog-content-components.css

   Các class này dùng trong WYSIWYG content của bài viết.
   Biên tập viên paste HTML có class sẵn, CSS tự áp style.

   Enqueue file này cùng với blog-single.css (xem functions-snippet.php)
   ============================================================ */

/* ============================================================
   CARD GRID - 7 XU HƯỚNG
   .scex-trend-grid > .scex-trend-card
   ============================================================ */
.scex-trend-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 32px 0;
}

/* Card thứ 7 (--wide) chiếm full width để tránh lẻ hàng */
.scex-trend-card--wide {
    grid-column: 1 / -1;
}

@media screen and (max-width: 849px) {
    .scex-trend-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .scex-trend-card--wide {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 549px) {
    .scex-trend-grid {
        grid-template-columns: 1fr;
    }
}

.scex-trend-card {
    background-color: var(--cdet-bg-white);
    border: 1px solid var(--cdet-border);
    border-radius: var(--cdet-radius-lg);
    padding: 28px 24px;
    transition: box-shadow 0.25s, transform 0.25s;
}

.scex-trend-card:hover {
    box-shadow: var(--cdet-shadow-hover);
    transform: translateY(-3px);
}

.scex-trend-card__icon {
    width: 48px;
    height: 48px;
    background-color: rgba(0, 74, 173, 0.08);
    border-radius: var(--cdet-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    color: var(--cdet-primary);
}

.scex-trend-card__icon svg {
    width: 24px;
    height: 24px;
}

.scex-trend-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--cdet-primary);
    margin: 0 0 10px;
    line-height: 1.4;
}

/* Override Flatsome default heading margin trong content */
.cdet-blog-single__content .scex-trend-card h3.scex-trend-card__title {
    font-size: 16px;
    font-weight: 700;
    color: var(--cdet-primary);
    margin: 0 0 10px;
}

.scex-trend-card__desc {
    font-size: 14px;
    color: var(--cdet-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   CHART - PROGRESS BAR
   .scex-chart > .scex-chart__row
   ============================================================ */
.scex-chart {
    background-color: var(--cdet-bg-white);
    border: 1px solid var(--cdet-border);
    border-radius: var(--cdet-radius-lg);
    padding: 32px;
    margin: 32px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.scex-chart__row {
    display: grid;
    grid-template-columns: 200px 1fr 48px;
    align-items: center;
    gap: 16px;
}

@media screen and (max-width: 549px) {
    .scex-chart__row {
        grid-template-columns: 1fr 48px;
    }

    .scex-chart__label {
        grid-column: 1 / -1;
    }
}

.scex-chart__label {
    font-size: 14px;
    font-weight: 600;
    color: var(--cdet-text);
}

.scex-chart__bar-wrap {
    background-color: var(--cdet-bg-gray);
    border-radius: var(--cdet-radius-xl);
    height: 10px;
    overflow: hidden;
}

.scex-chart__bar {
    height: 100%;
    background: linear-gradient(90deg, var(--cdet-primary) 0%, var(--cdet-navy) 100%);
    border-radius: var(--cdet-radius-xl);
    /* Animation khi vào viewport */
    animation: scex-bar-grow 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes scex-bar-grow {
    from { width: 0 !important; }
    to   { /* width giữ nguyên giá trị inline style */ }
}

.scex-chart__value {
    font-size: 16px;
    font-weight: 700;
    color: var(--cdet-primary);
    text-align: right;
}

.scex-chart__source {
    font-size: 12px;
    color: var(--cdet-text-light);
    text-align: right;
    margin: 0 0 32px;
}

/* ============================================================
   ACTION GRID - 4 BOX HÀNH ĐỘNG
   .scex-action-grid > .scex-action-box
   ============================================================ */
.scex-action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 32px 0;
}

@media screen and (max-width: 849px) {
    .scex-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 549px) {
    .scex-action-grid {
        grid-template-columns: 1fr;
    }
}

.scex-action-box {
    background-color: var(--cdet-bg-white);
    border: 1px solid var(--cdet-border);
    border-radius: var(--cdet-radius-lg);
    padding: 24px 20px;
    text-align: center;
}

.scex-action-box__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--cdet-primary);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 16px;
}

.scex-action-box__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--cdet-primary);
    margin: 0 0 10px;
    line-height: 1.4;
}

/* Override Flatsome default heading margin trong content */
.cdet-blog-single__content .scex-action-box h4.scex-action-box__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--cdet-primary);
    margin: 0 0 10px;
}

.scex-action-box__desc {
    font-size: 13px;
    color: var(--cdet-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ============================================================
   ACTION PLAN - GỢI Ý 90 NGÀY
   .scex-action-plan
   ============================================================ */
.scex-action-plan {
    background-color: rgba(0, 74, 173, 0.04);
    border: 1px solid rgba(0, 74, 173, 0.15);
    border-left: 4px solid var(--cdet-primary);
    border-radius: 0 var(--cdet-radius-lg) var(--cdet-radius-lg) 0;
    padding: 28px 32px;
    margin: 32px 0;
}

.scex-action-plan__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--cdet-primary);
    margin: 0 0 20px;
}

.scex-action-plan__title svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--cdet-primary);
}

/* Override Flatsome default heading margin trong content */
.cdet-blog-single__content .scex-action-plan h4.scex-action-plan__title {
    font-size: 17px;
    font-weight: 700;
    color: var(--cdet-primary);
    margin: 0 0 20px;
}

.scex-action-plan__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.scex-action-plan__list li {
    position: relative;
    padding-left: 28px;
    font-size: 15px;
    color: var(--cdet-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* Dấu check thay thế bullet mặc định */
.scex-action-plan__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    background-color: var(--cdet-primary);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 8l3 3 6-6' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
    flex-shrink: 0;
}