/**
 * تایپوگرافی مشترک — استایل محتوای غنی داخل ویجت‌ها.
 *
 * @package Bargheto_Widgets
 */

/* ── Headings ── */
.bargheto-prose h1,
.bargheto-prose h2,
.bargheto-prose h3,
.bargheto-prose h4,
.bargheto-prose h5,
.bargheto-prose h6 {
    display: block;
    margin: 0 0 0.75rem;
    font-weight: 700;
    line-height: 1.375;
    color: #121517;
}

.bargheto-prose h1 {
    font-size: 1.75rem;
}

.bargheto-prose h2 {
    font-size: 1.5rem;
}

.bargheto-prose h3 {
    font-size: 1.25rem;
}

.bargheto-prose h4 {
    font-size: 1.125rem;
}

.bargheto-prose h5 {
    font-size: 1rem;
}

.bargheto-prose h6 {
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .bargheto-prose h1 { font-size: 2.25rem; }
    .bargheto-prose h2 { font-size: 1.875rem; }
    .bargheto-prose h3 { font-size: 1.5rem; }
    .bargheto-prose h4 { font-size: 1.25rem; }
    .bargheto-prose h5 { font-size: 1.125rem; }
    .bargheto-prose h6 { font-size: 1rem; }
}

/* ── Paragraph ── */
.bargheto-prose p {
    margin: 0 0 1rem;
    line-height: 1.75;
}

/* ── Links ── */
.bargheto-prose a {
    color: var(--bargheto-blue-light, #0043CB);
    text-decoration: underline;
    text-underline-offset: 12px;
    transition: color 0.15s ease;
}

.bargheto-prose a:hover {
    color: var(--bargheto-blue-dark, #00359f);
}

/* ── Lists ── */
.bargheto-prose ul,
.bargheto-prose ol {
    margin: 0 0 1rem;
    padding-inline-start: 1.5rem;
}

.bargheto-prose ul {
    list-style-type: disc;
}

.bargheto-prose ol {
    list-style-type: decimal;
}

.bargheto-prose li {
    margin-bottom: 0.375rem;
    line-height: 1.75;
}

.bargheto-prose li:last-child {
    margin-bottom: 0;
}

/* ── Blockquote ── */
.bargheto-prose blockquote {
    margin: 1.5rem 0;
    border-right: 4px solid var(--bargheto-blue-light, #0043CB);
    border-radius: 0.75rem;
    background: rgba(0, 67, 203, 0.05);
    padding: 1rem 1.25rem;
    font-style: italic;
    color: #70777e;
}

.bargheto-prose blockquote p:last-child {
    margin-bottom: 0;
}

/* ── Inline ── */
.bargheto-prose strong,
.bargheto-prose b {
    font-weight: 700;
    color: #121517;
}

.bargheto-prose em,
.bargheto-prose i {
    font-style: italic;
}

.bargheto-prose code {
    font-family: 'IRANYekanXFaNum', monospace;
    font-size: 0.875em;
    background: #f1f5f9;
    border-radius: 0.25rem;
    padding: 0.125rem 0.375rem;
    color: #dc2626;
}

.bargheto-prose pre {
    margin: 0 0 1rem;
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    color: #e2e8f0;
    line-height: 1.5;
}

.bargheto-prose pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.8125rem;
}

.bargheto-prose mark {
    background: #fef08a;
    border-radius: 0.125rem;
    padding: 0.0625rem 0.25rem;
}

/* ── Table ── */
.bargheto-prose table {
    width: 100%;
    margin: 0 0 1rem;
    border-collapse: collapse;
}

.bargheto-prose th,
.bargheto-prose td {
    border: 1px solid #e3eaee;
    padding: 0.625rem 0.75rem;
    text-align: start;
}

.bargheto-prose th {
    background: #f7f8fa;
    font-weight: 700;
    color: #121517;
}

.bargheto-prose tbody tr:nth-child(even) {
    background: #f9fafb;
}

/* ── Separator ── */
.bargheto-prose hr {
    margin: 1.5rem 0;
    border: none;
    border-top: 1px solid #e3eaee;
}

/* ── Image ── */
.bargheto-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* ── Figure ── */
.bargheto-prose figure {
    margin: 0 0 1rem;
}

.bargheto-prose figcaption {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: #70777e;
    text-align: center;
}

/* ── Details / Summary ── */
.bargheto-prose details {
    margin: 0 0 1rem;
    border: 1px solid #e3eaee;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.bargheto-prose summary {
    cursor: pointer;
    font-weight: 600;
    color: #121517;
}

.bargheto-prose details[open] summary {
    margin-bottom: 0.75rem;
}
