/* استایل محتوای تولیدشده با استایل‌دهنده هوشمند WSCG */
@import url('../fonts/iranyekan.css');

.wscg-article {
    direction: rtl;
    text-align: right;
    font-family: 'IRANYekan', Tahoma, Arial, sans-serif;
    line-height: 1.85;
    color: #2c3345;
    width: 100%;
    max-width: min(1180px, calc(100vw - 2rem));
    margin: 0 auto 2rem;
    padding: 0.5rem 0;
    box-sizing: border-box;
}

/* پر کردن عرض محتوای پست در دسکتاپ */
.entry-content .wscg-article,
.post-content .wscg-article,
.wp-block-post-content .wscg-article,
article .wscg-article {
    width: 100%;
    max-width: min(1180px, 100%);
}

@media (min-width: 960px) {
    .wscg-article[class*='wscg-theme-'] {
        max-width: min(1180px, calc(100% - 1rem));
        width: 100%;
    }
}

@media (min-width: 1280px) {
    .wscg-article {
        max-width: min(1240px, calc(100vw - 3rem));
    }
}

/* اگر قالب وردپرس عرض entry-content را محدود کرده باشد */
.entry-content:has(.wscg-article) {
    max-width: 100%;
}

.single .entry-content .wscg-article,
.page .entry-content .wscg-article {
    width: 100%;
    max-width: min(1180px, 100%);
}

.wscg-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(45, 52, 90, 0.08);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(45, 52, 90, 0.06);
}

.wscg-card--hero {
    background: linear-gradient(135deg, #f8faff 0%, #f3f6ff 100%);
    border: 1px solid rgba(79, 110, 247, 0.22);
    box-shadow: 0 6px 22px rgba(79, 110, 247, 0.12);
    text-align: center;
    padding: 1.75rem 2rem;
}

.wscg-hero-text {
    margin: 0;
    font-size: 1.12rem;
    font-weight: 600;
    color: #2d3481;
    line-height: 1.9;
}

.wscg-card-title {
    margin: 0 0 0.65rem;
    padding: 0 2rem 0 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3481;
    position: relative;
    line-height: 1.6;
}

.wscg-card-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0.45em;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #5b6ee8, #8b5cf6);
    transform: rotate(45deg);
    border-radius: 2px;
}

.wscg-card-divider {
    border: none;
    border-top: 1px solid #e8ecf4;
    margin: 0 0 1.1rem;
}

.wscg-card-body {
    font-size: 1rem;
    color: #3d4558;
}

.wscg-card-body p {
    margin: 0 0 1rem;
}

.wscg-card-body p:last-child {
    margin-bottom: 0;
}

/* آیکون Dashicons روی کادرها */
.wscg-box-icon-wrap {
    margin-bottom: 0.5rem;
}

.wscg-box-icon.dashicons {
    display: inline-block;
    width: 28px;
    height: 28px;
    font-size: 26px;
    line-height: 28px;
    color: inherit;
    opacity: 0.88;
}

.wscg-box--important .wscg-box-icon {
    color: #b8860b;
}

.wscg-box--description .wscg-box-icon {
    color: #5a6d88;
}

.wscg-box--note .wscg-box-icon {
    color: #c77d0a;
}

.wscg-card--hero .wscg-box-icon-wrap {
    margin-bottom: 0.35rem;
}

.wscg-card--hero .wscg-box-icon {
    color: #4f46e5;
}

.wscg-profile-voice .wscg-box-icon-wrap {
    padding: 0 1.25rem;
    margin: 0.75rem 0 0;
}

.wscg-profile-voice .wscg-box-icon {
    color: #6366f1;
}

/* بلوک‌های طبقه‌بندی‌شده (خروجی JSON) */
.wscg-box {
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    margin: 0 0 1rem;
}

.wscg-box:last-child {
    margin-bottom: 0;
}

.wscg-box-label {
    margin: 0 0 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.wscg-box-content {
    line-height: 1.85;
}

.wscg-box-content p {
    margin: 0 0 0.65rem;
}

.wscg-box-content p:last-child {
    margin-bottom: 0;
}

/* مهم — کادر طلایی */
.wscg-box--important {
    background: linear-gradient(135deg, #fffdf5 0%, #fff9e8 100%);
    border: 2px solid #d4a017;
    box-shadow: 0 4px 16px rgba(212, 160, 23, 0.15);
}

.wscg-box--important .wscg-box-label {
    color: #8b6914;
}

/* توضیحات — کادر طوسی گرادیانی */
.wscg-box--description {
    background: linear-gradient(135deg, #f7f8fa 0%, #eceff3 55%, #e4e8ee 100%);
    border: 1px solid #d5dbe3;
    color: #3d4558;
}

.wscg-box--description .wscg-box-label {
    color: #5a6478;
}

/* نکته */
.wscg-box--note {
    background: #fff9e6;
    border-right: 4px solid #f5a623;
    border-left: none;
}

.wscg-paragraph {
    margin: 0 0 1rem;
}

/* لیست‌ها: assets/style-lists.css */

.wscg-callout {
    border-radius: 10px;
    padding: 1rem 1.15rem;
    margin: 1rem 0 0;
}

.wscg-callout--note {
    background: #fff9e6;
    border-right: 4px solid #f5a623;
    border-left: none;
}

.wscg-callout p {
    margin: 0;
    color: #4a4528;
}

.wscg-pullquote {
    font-size: 1.08rem;
    font-weight: 600;
    color: #4f46e5;
    border-right: 3px solid #a5b4fc;
    padding-right: 1rem;
    margin: 1.25rem 0;
}

/* تم‌های متمایز: assets/style-themes.css */

/* کادر صدای پروفایل (گوینده) — همان عرض سایر کادرها */
.wscg-article .wscg-profile-voice {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* اگر از ویرایشگر خارج از .wscg-article درج شده باشد */
.entry-content > .wscg-profile-voice {
    width: 100%;
    max-width: min(1180px, 100%);
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
}

.wscg-profile-voice {
    margin: 0 0 1rem;
    padding: 1px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899, #6366f1);
    background-size: 300% 300%;
    animation: wscg-profile-gradient 6s ease infinite;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.12);
    overflow: hidden;
}

@keyframes wscg-profile-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.wscg-profile-voice__inner {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #fff;
    border-radius: 13px;
    padding: 1.1rem 1.25rem;
}

.wscg-card-body .wscg-profile-voice {
    margin: 0 0 1rem;
}

.wscg-profile-voice__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.wscg-profile-avatar-ring {
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    padding: 3px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, #6366f1, #a855f7, #ec4899, #f59e0b, #6366f1);
    animation: wscg-profile-ring-spin 4s linear infinite;
}

@keyframes wscg-profile-ring-spin {
    to { transform: rotate(360deg); }
}

.wscg-profile-avatar-wrap {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f8;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wscg-profile-ring-spin 4s linear infinite reverse;
}

.wscg-profile-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wscg-profile-avatar--placeholder {
    font-size: 1.75rem;
    font-weight: 700;
    color: #6366f1;
    line-height: 70px;
    text-align: center;
}

.wscg-profile-meta {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.wscg-profile-name {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2d3481;
}

.wscg-profile-bio {
    margin: 0;
    font-size: 0.92rem;
    color: #6b7280;
    line-height: 1.6;
}

.wscg-profile-voice__content {
    font-size: 1rem;
    color: #374151;
    line-height: 1.85;
    border-top: 1px solid #eef0f6;
    padding-top: 1rem;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wscg-profile-voice__content p {
    margin: 0 0 0.75rem;
}

.wscg-profile-voice__content p:last-child {
    margin-bottom: 0;
}

/* واکنش‌گرا */
@media (max-width: 600px) {
    .wscg-card {
        padding: 1.15rem 1.2rem;
        border-radius: 12px;
    }

    .wscg-card-title {
        font-size: 1.08rem;
        padding-right: 1.5rem;
    }
}
