/* ============ Header (Pro + Light) ============ */

:root{
  --hdr-bg: #ffffff;
  --hdr-border: rgba(15, 23, 42, .08);
  --hdr-text: #0f172a;
  --hdr-muted: rgba(15, 23, 42, .6);
  --hdr-soft: rgba(15, 23, 42, .06);
  --hdr-shadow: 0 10px 25px rgba(15, 23, 42, .06);
  --hdr-radius: 16px;
}

/* Sticky + subtle blur */
.site-header{
  position: sticky;
  top: 0;
  z-index: 9999;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hdr-border);
}

/* Container */
.site-header .header-container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

/* Logo */
.site-header .logo a{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--hdr-text);
  font-weight: 900;
  letter-spacing: .2px;
  white-space: nowrap;
}

.site-header .logo .logo-icon{
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: #fff;
  font-size: 18px;
  box-shadow: 0 10px 18px rgba(0,0,0,.08);
}

.site-header .logo .site-title{
  font-size: 16px;
  line-height: 1;
}

/* Nav */
.site-header .main-navigation{
  flex: 1;
  display: flex;
  justify-content: center;
}

.site-header .main-navigation .nav-menu{
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--hdr-border);
  background: var(--hdr-bg);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.site-header .main-navigation .nav-menu > li{
  position: relative;
}

.site-header .main-navigation .nav-menu > li > a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--hdr-text);
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
  transition: background .2s ease, transform .2s ease, color .2s ease;
}

.site-header .main-navigation .nav-menu > li > a .menu-icon{
  opacity: .9;
}

.site-header .main-navigation .nav-menu > li > a:hover{
  background: var(--hdr-soft);
}

.site-header .main-navigation .nav-menu > li.current-menu-item > a,
.site-header .main-navigation .nav-menu > li.current_page_item > a{
  background: rgba(13,110,253,.12);
  color: #0d6efd;
}

/* Header actions */
.site-header .header-actions{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* Join button */
.site-header .join-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0d6efd, #4f46e5);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 12px 22px rgba(13,110,253,.18);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
  white-space: nowrap;
}
.site-header .join-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(13,110,253,.22);
}
.site-header .join-btn:active{ transform: translateY(0); }

/* Search */
.site-header .search-wrapper{
  width: 280px;
  max-width: 34vw;
}

.site-header .search-box{
  background: rgba(244,246,251,.95);
  border: 1px solid var(--hdr-border);
  border-radius: 999px;
  padding: 8px 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.site-header .search-form{
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-header .search-input{
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--hdr-text);
}
.site-header .search-input::placeholder{
  color: var(--hdr-muted);
}

.site-header .search-submit{
  border: 0;
  background: var(--hdr-soft);
  border-radius: 999px;
  cursor: pointer;
  padding: 8px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, transform .2s ease;
}
.site-header .search-submit:hover{
  background: rgba(13,110,253,.12);
  transform: translateY(-1px);
}

/* Dropdown */
.site-header .main-navigation .sub-menu{
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--hdr-border);
  border-radius: 14px;
  padding: 8px;
  min-width: 220px;
  box-shadow: var(--hdr-shadow);
}

.site-header .main-navigation li:hover > .sub-menu{
  display: block;
}

.site-header .main-navigation .sub-menu li a{
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--hdr-text);
  font-weight: 800;
  font-size: 13px;
}
.site-header .main-navigation .sub-menu li a:hover{
  background: var(--hdr-soft);
}

/* ============ Mobile ============ */
@media (max-width: 992px){

  .site-header .header-container{
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }

  /* Logo + join on top row */
  .site-header .logo{
    order: 1;
  }
  .site-header .header-actions{
    order: 1;
    margin-inline-start: auto;
  }

  /* Nav becomes horizontal scroll chips */
  .site-header .main-navigation{
    order: 2;
    width: 100%;
    justify-content: flex-start;
  }

  .site-header .main-navigation .nav-menu{
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
    padding: 6px;
    border-radius: 14px;
  }

  .site-header .main-navigation .nav-menu::-webkit-scrollbar{
    height: 6px;
  }

  .site-header .main-navigation .nav-menu > li > a{
    padding: 10px 12px;
    white-space: nowrap;
  }

  /* Search full width under nav */
  .site-header .search-wrapper{
    order: 3;
    width: 100%;
    max-width: 100%;
  }

  /* Join smaller */
  .site-header .join-btn{
    padding: 9px 12px;
    font-size: 13px;
  }
}

/* Extra small */
@media (max-width: 420px){
  .site-header .logo .site-title{ display:inline; }
  .site-header .search-box{ padding: 7px 9px; }
}







/* ✅ Pagination واضح وكبير */
.author-pagination{
  text-align:center;
  margin-top: 30px;
}

.author-pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  min-width: 44px;
  height: 44px;

  padding: 0 14px;
  margin: 0 6px;            /* ✅ المسافة بين الأرقام */

  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);

  text-decoration:none;
  font-weight: 900;
  font-size: 16px;          /* ✅ أكبر */
  color: var(--dark-color);

  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transition: .2s ease;
}

.author-pagination .page-numbers:hover{
  transform: translateY(-2px);
  border-color: rgba(0,0,0,.20);
}

.author-pagination .page-numbers.current{
  background: var(--primary-color);
  color: #fff;
  border-color: transparent;
  transform: none;
}

.author-pagination .page-numbers.dots{
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 8px;
  margin: 0 4px;
  min-width: auto;
}

.author-pagination .page-numbers.prev,
.author-pagination .page-numbers.next{
  min-width: 120px;         /* ✅ زر أكبر */
  border-radius: 999px;
  font-size: 15px;
}








/* ✅ Pretty Pagination (External CSS) */
.pagination--pretty{
  text-align: center;
  margin-top: 30px;
}

.pagination--pretty .nav-links{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;                 /* ✅ المسافة بين العناصر */
  flex-wrap: wrap;
}

.pagination--pretty .page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 44px;
  height: 44px;
  padding: 0 14px;

  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.10);

  text-decoration: none;
  font-weight: 900;
  font-size: 16px;
  color: var(--dark-color);

  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transition: .2s ease;
}

.pagination--pretty .page-numbers:hover{
  transform: translateY(-2px);
  border-color: rgba(0,0,0,.20);
}

.pagination--pretty .page-numbers.current{
  background: var(--primary-color);
  color: #fff;
  border-color: transparent;
  transform: none;
}

.pagination--pretty .page-numbers.dots{
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0 8px;
  min-width: auto;
}

.pagination--pretty .page-numbers.prev,
.pagination--pretty .page-numbers.next{
  min-width: 120px;          /* ✅ أزرار أكبر */
  border-radius: 999px;
  font-size: 15px;
}




.footer-social{ margin-top:20px; }
.footer-social__title{ color:#fff; margin:0 0 10px; }

.footer-social__links{
  display:flex;
  gap:15px;
  align-items:center;
}

.footer-social__link{
  color:#fff;
  font-size:20px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
}

.footer-social__link:focus{
  outline:2px solid rgba(255,255,255,.7);
  outline-offset:3px;
  border-radius:8px;
}

/* نص مخفي لإتاحة الوصول */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}




/* =========================================================
   Single Article
========================================================= */

.article-single {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}


/* =========================================================
   Article Header
========================================================= */

.article-header {
    margin-bottom: 28px;
    text-align: right;
}

.article-header h1 {
    margin: 0 0 18px;

    color: var(--dark-color);

    font-size: clamp(30px, 4vw, 46px);
    font-weight: 900;
    line-height: 1.45;

    letter-spacing: -0.4px;
}


/* =========================================================
   Article Meta
========================================================= */

.article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    color: var(--gray-color);

    font-size: 13px;
    font-weight: 600;
}

.article-meta a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 800;
}

.article-meta a:hover {
    text-decoration: underline;
}


/* =========================================================
   Featured Image
========================================================= */

.article-featured-image {
    width: 100%;

    margin: 0 0 32px;

    overflow: hidden;

    border-radius: 22px;

    background: var(--light-color);

    box-shadow:
        0 12px 35px rgba(15, 23, 42, .08);
}

.article-featured-image img {
    display: block;

    width: 100%;
    height: auto;

    max-height: 520px;

    object-fit: cover;
}


/* =========================================================
   Article Content
========================================================= */

.article-content {
    color: #1e293b;

    font-size: 18px;
    line-height: 2.05;

    word-wrap: break-word;
    overflow-wrap: break-word;
}


/* Paragraphs */

.article-content p {
    margin: 0 0 24px;
}


/* Headings */

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--dark-color);

    font-weight: 900;

    line-height: 1.5;
}

.article-content h2 {
    margin: 42px 0 18px;

    font-size: 28px;
}

.article-content h3 {
    margin: 34px 0 16px;

    font-size: 23px;
}

.article-content h4 {
    margin: 28px 0 14px;

    font-size: 19px;
}


/* Links */

.article-content a {
    color: var(--primary-color);

    text-decoration: underline;

    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-content a:hover {
    color: var(--primary-dark);
}


/* =========================================================
   Images inside article
========================================================= */

.article-content img {
    max-width: 100%;
    height: auto;

    border-radius: 16px;
}

.article-content figure {
    max-width: 100%;

    margin: 30px auto;
}

.article-content figcaption {
    margin-top: 9px;

    color: var(--gray-color);

    font-size: 13px;
    line-height: 1.7;

    text-align: center;
}


/* =========================================================
   Lists
========================================================= */

.article-content ul,
.article-content ol {
    margin: 22px 0;

    padding-right: 28px;
}

.article-content li {
    margin-bottom: 10px;
}


/* =========================================================
   Blockquote
========================================================= */

.article-content blockquote {
    margin: 30px 0;

    padding: 20px 24px;

    background: #f8fafc;

    border-right: 4px solid var(--primary-color);

    border-radius: 14px;

    color: #334155;

    font-size: 17px;
    line-height: 1.9;
}

.article-content blockquote p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   Tables
========================================================= */

.article-content table {
    width: 100%;

    margin: 28px 0;

    border-collapse: collapse;

    font-size: 15px;
}

.article-content th,
.article-content td {
    padding: 12px 14px;

    border: 1px solid #e2e8f0;

    text-align: right;
}

.article-content th {
    background: #f8fafc;

    color: var(--dark-color);

    font-weight: 900;
}


/* =========================================================
   Video / Embed
========================================================= */

.article-content iframe,
.article-content video {
    max-width: 100%;
}

.article-content iframe {
    border-radius: 14px;
}


/* =========================================================
   Categories
========================================================= */

.article-categories {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 9px;

    margin-top: 42px;
    padding-top: 24px;

    border-top: 1px solid var(--border-color);
}

.article-categories a {
    display: inline-flex;
    align-items: center;

    padding: 7px 13px;

    background: #f1f5f9;

    border: 1px solid #e2e8f0;
    border-radius: 999px;

    color: #475569;

    text-decoration: none;

    font-size: 12px;
    font-weight: 800;

    transition:
        background .2s ease,
        color .2s ease,
        border-color .2s ease;
}

.article-categories a:hover {
    background: var(--primary-color);

    border-color: var(--primary-color);

    color: #ffffff;
}


/* =========================================================
   Mobile
========================================================= */

@media (max-width: 768px) {

    .article-single {
        max-width: 100%;
    }

    .article-header {
        margin-bottom: 22px;
    }

    .article-header h1 {
        margin-bottom: 14px;

        font-size: 29px;
        line-height: 1.5;
    }

    .article-meta {
        gap: 6px;

        font-size: 12px;
    }

    .article-featured-image {
        margin-bottom: 25px;

        border-radius: 16px;

        box-shadow:
            0 8px 24px rgba(15, 23, 42, .07);
    }

    .article-featured-image img {
        max-height: none;
    }

    .article-content {
        font-size: 17px;
        line-height: 2;
    }

    .article-content p {
        margin-bottom: 21px;
    }

    .article-content h2 {
        margin-top: 34px;

        font-size: 24px;
    }

    .article-content h3 {
        margin-top: 30px;

        font-size: 21px;
    }

    .article-content blockquote {
        padding: 17px 18px;

        font-size: 16px;
    }

    .article-content table {
        font-size: 13px;
    }

    .article-content th,
    .article-content td {
        padding: 10px;
    }

    .article-categories {
        margin-top: 34px;
    }
}


/* =========================================================
   Small Phones
========================================================= */

@media (max-width: 480px) {

    .article-header h1 {
        font-size: 26px;
    }

    .article-content {
        font-size: 16.5px;
    }

}




/* =========================================================
   Related Articles
========================================================= */

.related-articles {
    margin-top: 55px;
    padding-top: 38px;
    border-top: 1px solid var(--border-color);
}

.related-articles__header {
    margin-bottom: 24px;
    text-align: center;
}

.related-articles__header span {
    display: block;
    margin-bottom: 5px;

    color: var(--primary-color);

    font-size: 12px;
    font-weight: 900;
}

.related-articles__header h2 {
    margin: 0;

    color: var(--dark-color);

    font-size: 27px;
    font-weight: 900;
}

.related-articles__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}


/* Card */

.related-card {
    overflow: hidden;

    background: #fff;

    border: 1px solid var(--border-color);
    border-radius: 18px;

    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.related-card:hover {
    transform: translateY(-3px);

    box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
}


/* Image */

.related-card__image {
    display: block;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background: var(--light-color);
}

.related-card__image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .25s ease;
}

.related-card:hover .related-card__image img {
    transform: scale(1.04);
}

.related-card__placeholder {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    font-size: 40px;
}


/* Content */

.related-card__content {
    padding: 16px;
}

.related-card__date {
    display: block;

    margin-bottom: 8px;

    color: var(--gray-color);

    font-size: 11px;
    font-weight: 700;
}

.related-card h3 {
    margin: 0;

    font-size: 16px;
    line-height: 1.6;
}

.related-card h3 a {
    color: var(--dark-color);

    text-decoration: none;
}

.related-card h3 a:hover {
    color: var(--primary-color);
}

.related-card__read {
    display: inline-flex;

    margin-top: 13px;

    color: var(--primary-color);

    text-decoration: none;

    font-size: 12px;
    font-weight: 900;
}


/* =========================================================
   Related Articles - Mobile
========================================================= */

@media (max-width: 768px) {

    .related-articles {
        margin-top: 42px;
        padding-top: 30px;
    }

    .related-articles__header h2 {
        font-size: 23px;
    }

    .related-articles__grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .related-card {
        display: grid;
        grid-template-columns: 120px 1fr;
    }

    .related-card__image {
        aspect-ratio: auto;
        height: 100%;
        min-height: 120px;
    }

    .related-card__content {
        padding: 14px;
    }

    .related-card h3 {
        font-size: 15px;
    }

}
