/* ------- تصميم الصفحات الداخلية: صفحة القسم والبحث والوسوم وتفاصيل الخبر
   (محصور داخل .innerPage حتى لا يؤثر على باقي الصفحات) ------- */

.innerPage {
    --brand-teal: #326666;
    --brand-teal-dark: #264f4f;
    --brand-red: #9b1e42;
    --text-main: #1d2327;
    --text-body: #3a4146;
    --text-muted: #6b7378;
    --border: #e4e9e9;
    --surface: #ffffff;
    --surface-alt: #f4f6f6;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgb(0 0 0 / 6%), 0 1px 2px rgb(0 0 0 / 4%);
    --shadow-md: 0 10px 24px rgb(0 0 0 / 10%);
    --ease: cubic-bezier(.2, .7, .3, 1);
    padding-bottom: 64px;
}

.innerPage a {
    overflow-wrap: anywhere;
}

/* ---------- مسار التنقل ---------- */

.innerPage .breadcrumb-item .breadcrumb {
    border-bottom: 0;
    padding: 0;
    margin-bottom: 18px;
    width: auto;
    font-size: 14px;
    flex-wrap: nowrap;
    min-width: 0;
}

.innerPage .breadcrumb-item li a {
    color: var(--text-muted);
    transition: color .2s;
}

.innerPage .breadcrumb-item li a:hover {
    color: var(--brand-red);
}

.innerPage .breadcrumb-item li.active {
    color: var(--text-main);
    min-width: 0;
}

.innerPage .breadcrumb-item li {
    white-space: nowrap;
}

.innerPage .breadcrumb .titleNewsWrap {
    width: auto;
    flex: 1;
}

/* ---------- عنوان الصفحة (القسم / البحث / الوسم) ---------- */

.innerPage .pageHeading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}

.innerPage .pageHeading h1 {
    position: relative;
    margin: 0;
    padding-right: 16px;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--text-main);
}

.innerPage .pageHeading h1::before {
    content: '';
    position: absolute;
    right: 0;
    top: 12%;
    bottom: 12%;
    width: 6px;
    border-radius: 3px;
    background: var(--brand-red);
}

.innerPage .pageHeading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.innerPage .emptyState {
    padding: 64px 16px;
    text-align: center;
    color: var(--text-muted);
    background: var(--surface-alt);
    border-radius: var(--radius);
}

.innerPage .emptyState i {
    display: block;
    font-size: 36px;
    margin-bottom: 12px;
    color: #b9c3c3;
}

/* ---------- بطاقات قائمة الأخبار ---------- */

.innerPage .cardNews {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}

.innerPage .cardNews:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.innerPage .cardNews .imageNews {
    width: 100%;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: auto;
    aspect-ratio: 16 / 10;
    margin-bottom: 0;
    border: 0;
    border-radius: 0;
    background-color: var(--surface-alt);
}

.innerPage .cardNews .titleNews {
    flex: 1;
    padding: 16px 16px 0;
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.innerPage .cardNews:hover .titleNews {
    color: var(--brand-red);
}

.innerPage .cardNews .dateNews {
    padding: 12px 16px;
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ---------- الترقيم ---------- */

.innerPage .pagerWrap {
    margin-top: 16px;
}

.innerPage ul.blade-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.innerPage ul.pagination li.page {
    float: none;
    margin: 0;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-main);
    font-weight: 700;
    transition: background-color .2s, border-color .2s, color .2s;
}

.innerPage ul.pagination li.page:hover {
    border-color: var(--brand-teal);
    color: var(--brand-teal);
}

.innerPage ul.pagination li.page.active {
    background: var(--brand-teal);
    border-color: var(--brand-teal);
    color: #fff;
}

.innerPage ul.blade-pagination li.page.disabled {
    background: var(--surface-alt);
    color: #b3bcbc;
}

.innerPage ul.pagination li.more {
    font-size: 4px;
    color: var(--text-muted);
}

/* ================= صفحة تفاصيل الخبر ================= */

.innerPage .articleHeader {
    margin-bottom: 24px;
}

.innerPage .articleCategory {
    display: inline-block;
    margin-bottom: 14px;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--brand-red);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s;
}

.innerPage .articleCategory:hover {
    background: #7f1736;
    color: #fff;
}

.innerPage .titleDetailsNews {
    margin: 0 0 14px;
    font-family: 'Droid Arabic Naskh', Cairo, sans-serif !important;
    font-size: 32px;
    font-weight: bold;
    line-height: 1.7;
    color: var(--text-main);
}

.innerPage .sub_titleDetailsNews {
    margin: 0 0 20px;
    padding-right: 14px;
    border-right: 3px solid var(--brand-teal);
    font-family: 'Droid Arabic Naskh', Cairo, sans-serif !important;
    font-size: 18px;
    line-height: 1.9;
    color: var(--text-muted);
}

/* شريط المعلومات: المصدر والتاريخ والمشاهدات والتعليقات والمشاركة */
.innerPage .articleMeta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.innerPage .articleMetaInfo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.innerPage .articleMetaInfo > span {
    white-space: nowrap;
}

.innerPage .articleMetaInfo i {
    margin-left: 5px;
    color: var(--brand-teal);
}

.innerPage .articleSource {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--text-main);
    font-weight: 700;
}

.innerPage .articleSource i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin: 0;
    border-radius: 50%;
    background: var(--brand-teal);
    color: #fff;
    font-size: 11px;
}

.innerPage .sharePost {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.innerPage .sharePost > span {
    font-weight: 600;
    color: var(--brand-teal);
}

.innerPage .sharePost a:not(.editNews) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgb(50 102 102 / 10%);
    color: var(--brand-teal) !important;
    font-size: 16px;
    text-decoration: none;
    transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}

.innerPage .sharePost a:not(.editNews):hover,
.innerPage .sharePost a:not(.editNews):focus-visible {
    background: var(--brand-red);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgb(155 30 66 / 25%);
}

/* أزرار تكبير وتصغير نص الخبر */
.innerPage .fontSizeControl {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.innerPage .fontSizeControl > span {
    font-weight: 600;
    color: var(--brand-teal);
}

.innerPage .fontSizeControl button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--radius-sm);
    background: rgb(50 102 102 / 10%);
    color: var(--brand-teal);
    font-size: 15px;
    font-weight: 700;
    direction: ltr;
    transition: background-color .2s var(--ease), color .2s var(--ease);
}

.innerPage .fontSizeControl button:hover:not(:disabled),
.innerPage .fontSizeControl button:focus-visible {
    background: var(--brand-teal);
    color: #fff;
}

.innerPage .fontSizeControl button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.innerPage .editNews {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
}

/* الصورة الرئيسية */
.innerPage .poster {
    margin: 24px 0 8px;
}

.innerPage .poster img {
    display: block;
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    margin: 0;
    border-radius: var(--radius);
    background: var(--surface-alt);
}

/* نص الخبر */
.innerPage .content {
    margin-top: 24px;
    font-size: calc(18px * var(--content-scale, 1));
    color: var(--text-body);
    text-align: start;
}

.innerPage .content,
.innerPage .content p,
.innerPage .content span,
.innerPage .content b,
.innerPage .content strong,
.innerPage .content li {
    font-family: 'Droid Arabic Naskh', Cairo, sans-serif !important;
    line-height: 2.2 !important;
}

.innerPage .content p {
    margin-bottom: 1.1em;
}

.innerPage .content h1,
.innerPage .content h2,
.innerPage .content h3,
.innerPage .content h4,
.innerPage .content h5 {
    font-family: 'Droid Arabic Naskh', Cairo, sans-serif !important;
    line-height: 1.9 !important;
    font-weight: bold;
    color: var(--text-main);
    margin: 1.2em 0 .5em;
}

.innerPage .content h1 { font-size: calc(26px * var(--content-scale, 1)); }
.innerPage .content h2 { font-size: calc(22px * var(--content-scale, 1)); }
.innerPage .content h3 { font-size: calc(20px * var(--content-scale, 1)); }
.innerPage .content h4 { font-size: calc(18px * var(--content-scale, 1)); }
.innerPage .content h5 { font-size: calc(16px * var(--content-scale, 1)); }

.innerPage .content a {
    color: var(--brand-red);
}

.innerPage .content img {
    max-width: 100% !important;
    height: auto;
    border-radius: var(--radius-sm);
}

.innerPage .content blockquote {
    margin: 1.2em 0;
    padding: 12px 18px;
    border-right: 4px solid var(--brand-teal);
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
}

/* الجداول العريضة القادمة من المحرر تتمرر داخل مكانها بدل أن تُعرّض الصفحة */
.innerPage .content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.innerPage .content video {
    width: 100% !important;
    height: auto !important;
}

.innerPage .content iframe {
    width: 100%;
    max-width: 100%;
}

.innerPage .listLink,
.innerPage .embed_code {
    margin-top: 24px;
}

.innerPage .listLink iframe,
.innerPage .embed_code iframe {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* الصور والفيديوهات الإضافية */
.innerPage .mediaGallery {
    margin-top: 32px;
}

.innerPage .otherMedia {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.innerPage .otherMedia .imgNews {
    width: 100%;
    height: 250px;
    background-color: var(--surface-alt);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
    transition: transform .5s var(--ease);
}

.innerPage .otherMedia:hover .imgNews {
    transform: scale(1.04);
}

.innerPage .otherMedia video {
    display: block;
    width: 100%;
    height: 250px;
    background-color: #000;
}

.innerPage .fullFile .imgNews {
    height: 500px;
}

.innerPage .fullFile video {
    height: auto;
}

/* الوسوم */
.innerPage .articleTags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
}

.innerPage .articleTags .articleTagsLabel {
    margin-left: 4px;
    font-weight: 700;
    color: var(--text-main);
}

.innerPage a.tags {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-main);
    font-size: 14px;
    text-decoration: none;
    transition: background-color .2s, color .2s, border-color .2s;
}

.innerPage a.tags::before {
    content: '#';
    color: var(--brand-red);
    margin-left: 2px;
}

.innerPage a.tags:hover {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
}

.innerPage a.tags:hover::before {
    color: #fff;
}

/* ---------- عناوين أقسام التفاصيل (ذات صلة / التعليقات) ---------- */

.innerPage .sectionHeading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
}

.innerPage .sectionHeading span {
    position: relative;
    padding-right: 14px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
}

.innerPage .sectionHeading span::before {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    bottom: 15%;
    width: 5px;
    border-radius: 3px;
    background: var(--brand-red);
}

.innerPage .sectionHeading small {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
}

.innerPage .sectionHeading::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ---------- الشريط الجانبي: ذات صلة ---------- */

.innerPage .articleAside {
    position: sticky;
    top: 110px;
}

.innerPage .relatedBox {
    padding: 20px;
    background: var(--surface-alt);
    border-radius: var(--radius);
}

.innerPage .CardSuggestionNews {
    display: block;
    text-decoration: none;
    padding: 8px;
    margin: 0 -8px 6px;
    border-radius: var(--radius-sm);
    transition: background-color .2s;
}

.innerPage .CardSuggestionNews:last-child {
    margin-bottom: 0;
}

.innerPage .CardSuggestionNews:hover {
    background: var(--surface);
}

.innerPage .CardSuggestionNews .imgSuggestionNews {
    width: 110px;
    height: 76px;
    border-radius: var(--radius-sm);
    background-color: #e3e8e8;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.innerPage .CardSuggestionNews .titleSuggestionNews {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}

.innerPage .CardSuggestionNews:hover .titleSuggestionNews {
    color: var(--brand-red);
}

.innerPage .CardSuggestionNews .rowDataSuggestionNews {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ---------- التعليقات ---------- */

.innerPage .commentsSection {
    margin-top: 48px;
}

.innerPage .cardComment {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.innerPage .cardComment .iconUser {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface-alt);
    color: var(--brand-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 17px;
}

.innerPage .cardComment .commentBody {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    background: var(--surface-alt);
    border-radius: 4px var(--radius) var(--radius) var(--radius);
}

.innerPage .cardComment .nameUser {
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
}

.innerPage .cardComment .commentText {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    line-height: 1.9;
    color: var(--text-body);
    overflow-wrap: anywhere;
}

.innerPage .noComments {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.innerPage .commentForm {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.innerPage .commentForm .commentFormTitle {
    margin-bottom: 16px;
    font-weight: 800;
    font-size: 17px;
    color: var(--text-main);
}

.innerPage .commentForm label {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.innerPage .formField,
.innerPage .formFieldComment {
    border: 1px solid #d5dcdc;
    border-radius: var(--radius-sm);
    box-shadow: none;
    background: #fbfcfc;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

.innerPage .formField {
    height: 48px;
}

.innerPage .formField:focus,
.innerPage .formFieldComment:focus {
    border-color: var(--brand-teal);
    background: #fff;
    box-shadow: 0 0 0 3px rgb(50 102 102 / 15%);
}

.innerPage .errorForm {
    color: #c0392b;
    font-weight: 400;
}

.innerPage .borderError {
    border: 1px solid #c0392b !important;
}

.innerPage .btnSendComment button {
    min-width: 160px;
    padding: 11px 32px;
    border-radius: 999px;
    background: var(--brand-teal) !important;
    color: #fff !important;
    font-weight: 700;
    transition: background-color .2s;
}

.innerPage .btnSendComment button:hover {
    background: var(--brand-teal-dark) !important;
}

/* ---------- الشاشات الصغيرة ---------- */

@media (max-width: 991px) {
    .innerPage .articleAside {
        position: static;
        margin-top: 48px;
    }
}

@media (max-width: 767px) {
    .innerPage .fullFile .imgNews {
        height: 300px;
    }
}

@media (max-width: 575px) {
    .innerPage .pageHeading h1 {
        font-size: 24px;
    }

    .innerPage .titleDetailsNews {
        font-size: 24px;
    }

    .innerPage .sub_titleDetailsNews {
        font-size: 16px;
    }

    .innerPage .content {
        font-size: calc(17px * var(--content-scale, 1));
    }

    .innerPage .articleMeta {
        flex-direction: column;
        align-items: flex-start;
    }

    .innerPage .commentForm {
        padding: 16px;
    }

    .innerPage .fullFile .imgNews {
        height: 250px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .innerPage *,
    .innerPage *::before {
        transition: none !important;
    }
}
