/* =====================================================
   صفحه برگه عمومی (Page) — Cartonparsiran 2026
   نسخه ۳.۰ — عنوان وسط‌چین، بدون کلمه «برگه»
   ===================================================== */

.ps-page {
    background: #fff;
    font-family: "iransans", 'IRANSans', 'Segoe UI', Tahoma, sans-serif;
}

/* =====================================================
   هدر برگه — کوچک، متعادل، عنوان وسط
   ===================================================== */
.ps-page-header {
    position: relative;
    isolation: isolate;
    padding: 28px 0 32px;
    color: #fff;
    text-align: center;
    background: linear-gradient(125deg, #152b3a 0%, #1d3d4c 55%, #087f8c 100%);
    overflow: hidden;
}
.ps-page-header::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 4px;
    background: linear-gradient(90deg, #f0a44b 0 22%, #087f8c 22% 100%);
    z-index: -1;
}

/* Breadcrumb — وسط‌چین، کوچک */
.ps-page-breadcrumb {
    margin-bottom: 16px;
}
.ps-page-breadcrumb .breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .78rem;
    color: rgba(255, 255, 255, .45);
}
.ps-page-breadcrumb .breadcrumbs li {
    display: inline-flex;
    align-items: center;
}
.ps-page-breadcrumb .breadcrumbs a {
    color: rgba(255, 255, 255, .45);
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}
.ps-page-breadcrumb .breadcrumbs a:hover {
    color: #f0a44b;
}
.ps-page-breadcrumb .breadcrumbs .separator {
    color: rgba(255, 255, 255, .35);
    margin: 0 3px;
}


/* عنوان — وسط، سفید */
.ps-page-title {
    margin: 0 auto;
    max-width: 820px;
    color: #fff;
    font-size: clamp(1.4rem, 2.2vw, 1.9rem);
    line-height: 1.5;
    font-weight: 800;
    letter-spacing: -.02em;
    text-align: center;
}

/* توضیح کوتاه */
.ps-page-lead {
    max-width: 640px;
    margin: 10px auto 0;
    color: rgba(255, 255, 255, .78);
    font-size: .92rem;
    line-height: 1.9;
    text-align: center;
}

/* =====================================================
   بدنه برگه
   ===================================================== */
.ps-page-body {
    padding: 40px 0 60px;
    background: #fff;
}

.ps-page-content {
    max-width: 900px;
    margin: 0 auto;
    color: var(--ps-text, #344654);
    font-size: 1rem;
    line-height: 2.05;
}

/* تیترها در محتوا */
.ps-page-content h1,
.ps-page-content h2,
.ps-page-content h3,
.ps-page-content h4 {
    color: var(--ps-ink, #182b3a);
    line-height: 1.55;
    letter-spacing: -.03em;
    margin: 2em 0 .6em;
}
.ps-page-content h1 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
    font-weight: 900;
}
.ps-page-content h2 {
    position: relative;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ps-line, #e0e7ea);
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    font-weight: 850;
}
.ps-page-content h2::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 60px;
    height: 3px;
    border-radius: 3px;
    background: var(--ps-accent, #f0a44b);
}
.ps-page-content h3 {
    font-size: 1.25rem;
    font-weight: 800;
}
.ps-page-content h3::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 18px;
    margin-left: 8px;
    border-radius: 4px;
    background: var(--ps-primary, #087f8c);
    vertical-align: middle;
}
.ps-page-content h4 {
    font-size: 1.08rem;
    font-weight: 800;
}

/* پاراگراف و متن */
.ps-page-content p {
    margin: 0 0 18px;
    color: var(--ps-text, #344654);
}
.ps-page-content strong {
    color: var(--ps-ink, #182b3a);
    font-weight: 800;
}
.ps-page-content a {
    color: var(--ps-primary, #087f8c);
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, color .2s ease;
}
.ps-page-content a:hover {
    color: var(--ps-primary-dark, #06636d);
    border-bottom-color: currentColor;
}

/* لیست‌ها */
.ps-page-content ul,
.ps-page-content ol {
    margin: 0 0 20px;
    padding-right: 24px;
}
.ps-page-content li {
    margin-bottom: 10px;
    line-height: 1.95;
}
.ps-page-content ul li::marker {
    color: var(--ps-primary, #087f8c);
    font-size: 1.1em;
}
.ps-page-content ol li::marker {
    color: var(--ps-primary, #087f8c);
    font-weight: 900;
}

/* بلوک نقل قول */
.ps-page-content blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    border-right: 4px solid var(--ps-primary, #087f8c);
    border-radius: 0 12px 12px 0;
    background: var(--ps-primary-light, #e5f5f4);
    color: var(--ps-ink, #182b3a);
    font-style: normal;
    line-height: 2;
}
.ps-page-content blockquote p:last-child {
    margin-bottom: 0;
}
.ps-page-content blockquote cite {
    display: block;
    margin-top: 10px;
    color: var(--ps-muted, #687985);
    font-size: .88rem;
    font-style: normal;
}

/* جداول */
.ps-page-content table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
    border: 1px solid var(--ps-line, #e0e7ea);
    border-radius: 12px;
    overflow: hidden;
    font-size: .92rem;
}
.ps-page-content table thead {
    background: var(--ps-bg, #f5f7f8);
}
.ps-page-content table th {
    padding: 12px 14px;
    text-align: right;
    color: var(--ps-ink, #182b3a);
    font-weight: 800;
    font-size: .88rem;
    border-bottom: 1px solid var(--ps-line, #e0e7ea);
}
.ps-page-content table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ps-line, #e0e7ea);
    color: var(--ps-text, #344654);
    line-height: 1.8;
}
.ps-page-content table tr:last-child td {
    border-bottom: none;
}
.ps-page-content table tr:nth-child(even) {
    background: #fafbfc;
}

/* تصاویر */
.ps-page-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    border-radius: var(--ps-radius-sm, 12px);
}
.ps-page-content figure {
    margin: 24px 0;
}
.ps-page-content figcaption {
    margin-top: 8px;
    color: var(--ps-muted, #687985);
    font-size: .84rem;
    text-align: center;
}

/* کد */
.ps-page-content code {
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--ps-bg, #f5f7f8);
    color: var(--ps-ink, #182b3a);
    font-size: .9em;
    direction: ltr;
}
.ps-page-content pre {
    margin: 20px 0;
    padding: 18px 20px;
    border-radius: 12px;
    background: #152b3a;
    color: #e5f5f4;
    overflow-x: auto;
    direction: ltr;
    font-size: .86rem;
    line-height: 1.8;
}
.ps-page-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

/* دکمه‌های داخل محتوا */
.ps-page-content .wp-block-button__link,
.ps-page-content .ps-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 10px;
    background: var(--ps-primary, #087f8c);
    color: #fff !important;
    font-weight: 800;
    border: none;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}
.ps-page-content .wp-block-button__link:hover,
.ps-page-content .ps-btn:hover {
    background: var(--ps-primary-dark, #06636d);
    transform: translateY(-2px);
}

/* صفحه‌بندی برگه */
.ps-page-pagination {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--ps-line, #e0e7ea);
    font-size: .92rem;
    color: var(--ps-muted, #687985);
}
.ps-page-pagination a,
.ps-page-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 0 3px;
    padding: 0 10px;
    border: 1px solid var(--ps-line, #e0e7ea);
    border-radius: 9px;
    background: #fff;
    color: var(--ps-ink, #182b3a);
    font-weight: 800;
    text-decoration: none;
    transition: all .2s ease;
}
.ps-page-pagination a:hover,
.ps-page-pagination .current {
    background: var(--ps-primary, #087f8c);
    color: #fff;
    border-color: var(--ps-primary, #087f8c);
}

/* لینک ویرایش */
.ps-page-edit {
    max-width: 900px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px dashed var(--ps-line, #e0e7ea);
    text-align: left;
    font-size: .84rem;
}
.ps-page-edit a {
    color: var(--ps-muted, #687985);
    text-decoration: none;
    font-weight: 700;
}
.ps-page-edit a:hover {
    color: var(--ps-primary, #087f8c);
}

/* =====================================================
   ریسپانسیو
   ===================================================== */
@media (max-width: 760px) {
    .ps-page-header {
        padding: 22px 0 24px;
    }
    .ps-page-body {
        padding: 28px 0 40px;
    }
    .ps-page-title {
        font-size: clamp(1.15rem, 5vw, 1.5rem);
    }
    .ps-page-lead {
        font-size: .86rem;
        margin-top: 6px;
    }
    .ps-page-content {
        font-size: .95rem;
        line-height: 2;
    }
    .ps-page-content h2 {
        font-size: clamp(1.2rem, 5vw, 1.5rem);
    }
    .ps-page-content h3 {
        font-size: 1.12rem;
    }
    .ps-page-content table {
        font-size: .84rem;
    }
    .ps-page-content th,
    .ps-page-content td {
        padding: 10px 8px;
    }
    .ps-page-breadcrumb {
        margin-bottom: 12px;
    }
    .ps-page-breadcrumb .breadcrumbs {
        font-size: .72rem;
    }
}

@media (max-width: 440px) {
    .ps-page-header {
        padding: 18px 0 20px;
    }
    .ps-page-title {
        font-size: 1.12rem;
        line-height: 1.45;
    }
    .ps-page-lead {
        font-size: .84rem;
    }
    .ps-page-content {
        font-size: .92rem;
    }
    .ps-page-content ul,
    .ps-page-content ol {
        padding-right: 18px;
    }
    .ps-page-content blockquote {
        padding: 16px 18px;
    }
    .ps-page-content pre {
        padding: 14px 16px;
        font-size: .8rem;
    }
}