/**
 * استایل قالب مینیمال نمایش تک کمپین
 * تمام کلاس‌ها با پیشوند cmn- نوشته شده‌اند تا با قالب کلاسیک/مدرن (template-1/2) تداخل نکنند.
 *
 * نکته RTL: طبق همان قاعده‌ای که در قالب کلاسیک و مدرن رعایت شد، برای چیدمان‌های چندستونه
 * از grid-template-areas با نام صریح استفاده شده تا مستقل از ترتیب DOM، اولین نامِ نوشته‌شده
 * در سمت راست صفحه قرار بگیرد (طبق رفتار CSS Grid در جهت راست‌به‌چپ).
 *
 * @package Campaign_Management
 */

.cm-template-minimal {
    background: #f8fafc;
    direction: rtl;
    font-family: inherit;
}

.cm-template-minimal * {
    box-sizing: border-box;
}

.cmn-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ===================== هیرو + کارت شناور ===================== */
.cmn-hero-wrap {
    position: relative;
    margin-bottom: 90px;
}

.cmn-hero-image {
    width: 100%;
    min-height: 320px;
    max-height: 420px;
    overflow: hidden;
}

.cmn-hero-image img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.cmn-hero-image iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.cmn-float-card {
    position: absolute;
    left: 40px;
    bottom: -90px;
    width: 300px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
    padding: 24px;
    text-align: center;
}

@media (max-width: 900px) {
    .cmn-float-card {
        position: static;
        margin: -60px auto 0;
        left: auto;
    }

    .cmn-hero-wrap {
        margin-bottom: 24px;
    }
}

.cmn-float-heart {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px auto;
    border-radius: 50%;
    border: 2px solid #dcfce7;
    color: #16a34a;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cmn-float-raised {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.cmn-float-goal {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 14px 0;
}

.cmn-progress-bar {
    background: #e5e7eb;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.cmn-progress-fill {
    height: 100%;
    background: #22c55e;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.cmn-float-percent {
    font-size: 14px;
    font-weight: 800;
    color: #16a34a;
    margin: 0 0 18px 0;
}

.cmn-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 10px;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.cmn-btn:last-child {
    margin-bottom: 0;
}

.cmn-btn-primary {
    background: #16a34a;
    color: #fff;
}

.cmn-btn-primary:hover {
    background: #128038;
    color: #fff;
}

.cmn-btn-outline {
    background: #fff;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.cmn-btn-outline:hover {
    background: #f8fafc;
}

/* ===================== عنوان ===================== */
.cmn-title-block {
    max-width: 760px;
    margin: 0 0 28px auto;
    text-align: right;
}

.cmn-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #16a34a;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.cmn-title {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px 0;
    line-height: 1.35;
}

.cmn-excerpt {
    font-size: 15px;
    color: #64748b;
    line-height: 1.9;
    margin: 0;
}

/* ===================== ردیف آمار فشرده ===================== */
.cmn-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.cmn-chip {
    background: #fff;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    flex: 1 1 150px;
}

.cmn-chip-countdown {
    flex: 2 1 260px;
}

.cmn-chip-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.cmn-chip-label i {
    color: #16a34a;
}

.cmn-chip-value {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.cmn-chip-value small {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
}

.cmn-chip-sep {
    color: #cbd5e1;
    font-size: 11px;
    margin: 0 4px;
}

/* ===================== ردیف بدنه: توضیحات/نظرات (چپ) + کارت جزئیات (راست) ===================== */
.cmn-body-row {
    display: grid;
    grid-template-columns: 340px 1fr;
    grid-template-areas: "sidebar main";
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .cmn-body-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "sidebar"
            "main";
    }
}

.cmn-main {
    grid-area: main;
    min-width: 0;
}

.cmn-details-card {
    grid-area: sidebar;
    background: #fff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.cmn-details-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
}

.cmn-amounts-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cmn-amount-block {
    text-align: center;
    flex: 1;
}

.cmn-amount-value {
    font-size: 15px;
    font-weight: 800;
    color: #64748b;
    margin: 0 0 3px 0;
}

.cmn-amount-raised .cmn-amount-value {
    color: #16a34a;
}

.cmn-amount-label {
    font-size: 11px;
    color: #94a3b8;
    margin: 0;
}

.cmn-progress-bar-sm {
    height: 8px;
}

.cmn-details-percent {
    text-align: center;
    font-size: 13px;
    color: #64748b;
    margin: 0 0 16px 0;
}

.cmn-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

.cmn-info-row:last-child {
    border-bottom: none;
}

.cmn-info-value {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #0f172a;
    font-weight: 700;
}

.cmn-info-value i {
    color: #16a34a;
}

.cmn-info-label {
    color: #94a3b8;
}

/* بخش‌های محتوایی ستون اصلی */
.cmn-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.cmn-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px 0;
}

.cmn-description {
    line-height: 2;
    color: #334155;
    font-size: 15px;
}

/* گالری */
.cmn-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.cmn-gallery-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

/* نظرات */
.cmn-comments-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}

.cmn-comment-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
}

.cmn-comment-item .children {
    list-style: none;
    margin: 10px 0 0 0;
    padding-right: 30px;
}

.cmn-comment-avatar img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
}

.cmn-comment-body {
    flex: 1;
}

.cmn-comment-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.cmn-comment-author {
    color: #0f172a;
    font-size: 14px;
}

.cmn-comment-date {
    color: #94a3b8;
    font-size: 12px;
}

.cmn-comment-text {
    color: #475569;
    font-size: 14px;
    line-height: 1.9;
}

/* فرم ارسال نظر */
.cmn-comment-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cmn-comment-field-wrap {
    flex: 1;
    margin: 0;
}

.cmn-comment-field {
    width: 100%;
    resize: none;
    height: 46px;
    padding: 12px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.4;
}

.cmn-comment-field:focus {
    outline: none;
    border-color: #16a34a;
}

.cmn-comment-submit-wrap {
    margin: 0;
}

.cmn-comment-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
}

.cmn-comment-submit:hover {
    background: #128038;
}

/* ===================== ریسپانسیو ===================== */

@media (max-width: 900px) {
    .cmn-hero-image {
        min-height: 220px;
        max-height: none;
    }

    .cmn-hero-image img {
        min-height: 220px;
        max-height: none;
    }

    .cmn-float-card {
        width: 90%;
        max-width: 320px;
    }
}

@media (max-width: 640px) {
    .cmn-container {
        padding: 0 14px 40px;
    }

    .cmn-title {
        font-size: 23px;
    }

    .cmn-excerpt {
        font-size: 14px;
    }

    .cmn-title-block {
        max-width: 100%;
    }

    .cmn-hero-image {
        min-height: 180px;
    }

    .cmn-hero-image img {
        min-height: 180px;
    }

    .cmn-float-card {
        padding: 18px;
        border-radius: 16px;
    }

    .cmn-section,
    .cmn-details-card {
        padding: 16px;
        border-radius: 12px;
    }

    .cmn-chips-row {
        gap: 8px;
        margin-bottom: 20px;
    }

    .cmn-chip {
        flex-basis: 45%;
        padding: 10px 12px;
    }

    .cmn-chip-countdown {
        flex-basis: 100%;
    }

    .cmn-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .cmn-comment-form {
        flex-wrap: wrap;
    }

    .cmn-comment-field-wrap {
        flex-basis: 100%;
    }

    .cmn-comment-submit-wrap {
        width: 100%;
    }

    .cmn-comment-submit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .cmn-chip {
        flex-basis: 100%;
    }
}
