/* Al-Nnas Writers — editorial frontend (v7.2.1)
 * Visual identity mirrors the Lovable app:
 *   parchment background, deep olive primary, warm sand accent,
 *   soft ink-on-paper shadows, 0.75rem radius. RTL-first.
 *   No gold accents, no decorative bars.
 */
:root{
  /* Palette (sRGB approximations of the app's oklch tokens) */
  --anw-bg:        #f6f1e6;   /* parchment */
  --anw-paper:     #fdfaf2;   /* card */
  --anw-ink:       #2b261b;   /* foreground */
  --anw-ink-soft:  #4a4538;
  --anw-muted:     #7a7363;   /* muted-foreground */
  --anw-line:      #e5dec9;   /* border */
  --anw-line-2:    #d6cdb4;
  --anw-primary:   #4f6b3a;   /* deep olive */
  --anw-primary-2: #3d5530;
  --anw-accent:    #ddc89a;   /* warm sand */
  --anw-accent-soft:#efe6cd;

  --anw-border-w:  1px;

  --anw-radius:    14px;
  --anw-radius-sm: 10px;
  --anw-radius-lg: 18px;

  --anw-shadow-card: 0 2px 8px -2px rgba(43,38,27,.10);
  --anw-shadow-soft: 0 1px 3px rgba(43,38,27,.08), 0 4px 20px -8px rgba(43,38,27,.12);

  --anw-font:    'Tajawal','Segoe UI',Tahoma,Arial,sans-serif;
  --anw-display: 'Cairo','Tajawal','Segoe UI',Tahoma,Arial,sans-serif;
  --anw-sec-font:'El Messiri','Cairo','Tajawal','Segoe UI',Tahoma,Arial,sans-serif;

  /* Typography scale */
  --anw-h-size:    clamp(1.7rem,3.6vw,2.6rem);
  --anw-h-weight:  800;
  --anw-h-lh:      1.45;
  --anw-body-size: clamp(1.06rem,1.4vw,1.18rem);
  --anw-body-weight:400;
  --anw-body-lh:   2;
  --anw-small-size:.88rem;

  /* Spacing */
  --anw-space-section: 36px;
  --anw-space-card:    18px;
  --anw-space-content: clamp(22px,4vw,40px) clamp(20px,5vw,52px);
  --anw-space-heading: 14px;
  --anw-space-page:    clamp(16px,3vw,28px);
  --anw-card-pad:      14px 18px;

  /* Homepage section headings */
  --anw-sec-size:  clamp(1.3rem,2.6vw,1.8rem);
  --anw-sec-weight:700;
  --anw-sec-space: 14px;
  --anw-sec-align: right;
  --anw-sec-divider-display:none;
  --anw-sec-divider-color:#4f6b3a;
  --anw-sec-divider-size:1px;

  /* Buttons */
  --anw-btn-bg:     #4f6b3a;
  --anw-btn-color:  #fdfaf2;
  --anw-btn-radius: 10px;
  --anw-btn-weight: 700;
}

/* v7.6.11 — Thin olive top bar at the very top of the frontend */
body::before{content:"";position:fixed;top:0;left:0;right:0;height:5px;background:var(--anw-primary);z-index:9999;pointer-events:none}

/* ===== Page shells ===== */
.anw-single,.anw-writer-page,.anw-directory{
  font-family:var(--anw-font);
  color:var(--anw-ink);
  background:var(--anw-bg);
  margin:0 auto;
  padding:clamp(24px,4vw,56px) clamp(16px,4vw,32px);
  box-sizing:border-box;
  min-height:80vh;
  direction:rtl;
}
.anw-single *,.anw-writer-page *,.anw-directory *{box-sizing:border-box}
.anw-single a,.anw-writer-page a,.anw-directory a{color:inherit;text-decoration:none}

/* ===== Reusable card ===== */
.anw-card{
  background:var(--anw-paper);
  border:var(--anw-border-w) solid var(--anw-line);
  border-radius:var(--anw-radius);
  box-shadow:var(--anw-shadow-card);
}

/* ===== Single article page ===== */
.anw-page{max-width:820px;margin:0 auto;display:flex;flex-direction:column;gap:var(--anw-space-card)}
.anw-single .anw-page__title,
.anw-page__title{
  margin:14px 0 2px;
  padding:0 clamp(4px,2vw,18px);
  color:var(--anw-ink);
  font-family:var(--anw-display);
  font-size:var(--anw-h-size);
  line-height:var(--anw-h-lh);
  font-weight:var(--anw-h-weight);
  letter-spacing:-.005em;
  text-wrap:balance;
  text-align:right;
}

/* Writer card — minimal, professional */
.anw-writer-card{
  display:flex;align-items:center;gap:14px;
  padding:var(--anw-card-pad);
}
.anw-writer-card__avatar{display:block;flex:0 0 auto}
.anw-writer-card__img{
  width:52px;height:52px;border-radius:50%;
  object-fit:cover;display:block;
  background:var(--anw-accent-soft);
  border:1px solid var(--anw-line);
}
.anw-writer-card__img--ph{
  display:inline-flex;align-items:center;justify-content:center;
  color:var(--anw-muted);
}
.anw-writer-card__meta{display:flex;flex-direction:column;gap:2px;min-width:0;text-align:right}
.anw-writer-card__name{
  color:var(--anw-ink);font-weight:700;font-size:1.02rem;line-height:1.4;
  font-family:var(--anw-display);
}
.anw-writer-card__name:hover{color:var(--anw-primary)}
.anw-writer-card__count{color:var(--anw-muted);font-size:.85rem;line-height:1.4}

/* Content card */
.anw-card--content{padding:var(--anw-space-content)}

/* Meta row — text only, separated by middle dots */
.anw-meta-row{
  display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;
  color:var(--anw-muted);font-size:var(--anw-small-size);line-height:1.6;
  padding-bottom:10px;margin-bottom:18px;
  border-bottom:1px solid var(--anw-line);
}
.anw-meta__item{color:var(--anw-muted)}
.anw-meta__item--link:hover{color:var(--anw-primary)}
.anw-meta__sep{color:var(--anw-line-2)}

/* Body — readable, RTL */
.anw-article-body{
  font-size:var(--anw-body-size);
  font-weight:var(--anw-body-weight);
  line-height:var(--anw-body-lh);
  color:var(--anw-ink);
  text-align:justify;text-justify:inter-word;hyphens:none;
}
.anw-article-body p{margin:0 0 1.2em}
.anw-article-body h2,.anw-article-body h3{
  margin:1.8em 0 var(--anw-space-heading);color:var(--anw-ink);line-height:1.5;font-weight:700;
  font-family:var(--anw-display);
}
.anw-article-body h2{font-size:1.4em}
.anw-article-body h3{font-size:1.2em}
.anw-article-body blockquote{
  margin:1.6rem 0;padding:.9rem 1.2rem;
  border-inline-start:3px solid var(--anw-primary);
  background:var(--anw-accent-soft);
  border-radius:var(--anw-radius-sm);
  color:var(--anw-ink-soft);
}
.anw-article-body a{color:var(--anw-primary);text-decoration:underline;text-underline-offset:3px}
.anw-article-body img{display:none}

/* Gallery */
.anw-gallery{margin-top:36px;padding-top:24px;border-top:1px solid var(--anw-line)}
.anw-gallery__title{font-size:1.15rem;margin:0 0 14px;color:var(--anw-ink);font-family:var(--anw-display);font-weight:700}
.anw-gallery__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px}
.anw-gallery__item{display:block;overflow:hidden;border-radius:var(--anw-radius-sm);aspect-ratio:4/3;background:var(--anw-accent-soft);box-shadow:var(--anw-shadow-card)}
.anw-gallery__item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.anw-gallery__item:hover img{transform:scale(1.05)}
.anw-gallery--slider .anw-gallery__grid{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding-bottom:8px}
.anw-gallery--slider .anw-gallery__item{flex:0 0 76%;max-width:340px;scroll-snap-align:start}

/* More from this writer */
.anw-more{margin-top:36px;padding-top:24px;border-top:1px solid var(--anw-line)}
.anw-more__title-h{font-size:1.1rem;margin:0 0 14px;color:var(--anw-ink);font-family:var(--anw-display);font-weight:700}
.anw-more__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}
.anw-more__card{
  display:flex;flex-direction:column;gap:6px;
  padding:14px 16px;background:var(--anw-bg);
  border:1px solid var(--anw-line);border-radius:var(--anw-radius-sm);
  transition:border-color .18s,transform .18s,box-shadow .18s;
}
.anw-more__card:hover{border-color:var(--anw-primary);transform:translateY(-2px);box-shadow:var(--anw-shadow-soft)}
.anw-more__title{margin:0;font-size:1rem;font-weight:700;color:var(--anw-ink);line-height:1.5;font-family:var(--anw-display)}
.anw-more__excerpt{margin:0;font-size:.85rem;color:var(--anw-muted);line-height:1.6}
.anw-more__date{font-size:.78rem;color:var(--anw-muted)}

/* ===== Writer page ===== */
/* Breadcrumb */
.anw-crumbs{
  max-width:1080px;margin:0 auto var(--anw-wp-space-crumb,16px);
  display:flex;flex-wrap:wrap;align-items:center;gap:6px;
  font-size:.82rem;color:var(--anw-muted);font-family:var(--anw-font);
}
.anw-crumbs a{color:var(--anw-muted);transition:color .16s}
.anw-crumbs a:hover{color:var(--anw-primary)}
.anw-crumbs__sep{color:var(--anw-line-2)}
.anw-crumbs__current{color:var(--anw-ink)}
.anw-crumbs--article{max-width:820px}

/* Writer card — identity only */
.anw-wcard{
  max-width:1080px;margin:0 auto var(--anw-wp-space-card-bio,14px);
  padding:var(--anw-wp-card-pad,20px);
  display:flex;align-items:center;gap:18px;
  background:var(--anw-wp-card-bg,var(--anw-paper));
  border:1px solid var(--anw-wp-card-border,var(--anw-line));
  border-radius:var(--anw-wp-card-radius,var(--anw-radius));
  box-shadow:var(--anw-shadow-card);
}
.anw-wcard__img{
  width:var(--anw-wp-card-img,96px);height:var(--anw-wp-card-img,96px);
  border-radius:50%;object-fit:cover;flex:0 0 auto;
  border:1px solid var(--anw-wp-card-border,var(--anw-line));background:var(--anw-accent-soft);
}
.anw-wcard__body{min-width:0;text-align:right}
.anw-wcard__name{
  margin:0 0 4px;font-family:var(--anw-display);font-weight:800;line-height:1.35;
  font-size:clamp(1.4rem,3vw,2rem);color:var(--anw-wp-card-name,var(--anw-ink));
}
.anw-wcard__meta{
  margin:0;color:var(--anw-wp-card-meta,var(--anw-muted));
  font-size:.9rem;line-height:1.7;display:inline-flex;flex-wrap:wrap;align-items:center;gap:.5em;
}

/* Bio card — separate from the writer card */
.anw-biocard{
  max-width:1080px;margin:0 auto var(--anw-wp-space-bio-list,18px);
  padding:var(--anw-wp-bio-pad,20px);
  background:var(--anw-wp-bio-bg,var(--anw-paper));
  border:1px solid var(--anw-wp-bio-border,var(--anw-line));
  border-radius:var(--anw-wp-bio-radius,var(--anw-radius));
  box-shadow:var(--anw-shadow-card);
}
.anw-biocard__text{
  color:var(--anw-wp-bio-color,var(--anw-ink-soft));
  font-size:1rem;line-height:1.95;text-align:right;
}
.anw-biocard__text > *:first-child{margin-top:0}
.anw-biocard__text > *:last-child{margin-bottom:0}
.anw-biocard__text h1,.anw-biocard__text h2,.anw-biocard__text h3,
.anw-biocard__text h4,.anw-biocard__text h5,.anw-biocard__text h6{
  color:var(--anw-wp-bio-heading,var(--anw-ink));font-family:var(--anw-display);line-height:1.45;
}
.anw-biocard__text a{color:var(--anw-primary);text-decoration:underline}
.anw-biocard__text ul,.anw-biocard__text ol{padding-inline-start:1.4em;margin:.6em 0}
.anw-biocard__text.is-clamped{
  display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
.anw-biocard__more{
  margin-top:10px;padding:0;border:0;background:transparent;cursor:pointer;
  font-family:var(--anw-font);font-size:.88rem;font-weight:700;
  color:var(--anw-wp-bio-more,var(--anw-primary));transition:color .16s;
}
.anw-biocard__more:hover{color:var(--anw-wp-bio-more-hover,var(--anw-primary-2))}

.anw-writer-page__list{max-width:1080px;margin:0 auto;display:grid;gap:16px}
.anw-list-toolbar{
  display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;
  padding:12px;background:var(--anw-paper);
  border:1px solid var(--anw-line);border-radius:var(--anw-radius);box-shadow:var(--anw-shadow-card);
}
.anw-list-search{display:flex;gap:10px;flex:1;min-width:240px}
.anw-list-search input{
  flex:1;min-width:0;height:42px;padding:0 14px;
  border:1px solid var(--anw-line-2);border-radius:var(--anw-radius-sm);background:var(--anw-paper);
  color:var(--anw-ink);font-family:var(--anw-font);font-size:1rem;text-align:right;
}
.anw-list-search input:focus{outline:none;border-color:var(--anw-primary);box-shadow:0 0 0 3px rgba(79,107,58,.18)}
.anw-btn{
  height:42px;border:0;padding:0 20px;border-radius:var(--anw-btn-radius);
  background:var(--anw-btn-bg);color:var(--anw-btn-color);
  font-family:var(--anw-font);font-weight:var(--anw-btn-weight);cursor:pointer;
  transition:background .18s,transform .18s,box-shadow .18s;
}
.anw-btn:hover{background:var(--anw-primary-2);transform:translateY(-1px);box-shadow:var(--anw-shadow-soft)}
.anw-view-toggle{display:inline-flex;border:1px solid var(--anw-line-2);border-radius:var(--anw-radius-sm);overflow:hidden;background:var(--anw-paper);flex:0 0 auto}
.anw-view-toggle button{width:40px;height:40px;background:var(--anw-paper);border:0;border-inline-start:1px solid var(--anw-line);cursor:pointer;font-size:1rem;color:var(--anw-muted)}
.anw-view-toggle button:first-child{border-inline-start:0}
.anw-view-toggle button.is-active{background:var(--anw-primary);color:#fdfaf2}

.anw-toolbar__controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.anw-sort{display:inline-flex;gap:6px}
.anw-chip{
  display:inline-flex;align-items:center;height:34px;padding:0 14px;
  border:1px solid var(--anw-line-2);border-radius:999px;background:var(--anw-paper);
  color:var(--anw-muted);font-size:.88rem;font-weight:600;white-space:nowrap;
  transition:color .18s,border-color .18s,background .18s;
}
.anw-chip:hover{color:var(--anw-ink);border-color:var(--anw-primary)}
.anw-chip.is-active{background:var(--anw-primary);border-color:var(--anw-primary);color:#fdfaf2}
.anw-filters{display:flex;flex-wrap:wrap;gap:8px;padding:2px 2px 0}

.anw-articles.is-list{display:flex;flex-direction:column;border:1px solid var(--anw-line);border-radius:var(--anw-radius);background:var(--anw-paper);overflow:hidden}
.anw-articles.is-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}

.anw-article-item{min-width:0}
.anw-article-item__link{display:block;text-align:right;color:inherit;min-width:0}
.anw-article-item__title{
  margin:0;font-family:var(--anw-display);font-weight:700;color:var(--anw-ink);
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.anw-article-item__date{margin:0;color:var(--anw-muted);font-size:.78rem;line-height:1.6}
.anw-article-item__excerpt{margin:0;color:var(--anw-muted);font-size:.9rem;line-height:1.7;overflow:hidden;text-overflow:ellipsis}

/* List view — compact, clearly separated rows */
.anw-articles.is-list .anw-article-item{border-top:1px solid var(--anw-line-2)}
.anw-articles.is-list .anw-article-item:first-child{border-top:0}
.anw-articles.is-list .anw-article-item__link{padding:14px 18px;transition:background .16s}
.anw-articles.is-list .anw-article-item__link:hover{background:var(--anw-accent-soft)}
.anw-articles.is-list .anw-article-item__link:hover .anw-article-item__title{color:var(--anw-primary)}
.anw-articles.is-list .anw-article-item__title{font-size:1rem;line-height:1.6}
.anw-articles.is-list .anw-article-item__excerpt{white-space:nowrap;font-size:.85rem;margin-top:3px}

/* Grid view — more breathing room, longer excerpt */
.anw-articles.is-grid .anw-article-item{
  border:1px solid var(--anw-line);border-radius:var(--anw-radius);background:var(--anw-paper);
  box-shadow:var(--anw-shadow-card);transition:transform .2s,box-shadow .2s,border-color .2s;
}
.anw-articles.is-grid .anw-article-item:hover{transform:translateY(-2px);box-shadow:var(--anw-shadow-soft);border-color:var(--anw-primary)}
.anw-articles.is-grid .anw-article-item__link{padding:16px 18px;display:flex;flex-direction:column;gap:6px}
.anw-articles.is-grid .anw-article-item__title{font-size:1.06rem;line-height:1.5}
.anw-articles.is-grid .anw-article-item__excerpt{
  display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;line-clamp:4;white-space:normal;
}

@media (max-width:640px){
  .anw-articles.is-grid{grid-template-columns:1fr}
  .anw-articles.is-list .anw-article-item__link{padding:12px 14px}
  .anw-articles.is-list .anw-article-item__title{font-size:.95rem}
}

/* ===== Writer archive pagination ===== */
.anw-pager{margin-top:var(--anw-wp-space-list-pager,18px)}
.anw-pager__inner{
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
  gap:var(--anw-wp-pg-gap,8px);padding:0;background:transparent;border:0;box-shadow:none;
}
.anw-pager__numbers{
  display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
  gap:var(--anw-wp-pg-gap,8px);list-style:none;margin:0;padding:0;flex:0 1 auto;
}
.anw-pager__numbers li{margin:0;padding:0}
.anw-pager__num,.anw-pager__nav{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:40px;height:40px;padding:0 12px;
  border:1px solid var(--anw-wp-pg-border,var(--anw-line-2));
  border-radius:var(--anw-wp-pg-radius,8px);
  background:var(--anw-wp-pg-bg,var(--anw-paper));
  color:var(--anw-wp-pg-color,var(--anw-ink));
  font-family:var(--anw-font);font-size:.92rem;font-weight:600;line-height:1;
  text-decoration:none;white-space:nowrap;cursor:pointer;
  transition:background .16s,color .16s,border-color .16s;
}
.anw-pager__num:hover,.anw-pager__nav:hover{
  border-color:var(--anw-wp-pg-active-bg,var(--anw-accent));
  color:var(--anw-wp-pg-active-bg,var(--anw-accent));
}
.anw-pager__num.is-active{
  background:var(--anw-wp-pg-active-bg,var(--anw-accent));
  border-color:var(--anw-wp-pg-active-border,var(--anw-wp-pg-active-bg,var(--anw-accent)));
  color:var(--anw-wp-pg-active-color,#fdfaf2);pointer-events:none;
}
.anw-pager__nav{color:var(--anw-wp-pg-nav-color,var(--anw-wp-pg-color,var(--anw-ink)));font-weight:700}
.anw-pager__nav.is-disabled{opacity:.4;cursor:not-allowed;pointer-events:none;background:var(--anw-bg);color:var(--anw-muted)}
.anw-pager__ellipsis{display:inline-flex;align-items:center;justify-content:center;min-width:24px;color:var(--anw-muted);font-size:1rem}
@media (max-width:640px){
  .anw-pager__num,.anw-pager__nav{min-width:36px;height:36px;padding:0 10px;font-size:.88rem}
}

/* ===== Writers directory ===== */
.anw-directory__title{
  max-width:1080px;margin:0 auto 18px;
  font-family:var(--anw-display);color:var(--anw-ink);
  font-size:clamp(1.6rem,3.2vw,2.2rem);font-weight:800;text-align:right;
}
.anw-directory__grid{
  max-width:1080px;margin:0 auto;
  display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px;
}
.anw-writer-tile{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:20px 16px;background:var(--anw-paper);
  border:1px solid var(--anw-line);border-radius:var(--anw-radius);
  box-shadow:var(--anw-shadow-card);text-align:center;
  transition:transform .2s,box-shadow .2s,border-color .2s;
}
.anw-writer-tile:hover{transform:translateY(-3px);box-shadow:var(--anw-shadow-soft);border-color:var(--anw-primary)}
.anw-writer-tile__img{width:84px;height:84px;border-radius:50%;object-fit:cover;border:1px solid var(--anw-line);background:var(--anw-accent-soft)}
.anw-writer-tile__name{margin:6px 0 0;font-size:1rem;font-weight:700;color:var(--anw-ink);font-family:var(--anw-display)}
.anw-writer-tile__count{font-size:.82rem;color:var(--anw-muted)}

/* ===== Homepage ===== */
.anw-home{
  max-width:1180px;margin:0 auto;
  display:flex;flex-direction:column;gap:var(--anw-space-section);
  direction:rtl;font-family:var(--anw-font);color:var(--anw-ink);
  padding:var(--anw-space-page);
  background:var(--anw-bg);
}
.anw-home *{box-sizing:border-box}
.anw-home a{color:inherit;text-decoration:none}
.anw-home-banner{
  position:relative;left:auto;right:auto;
  width:100vw;max-width:100vw;
  margin:0 calc(50% - 50vw);
  overflow:hidden;
  line-height:0;
}
.anw-home-banner__image{
  display:block;width:100%;max-width:none;height:auto;
}
html:has(.anw-global-banner),body:has(.anw-global-banner){overflow-x:hidden}
@media (max-width:782px){
  .anw-home-banner{display:none!important;margin:0!important;padding:0!important;height:0!important}
}
/* v7.7.1 — Homepage section headings driven entirely by Design tokens.
   Selector is scoped through .anw-home so theme rules such as
   `.entry-content h2` cannot outrank the token-driven values. */
.anw-home .anw-home__h2,
.anw-home__h2{
  position:relative;margin:0 0 var(--anw-sec-space);
  font-family:var(--anw-sec-font);color:var(--anw-ink);
  font-size:var(--anw-sec-size);font-weight:var(--anw-sec-weight);
  text-align:var(--anw-sec-align);line-height:1.4;
}
.anw-home .anw-home__h2::after,
.anw-home__h2::after{
  content:"";display:var(--anw-sec-divider-display);
  height:var(--anw-sec-divider-size);margin-top:10px;
  background:linear-gradient(to left,var(--anw-sec-divider-color),transparent);
  opacity:.35;
}


/* Dual banners */
.anw-home__banners{display:grid;grid-template-columns:1fr 1fr;gap:18px}
@media (max-width:820px){.anw-home__banners{grid-template-columns:1fr}}
.anw-banner{
  position:relative;
  background:var(--anw-paper);border:1px solid var(--anw-line);
  border-radius:var(--anw-radius);box-shadow:var(--anw-shadow-card);
  padding:18px;display:flex;flex-direction:column;gap:12px;min-height:280px;
  overflow:hidden;
}
.anw-banner--empty{align-items:center;justify-content:center;color:var(--anw-muted)}
.anw-banner__head{display:flex;align-items:center;justify-content:space-between}
.anw-banner__kicker{
  font-size:.8rem;color:var(--anw-primary);font-weight:800;letter-spacing:.04em;
  text-transform:uppercase;
}
.anw-banner__viewport{position:relative;flex:1;min-height:220px}
.anw-banner__slides{position:relative;height:100%}
.anw-slide{
  position:absolute;inset:0;display:flex;flex-direction:column;gap:10px;
  opacity:0;pointer-events:none;transition:opacity .45s ease;
}
.anw-slide.is-active{opacity:1;pointer-events:auto;position:relative;inset:auto}
.anw-slide__cover{position:absolute;inset:0;z-index:1}
.anw-slide__writer{display:flex;align-items:center;gap:8px;position:relative;z-index:2}
.anw-slide__avatar{
  width:36px;height:36px;border-radius:50%;object-fit:cover;
  background:var(--anw-accent-soft);border:1px solid var(--anw-line);display:block;
}
.anw-slide__writer-name{font-size:.88rem;color:var(--anw-muted);font-weight:700;position:relative;z-index:3}
.anw-slide__writer-name:hover{color:var(--anw-primary)}
.anw-slide__title{
  margin:0;font-family:var(--anw-display);font-size:1.18rem;line-height:1.5;
  color:var(--anw-ink);font-weight:800;position:relative;z-index:2;
}
.anw-slide__title:hover{color:var(--anw-primary)}
.anw-slide__excerpt{margin:0;color:var(--anw-muted);font-size:.94rem;line-height:1.7;position:relative;z-index:2}
.anw-banner__nav{
  position:absolute;top:50%;transform:translateY(-50%);
  width:32px;height:32px;border-radius:50%;border:1px solid var(--anw-line);
  background:var(--anw-paper);color:var(--anw-ink);cursor:pointer;
  display:flex;align-items:center;justify-content:center;font-size:1.1rem;
  box-shadow:var(--anw-shadow-card);z-index:4;
}
.anw-banner__nav:hover{background:var(--anw-primary);color:#fdfaf2;border-color:var(--anw-primary)}
.anw-banner__nav--prev{right:6px}
.anw-banner__nav--next{left:6px}

/* Latest grid */
.anw-home__grid-wrap{display:flex;flex-direction:column;gap:14px}
.anw-home__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.anw-home__grid .anw-card{
  padding:16px;display:flex;flex-direction:column;gap:0;
  transition:transform .2s,box-shadow .2s,border-color .2s;
}
.anw-home__grid .anw-card:hover{transform:translateY(-3px);box-shadow:var(--anw-shadow-soft);border-color:var(--anw-primary)}
.anw-card__writer{display:flex;align-items:center;gap:8px}
.anw-card__avatar{
  width:32px;height:32px;border-radius:50%;object-fit:cover;
  background:var(--anw-accent-soft);border:1px solid var(--anw-line);display:block;
}
.anw-card__writer-name{font-size:.84rem;color:var(--anw-muted);font-weight:700}
.anw-card__writer-name:hover{color:var(--anw-primary)}
.anw-card__date{
  display:block;margin-block-start:var(--anw-card-gap-author-meta,14px);
  font-size:var(--anw-card-meta-size,.78rem);
  font-weight:var(--anw-card-meta-weight,500);
  color:var(--anw-card-meta-color,var(--anw-muted));
  letter-spacing:.01em;
}
.anw-card__title{
  margin:0;margin-block-start:var(--anw-card-gap-meta-title,6px);
  font-family:var(--anw-display);
  font-size:var(--anw-card-title-size,1.05rem);line-height:1.5;
  color:var(--anw-ink);font-weight:var(--anw-card-title-weight,700);
}
.anw-card__title a:hover{color:var(--anw-primary)}
.anw-card__excerpt{
  margin:0;margin-block-start:var(--anw-card-gap-title-excerpt,6px);
  font-size:var(--anw-card-excerpt-size,.9rem);
  font-weight:var(--anw-card-excerpt-weight,400);
  line-height:1.65;
  color:var(--anw-card-excerpt-color,var(--anw-muted));
}

.anw-card__excerpt a,
.anw-card__excerpt a:link,
.anw-card__excerpt a:visited{color:inherit;text-decoration:none}
.anw-card__excerpt a:hover,
.anw-card__excerpt a:focus,
.anw-card__excerpt:hover{color:var(--anw-card-excerpt-hover,var(--anw-ink));transition:color .2s}

/* v7.8.7 — Theme-margin hardening for article cards.
   Blocksy/WordPress rules such as `.entry-content h3` or `.entry-content p`
   outrank single-class selectors and re-introduce block margins between the
   title and the excerpt. These higher-specificity rules make
   --anw-card-gap-* the ONLY spacing between the card elements. No negative
   margins; structure and RTL untouched. */
.anw-home .anw-card .anw-card__writer,
.anw-home .anw-card .anw-card__date,
.anw-home .anw-card .anw-card__title,
.anw-home .anw-card .anw-card__excerpt,
.entry-content .anw-home .anw-card .anw-card__title,
.entry-content .anw-home .anw-card .anw-card__excerpt{
  margin-block-end:0;
  margin-inline:0;
  padding-block:0;
}
.anw-home .anw-card .anw-card__date,
.entry-content .anw-home .anw-card .anw-card__date{
  margin-block-start:var(--anw-card-gap-author-meta,14px);
}
.anw-home .anw-card .anw-card__title,
.entry-content .anw-home .anw-card .anw-card__title{
  margin-block-start:var(--anw-card-gap-meta-title,6px);
}
.anw-home .anw-card .anw-card__excerpt,
.entry-content .anw-home .anw-card .anw-card__excerpt{
  margin-block-start:var(--anw-card-gap-title-excerpt,6px);
}
/* No stray text nodes / <br> may create a phantom line between them. */
.anw-home .anw-card .anw-card__title br,
.anw-home .anw-card .anw-card__excerpt br{display:none}
.anw-home .anw-card>br{display:none}


.anw-ph{
  background:var(--anw-accent-soft);border:1px dashed var(--anw-line-2);
  display:inline-block;
}

/* Our Writers block */
.anw-home__writers-wrap{display:flex;flex-direction:column;gap:14px}
.anw-home__writers-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.anw-home__writers-kicker{color:var(--anw-primary);font-weight:700;font-size:.85rem;letter-spacing:.04em}
.anw-home__writers-grid{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:14px;
}
.anw-home-writer{
  position:relative;
  display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:18px 14px;background:var(--anw-paper);
  border:1px solid var(--anw-line);border-radius:var(--anw-radius);
  box-shadow:var(--anw-shadow-card);text-align:center;
  transition:transform .2s,box-shadow .2s,border-color .2s;
}
.anw-home-writer:hover{transform:translateY(-3px);box-shadow:var(--anw-shadow-soft);border-color:var(--anw-primary)}
.anw-home-writer.is-featured{border-color:var(--anw-accent);background:linear-gradient(180deg,var(--anw-accent-soft) 0%, var(--anw-paper) 60%)}
.anw-home-writer__img{
  width:72px;height:72px;border-radius:50%;object-fit:cover;
  border:1px solid var(--anw-line);background:var(--anw-accent-soft);
}
.anw-home-writer__star{
  position:absolute;top:8px;inset-inline-start:10px;
  color:var(--anw-primary);font-size:.95rem;line-height:1;
}
.anw-home-writer__name{
  margin-top:4px;font-family:var(--anw-display);font-weight:700;color:var(--anw-ink);
  font-size:.98rem;line-height:1.4;
}
.anw-home-writer__meta{color:var(--anw-muted);font-size:.78rem;line-height:1.5}
/* Writer card stats — icons + numbers only, one centred subtle line */
.anw-home-writer__stats{
  display:flex;align-items:center;justify-content:center;gap:14px;
  margin-top:2px;line-height:1;unicode-bidi:isolate;
}
.anw-stat{display:inline-flex;align-items:center;gap:4px;color:var(--anw-muted)}
.anw-stat__icon{width:13px;height:13px;color:var(--anw-muted);opacity:.8;flex:0 0 auto}
.anw-stat__num{
  font-variant-numeric:tabular-nums;font-size:.76rem;color:var(--anw-muted);
  letter-spacing:.01em;
}
.anw-home__writers-cta{display:flex;justify-content:center;margin-top:6px}
.anw-home__writers-cta .anw-btn{text-decoration:none;display:inline-flex;align-items:center;background:var(--anw-btn-bg);color:var(--anw-btn-color)}
.anw-home__writers-cta .anw-btn:hover{color:var(--anw-btn-color)}


/* ===== Writers directory v7.4.7 (letter strip + incremental loading) ===== */
.anw-directory{max-width:1180px;margin:0 auto;padding:clamp(16px,3vw,28px);direction:rtl;font-family:var(--anw-font);color:var(--anw-ink);background:var(--anw-bg)}
.anw-directory__head{display:flex;flex-direction:column;gap:14px;margin-bottom:20px}
.anw-directory__head h1{margin:0;font-family:var(--anw-display);font-weight:800;font-size:clamp(1.6rem,3.2vw,2.2rem);color:var(--anw-ink)}
.anw-directory__search input{
  width:100%;max-width:520px;padding:12px 16px;border:1px solid var(--anw-line);
  border-radius:var(--anw-radius);background:var(--anw-paper);color:var(--anw-ink);
  font-family:inherit;font-size:1rem;box-shadow:var(--anw-shadow-card);
}
.anw-directory__search input:focus{outline:none;border-color:var(--anw-primary);box-shadow:0 0 0 3px var(--anw-accent-soft)}
.anw-directory__letters{display:flex;flex-wrap:wrap;gap:6px;padding:10px;background:var(--anw-paper);border:1px solid var(--anw-line);border-radius:var(--anw-radius);box-shadow:var(--anw-shadow-card)}
.anw-letter{
  min-width:36px;height:36px;padding:0 10px;
  border-radius:10px;border:1px solid var(--anw-line);
  background:transparent;color:var(--anw-ink);
  font-family:var(--anw-display);font-size:1rem;font-weight:700;
  cursor:pointer;transition:background .15s,color .15s,border-color .15s;
}
.anw-letter:hover:not(.is-disabled){background:var(--anw-accent-soft);border-color:var(--anw-primary)}
.anw-letter.is-active{background:var(--anw-primary);color:#fdfaf2;border-color:var(--anw-primary)}
.anw-letter.is-disabled{opacity:.35;cursor:not-allowed}
.anw-directory__active{display:flex;flex-wrap:wrap;gap:6px}
.anw-chip{
  border:1px solid var(--anw-line);background:var(--anw-paper);color:var(--anw-ink);
  padding:6px 10px;border-radius:999px;font-size:.85rem;cursor:pointer;
}
.anw-chip:hover{border-color:var(--anw-primary);color:var(--anw-primary)}
.anw-chip--clear{background:var(--anw-accent-soft)}
.anw-dir-card{
  display:flex;flex-direction:column;align-items:center;gap:6px;
  padding:18px 12px;background:var(--anw-paper);border:1px solid var(--anw-line);
  border-radius:var(--anw-radius);box-shadow:var(--anw-shadow-card);text-align:center;
  transition:transform .2s,box-shadow .2s,border-color .2s;
}
.anw-dir-card:hover{transform:translateY(-3px);box-shadow:var(--anw-shadow-soft);border-color:var(--anw-primary)}
.anw-dir-card img,.anw-dir-card .anw-ph{width:84px;height:84px;border-radius:50%;object-fit:cover;background:var(--anw-accent-soft);border:1px solid var(--anw-line)}
.anw-dir-card strong{font-family:var(--anw-display);font-size:1rem;color:var(--anw-ink);margin-top:6px}
.anw-dir-card span{font-size:.82rem;color:var(--anw-muted)}
.anw-directory__loader{display:flex;flex-direction:column;align-items:center;gap:8px;margin:28px 0 8px}
.anw-dir-status{font-size:.85rem;color:var(--anw-muted)}
.anw-empty{grid-column:1/-1;text-align:center;color:var(--anw-muted);padding:32px 0}

/* v7.5.1 — Unified "Label: Value" pattern (RTL-safe, bidi-isolated). */
.anw-kv{display:inline-flex;align-items:baseline;gap:0;white-space:nowrap;unicode-bidi:isolate}
.anw-kv__k{color:var(--anw-muted,#6b7280);font-weight:500}
.anw-kv__s{color:var(--anw-muted,#6b7280);margin-inline-end:.25em}
.anw-kv__v{color:var(--anw-ink,#111827);font-variant-numeric:tabular-nums;unicode-bidi:isolate}
.anw-kv__v a{color:inherit;text-decoration:none;border-bottom:1px dotted currentColor}
.anw-wcard__meta,.anw-home-writer__meta{display:inline-flex;flex-wrap:wrap;align-items:center;gap:.5em}
.anw-meta__sep{color:var(--anw-muted,#6b7280);margin:0 .35em;opacity:.7}

/* Legacy Al-Nnas footer styles are retained for saved-setting compatibility.
   Blocksy owns the one global frontend footer as of v7.10.6. */
.anw-footer{
  background:var(--anw-footer-bg);color:var(--anw-footer-color);
  font-family:var(--anw-footer-font);font-size:var(--anw-footer-size);font-weight:var(--anw-footer-weight);
  border-radius:0;box-shadow:none;
  /* Symmetric viewport breakout. Unlike left + translateX, this remains
     centred when the containing WordPress block is RTL. */
  position:relative;inset-inline:auto;
  width:100vw;max-width:none;
  margin-inline:calc(50% - 50vw);
  transform:none;
  flex-shrink:0;
}
.anw-footer__sep{display:var(--anw-footer-border-display);height:var(--anw-footer-border-size);background:var(--anw-footer-border-color)}
.anw-footer__inner{
  width:100%;max-width:1280px;margin:0 auto;
  /* v7.8.2 — two-level footer: 3-column main area + full-width bottom row. */
  padding-block:calc(var(--anw-footer-pad) * 2.75) 0;
  padding-inline:24px;
  display:flex;flex-direction:column;
}
.anw-footer__cols{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:start;gap:var(--anw-footer-gap);
  padding-block-end:calc(var(--anw-footer-pad) * 2.25);
}
.anw-footer__area{min-width:0;display:flex;flex-direction:column;gap:calc(var(--anw-footer-gap) / 2)}
.anw-footer__area.is-start{align-items:flex-start;text-align:start;padding-inline-start:calc(var(--anw-footer-pad) * .65)}
.anw-footer__area.is-center{align-items:center;text-align:center}
.anw-footer__area.is-end{align-items:flex-end;text-align:end;padding-inline-end:calc(var(--anw-footer-pad) * .65)}
.anw-footer__heading{
  margin:0;font-family:inherit;
  font-size:var(--anw-footer-h-size);
  font-weight:var(--anw-footer-h-weight);letter-spacing:.04em;text-transform:none;
  color:var(--anw-footer-h-color);line-height:1.4;
}
.anw-footer__socials{display:flex;flex-wrap:wrap;align-items:center;gap:var(--anw-footer-icon-gap);margin:0;padding:0;list-style:none}
.anw-footer__area.is-center .anw-footer__socials{justify-content:center}
.anw-footer__area.is-end .anw-footer__socials{justify-content:flex-end}
.anw-footer__socials.has-names{gap:calc(var(--anw-footer-icon-gap) + 4px)}
.anw-footer__social{
  display:inline-flex;align-items:center;gap:.6em;
  padding:.5em .7em;border-radius:9px;
  font-size:var(--anw-footer-size);line-height:1;
  color:var(--anw-footer-icon-color);text-decoration:none;
  transition:color .22s ease,background-color .22s ease;
}
.anw-footer__social-icon{
  display:inline-flex;align-items:center;justify-content:center;
  width:calc(var(--anw-footer-icon-size) * 1.05);
  height:calc(var(--anw-footer-icon-size) * 1.05);
  font-size:var(--anw-footer-icon-size);flex:0 0 auto;
}
.anw-footer__social-icon svg{width:1em;height:1em;display:block}
.anw-footer__social-name{font-size:var(--anw-footer-size);font-weight:inherit}
.anw-footer__social:hover{color:var(--anw-footer-accent);background:color-mix(in srgb,currentColor 10%,transparent)}
@media (hover:hover){
  .anw-footer__social--facebook:hover{color:#1877f2}
  .anw-footer__social--instagram:hover{color:#e1306c}
  .anw-footer__social--youtube:hover{color:#ff0000}
  .anw-footer__social--x:hover{color:#ffffff}
}
.anw-footer__text{margin:0;color:var(--anw-footer-color);line-height:1.7}
.anw-footer__menu{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.45em}
.anw-footer__area.is-center .anw-footer__menu{align-items:center}
.anw-footer__area.is-end .anw-footer__menu{align-items:flex-end}
.anw-footer__menu li{margin:0}
.anw-footer__bottom{
  border-block-start:var(--anw-footer-divider-size) solid var(--anw-footer-divider-color);
}
.anw-footer__bottom-inner{
  min-height:1.7em;display:flex;align-items:center;justify-content:center;
  text-align:center;
  padding-block:calc(var(--anw-footer-pad) * 1.5);
}
.anw-footer a{color:var(--anw-footer-link);text-decoration:none}
.anw-footer a:hover{color:var(--anw-footer-link-hover)}
@media (max-width:860px){
  .anw-footer__inner{padding-block:calc(var(--anw-footer-pad) * 3) 0}
  .anw-footer__cols{
    grid-template-columns:1fr;
    gap:calc(var(--anw-footer-gap) * 1.5);
    text-align:center;
    padding-block-end:calc(var(--anw-footer-pad) * 2.5);
  }
  .anw-footer__area{align-items:center;text-align:center}
  .anw-footer__area.is-start,.anw-footer__area.is-end{align-items:center;text-align:center}
  .anw-footer__area.is-empty{display:none}
  .anw-footer__socials{justify-content:center}
  .anw-footer__menu{align-items:center}
}
@media (max-width:640px){
  .anw-footer__inner{padding-inline:16px}
}



/* ============================================================
   v7.9.0 — Header navigation (compact, centred, route-aware)
   The theme still owns the header markup; the plugin only refines
   the layout and the link states. RTL-safe.
   ============================================================ */
.ct-header [data-row] > .ct-container,
.ct-header [data-row] > .ct-container-fluid{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
}
.ct-header [data-column="start"]{justify-self:start}
.ct-header [data-column="middle"]{justify-self:center}
.ct-header [data-column="end"]{justify-self:end}
.ct-header [data-column="middle"] [data-id="menu"]{margin-inline:auto}

/* Menu rows must not stretch the links to full header height. */
.ct-header .menu,
.ct-header .menu > li{align-items:center}
.ct-header .menu > li{display:flex;align-items:center}

/* Palette bridge — the Menu Design tokens (ANW_Design) are the single source
   of truth. Their defaults already resolve to the Blocksy palette, so an
   untouched install keeps inheriting the theme colours. */
.ct-header .menu{gap:var(--anw-menu-gap,6px)}

.ct-header .menu > li > a,
.ct-header .menu > li > a.ct-menu-link,
.ct-header .ct-menu-link{
  height:auto;min-height:0;align-self:center;
  display:inline-flex;align-items:center;line-height:1.35;
  font-family:var(--anw-menu-font,inherit);
  font-size:var(--anw-menu-size,.95rem);
  font-weight:var(--anw-menu-weight,500);
  color:var(--anw-menu-color,inherit);
  padding:var(--anw-menu-pad-y,6px) var(--anw-menu-pad-x,10px);
  border-radius:var(--anw-menu-radius,0px);
  background:transparent;box-shadow:none;
  transition:color .2s ease,background-color .2s ease,box-shadow .2s ease;
}
/* Blocksy wraps the label in a span and paints it through theme link vars. */
.ct-header .menu > li > a .ct-menu-label,
.ct-header .ct-menu-link .ct-menu-label{color:inherit}
.ct-header .menu > li > a::before,
.ct-header .menu > li > a::after,
.ct-header .ct-menu-link::before,
.ct-header .ct-menu-link::after{display:none !important}

@media (hover:hover){
  .ct-header .menu > li > a:hover,
  .ct-header .menu > li > a.ct-menu-link:hover,
  .ct-header .ct-menu-link:hover{
    background:var(--anw-menu-hover-bg,transparent);
    color:var(--anw-menu-hover-color,inherit);
    box-shadow:var(--anw-menu-hover-shadow,none);
  }
  .ct-header .menu > li > a:hover .ct-menu-label,
  .ct-header .ct-menu-link:hover .ct-menu-label{color:var(--anw-menu-hover-color,inherit)}
}

/* Persistent current-page state — derived from the request URL through
   ANW_Nav, never from hover or JavaScript.
   v7.9.3: Blocksy paints menu links through its own link colour custom
   properties on high-specificity selectors, so the active colour has to be
   re-declared on the link, on the nested label span, and on those theme
   variables. Everything still reads the Menu Design tokens. */
.ct-header .menu > li.current-menu-item,
.ct-header .menu > li.current_page_item,
.ct-header .menu > li.current-menu-ancestor,
.ct-header .menu > li.current_page_ancestor,
.ct-header .menu > li.current-menu-parent,
.ct-header .menu > li.current_page_parent,
.ct-header .menu > li.anw-current,
.ct-header .menu > li.anw-current-ancestor{
  --theme-link-initial-color:var(--anw-menu-active-color,inherit);
  --theme-link-hover-color:var(--anw-menu-active-color,inherit);
  --linkInitialColor:var(--anw-menu-active-color,inherit);
  --linkHoverColor:var(--anw-menu-active-color,inherit);
  --theme-text-color:var(--anw-menu-active-color,inherit);
}
.ct-header .menu > li.current-menu-item > a,
.ct-header .menu > li.current-menu-item > a.ct-menu-link,
.ct-header .menu > li.current_page_item > a,
.ct-header .menu > li.current_page_item > a.ct-menu-link,
.ct-header .menu > li.anw-current > a,
.ct-header .menu > li.anw-current > a.ct-menu-link,
.ct-header .menu > li.current-menu-ancestor > a,
.ct-header .menu > li.current-menu-ancestor > a.ct-menu-link,
.ct-header .menu > li.current_page_ancestor > a,
.ct-header .menu > li.current_page_ancestor > a.ct-menu-link,
.ct-header .menu > li.anw-current-ancestor > a,
.ct-header .menu > li.anw-current-ancestor > a.ct-menu-link,
.ct-header .menu > li.current-menu-parent > a,
.ct-header .menu > li.current-menu-parent > a.ct-menu-link,
.ct-header .menu > li.current_page_parent > a,
.ct-header .menu > li.current_page_parent > a.ct-menu-link{
  background:var(--anw-menu-active-bg,transparent);
  color:var(--anw-menu-active-color,inherit) !important;
  box-shadow:var(--anw-menu-active-shadow,none);
  font-weight:var(--anw-menu-active-weight,700);
}
/* Nested label / icon inside the active link. */
.ct-header .menu > li.current-menu-item > a *,
.ct-header .menu > li.current_page_item > a *,
.ct-header .menu > li.anw-current > a *,
.ct-header .menu > li.current-menu-ancestor > a *,
.ct-header .menu > li.current_page_ancestor > a *,
.ct-header .menu > li.anw-current-ancestor > a *,
.ct-header .menu > li.current-menu-parent > a *,
.ct-header .menu > li.current_page_parent > a *{
  color:var(--anw-menu-active-color,inherit) !important;
  fill:currentColor;
}
/* Hover on the current item keeps the active colour readable. */
@media (hover:hover){
  .ct-header .menu > li.current-menu-item > a:hover,
  .ct-header .menu > li.current_page_item > a:hover,
  .ct-header .menu > li.anw-current > a:hover,
  .ct-header .menu > li.current-menu-ancestor > a:hover,
  .ct-header .menu > li.current_page_ancestor > a:hover,
  .ct-header .menu > li.anw-current-ancestor > a:hover{
    background:var(--anw-menu-active-bg,transparent);
    box-shadow:var(--anw-menu-active-shadow,none);
  }
}


/* ============================================================
   v7.9.0 — Homepage hero: featured slider + "مختارات" panel
   ============================================================ */

/* v7.10.6 — the shared panoramic banner is emitted immediately after the
   Blocksy header. It has no outer spacing; each page shell keeps ownership of
   its existing content spacing beneath it. */
.ct-header + .anw-global-banner,
#header + .anw-global-banner,
.anw-global-banner{margin-block:0!important}

/* Homepage wrappers must not reintroduce a gap above the shared banner. */
body:has(.anw-home) main.site-main{padding-top:0;margin-top:0}
body:has(.anw-home) .entry-content > .anw-home{margin-top:0}
.anw-home{padding-top:0}
/* When the shared banner is emitted beneath the header, restore one measured
   section interval before the homepage carousel. A shortcode fallback banner
   already receives this interval from the homepage flex gap. */
@media (min-width:783px){
  body:has(.anw-global-banner) .anw-home:not(:has(> .anw-global-banner)){
    padding-top:var(--anw-space-section);
  }
}

/* v7.10.2 — The theme wraps the page content in several containers between the
   header and the first content block (banner image / hero). Any one of them can
   re-introduce a top gap, so zero the whole chain on the homepage only. */
body:has(.anw-home) main.site-main > .ct-container,
body:has(.anw-home) main.site-main > .ct-container-narrow,
body:has(.anw-home) main.site-main > .ct-container-full,
body:has(.anw-home) main.site-main > article,
body:has(.anw-home) main.site-main .entry-content,
body:has(.anw-home) #main-container,
body:has(.anw-home) .site-content,
body:has(.anw-home) .content-area{
  padding-top:0 !important;
  margin-top:0 !important;
}
/* First visible element inside the content (the banner picture) must not carry
   its own top margin either. */
body:has(.anw-home) main.site-main .entry-content > *:first-child,
body:has(.anw-home) main.site-main .entry-content > *:first-child > *:first-child{
  margin-top:0 !important;
}
/* Blocksy's optional page-title/hero strip sits between header and content. */
body:has(.anw-home) .hero-section{margin-top:0;margin-bottom:0}

/* v7.10.1 — Hero → carousel: a subtle editorial feather that dissolves
   the bottom of the hero into the earthy page background, plus a closer
   gap so the page reads as one connected surface. RTL-safe (symmetric,
   no directional bias). No new card/box/section is introduced. */
.anw-hero{
  position:relative;
  display:grid;grid-template-columns:minmax(0,1.85fr) minmax(0,1fr);
  gap:18px;align-items:stretch;
  margin-bottom:calc(var(--anw-space-section) * -1 + 22px);
}
.anw-hero::after{
  content:"";
  position:absolute;left:0;right:0;bottom:-22px;
  height:22px;pointer-events:none;z-index:0;
  background:linear-gradient(to bottom, rgba(43,38,27,.07), transparent);
}
@media (max-width:900px){.anw-hero{grid-template-columns:1fr}}
/* v7.9.9 — When the "مختارات" (Featured) panel has no active Featured Posts it
   is not rendered at all; collapse the hero to a single column so the carousel
   takes full width and nothing below it is pushed down by an empty slot. */
.anw-hero:not(:has(.anw-hero__panel)){grid-template-columns:1fr}

.anw-hero__slider{
  position:relative;display:flex;flex-direction:column;overflow:hidden;
  direction:rtl;
  border:1px solid var(--anw-line);border-radius:var(--anw-radius-lg);
  background:var(--anw-paper);box-shadow:var(--anw-shadow-card);
  min-height:400px;
}
@media (max-width:640px){.anw-hero__slider{min-height:340px}}

/* Stage holds the absolutely positioned slides; controls sit below it. */
.anw-hero__stage{position:relative;flex:1 1 auto;min-height:0;overflow:hidden}

.anw-hero__slide{
  position:absolute;inset:0;display:flex;flex-direction:column;justify-content:flex-end;
  opacity:0;visibility:hidden;transition:opacity .6s ease;
}
.anw-hero__slide.is-active{opacity:1;visibility:visible}
.anw-hero__bg{
  position:absolute;inset:0;background-size:cover;background-position:center;
  transform:scale(1.02);transition:transform 1.2s ease;
}
/* Writer-portrait fallback: blurred cover backdrop + contained portrait so a
   small vertical photo never gets stretched. */
.anw-hero__bg--blur{filter:blur(26px) saturate(.85);transform:scale(1.18)}
.anw-hero__slide.bg-writer .anw-hero__bg:not(.anw-hero__bg--blur){
  background-size:contain;background-repeat:no-repeat;
  background-position:top 0 right 6%;
  transform:none;
}
@media (max-width:640px){
  .anw-hero__slide.bg-writer .anw-hero__bg:not(.anw-hero__bg--blur){background-position:top 0 center}
}
/* Default Al-Nnas background is intentionally quiet. */
.anw-hero__slide.bg-default .anw-hero__bg{background-position:center 35%}
.anw-hero__slider:hover .anw-hero__slide.is-active .anw-hero__bg:not(.anw-hero__bg--blur){transform:scale(1.07)}
.anw-hero__slider:hover .anw-hero__slide.is-active.bg-writer .anw-hero__bg:not(.anw-hero__bg--blur){transform:none}
.anw-hero__scrim{
  position:absolute;inset:0;
  background:linear-gradient(0deg, rgba(20,18,12,.88) 0%, rgba(20,18,12,.55) 38%, rgba(20,18,12,.15) 70%, rgba(20,18,12,.05) 100%);
}
.anw-hero__cover{position:absolute;inset:0;z-index:2}

.anw-hero__body{
  position:relative;z-index:3;padding:26px 26px 30px;
  display:flex;flex-direction:column;gap:10px;pointer-events:none;
}
.anw-hero__body a{pointer-events:auto}
@media (max-width:640px){.anw-hero__body{padding:18px 18px 22px}}

.anw-hero__badge{
  align-self:flex-start;
  background:var(--anw-primary);color:#fdfaf2;
  font-size:.72rem;font-weight:800;letter-spacing:.04em;
  padding:.28em .7em;border-radius:999px;
}
.anw-hero__meta{display:flex;align-items:center;gap:8px;font-size:.85rem;color:var(--anw-muted)}
.anw-hero__avatar{
  width:30px;height:30px;border-radius:50%;object-fit:cover;display:block;
  background:var(--anw-accent-soft);border:1px solid var(--anw-line);
}
.anw-hero__writer{font-weight:700}
.anw-hero__title{
  margin:0;font-family:var(--anw-sec-font,var(--anw-display));
  font-size:clamp(1.35rem,2.6vw,2rem);line-height:1.5;font-weight:800;color:var(--anw-ink);
}
.anw-hero__title a{color:inherit}
.anw-hero__excerpt{margin:0;color:var(--anw-muted);font-size:.95rem;line-height:1.8;max-width:60ch}

/* Slides with a photo sit on a dark scrim → invert the text colours. */
.anw-hero__slide.has-image .anw-hero__title,
.anw-hero__slide.has-image .anw-hero__title a{color:#fdfaf2}
.anw-hero__slide.has-image .anw-hero__excerpt,
.anw-hero__slide.has-image .anw-hero__meta{color:rgba(253,250,242,.86)}
.anw-hero__slide.has-image .anw-hero__avatar{border-color:rgba(253,250,242,.45)}

/* Controls grouped in a quiet bar at the bottom of the featured card.
   The bar is RTL, so dots read right-to-left and arrows follow suit. */
.anw-hero__controls{
  position:relative;z-index:5;direction:rtl;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:10px 16px;
  border-top:1px solid var(--anw-line);
  background:var(--anw-paper);
}
/* v7.9.4 — the arrow row is explicitly LTR so DOM order equals visual order:
   next (chevron-left) sits left, previous (chevron-right) sits right, which is
   the natural pairing for an RTL reading flow. */
.anw-hero__arrows{display:flex;align-items:center;gap:6px;direction:ltr}
.anw-hero__nav{
  width:30px;height:30px;border-radius:6px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;font-size:1.05rem;line-height:1;
  border:1px solid var(--anw-line);background:transparent;
  color:var(--anw-ink);
  transition:background-color .2s ease,color .2s ease,border-color .2s ease;
}
.anw-hero__nav:hover{
  background:color-mix(in srgb,var(--anw-primary) 10%,transparent);
  border-color:color-mix(in srgb,var(--anw-primary) 45%,transparent);
  color:var(--anw-primary);
}

.anw-hero__dots{display:flex;align-items:center;gap:8px}
.anw-hero__dot{
  width:8px;height:8px;padding:0;border-radius:50%;cursor:pointer;
  border:1px solid color-mix(in srgb,var(--anw-ink) 25%,transparent);
  background:transparent;transition:background-color .2s ease,transform .2s ease;
}
.anw-hero__dot.is-active{background:var(--anw-primary);border-color:var(--anw-primary);transform:scale(1.25)}

/* Selected panel */
.anw-hero__panel{
  display:flex;flex-direction:column;gap:12px;padding:20px;
  border:1px solid var(--anw-line);border-radius:var(--anw-radius-lg);
  background:var(--anw-paper);box-shadow:var(--anw-shadow-card);
}
.anw-hero__panel-title{
  margin:0;font-family:var(--anw-sec-font,var(--anw-display));
  font-size:1.15rem;font-weight:800;color:var(--anw-ink);
  padding-bottom:10px;border-bottom:2px solid color-mix(in srgb,var(--anw-primary) 30%,transparent);
}
.anw-hero__list{
  list-style:none;margin:0;padding:0;display:flex;flex-direction:column;
  /* v7.9.4 — compact box, scroll inside. Heading stays outside the scroller. */
  max-height:var(--anw-selected-max-h,360px);overflow-y:auto;overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb,var(--anw-ink) 18%,transparent) transparent;
}
.anw-hero__list::-webkit-scrollbar{width:6px}
.anw-hero__list::-webkit-scrollbar-track{background:transparent}
.anw-hero__list::-webkit-scrollbar-thumb{
  background:color-mix(in srgb,var(--anw-ink) 16%,transparent);border-radius:99px;
}
.anw-hero__list::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--anw-ink) 28%,transparent)}
.anw-hero__item{
  position:relative;
  display:flex;gap:10px;align-items:flex-start;
  padding:12px 10px;border-bottom:1px solid var(--anw-line);
  border-radius:8px;
  transition:background-color .18s ease,transform .18s ease;
}
.anw-hero__item.has-link:hover{
  background:color-mix(in srgb,var(--anw-primary) 6%,transparent);
  transform:translateX(2px);
}
.anw-hero__item.has-link:hover .anw-hero__item-title{color:var(--anw-primary)}
.anw-hero__item-desc{font-size:.85rem;line-height:1.6;color:var(--anw-muted)}
.anw-hero__item:last-child{border-bottom:0}
.anw-hero__item-avatar{
  width:34px;height:34px;border-radius:50%;object-fit:cover;flex:0 0 auto;display:block;
  background:var(--anw-accent-soft);border:1px solid var(--anw-line);
}
.anw-hero__item-body{display:flex;flex-direction:column;gap:4px;min-width:0}
.anw-hero__item-title{
  font-family:var(--anw-display);font-size:.98rem;line-height:1.6;font-weight:700;color:var(--anw-ink);
}
.anw-hero__item-title:hover{color:var(--anw-primary)}
/* Whole row clickable when the item has a link. */
a.anw-hero__item-title::after{content:"";position:absolute;inset:0;border-radius:8px}
.anw-hero__item-meta{display:flex;align-items:center;gap:6px;font-size:.8rem;color:var(--anw-muted)}
/* v7.9.1 — "عرض المزيد" removed: no /articles/ page dependency. */

/* ============================================================
   v7.9.5 — Shared article-preview text rules
   ONE place defines truncation for every compact preview
   (cards, carousel slides, مختارات items). Scoped to preview
   components only — the single-article template is never
   touched by these rules.
   ============================================================ */
:root{
  --anw-preview-title-lines:1;
  --anw-preview-excerpt-lines:2;
}
.anw-preview-clamp-1,
.anw-home .anw-card__title,
.anw-home .anw-card__title a,
.entry-content .anw-home .anw-card__title,
.anw-slide__title,
.anw-slide__title a,
.anw-hero__title,
.anw-hero__title a,
.anw-hero__item-title{
  display:-webkit-box;
  -webkit-line-clamp:var(--anw-preview-title-lines,1);
  line-clamp:var(--anw-preview-title-lines,1);
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.anw-preview-clamp-2,
.anw-home .anw-card__excerpt,
.entry-content .anw-home .anw-card__excerpt,
.anw-slide__excerpt,
.anw-hero__excerpt,
.anw-hero__item-desc{
  display:-webkit-box;
  -webkit-line-clamp:var(--anw-preview-excerpt-lines,2);
  line-clamp:var(--anw-preview-excerpt-lines,2);
  -webkit-box-orient:vertical;
  overflow:hidden;
  text-overflow:ellipsis;
  word-break:break-word;
  overflow-wrap:anywhere;
}

/* Reserved space → short text never pulls the layout up. */
.anw-home .anw-card__title,
.entry-content .anw-home .anw-card__title{min-height:1.5em}
.anw-home .anw-card__excerpt,
.entry-content .anw-home .anw-card__excerpt{min-height:3.3em}
.anw-slide__title{min-height:1.5em}
.anw-slide__excerpt{min-height:3.4em}

/* Carousel slide: metadata / title / excerpt keep fixed rhythm,
   title → excerpt spacing capped at 2px. */
.anw-slide{gap:0;justify-content:flex-start}
.anw-slide__writer{margin:0 0 10px}
.anw-slide__title{margin:0 0 2px}
.anw-slide__excerpt{margin:0}

.anw-hero__body{gap:0}
.anw-hero__badge{margin:0 0 8px}
.anw-hero__meta{margin:0 0 8px;min-height:1.4em}
.anw-hero__title{margin:0 0 2px;min-height:1.5em}
.anw-hero__excerpt{margin:0;min-height:3.6em}

/* مختارات — max four items visible, scroll for the rest. */
.anw-hero__item{
  min-height:var(--anw-selected-item-h,72px);
  box-sizing:border-box;
  overflow:hidden;
}
.anw-hero__item-desc{
  -webkit-line-clamp:1;line-clamp:1;
}
.anw-hero__list{
  max-height:calc(var(--anw-selected-item-h,72px) * 4);
}

/* Single article page — never clamped, never truncated.
   Only the clamp properties are neutralised; layout/display of
   the article body is left exactly as the theme renders it. */
.single .entry-title,
.anw-article-body,
.anw-article-body p,
.anw-article-body h1,
.anw-article-body h2,
.anw-article-body h3,
.anw-article-body h4,
.anw-article-body li,
.anw-article-body blockquote{
  -webkit-line-clamp:unset;
  line-clamp:unset;
  overflow:visible;
  text-overflow:clip;
  min-height:0;
}
