* {
    direction: rtl;
    font-family: 'Cairo', sans-serif;

}

a {
    color: inherit; /* blue colors for links too */
  text-decoration: inherit;
}

@font-face {
    font-family: 'Cairo';
    src: url('../fonts/Cairo-VariableFont_slnt,wght.ttf') format('truetype');
    font-weight: 100 900; /* يدعم جميع الأوزان بين 100 و 900 */
    font-style: normal;
}

body{
	    background: #d1d1d31f;
}

.headercont{padding:12px 16px;margin:0 auto;position:relative;     background: rgba(34, 34, 45, 0.95);     border-bottom: 4px solid #515ee4;}

/* شريط العنوان */
.headerbar{display:flex;align-items:center;justify-content:center;position:relative}
.site-title{font-size: clamp(22px, 5vw, 36px);font-weight:800;color:white;text-decoration:none;white-space:nowrap}

.icon-btn{background:none;border:0;cursor:pointer;line-height:1}

/* زر الهامبرغر */
.hamburger{background:none;border:0;cursor:pointer;width:28px;height:20px;display:none;flex-direction:column;justify-content:space-between;padding:0;position:relative;inset-inline-start:0}
.hamburger span{height:3px;width:100%;background:#515ee4;border-radius:2px;transition:transform .2s ease,opacity .2s ease}
.hamburger.active span:nth-child(1){transform:translateY(9px) rotate(45deg)}
.hamburger.active span:nth-child(2){opacity:0}
.hamburger.active span:nth-child(3){transform:translateY(-9px) rotate(-45deg)}

/* أيقونة البحث بالـ CSS + التحول إلى X */
.search-toggle{width:28px;height:28px;position:relative}
.search-toggle .icon,
.search-toggle .icon::before,
.search-toggle .icon::after{content:"";position:absolute;display:block;transition:all .25s ease}
.search-toggle .icon{inset:0;margin:auto}
 /* العدسة */
.search-toggle .icon::before{
  width:14px;height:14px;border:2px solid #515ee4;border-radius:50%;
  top:4px; inset-inline-start:4px;
}
 /* المقبض */
.search-toggle .icon::after{
width: 9px;
    height: 2px;
    background: #515ee4;
    bottom: 6px;
    inset-inline-start: 0;
    transform: rotate(45deg);}

/* حالة الفتح: تتحول إلى X */
.search-toggle.active .icon::before{
  width:18px;height:2px;border:none;background:#515ee4;top:13px;inset-inline-start:5px;transform:rotate(45deg);
}
.search-toggle.active .icon::after{
  width:18px;height:2px;background:#515ee4;top:13px;inset-inline-start:5px;transform:rotate(-45deg);
}

/* شريط الروابط */
.headertree{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;
  gap:0; /* سنستخدم الفواصل بدل gap */
  padding:8px 0;
}
.headertree a{position:relative;text-decoration:none;color:#ccc;;padding:6px 10px;border-radius:8px; font-weight: bold;}
.headertree a:hover{background:#f1f5f9;color:#111}

/* الفواصل بين العناصر: "-" */
.headertree a + a::before{
  content:"-";
  color:#a0aec0;
  margin:0 10px;
}

/* زر البحث داخل الشريط */
.nav-search{margin-inline-start:8px}

/* شريط البحث */
.searchbar{display:none;padding:10px 0}
.searchbar.open{display:block}
.searchbar input{width:100%;padding:12px 14px;border:1px solid #ddd;border-radius:10px;font-size:16px}

/* استجابة */
@media (max-width: 992px){
  .headertree{display:none}
  .headertree.open{display:flex;         flex-direction: column;}

  #menuToggle{display:flex}
  .top-search{display:inline-block}
  .nav-search{display:none}
	.headertree a{    border-bottom: 1px solid;
    width: 95%; border-radius: 0; }
  .headerbar{justify-content:space-between}
}

@media (min-width: 993px){
  #menuToggle{display:none}
  .top-search{display:none}
  .headertree{display:flex}
}

/* تحسين الهيدر للشاشات الضيّقة جدًا (≈300px) */
@media (max-width: 365px){
  .headerbar{
    padding-inline: 44px;            /* نحجز 44px يمين ويسار للأيقونات */
    min-height: 44px;                /* ارتفاع مريح للأزرار */
    justify-content: center;         /* نخلي العنوان وسط فعليًا */
    position: relative;
  }

  /* ثبّت الأيقونات على الحواف */
  #menuToggle{
    position: absolute;
    inset-inline-start: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
  }
  .top-search{
    position: absolute;
    inset-inline-end: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
  }

  /* العنوان: وسط، لا يلفّ، قطع بنقاط عند الضيق */
  .site-title{
    font-size: clamp(18px, 6vw, 24px);
    max-width: 100%;
    text-overflow: ellipsis;
    text-align: center;
	       white-space: wrap;
  }

  /* صغّر أيقونة البحث قليلًا لراحة أكبر */
  .search-toggle{ width: 24px; height: 24px; }
  .search-toggle .icon::before{ width: 12px; height: 12px; top: 4px; inset-inline-start: 4px; }
  .search-toggle .icon::after{ width: 8px; height: 2px; bottom: 5px; inset-inline-start: 0; }

  /* القائمة المنسدلة بالموبايل تبقى عمودية كما لديك */
  .headertree.open{ flex-direction: column; }
}


/* FRONT-PAGE */



.posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    justify-items: center;
    width: 100%;
    padding: 0 5%;
    box-sizing: border-box;
}
.posts-container {
@media (min-width: 768px) and (max-width: 991.98px) {
    grid-template-columns: repeat(3, 1fr); /* دائمًا عمودين */

    margin: 0 auto;
}
@media (min-width: 450px) and (max-width: 767.98px) {
      grid-template-columns: repeat(2, 1fr); /* دائمًا عمودين */

    margin: 0 auto;
}

@media (min-width: 300px) and (max-width: 575.98px) {

    margin: 0 auto;
}
	


  @media (min-width: 0px) and (max-width: 300px) {
   grid-template-columns: repeat(2, 1fr); /* دائمًا عمودين */

    margin: 0 auto;
}
}



.post-box {
    width: 230px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.post-box{
@media (min-width: 768px) and (max-width: 991.98px) {
        width: 100%; /* يملأ العمود كاملاً */
	

}
@media (min-width: 576px) and (max-width: 767.98px) {
       width: 100%; /* يملأ العمود كاملاً */

}

@media (min-width: 300px) and (max-width: 575.98px) {
    width: 100%; /* يملأ العمود كاملاً */

}

  @media (min-width: 0px) and (max-width: 300px) {
    width: 100%; /* يملأ العمود كاملاً */

}
}

.post-box:hover {
    transform: translateY(-5px);
}

.bookimagecont {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top: 3px solid #515ee4;
}


.bookimg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}




.book-caption {
    padding: 10px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    height: auto;
    overflow: hidden;
    border-top: 3px solid #515ee4;
}

#searchResultsContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    justify-items: center;
    width: 100%;
    padding: 0 5%;
    box-sizing: border-box;
}

/* نفس الاستجابة للشاشات الصغيرة */

@media (min-width: 768px) and (max-width: 991.98px) {
    #searchResultsContainer {
        grid-template-columns: repeat(3, 1fr);
        margin: 0 auto;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    #searchResultsContainer {
        grid-template-columns: repeat(2, 1fr);
        margin: 0 auto;
    }
}

@media (min-width: 0px) and (max-width: 575.98px) {
    #searchResultsContainer {
        grid-template-columns: repeat(2, 1fr);
        margin: 0 auto;
    }
}


#uploadForm {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%;
    margin: auto;
    width: 90%;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    flex: 1;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    padding: 15px 10px 10px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    position: absolute;
    top: -10px;
    right: 15px;
    background-color: #fff;
    padding: 0 6px;
    font-size: 14px;
    color: #333;
}

.file-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.custom-upload {
    padding: 8px 16px;
    background-color: #0073aa;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
}

.custom-upload:hover {
    background-color: #005d8f;
}

#fileInput {
    display: none;
}

#fileName {
    font-style: italic;
    font-size: 14px;
}

#uploadProgress {
    width: 90%;
    display: none;
    margin: 0 auto;
    margin-top: 20px;
}

#uploadForm input[type="submit"] {
    height: fit-content;
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#uploadForm input[type="submit"]:hover {
    background-color: #005d8f;
}

#uploadForm {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%;
    margin: auto;
    width: 90%;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    flex: 1;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    padding: 15px 10px 10px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    position: absolute;
    top: -10px;
    right: 15px;
    background-color: #fff;
    padding: 0 6px;
    font-size: 14px;
    color: #333;
}

.file-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.custom-upload {
    padding: 8px 16px;
    background-color: #0073aa;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
    white-space: nowrap;
}

.custom-upload:hover {
    background-color: #005d8f;
}

#fileInput {
    display: none;
}

#fileName {
    font-style: italic;
    font-size: 14px;
}

.hidden-progress {
    width: 90%;
    display: block;
    margin: 0 auto;
    margin-top: 20px;
}

#uploadForm input[type="submit"] {
    height: fit-content;
    background-color: #0073aa;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#uploadForm input[type="submit"]:hover {
    background-color: #005d8f;
}

.section-divider {
    margin: 20px auto;
    width: 90%;
    border: 0;
    border-top: 2px solid #ccc;
}

.searchform{
display: flex
;
    /* gap: 10px; */
    width: 90%;
    /* margin: 0 auto; */
    /* align-items: center; */
    margin: 0 auto;
    gap: 10px;
    /* margin-bottom: 20px; */
    /* align-items: center; */
    justify-content: center;
}



.floating-input-group {
      position: relative;
    width: 100%;
}

.floating-input {
    width: 100%;
    padding: 16px 12px 8px 12px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    background: white;
}

.floating-input:focus {
    outline: none;
    border-color: #4e4eb9;
}

.floating-input-group label {
    position: absolute;
    right: 12px;
    top: 14px;
    background: white;
    color: #888;
    font-size: 16px;
    padding: 0 4px;
    pointer-events: none;
    transition: 0.2s ease all;
}

.floating-input:focus + label,
.floating-input:not(:placeholder-shown):valid + label {
    top: -10px;
    font-size: 13px;
    color: #4e4eb9;
}

.search-button{
    padding: 10px;
    /* border: 1px solid black; */
    border-radius: 10px;
    cursor: pointer;
    height: 100%;
    display: flex
;
    width: 15%;
    text-align: center;
    justify-content: center;
    font-size: 20px;
    background: #4e4eb9;
    color: white;
    font-weight: bold;
    border: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* SEARCH.PHP */

.search-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(6px, 2vw, 12px);
  margin:30px auto;
  text-align:center;
  font-size:clamp(20px, 5vw, 28px);
  font-weight:bold;
  line-height:1.3;
  width:90%;
}

/* الأجنحة */
.search-title::before,
.search-title::after{
  content:"";
  flex:1 1 auto;
  min-width:48px;
  height:8px;
  background-repeat:no-repeat;
  background-position: top center, bottom center;
  background-size:100% 2px, 100% 1px;
  opacity:.95;
}

/* الجناح الأيسر */
.search-title::before{
  background-image:
    linear-gradient(to left,
      rgba(78,78,185,1) 0%,
      rgba(78,78,185,.65) 35%,
      rgba(78,78,185,.15) 80%,
      rgba(78,78,185,0) 100%),
    linear-gradient(to left,
      rgba(0,0,0,.24) 0%,
      rgba(0,0,0,.12) 60%,
      rgba(0,0,0,0) 100%);
}

/* الجناح الأيمن */
.search-title::after{
  background-image:
    linear-gradient(to right,
      rgba(78,78,185,1) 0%,
      rgba(78,78,185,.65) 35%,
      rgba(78,78,185,.15) 80%,
      rgba(78,78,185,0) 100%),
    linear-gradient(to right,
      rgba(0,0,0,.24) 0%,
      rgba(0,0,0,.12) 60%,
      rgba(0,0,0,0) 100%);
}

/* تحسين العرض الصغير */
@media (max-width: 420px){
  .search-title{ gap:8px; font-size:clamp(18px, 5vw, 22px); }
  .search-title::before,
  .search-title::after{
    min-width:32px;
    height:6px;
    background-size:100% 2px, 100% 1px;
  }
}

/* عرض ضيق جداً */
@media (max-width: 340px){
  .search-title{ gap:6px }
  .search-title::before,
  .search-title::after{ min-width:24px; }
}


/* SINGLE.PHP */

.single-book-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    width: 90%;
    margin: 0 auto;
}

.single-book-container {
@media (min-width: 992px) and (max-width: 1199.98px) {
      justify-content: center;
    text-align: center;
}
@media (min-width: 768px) and (max-width: 991.98px) {
        justify-content: center;
    text-align: center;
}
@media (min-width: 576px) and (max-width: 767.98px) {
       justify-content: center;
    text-align: center;
}

@media (min-width: 300px) and (max-width: 575.98px) {
    justify-content: center;
    text-align: center;
}

  @media (min-width: 0px) and (max-width: 300px) {
    justify-content: center;
    text-align: center;
}
}

.single-book-image {
    flex: 1 1 300px;
    max-width: 300px;
}


.single-book-image img {
    width: 100%;
  
    border-radius: 8px;

    border: 1px solid #999999b8;
    margin-top: 15px;
}

.book-details {
    flex: 2 1 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.book-meta {
    font-size: 16px;
    font-weight: bold;
        margin-top: 15px;
}

.book-description {
    font-size: 16px;
    line-height: 1.6;
}

.book-links{
    display: flex
;
    flex-direction: column;
}

.book-links a {
    display: inline-block;
    margin-right: 10px;
    padding: 10px 20px;
    background-color: #0073aa;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
}

.book-links a:hover {
    background-color: #005f8a;
}

.book-title{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(6px, 2vw, 12px);   /* مسافة حول النص */
  margin:25px auto;
  text-align:center;
  font-size:clamp(18px, 3.5vw, 22px);
  font-weight:bold;
 
  line-height:1.4;
  width:90%;                   /* لا يلتصق بالحواف */
}

/* الأجنحة يمين ويسار */
.book-title::before,
.book-title::after{
  content:"";
  flex:1 1 auto;
  min-width:48px;              /* يمنع الاختفاء في الشاشات الضيقة */
  height:8px;                  /* مساحة كافية للخطين */
  background-repeat:no-repeat;
  background-position: top center, bottom center;
  background-size:100% 2px, 100% 1px;
  opacity:.95;
}

/* الجناح الأيسر */
.book-title::before{
  background-image:
    linear-gradient(to left,
      rgba(81,94,228,1) 0%,
      rgba(81,94,228,.65) 35%,
      rgba(81,94,228,.15) 80%,
      rgba(81,94,228,0) 100%),
    linear-gradient(to left,
      rgba(0,0,0,.24) 0%,
      rgba(0,0,0,.12) 60%,
      rgba(0,0,0,0) 100%);
}

/* الجناح الأيمن */
.book-title::after{
  background-image:
    linear-gradient(to right,
      rgba(81,94,228,1) 0%,
      rgba(81,94,228,.65) 35%,
      rgba(81,94,228,.15) 80%,
      rgba(81,94,228,0) 100%),
    linear-gradient(to right,
      rgba(0,0,0,.24) 0%,
      rgba(0,0,0,.12) 60%,
      rgba(0,0,0,0) 100%);
}

/* تحسين العرض الصغير */
@media (max-width: 420px){
  .book-title{ gap:8px; font-size:clamp(16px, 4.5vw, 20px); }
  .book-title::before,
  .book-title::after{
    min-width:32px;
    height:6px;
    background-size:100% 2px, 100% 1px;
  }
}

/* عند الشاشات شديدة الضيق (~300px) */
@media (max-width: 340px){
  .book-title{ gap:6px }
  .book-title::before,
  .book-title::after{ min-width:24px; }
}

hr{
  width: 100%;
  opacity: 0.25;
}



.show-downloads{
    margin-bottom: 10px;
    border-radius: 20px;
    border: 3px solid #4e4eb9;
    padding: 10px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
}

.book-links button.show-downloads {
    margin-bottom: 10px;
    background-color: #f3f3f3;
    border: 3px solid #4e4eb9;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.download-links {
    display: none;
    margin-top: 10px;
}

.single-file-links a,
.multi-file-links a {
    background: #000;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    margin: 5px;
    display: inline-block;
}

.show-downloads {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.show-downloads .arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 14px solid #4e4eb9;
    animation: bounceArrow 1.2s infinite ease-in-out;
    transform: translateY(0px);
}


@keyframes bounceArrow {
    0%, 100% {
        transform: translateY(6px);
    }
    50% {
        transform: translateY(0px);
    }
}


.section-title {
    display: flex;
    align-items: center;
    margin: 15px 0;
    font-weight: bold;
    text-align: center;
	
}

.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    border-top: 1px solid #ccc;
    margin: 0 10px;
}

#pdfBackdrop {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9998;
}

#pdfModal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
    overflow: hidden;
}

.pdf-modal-header {
    text-align: left;
    padding: 10px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ccc;
}

.pdf-modal-header button {
    background: #d9534f;
    color: white;
    font-size: 14px;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}

#pdfIframe {
    width: 100%;
    height: calc(100% - 50px);
    border: none;
}

.related-books {
    width: 100%;
  
    box-sizing: border-box;
}


.related-books h2{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:clamp(6px, 2vw, 12px);   /* مسافة حول النص */
  margin:20px auto;
  text-align:center;
  font-size:clamp(20px, 4vw, 25px);
  font-weight:bold;
  line-height:1.3;
  width:90%;
}

/* الأجنحة يمين ويسار */
.related-books h2::before,
.related-books h2::after{
  content:"";
  flex:1 1 auto;
  min-width:48px;
  height:8px;
  background-repeat:no-repeat;
  background-position: top center, bottom center;
  background-size:100% 2px, 100% 1px;
  opacity:.95;
}

/* الجناح الأيسر */
.related-books h2::before{
  background-image:
    linear-gradient(to left,
      rgba(78,78,185,1) 0%,
      rgba(78,78,185,.65) 35%,
      rgba(78,78,185,.15) 80%,
      rgba(78,78,185,0) 100%),
    linear-gradient(to left,
      rgba(0,0,0,.24) 0%,
      rgba(0,0,0,.12) 60%,
      rgba(0,0,0,0) 100%);
}

/* الجناح الأيمن */
.related-books h2::after{
  background-image:
    linear-gradient(to right,
      rgba(78,78,185,1) 0%,
      rgba(78,78,185,.65) 35%,
      rgba(78,78,185,.15) 80%,
      rgba(78,78,185,0) 100%),
    linear-gradient(to right,
      rgba(0,0,0,.24) 0%,
      rgba(0,0,0,.12) 60%,
      rgba(0,0,0,0) 100%);
}

/* تحسين العرض الصغير */
@media (max-width: 420px){
  .related-books h2{ gap:8px; font-size:clamp(18px, 4.5vw, 22px); }
  .related-books h2::before,
  .related-books h2::after{
    min-width:32px;
    height:6px;
    background-size:100% 2px, 100% 1px;
  }
}

/* عند الشاشات شديدة الضيق (~300px) */
@media (max-width: 340px){
  .related-books h2{ gap:6px }
  .related-books h2::before,
  .related-books h2::after{ min-width:24px; }
}


.related-books-container {
   display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
/*     justify-items: center; */
    width: 100%;
    padding: 0 5%;
    box-sizing: border-box;
}



.related-book-card {
    width: 230px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.related-book-card:hover {
    transform: translateY(-5px);
}

.related-book-card .related-image {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.related-book-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-book-card .related-title {
    padding: 10px;
    font-size: 15px;
    font-weight: bold;
    text-align: center;
    height: 100px;
    overflow: hidden;
        border-top: 3px solid #4e4eb9;
}

.clickondar{
        font-size: 20px;
    font-weight: bold;
}

/* عنوان المؤلف في single مثل .book-title */
.single-author-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 12px);
  text-align: center;
  font-size: 22px;
  font-weight: bold;
  line-height: 1.3; 
	width: 90%;
    margin: 0 auto;
	margin-top: 20px;
    margin-bottom: 20px;
}

.single-author-title::before,
.single-author-title::after {
  content: "";
  flex: 1 1 auto;
  min-width: 48px;
  height: 8px;
  background-repeat: no-repeat;
  background-position: top center, bottom center;
  background-size: 100% 2px, 100% 1px;
  opacity: .95;
}

.single-author-title::before {
  background-image:
    linear-gradient(to left, rgba(81,94,228,1) 0%, rgba(81,94,228,.65) 35%, rgba(81,94,228,.15) 80%, rgba(81,94,228,0) 100%),
    linear-gradient(to left, rgba(0,0,0,.24) 0%, rgba(0,0,0,.12) 60%, rgba(0,0,0,0) 100%);
}
.single-author-title::after {
  background-image:
    linear-gradient(to right, rgba(81,94,228,1) 0%, rgba(81,94,228,.65) 35%, rgba(81,94,228,.15) 80%, rgba(81,94,228,0) 100%),
    linear-gradient(to right, rgba(0,0,0,.24) 0%, rgba(0,0,0,.12) 60%, rgba(0,0,0,0) 100%);
}

@media (max-width: 420px){
  .single-author-title::before,
  .single-author-title::after {
    min-width: 32px;
    height: 6px;
  }
}
@media (max-width: 340px){
  .single-author-title::before,
  .single-author-title::after { min-width: 28px; }
}

/* بطاقة المؤلف */
.single-author-card {
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 20px;
  width: 80%;
  margin: 0 auto 30px auto;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,.05);
}

.single-author-desc {
  font-size: 15px;
  color: #555;
  margin-bottom: 15px;
  line-height: 1.6;
}

.single-author-btn {
  display: inline-block;
  padding: 10px 20px;
  background: #515ee4;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background .2s ease;
}
.single-author-btn:hover {
  background: #3c47c4;
}


/*===========================Categroy.php====================*
  
/* غلاف العنوان */
.category-header-wrapper {
  text-align: center;
  width: 90%;
  margin: 0 auto 30px auto;
}

/* عنوان صفحة التصنيف */
.category-page-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 12px);
  margin: 30px 0;
  text-align: center;
  font-size: 28px;
  font-weight: bold;
  line-height: 1.3;
}

/* الأجنحة يمين ويسار */
.category-page-title::before,
.category-page-title::after {
  content: "";
  flex: 1 1 auto;
  min-width: 48px;      /* يمنع انهيار الخطوط على الشاشات الصغيرة */
  height: 8px;          /* مسار نرسم داخله الخطين */
  background-repeat: no-repeat;
  background-position: top center, bottom center; 
  background-size: 100% 2px, 100% 1px;
  opacity: .95;
}

/* اليسار */
.category-page-title::before {
  background-image:
    linear-gradient(to left,  rgba(81,94,228,1) 0%, rgba(81,94,228,.65) 35%, rgba(81,94,228,.15) 80%, rgba(81,94,228,0) 100%),
    linear-gradient(to left,  rgba(0,0,0,.24)     0%, rgba(0,0,0,.12)      60%, rgba(0,0,0,0)       100%);
}

/* اليمين */
.category-page-title::after {
  background-image:
    linear-gradient(to right, rgba(81,94,228,1) 0%, rgba(81,94,228,.65) 35%, rgba(81,94,228,.15) 80%, rgba(81,94,228,0) 100%),
    linear-gradient(to right, rgba(0,0,0,.24)     0%, rgba(0,0,0,.12)      60%, rgba(0,0,0,0)       100%);
}

/* تحسين الشاشات الصغيرة */
@media (max-width: 420px) {
  .category-page-title { gap: 8px; font-size: 22px; }
  .category-page-title::before,
  .category-page-title::after {
    min-width: 32px;
    height: 6px;
    background-size: 100% 2px, 100% 1px;
  }
}

@media (max-width: 340px) {
  .category-page-title { gap: 6px; font-size: 20px; }
  .category-page-title::before,
  .category-page-title::after { min-width: 28px; }
}

