/* =========================================================
 *  Dynamic Post Rotator — Frontend Styles
 * ========================================================= */

.dpr-wrapper {
    width: 100%;
    margin: 0 auto;
    color: inherit;
    font-family: inherit;
    line-height: inherit;
    box-sizing: border-box;
}

.dpr-wrapper *,
.dpr-wrapper *::before,
.dpr-wrapper *::after {
    box-sizing: inherit;
}

/* ----- عنوان (h1/h2/h3/div — استایل یکسان) ----- */
.dpr-wrapper .dpr-title {
    margin: 0 0 1rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.35;
    color: inherit;
    display: block;
}
.dpr-wrapper h2.dpr-title { font-size: 1.75rem; }
.dpr-wrapper h3.dpr-title { font-size: 1.5rem;  }

/* ----- تصویر شاخص ----- */
.dpr-wrapper .dpr-thumbnail {
    margin: 0 0 1.5rem;
}
.dpr-wrapper .dpr-thumbnail img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

/* ----- محتوای مقاله ----- */
.dpr-wrapper .dpr-content {
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

/* تصاویر داخل مقاله */
.dpr-wrapper .dpr-content img,
.dpr-wrapper .dpr-content figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
    border-radius: 4px;
}

.dpr-wrapper .dpr-content figure {
    margin: 1.2rem 0;
    max-width: 100%;
}

.dpr-wrapper .dpr-content figcaption {
    font-size: .85em;
    text-align: center;
    opacity: .8;
    margin-top: .4rem;
}

/* جداول */
.dpr-wrapper .dpr-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .95em;
}
.dpr-wrapper .dpr-content table th,
.dpr-wrapper .dpr-content table td {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: right;
    vertical-align: middle;
}
.dpr-wrapper .dpr-content table th {
    background: #f5f5f5;
    font-weight: 700;
}

/* لیست‌ها */
.dpr-wrapper .dpr-content ul,
.dpr-wrapper .dpr-content ol {
    margin: 1rem 0;
    padding-right: 1.6rem;
}
.dpr-wrapper .dpr-content li {
    margin: .35rem 0;
}

/* نقل‌قول */
.dpr-wrapper .dpr-content blockquote {
    border-right: 4px solid #d0d0d0;
    padding: .4rem 1rem;
    margin: 1.2rem 0;
    font-style: italic;
    color: inherit;
    background: rgba(0,0,0,.02);
}

/* هدینگ‌های داخل محتوا */
.dpr-wrapper .dpr-content h1 { font-size: 1.6rem; margin: 1.5rem 0 .8rem; }
.dpr-wrapper .dpr-content h2 { font-size: 1.4rem; margin: 1.5rem 0 .7rem; }
.dpr-wrapper .dpr-content h3 { font-size: 1.2rem; margin: 1.2rem 0 .6rem; }
.dpr-wrapper .dpr-content h4,
.dpr-wrapper .dpr-content h5,
.dpr-wrapper .dpr-content h6 { margin: 1rem 0 .5rem; }

/* لینک‌ها (داخلی و خارجی) */
.dpr-wrapper .dpr-content a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.dpr-wrapper .dpr-content a:hover {
    opacity: .8;
}

/* دکمه‌های CTA */
.dpr-wrapper .dpr-content .wp-block-button__link,
.dpr-wrapper .dpr-content .btn,
.dpr-wrapper .dpr-content a.button {
    display: inline-block;
    padding: .7rem 1.4rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity .2s ease;
}
.dpr-wrapper .dpr-content .wp-block-button__link:hover,
.dpr-wrapper .dpr-content .btn:hover,
.dpr-wrapper .dpr-content a.button:hover {
    opacity: .85;
}

/* iframe و embed */
.dpr-wrapper .dpr-content iframe,
.dpr-wrapper .dpr-content embed,
.dpr-wrapper .dpr-content video {
    max-width: 100%;
    display: block;
    margin: 1rem auto;
}

/* پاک‌سازی شناوری‌ها */
.dpr-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

/* واکنش‌گرا */
@media (max-width: 600px) {
    .dpr-wrapper .dpr-title { font-size: 1.5rem; }
    .dpr-wrapper .dpr-content h1 { font-size: 1.35rem; }
    .dpr-wrapper .dpr-content h2 { font-size: 1.2rem;  }
    .dpr-wrapper .dpr-content h3 { font-size: 1.1rem;  }
    .dpr-wrapper .dpr-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}