/* إضافات ووردبريس فوق التصميم الأصلي (main.css) */

/* شريط الإدارة */
.admin-bar header { top: 32px; }
@media (max-width: 782px) { .admin-bar header { top: 46px; } }

/* نصوص للقارئات فقط */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute;
  width: 1px; word-wrap: normal !important;
}

/* شعار مخصص */
.brand-mark .brand-logo { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; display: block; }

/* روابط قائمة ووردبريس */
nav .menu-item a { text-decoration: none; }

/* الصفحات الداخلية */
.al-page { padding-block: 40px 56px; }
.al-narrow { max-width: 820px; }
.al-center { text-align: center; }
.al-center p, .al-center .al-search { margin-inline: auto; }
.al-page h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); }
.al-entry-head { margin-bottom: 18px; }
.al-meta { color: var(--mute); font-size: 0.92rem; margin: 0 0 12px; }
.al-meta a { color: var(--teal); text-decoration: none; font-weight: 700; }
.al-crumbs { font-size: 0.9rem; color: var(--mute); margin-bottom: 14px; }
.al-crumbs a { color: var(--teal); text-decoration: none; }
.al-hero-pic { max-width: 760px; margin: 0 0 24px; border-radius: var(--r); overflow: hidden; }
.al-hero-pic .pic { border-radius: var(--r); overflow: hidden; }

/* محتوى المقال */
.al-entry { font-size: 1.05rem; }
.al-entry p { max-width: none; }
.al-entry h2, .al-entry h3, .al-entry h4 { margin-top: 1.6em; }
.al-entry ul, .al-entry ol { margin: 0 0 1em; padding-inline-start: 1.4em; }
.al-entry ul { list-style: disc; }
.al-entry ol { list-style: decimal; }
.al-entry li { margin-bottom: 0.4em; }
.al-entry img { max-width: 100%; height: auto; border-radius: 10px; }
.al-entry a { color: var(--teal); }
.al-entry blockquote { margin: 1.2em 0; padding: 0.4em 1em; border-inline-start: 4px solid var(--tl); background: var(--mist); border-radius: 8px; }
.al-entry table { width: 100%; border-collapse: collapse; margin-bottom: 1em; }
.al-entry th, .al-entry td { border: 1px solid var(--line); padding: 8px 10px; text-align: start; }
.al-entry .alignleft { float: left; margin: 0 1em 1em 0; }
.al-entry .alignright { float: right; margin: 0 0 1em 1em; }
.al-entry .aligncenter { display: block; margin-inline: auto; }
.al-entry figcaption, .wp-caption-text { font-size: 0.88rem; color: var(--mute); }
.al-pages { font-weight: 700; }

/* شبكة المقالات */
.al-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-block: 24px; }
.al-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 10px 28px -22px rgba(11, 59, 74, 0.5); }
.al-card-pic { display: block; line-height: 0; }
.al-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.al-card h2 { font-size: 1.1rem; margin-bottom: 0.3em; }
.al-card h2 a { text-decoration: none; }
.al-card h2 a:hover { color: var(--teal); }
.al-card p { max-width: none; }
.al-card .more { margin-top: auto; color: var(--teal); font-weight: 700; text-decoration: none; }
.al-related { margin-top: 48px; }

/* الترقيم */
.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: #fff; }
.pagination .page-numbers.current { background: var(--teal-grad); color: #fff; border-color: transparent; }

/* البحث */
.al-search { display: flex; gap: 8px; max-width: 460px; margin-block: 14px; }
.al-search input[type="search"] { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }

/* التعليقات */
.al-comments { margin-top: 40px; }
.al-comment-list, .al-comment-list ol { list-style: none; padding: 0; margin: 0; }
.al-comment-list > li, .al-comment-list ol > li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.al-comment-list ol { padding-inline-start: 24px; }
.al-comments .comment-author img { border-radius: 50%; vertical-align: middle; margin-inline-end: 8px; }
.al-comments .comment-meta { font-size: 0.85rem; color: var(--mute); }
.al-comments textarea, .al-comments input[type="text"], .al-comments input[type="email"], .al-comments input[type="url"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit;
}
.al-comments .form-submit input { cursor: pointer; }

/* كتل ووردبريس */
.wp-block-image img { height: auto; }
.wp-block-image figcaption { text-align: center; }
.alignwide, .alignfull { max-width: 100%; }

/* الطباعة */
@media print { .action-bar, .scroll-progress, .nav-toggle { display: none !important; } }

/* ============ صفحة المقالات / التصنيفات (النصائح) ============ */
.al-archive-hero {
  background: var(--teal-grad);
  color: #fff;
  padding: 44px 0 34px;
  position: relative;
  overflow: hidden;
}
.al-archive-hero::after {
  content: ""; position: absolute; inset-inline-end: -80px; top: -80px; width: 280px; height: 280px;
  border-radius: 50%; background: rgba(255, 255, 255, 0.06);
}
.al-archive-hero .container { position: relative; z-index: 1; }
.al-archive-hero h1 { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: 0.2em; }
.al-kicker { color: var(--brass); font-weight: 800; font-size: 0.95rem; margin: 0 0 6px; letter-spacing: 0.02em; }
.al-lead { color: rgba(255, 255, 255, 0.88); font-size: 1.08rem; max-width: 60ch; }
.al-count { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; margin-bottom: 18px; }
.al-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.al-chips a {
  text-decoration: none; padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.12); color: #fff; border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.al-chips a span { opacity: 0.7; font-size: 0.8rem; margin-inline-start: 4px; }
.al-chips a:hover { background: rgba(255, 255, 255, 0.24); transform: translateY(-1px); }
.al-chips a.on { background: var(--gold-grad); color: var(--on-gold); border-color: transparent; }
.al-archive-hero .al-search { margin: 0; }
.al-archive-hero .al-search input[type="search"] { background: #fff; border: 0; }
.al-archive { padding-top: 34px; }
.al-empty { text-align: center; padding: 40px 0; }
.al-empty p { margin-inline: auto; }

/* بطاقات المقالات */
.al-post-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.al-card { transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
.al-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(11, 59, 74, 0.55); border-color: var(--tl); }
.al-card-pic { position: relative; overflow: hidden; }
.al-card-pic .pic img { transition: transform 0.5s; }
.al-card:hover .al-card-pic .pic img { transform: scale(1.04); }
.al-badge {
  position: absolute; top: 12px; inset-inline-start: 12px; background: var(--gold-grad); color: var(--on-gold);
  font-weight: 800; font-size: 0.78rem; line-height: 1; padding: 7px 12px; border-radius: 999px;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.5);
}
.al-card .al-meta { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; font-size: 0.85rem; }
.al-card h2 { font-size: 1.12rem; line-height: 1.55; }
.al-excerpt { color: var(--mute); font-size: 0.97rem; }
.al-card .more { display: inline-flex; gap: 6px; align-items: center; }
.al-card .more span { transition: transform 0.2s; }
.al-card:hover .more span { transform: translateX(-4px); }
.al-card-featured { grid-column: 1 / -1; flex-direction: row; }
.al-card-featured .al-card-pic { flex: 1 1 52%; min-width: 0; }
.al-card-featured .al-card-pic .pic { height: 100%; }
.al-card-featured .al-card-body { flex: 1 1 48%; padding: 28px; justify-content: center; }
.al-card-featured h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.al-card-featured .more { margin-top: 10px; }
@media (max-width: 760px) {
  .al-card-featured { flex-direction: column; }
  .al-card-featured .al-card-body { padding: 18px; }
}

/* ============ تحسينات عامة للموقع والرئيسية ============ */
header { transition: box-shadow 0.25s, background 0.25s; }
header.scrolled { box-shadow: 0 10px 30px -18px rgba(11, 59, 74, 0.55); }
nav ul li a { position: relative; }
nav ul li a::after {
  content: ""; position: absolute; inset-inline: 0; bottom: -4px; height: 2px; background: var(--brass);
  transform: scaleX(0); transform-origin: center; transition: transform 0.25s;
}
@media (min-width: 921px) { nav ul li a:hover::after, nav ul li a:focus-visible::after { transform: scaleX(1); } }
.service-card, .review-card, .accordion details { transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s; }
@media (hover: hover) {
  .service-card:hover, .review-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px rgba(11, 59, 74, 0.6); }
  .accordion details:hover { border-color: var(--tl); }
}
.section-head h2::after {
  content: ""; display: block; width: 54px; height: 4px; border-radius: 4px; margin-top: 10px; background: var(--gold-grad);
}
.btn { transition: transform 0.2s, box-shadow 0.2s, filter 0.2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
#articles .mt-l { display: flex; flex-wrap: wrap; gap: 10px; }
.to-top {
  position: fixed; inset-inline-start: 14px; bottom: 90px; z-index: 40; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--teal-grad); color: #fff; cursor: pointer; display: grid; place-items: center; opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: opacity 0.25s, transform 0.25s; box-shadow: 0 10px 22px -10px rgba(11, 59, 74, 0.7);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .al-card, .service-card, .review-card, .btn, .to-top { transition: none; }
  .al-card:hover, .service-card:hover, .review-card:hover, .btn:hover { transform: none; }
}

/* حماية: لا أزرار ولا تعليقات داخل صفحة المقال (حتى لو بقي HTML قديم في الكاش) */
.al-single .al-entry ~ p.mt-m,
.al-single #comments,
.al-single .comment-respond,
.al-single .al-comments { display: none !important; }
