/*
Theme Name: jerada-scientific-council
Theme URI: https://csl-jerada.ma
Author: المجلس العلمي المحلي لإقليم جرادة
Author URI: https://csl-jerada.ma
Description: قالب عربي متجاوب (RTL) للمجلس العلمي المحلي لإقليم جرادة، مبني على Tailwind CSS مع لوحة تخصيص كاملة للألوان والمحتوى، ودعم الأنشطة العلمية والأخبار والإعلانات والمكتبة ومواقيت الصلاة.
Version: 1.0.98
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: csl-jerada
Domain Path: /languages
Tags: rtl-language-support, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, news, one-column, two-columns, right-sidebar
*/
:root {
    --c-primary-rgb: 0 98 51;      
    --c-crimson-rgb: 193 39 45;    
    --c-gold-rgb: 201 168 106;     
    --c-dark-rgb: 15 42 31;        
    --c-cream-rgb: 247 245 240;    
    --c-ivory-rgb: 255 248 231;    
    --c-sand-rgb: 245 217 154;     
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: 'Tajawal', sans-serif;
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(0, 98, 51, .15);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

/* منع تمدد عناصر الشبكة بما يتجاوز عرض الشاشة على الهاتف */
main .grid > * {
    min-width: 0;
}

.amiri {
    font-family: 'Amiri', serif;
}

.cairo-font {
    font-family: 'Cairo', sans-serif;
}

.pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(201, 168, 106, .18) 1px, transparent 0);
    background-size: 22px 22px;
}

/* مراعاة الهيدر الثابت عند الانتقال إلى الأقسام عبر الروابط الداخلية */
main [id] {
    scroll-margin-top: 78px;
}

@media (min-width: 1024px) {
    main [id] {
        scroll-margin-top: 185px;
    }
}

.pattern-red {
    background: linear-gradient(135deg, #8B1A1F 0%, rgb(var(--c-crimson-rgb)) 50%, #7A151A 100%);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.fadeUp {
    animation: fadeUp .6s ease both;
}

.hero-img {
    transition: opacity 1s ease, transform 6s ease;
}

.acts-img {
    transition: opacity .6s ease;
}

.card {
    transition: transform .25s ease, box-shadow .25s ease;
}

.card:hover {
    transform: translateY(-4px);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* أهداف لمس مريحة (44px) للروابط النصية الصغيرة */
.csl-tap {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

/* توسيع منطقة اللمس لروابط العناوين دون تغيير التخطيط */
.csl-tap-inline {
    display: inline-block;
    padding-block: .55rem;
    margin-block: -.55rem;
}

/* تحسين استجابة اللمس على أندرويد وآيفون */
a,
button,
[role="button"],
input[type="submit"],
input[type="button"] {
    touch-action: manipulation;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

details summary::-webkit-details-marker {
    display: none;
}

.sticky-shadow {
    box-shadow: 0 2px 20px rgba(0, 0, 0, .06);
}

/* الهيدر الثابت: مراعاة النتوء/الحافة العلوية في iPhone */
header.sticky.top-0 {
    padding-top: env(safe-area-inset-top, 0px);
}

.csl-brand-link,
.csl-brand .custom-logo-link {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.csl-brand img,
.csl-brand .custom-logo {
    display: block;
    height: 60px;
    width: auto;
    max-width: calc(100vw - 132px);
    object-fit: contain;
}

@media (min-width: 640px) {
    .csl-brand img,
    .csl-brand .custom-logo {
        height: 72px;
        max-width: 360px;
    }
}

@media (min-width: 1024px) {
    .csl-brand img,
    .csl-brand .custom-logo {
        height: 82px;
        max-width: 430px;
    }
}

.csl-header-center-wrap {
    display: none;
}

.csl-header-center-logo {
    display: block;
    height: 48px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

@media (min-width: 640px) {
    .csl-header-center-wrap {
        display: flex;
    }
    .csl-header-center-logo {
        height: 85px;
    }
}

@media (min-width: 1024px) {
    .csl-header-center-logo {
        height: 110px;
    }
}

.ann-item {
    width: 100%;
}

@media (min-width: 640px) {
    .ann-item {
        width: calc(50% - 10px);
    }
}

@media (min-width: 1024px) {
    .ann-item {
        width: calc(25% - 15px);
    }
}

.screen-reader-text {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

.sticky {
    position: sticky;
}

.entry-content {
    min-width: 0;
    font-size: 15.5px;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object {
    max-width: 100%;
}

.entry-content h2 { font-size: 1.6rem; font-weight: 900; margin: 1.4rem 0 .7rem; color: rgb(var(--c-dark-rgb)); }
.entry-content h3 { font-size: 1.3rem; font-weight: 800; margin: 1.2rem 0 .6rem; }
.entry-content p  { line-height: 2; margin-bottom: 1rem; }
.entry-content ul { list-style: disc; padding-right: 1.5rem; margin-bottom: 1rem; line-height: 2; }
.entry-content ol { list-style: decimal; padding-right: 1.5rem; margin-bottom: 1rem; line-height: 2; }
.entry-content a  { color: rgb(var(--c-primary-rgb)); text-decoration: underline; }
.entry-content img { border-radius: 16px; max-width: 100%; height: auto; }
.entry-content blockquote {
    border-right: 4px solid rgb(var(--c-gold-rgb));
    background: rgb(var(--c-ivory-rgb));
    padding: 1rem 1.25rem;
    border-radius: 0 16px 16px 0;
    font-family: 'Amiri', serif;
    font-size: 1.15rem;
    line-height: 2;
    margin: 1.25rem 0;
}

.post-navigation-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}
.post-navigation-links a {
    flex: 1;
    min-width: 240px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 18px;
    padding: 1rem 1.25rem;
    font-weight: 700;
    transition: all .25s ease;
}
.post-navigation-links a:hover {
    border-color: rgb(var(--c-primary-rgb));
    box-shadow: 0 8px 24px rgba(0, 0, 0, .07);
}
.post-navigation-links .nav-next { text-align: left; }
.post-navigation-links .nav-previous { text-align: right; }

.search-form label { display: flex; gap: .5rem; }
.search-form input[type="search"] {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 999px;
    padding: .7rem 1.1rem;
    font-size: .95rem;
    outline: none;
}
.search-form input[type="submit"] {
    background: rgb(var(--c-primary-rgb));
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: .7rem 1.5rem;
    font-weight: 800;
    cursor: pointer;
}

.comment-list { list-style: none; padding: 0; }
.comment-body {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 20px;
    padding: 1.1rem 1.25rem;
    margin-bottom: .9rem;
}
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 14px;
    padding: .7rem 1rem;
    font-size: .92rem;
    margin-bottom: .7rem;
    outline: none;
}
.comment-respond input:focus,
.comment-respond textarea:focus { border-color: rgb(var(--c-primary-rgb)); }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgb(var(--c-gold-rgb));
    outline-offset: 2px;
}

.widget {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 24px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.widget-title,
.widget .wp-block-heading,
.widget h2,
.widget h3 {
    font-weight: 900;
    color: rgb(var(--c-dark-rgb));
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    padding: .55rem .75rem;
    background: rgb(var(--c-cream-rgb));
    border-radius: 12px;
    margin-bottom: .5rem;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.7;
}

.widget ul li a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.widget ul li a:hover {
    color: rgb(var(--c-primary-rgb));
}

.widget input[type="text"],
.widget input[type="search"],
.widget input[type="email"],
.widget input[type="url"],
.widget input[type="password"],
.widget select,
.widget textarea {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 999px;
    padding: .65rem 1.1rem;
    font-size: .92rem;
    outline: none;
    margin-bottom: .6rem;
}

.widget input[type="submit"],
.widget button,
.wp-block-search__button {
    background: rgb(var(--c-primary-rgb));
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: .65rem 1.5rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: opacity .2s ease;
}

.widget input[type="submit"]:hover,
.widget button:hover,
.wp-block-search__button:hover {
    opacity: .88;
}

.widget select {
    border-radius: 14px;
}

.widget .wp-block-categories li,
.widget .wp-block-archives li,
.widget .wp-block-recent-posts li {
    display: block;
}

.csl-topnav {
    margin-inline-start: auto;
}

.csl-topnav--dark .csl-top-links > li > a {
    color: rgba(255, 255, 255, .82);
}

.csl-topnav--dark .csl-top-links > li > a:hover,
.csl-topnav--dark .csl-top-links > li > a:focus-visible,
.csl-topnav--dark .csl-top-links > li.current-menu-item > a,
.csl-topnav--dark .csl-top-links > li.current-menu-ancestor > a {
    color: #fff;
    background: rgba(255, 255, 255, .12);
}

.csl-topnav--dark .csl-top-links > li + li::before {
    background: rgba(255, 255, 255, .22);
}

.csl-topnav--dark .csl-top-links .sub-menu a {
    color: rgb(var(--c-dark-rgb));
}

.csl-topnav--dark .csl-top-links .sub-menu a:hover,
.csl-topnav--dark .csl-top-links .sub-menu a:focus-visible {
    color: rgb(var(--c-primary-rgb));
    background: rgb(var(--c-cream-rgb));
}

.csl-top-links,
.csl-top-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.csl-top-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.csl-top-links > li {
    position: relative;
    display: flex;
    align-items: center;
}

.csl-top-links > li + li::before {
    content: "";
    width: 1px;
    height: .75rem;
    background: rgba(0, 0, 0, .14);
    margin: 0 .15rem;
}

.csl-top-links > li > a {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .6rem;
    border-radius: .5rem;
    color: #475569;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease;
}

.csl-top-links > li > a:hover,
.csl-top-links > li > a:focus-visible,
.csl-top-links > li.current-menu-item > a,
.csl-top-links > li.current-menu-ancestor > a {
    color: rgb(var(--c-primary-rgb));
    background: rgb(var(--c-cream-rgb));
}

.csl-top-links .menu-item-has-children > a::after {
    content: "";
    width: .38rem;
    height: .38rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-top: -.18rem;
    transition: transform .18s ease;
}

.csl-top-links li:hover > a::after,
.csl-top-links li:focus-within > a::after {
    transform: rotate(225deg);
    margin-top: .18rem;
}

.csl-top-links .sub-menu {
    position: absolute;
    top: calc(100% + .3rem);
    right: 0;
    z-index: 80;
    min-width: 230px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-top: 3px solid rgb(var(--c-gold-rgb));
    border-radius: 0 0 14px 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .16);
    padding: .4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.csl-top-links li:hover > .sub-menu,
.csl-top-links li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.csl-top-links > li:nth-last-child(-n+2) > .sub-menu {
    right: auto;
    left: 0;
}

.csl-top-links .sub-menu li {
    display: block;
}

.csl-top-links .sub-menu a {
    display: block;
    padding: .5rem .65rem;
    border-radius: 8px;
    color: rgb(var(--c-dark-rgb));
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.6;
    text-decoration: none;
    white-space: normal;
    transition: background .18s ease, color .18s ease;
}

.csl-top-links .sub-menu a:hover,
.csl-top-links .sub-menu a:focus-visible {
    background: rgb(var(--c-cream-rgb));
    color: rgb(var(--c-primary-rgb));
}

.csl-navbar {
    position: relative;
    z-index: 40;
}

.csl-nav-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.csl-nav,
.csl-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.csl-nav {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
}

.csl-nav > li {
    position: relative;
}

.csl-nav > li > a {
    position: relative;
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .8rem .85rem;
    border-radius: .45rem .45rem 0 0;
    color: #fff;
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.csl-nav > li > a:hover,
.csl-nav > li > a:focus-visible,
.csl-nav > li.current-menu-item > a,
.csl-nav > li.current-menu-ancestor > a,
.csl-nav > li.current-menu-parent > a {
    background: rgba(255, 255, 255, .12);
    color: rgb(var(--c-sand-rgb));
    box-shadow: inset 0 -3px 0 rgb(var(--c-gold-rgb));
}

.csl-nav .menu-item-has-children > a::after {
    content: "";
    width: .4rem;
    height: .4rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-inline-start: .2rem;
    margin-top: -.15rem;
    transition: transform .2s ease;
}

.csl-nav li:hover > a::after,
.csl-nav li:focus-within > a::after {
    transform: rotate(225deg);
    margin-top: .15rem;
}

.csl-nav .sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 70;
    min-width: 255px;
    background: #fff;
    color: rgb(var(--c-dark-rgb));
    border-top: 3px solid rgb(var(--c-gold-rgb));
    border-radius: 0 0 14px 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .2);
    padding: .45rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.csl-nav li:hover > .sub-menu,
.csl-nav li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.csl-nav > li:nth-last-child(-n+2) > .sub-menu {
    right: auto;
    left: 0;
}

.csl-nav .sub-menu li {
    position: relative;
}

.csl-nav .sub-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .55rem .7rem;
    border-radius: 8px;
    color: rgb(var(--c-dark-rgb));
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.6;
    text-decoration: none;
    white-space: normal;
    transition: background .18s ease, color .18s ease;
}

.csl-nav .sub-menu a:hover,
.csl-nav .sub-menu a:focus-visible,
.csl-nav .sub-menu .current-menu-item > a {
    background: rgb(var(--c-cream-rgb));
    color: rgb(var(--c-primary-rgb));
}

.csl-nav .sub-menu .menu-item-has-children > a::after {
    transform: rotate(135deg);
    margin-top: 0;
    margin-inline-start: .35rem;
}

.csl-nav .sub-menu li:hover > a::after,
.csl-nav .sub-menu li:focus-within > a::after {
    transform: rotate(135deg);
    margin-top: 0;
}

.csl-nav .sub-menu .sub-menu {
    top: -.45rem;
    right: 100%;
    border-radius: 14px;
}

#mobileMenu {
    max-height: calc(100vh - 5.5rem);
    max-height: calc(100dvh - 5.5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.csl-mobile-nav,
.csl-mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.csl-mobile-nav > li {
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.csl-mobile-nav > li:last-child {
    border-bottom: 0;
}

.csl-mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .75rem .3rem;
    color: rgb(var(--c-dark-rgb));
    font-size: .92rem;
    font-weight: 800;
    text-decoration: none;
    transition: color .18s ease;
}

.csl-mobile-nav a:hover {
    color: rgb(var(--c-primary-rgb));
}

.csl-mobile-nav .sub-menu {
    margin: 0 0 .5rem;
    padding-inline-start: .9rem;
    border-inline-start: 2px solid rgb(var(--c-gold-rgb));
}

.csl-mobile-nav .sub-menu a {
    padding: .45rem .3rem;
    color: #475569;
    font-size: .82rem;
    font-weight: 600;
}

.csl-mobile-nav .sub-menu .sub-menu {
    padding-inline-start: 1rem;
}

.csl-mobile-extras {
    margin-top: .9rem;
    padding-top: .8rem;
    border-top: 1px dashed rgba(0, 0, 0, .12);
}

.csl-mobile-extras__title {
    margin: 0 0 .35rem;
    color: #94a3b8;
    font-size: .72rem;
    font-weight: 800;
}

.csl-mobile-toplinks,
.csl-mobile-toplinks ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.csl-mobile-toplinks > li {
    border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.csl-mobile-toplinks > li:last-child {
    border-bottom: 0;
}

.csl-mobile-toplinks a {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .2rem;
    color: #475569;
    font-size: .84rem;
    font-weight: 700;
    text-decoration: none;
    transition: color .18s ease;
}

.csl-mobile-toplinks a:hover {
    color: rgb(var(--c-primary-rgb));
}

.csl-mobile-toplinks .sub-menu {
    padding-inline-start: .9rem;
}

.csl-mobile-toplinks .sub-menu a {
    padding: .35rem .2rem;
    color: #64748b;
    font-size: .78rem;
    font-weight: 600;
}

/* ===== معرض صور منشورات فيسبوك: شبكة مربعات 3×3 ===== */
.csl-fb-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 1.6rem 0 1.2rem;
    clear: both;
    width: 100%;
}

.csl-fb-gallery__item {
    position: relative;
    margin: 0;
    padding: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 14px;
    background: rgb(var(--c-ivory-rgb));
    box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

.csl-fb-gallery__item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.entry-content .csl-fb-gallery__item img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    transition: transform .35s ease;
}

.csl-fb-gallery__item:hover img,
.csl-fb-gallery__item:focus-within img {
    transform: scale(1.06);
}

.entry-content .jfs-source {
    margin-top: 1.4rem;
    padding-top: .9rem;
    border-top: 1px dashed rgba(15, 23, 42, .16);
    font-size: .85rem;
    color: #64748b;
}

@media (max-width: 640px) {
    .csl-fb-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .csl-fb-gallery__item {
        border-radius: 10px;
    }
}

/* ===== جداول المحتوى: تمرير أفقي داخل البطاقة بدل تمدد الصفحة ===== */
.csl-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    margin: 1.5rem 0;
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08);
    background: #fff;
}

.csl-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: .92rem;
    background: #fff;
    color: #334155;
}

.csl-table th,
.csl-table td {
    padding: .8rem 1rem;
    border: 1px solid rgba(0, 0, 0, .14);
    vertical-align: middle;
    line-height: 1.7;
}

.csl-table thead th {
    background: rgb(var(--c-primary-rgb));
    color: #fff;
    font-weight: 900;
    white-space: nowrap;
}

.csl-table tbody tr:nth-child(even) { background: #f6f4ec; }
.csl-table tbody tr:nth-child(odd) { background: #fff; }

.csl-table .csl-table__day {
    font-weight: 900;
    white-space: nowrap;
    color: rgb(var(--c-dark-rgb));
}

.csl-table .csl-table__phone {
    direction: ltr;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.csl-table .csl-table__time { white-space: nowrap; }

.csl-table .csl-table__note {
    background: #fdf7f0;
    color: #92400e;
    font-weight: 700;
}

.csl-table .csl-table__muted { color: #64748b; }

/* ===== تحسينات العرض على الهواتف النقالة ===== */
@media (max-width: 640px) {
    /* الهيدر أكثر إحكاماً لترك مساحة أكبر للمحتوى */
    .csl-brand img,
    .csl-brand .custom-logo {
        height: 46px;
        max-width: calc(100vw - 148px);
    }

    .csl-header-center-wrap {
        display: none;
    }

    #mobileMenu {
        max-height: calc(100vh - 5rem);
        max-height: calc(100dvh - 5rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        animation: fadeUp .18s ease both;
    }

    /* أهداف لمس مريحة في القائمة والفوتر */
    .csl-mobile-nav > li > a {
        min-height: 46px;
        padding-top: .6rem;
        padding-bottom: .6rem;
    }

    .csl-mobile-nav .sub-menu a {
        min-height: 42px;
        padding-top: .5rem;
        padding-bottom: .5rem;
    }

    .csl-mobile-toplinks a {
        min-height: 42px;
        align-items: center;
        padding-top: .45rem;
        padding-bottom: .45rem;
    }

    footer ul a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }

    footer a[aria-label="Facebook"],
    footer a[aria-label="YouTube"],
    footer a[aria-label="WhatsApp"],
    footer a[aria-label="X"] {
        width: 44px;
        height: 44px;
    }

    /* منع تكبير iOS التلقائي لحقول الإدخال */
    #searchOverlay {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

#searchOverlay input[type="search"],
    .search-form input[type="search"],
    .widget input[type="text"],
    .widget input[type="search"],
    .widget input[type="email"],
    .widget input[type="url"],
    .widget input[type="password"],
    .widget select,
    .widget textarea,
    .comment-respond input[type="text"],
    .comment-respond input[type="email"],
    .comment-respond input[type="url"],
    .comment-respond textarea,
    .wpforms-container input:not([type="submit"]),
    .wpforms-container textarea,
    .wpforms-container select {
        font-size: 16px;
    }

    /* طبقة البحث أقرب للأعلى لتظهر النتائج */
    #searchOverlay {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    #searchOverlay > div {
        padding-top: calc(4.5rem + env(safe-area-inset-top, 0px));
    }

    /* عنوان الواجهة يتناسب مع الشاشات الصغيرة */
    #heroTitle {
        font-size: clamp(29px, 9vw, 38px);
    }

    /* إلغاء التكبير الطفيف لصورة الواجهة (كان يسبب تجاوزاً أفقياً) */
    #home .hero-img {
        transform: none;
    }

    /* جداول أعرض من الشاشة: تمرير داخلي + إشارة بصرية */
    .csl-table {
        font-size: .8rem;
        min-width: 480px;
    }

    .csl-table th,
    .csl-table td {
        padding: .55rem .6rem;
    }

    .csl-table-wrap {
        position: relative;
        border-radius: 14px;
    }

    /* مساحات أنسب للمحتوى */
    .entry-content h2 { font-size: 1.35rem; }
    .entry-content h3 { font-size: 1.15rem; }
    .entry-content p { line-height: 1.95; }
    .entry-content ul,
    .entry-content ol { padding-right: 1.25rem; }

    .entry-content blockquote {
        padding: .85rem 1rem;
        font-size: 1.05rem;
    }

    /* أزرار التنقل بين المقالات بعرض كامل */
    .post-navigation-links a {
        min-width: 0;
        width: 100%;
    }

    /* ترقيم الصفحات: أهداف لمس مريحة */
    .navigation.pagination .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: .4rem;
    }

    .navigation.pagination .page-numbers {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 0 .55rem;
        border-radius: 12px;
        background: #fff;
        border: 1px solid rgba(0, 0, 0, .08);
        color: #334155;
        font-weight: 800;
        text-decoration: none;
    }

    .navigation.pagination .page-numbers.current {
        background: rgb(var(--c-primary-rgb));
        border-color: transparent;
        color: #fff;
    }

    /* رابط المصدر أسفل منشورات فيسبوك */
    .entry-content .jfs-source a {
        display: inline-flex;
        align-items: center;
        min-height: 38px;
    }
}

/* إطار المصحف المحمدي في الصفحة الرئيسية - بطاقة مربعة */
.csl-mushaf-frame-wrap {
    width: 290px;
    max-width: 100%;
    margin-inline-start: 0;
    margin-inline-end: auto;
}
.csl-mushaf-frame {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 290px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(201, 162, 39, .6);
    border-radius: 22px;
    background: linear-gradient(150deg, #0B5D3B 0%, #0d6b44 55%, #0B5D3B 100%);
    box-shadow: 0 10px 30px rgba(11, 93, 59, .18);
    color: #fff;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.csl-mushaf-frame:hover,
.csl-mushaf-frame:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(11, 93, 59, .28);
    color: #fff;
    outline: none;
}
.csl-mushaf-frame:focus-visible { box-shadow: 0 0 0 3px #C9A227, 0 16px 38px rgba(11, 93, 59, .28); }
.csl-mushaf-frame__pattern {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .13;
    background-image:
        repeating-linear-gradient(45deg, transparent 0 17px, rgba(201, 162, 39, .7) 17px 18px),
        repeating-linear-gradient(-45deg, transparent 0 17px, rgba(201, 162, 39, .45) 17px 18px);
}
.csl-mushaf-frame__icon {
    position: relative;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #0B5D3B;
    background: #C9A227;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .38);
}
.csl-mushaf-frame__body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}
.csl-mushaf-frame__eyebrow {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    color: #C9A227;
}
.csl-mushaf-frame__title {
    font-size: 20px;
    font-weight: 900;
    line-height: 1.5;
}
.csl-mushaf-frame__cta {
    position: relative;
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: #fff;
    color: #0B5D3B;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}
@media (max-width: 480px) {
    .csl-mushaf-frame-wrap { width: 100%; max-width: 260px; }
    .csl-mushaf-frame { min-height: 0; padding: 18px; }
}

/* ثلاث بطاقات: خطبة الجمعة، نافذة الزكاة، المصحف المحمدي */
.csl-feature-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.csl-feature-cards > .csl-mushaf-frame-wrap { margin: 0; }
.csl-feature-cards > .csl-khutba-wrap {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
}
.csl-feature-cards > .csl-zakat-wrap,
.csl-feature-cards > .csl-mushaf-frame-wrap:not(.csl-khutba-wrap) {
    flex: 0 0 290px;
    width: 290px;
}
@media (max-width: 600px) {
    .csl-feature-cards { gap: 12px; }
    .csl-feature-cards > .csl-khutba-wrap { flex: 0 0 260px; width: 260px; max-width: 100%; }
    .csl-feature-cards > .csl-zakat-wrap,
    .csl-feature-cards > .csl-mushaf-frame-wrap:not(.csl-khutba-wrap) { flex: 0 0 260px; width: 260px; }
}
/* تنسيق الهاتف: منع تمدد أعمدة الشبكة وتجاوز العناصر حدود الشاشة */
@media (max-width: 640px) {
    #home > div.relative > div { min-width: 0; }

    /* مؤشرات سلايدر الأنشطة في صفين بدل خروجها من البطاقة */
    .csl-hero-act-footer { flex-wrap: wrap; }
    .csl-hero-dots { width: 100%; flex-wrap: wrap; justify-content: flex-start; }
    .csl-hero-dots [data-hero-act] { flex: 0 0 auto; }

    /* بطاقات الخطبة والزكاة والمصحف بعرض الشاشة مع الحفاظ على ترتيبها */
    .csl-feature-cards > .csl-khutba-wrap,
    .csl-feature-cards > .csl-zakat-wrap,
    .csl-feature-cards > .csl-mushaf-frame-wrap:not(.csl-khutba-wrap) {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
    .csl-feature-cards > .csl-mushaf-frame-wrap { margin-inline-start: 0; margin-inline-end: 0; }
}
/* إعلانات المجلس مكان النبذة:بطاقتان في الصف داخل العمود */
@media (min-width: 1024px) {
    .csl-ann-inline .ann-item {
        flex: 0 0 calc(50% - 10px);
        width: calc(50% - 10px);
        max-width: calc(50% - 10px);
    }
}
.csl-zakat-frame {
    background: linear-gradient(150deg, #4A351B 0%, #6B4F2A 55%, #4A351B 100%);
}
.csl-zakat-frame:hover,
.csl-zakat-frame:focus-visible {
    box-shadow: 0 16px 38px rgba(107, 79, 42, .30);
}
.csl-zakat-frame .csl-mushaf-frame__icon { color: #6B4F2A; }
.csl-zakat-frame .csl-mushaf-frame__icon i { font-size: 24px; }
.csl-zakat-frame .csl-mushaf-frame__cta { color: #6B4F2A; }
.csl-khutba-frame {
    aspect-ratio: auto;
    min-height: 290px;
    background: linear-gradient(150deg, #122a1f 0%, #0b2018 55%, #0B5D3B 145%);
}
.csl-khutba-date {
    position: relative;
    font-size: 12px;
    font-weight: 800;
    color: #C9A227;
}
.csl-khutba-title {
    font-size: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.csl-khutba-actions {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.csl-khutba-actions .csl-mushaf-frame__cta { font-size: 13px; padding: 9px 14px; }
.csl-khutba-download {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border: 1px solid rgba(201, 162, 39, .55);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(201, 162, 39, .14);
    color: #C9A227;
    font-size: 13px;
    text-decoration: none;
}
.csl-khutba-download:hover,
.csl-khutba-download:focus-visible { background: #C9A227; color: #0B5D3B; outline: none; }

/* سلايدرات الهاتف: مخفية تماماً على الشاشات الكبيرة */
.csl-mobile-dots { display: none; }

@media (max-width: 640px) {
    /* الأنشطة، البرامج والأبحاث، المكتبة والوثائق، معرض الوسائط */
    .csl-mobile-slider {
        display: flex;
        flex-wrap: nowrap;
        gap: 12px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 6px;
    }
    .csl-mobile-slider::-webkit-scrollbar { display: none; }
    .csl-mobile-slider > * {
        flex: 0 0 86%;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    #docsGrid > * { flex-basis: 90%; }
    #galleryGrid > * { flex-basis: 80%; }
    .csl-mobile-slider > p { flex-basis: 100%; }

    .csl-mobile-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 7px;
        margin-top: 10px;
    }
    .csl-mobile-dots button {
        width: 8px;
        height: 8px;
        min-width: 8px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: rgba(15, 42, 31, .22);
        cursor: pointer;
        transition: width .2s ease, background .2s ease;
    }
    .csl-mobile-dots button.active {
        width: 22px;
        background: #C9A227;
    }
    .csl-mobile-dots button:focus-visible {
        outline: 2px solid #0B5D3B;
        outline-offset: 3px;
    }
}

@media (max-width: 600px) {
    .csl-khutba-frame { min-height: 260px; padding: 16px; }
    .csl-khutba-title { font-size: 15px; line-height: 1.5; }
    .csl-khutba-date { font-size: 11px; }
    .csl-khutba-actions .csl-mushaf-frame__cta { font-size: 12px; padding: 8px 12px; }
}

/* زر «عرض الكل» داخل المحتوى: نص أبيض واضح */
.entry-content a.csl-view-all,
.entry-content a.csl-view-all:hover,
.entry-content a.csl-view-all:focus-visible {
    color: #fff;
    text-decoration: none;
}
.entry-content a.csl-view-all i { color: #fff; }

