/* First Articles Layout - Frontend Styles */
:root{
  --fal-font: "Tajawal", system-ui, -apple-system, "Segoe UI", Arial;
  --fal-muted: #6b7280;
  --fal-border: rgba(17,24,39,.10);
  --fal-card-bg: rgba(255,255,255,1);
  --fal-accent: #16a34a;
  --fal-shadow: 18;
  --fal-container: 1180px;
}

.fal-wrap{
  font-family: var(--fal-font);
  direction: rtl;
  text-align: right;
  padding: 22px 12px;
  max-width: var(--fal-container);
  margin: 0 auto;
}


.fal-grid{
  display:grid;
  gap:14px;
}
.fal-grid--cols-1{ grid-template-columns: 1fr; }
.fal-grid--cols-2{ grid-template-columns: repeat(2, 1fr); }
.fal-grid--cols-3{ grid-template-columns: repeat(3, 1fr); }
.fal-grid--cols-4{ grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px){
  .fal-grid--cols-3,.fal-grid--cols-4{ grid-template-columns: repeat(2, 1fr); }
  .fal-grid--cols-2{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px){
  .fal-grid--cols-2,.fal-grid--cols-3,.fal-grid--cols-4{ grid-template-columns: 1fr; }
}

/* Cards (Elementor widget list) */
.fal-card{
  background: var(--fal-card-bg);
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid var(--fal-border);
  box-shadow: 0 10px calc(var(--fal-shadow)*1px) rgba(0,0,0,.08);
  text-decoration:none;
  color:inherit;
  display:block;
  position:relative;
}

.fal-card__img{
  padding-top: 62%;
  position: relative;
  overflow:hidden;
}
.fal-card__img img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.fal-card__img--ph{
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, rgba(22,163,74,.25), rgba(17,24,39,.08));
}

.fal-card__img::before{
  content:"";
  position:absolute;
  top:-60%;
  left:-80%;
  width:55%;
  height:220%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.75) 50%, transparent 100%);
  transform: translateX(-140%) rotate(25deg);
  opacity:0;
  transition: transform .85s ease, opacity .25s ease;
  pointer-events:none;
}
.fal-card:hover .fal-card__img::before{
  transform: translateX(260%) rotate(25deg);
  opacity:1;
}

.fal-card__imglink{ display:block; position:absolute; inset:0; }

.fal-card__img::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.55), rgba(255,255,255,0) 40%);
  opacity:0;
  transition: opacity .25s ease;
}
.fal-card:hover .fal-card__img::after{ opacity:1; }

.fal-card__body{ padding: 14px 14px 16px; }
.fal-card__title{ font-size: 16px; line-height: 1.5; font-weight: 800; margin: 0 0 8px; }
.fal-card__excerpt{ font-size: 13px; color: var(--fal-muted); line-height: 1.75; }


.fal-card__title a{
  color:inherit;
  text-decoration:none;
}
.fal-card__title a:hover{ text-decoration:underline; }

.fal-card__views{
  position:absolute;
  top:12px;
  right:12px;
  background: rgba(249,115,22,.95);
  color:#fff;
  border-radius: 999px;
  padding: 6px 10px;
  display:flex;
  gap:6px;
  align-items:center;
  font-size:12px;
  font-weight:800;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
}
.fal-card__views-ico{ display:inline-flex; }
.fal-card__views-num{ line-height:1; }

/* Views badge (archive + related) */
.fal-badge--views{
  position:absolute;
  top:12px;
  right:12px;
  background: rgba(249,115,22,.95);
  color:#fff;
  border-radius: 999px;
  padding: 6px 10px;
  display:flex;
  gap:6px;
  align-items:center;
  font-size:12px;
  font-weight:800;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
}
.fal-badge__ico{ display:inline-flex; }
.fal-badge__num{ line-height:1; }

.fal-card__actions{
  margin-top: 12px;
  display:flex;
  gap:10px;
}
.fal-btn{
  flex:1;
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 13px;
  text-decoration:none;
  border: 1px solid var(--fal-border);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  user-select:none;
}
.fal-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,.12);
}
.fal-btn--details{
  background: rgba(249,115,22,.12);
  border-color: rgba(249,115,22,.28);
  color: #c2410c;
}
.fal-btn--wa{
  background: rgba(37,211,102,.12);
  border-color: rgba(37,211,102,.26);
  color: #1f7a3a;
}


/* Single post layout */
.fal-layout{
  max-width: var(--fal-container);
  margin:0 auto;
  display:grid;
  grid-template-columns: 1fr 330px;
  gap:18px;
}
.fal-layout--one{ grid-template-columns: 1fr; }
@media (max-width: 980px){
  .fal-layout{ grid-template-columns:1fr; }
}

.fal-article,.fal-sidecard{
  background: var(--fal-card-bg);
  border:1px solid var(--fal-border);
  border-radius:18px;
  box-shadow: 0 10px calc(var(--fal-shadow)*1px) rgba(0,0,0,.08);
  overflow:hidden;
}

.fal-article__header{ padding:18px 18px 10px; }
.fal-article__thumb{
  border-radius:16px;
  overflow:hidden;
  margin-bottom:14px;
  position:relative;
}
.fal-article__thumb img{ width:100%; height:auto; display:block; }
.fal-article__thumb::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(circle at 25% 12%, rgba(255,255,255,.55), rgba(255,255,255,0) 40%);
  opacity:0;
  transition:opacity .25s ease;
}
.fal-article__thumb:hover::after{ opacity:1; }

.fal-article__title{ margin:0 0 8px; font-size:22px; font-weight:900; line-height:1.4; }
.fal-article__meta{ color:var(--fal-muted); font-size:13px; display:flex; gap:8px; align-items:center; }
.fal-article__content{ padding: 0 18px 18px; }
.fal-article__content p{ line-height: 1.9; font-size: 15px; }

.fal-article__extras{
  padding: 0 18px 18px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.fal-inpostcard{
  background: var(--fal-card-bg);
  border:1px solid var(--fal-border);
  border-radius:18px;
  padding:14px;
  box-shadow: 0 10px calc(var(--fal-shadow)*0.6px) rgba(0,0,0,.06);
}
.fal-inpostcard h3{ margin:0 0 10px; font-size:15px; font-weight:900; }

.fal-card--compact .fal-card__body{ padding: 12px 12px 14px; }
.fal-card--compact .fal-card__title{ font-size: 15px; }

.fal-sidebar{ display:flex; flex-direction:column; gap:14px; }
.fal-sidecard{ padding:14px; }
.fal-sidecard h3{ margin:0 0 10px; font-size:15px; font-weight:900; }

.fal-sidebar__hero{ border-radius:14px; overflow:hidden; border:1px solid var(--fal-border); }
.fal-sidebar__hero img{ width:100%; height:auto; display:block; }

.fal-cats ul{ list-style:none; padding:0; margin:0; }
.fal-cats li{ margin: 8px 0; }
.fal-cats a{
  text-decoration:none;
  color:inherit;
  display:flex;
  justify-content:space-between;
  padding:10px 12px;
  border-radius: 12px;
  border: 1px solid var(--fal-border);
  background: transparent;
}
.fal-cats a:hover{ border-color: rgba(22,163,74,.35); }

.fal-contact{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.fal-contact a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--fal-border);
  text-decoration:none;
  color:inherit;
  background: transparent;
}
.fal-contact a:hover{ border-color: rgba(22,163,74,.35); }

.fal-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:800;
}
.fal-ico{
  width:34px;height:34px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--fal-border);
}

.fal-list{ list-style:none; margin:0; padding:0; }
.fal-list li{ margin: 10px 0; }
.fal-list a{
  display:flex;
  gap:10px;
  text-decoration:none;
  color:inherit;
}
.fal-list img{ width:64px; height:48px; object-fit:cover; border-radius:10px; border:1px solid var(--fal-border); }
.fal-list .fal-li__t{ font-weight:800; font-size:13px; line-height:1.5; }
.fal-list .fal-li__m{ color:var(--fal-muted); font-size:12px; margin-top:2px; }

/* Share card (sidebar) */
.fal-share-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:10px;
}
.fal-share-btn{
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 11px 12px;
  border-radius: 14px;
  border:1px solid var(--fal-border);
  background: linear-gradient(180deg, rgba(255,255,255,.70), rgba(255,255,255,0));
  text-decoration:none;
  color: inherit;
  font-weight: 900;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.fal-share-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0,0,0,.12);
  border-color: rgba(22,163,74,.28);
}
.fal-share-btn::before{
  content:"";
  position:absolute;
  top:-70%;
  left:-80%;
  width:55%;
  height:260%;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.85) 50%, transparent 100%);
  transform: translateX(-140%) rotate(25deg);
  opacity:0;
  transition: transform .85s ease, opacity .25s ease;
  pointer-events:none;
}
.fal-share-btn:hover::before{
  transform: translateX(260%) rotate(25deg);
  opacity:1;
}
.fal-share-ico{
  width:30px;
  height:30px;
  border-radius: 13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--fal-border);
  flex: 0 0 auto;
}
.fal-share-txt{ font-size: 13px; }
.fal-share-arr{ color: var(--fal-muted); font-size: 13px; }
.fal-share-ico svg{width:16px;height:16px;}


/* Brand-ish icon colors (subtle) */
.fal-share--fb .fal-share-ico{ color:#1877F2; background: rgba(24,119,242,.10); border-color: rgba(24,119,242,.18); }
.fal-share--x  .fal-share-ico{ color:#111827; background: rgba(17,24,39,.06); border-color: rgba(17,24,39,.12); }
.fal-share--li .fal-share-ico{ color:#0A66C2; background: rgba(10,102,194,.10); border-color: rgba(10,102,194,.18); }
.fal-share--wa .fal-share-ico{ color:#25D366; background: rgba(37,211,102,.10); border-color: rgba(37,211,102,.18); }
.fal-share--tg .fal-share-ico{ color:#229ED9; background: rgba(34,158,217,.10); border-color: rgba(34,158,217,.18); }


/* Archive */
.fal-archive__head{
  background: var(--fal-card-bg);
  border:1px solid var(--fal-border);
  border-radius:18px;
  box-shadow: 0 10px calc(var(--fal-shadow)*1px) rgba(0,0,0,.08);
  padding:14px;
  margin-bottom:14px;
}
.fal-archive__title{ margin:0; font-size:18px; line-height:1.45; font-weight:900; }
.fal-archive__desc{ margin-top:6px; color: var(--fal-muted); font-size:13px; line-height:1.8; }
.fal-empty{
  background: var(--fal-card-bg);
  border:1px solid var(--fal-border);
  border-radius:18px;
  padding:18px;
  box-shadow: 0 10px calc(var(--fal-shadow)*1px) rgba(0,0,0,.06);
}

.fal-pagination{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  margin-top:16px;
}
.fal-pagination .page-numbers{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:38px;
  height:38px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid var(--fal-border);
  background: var(--fal-card-bg);
  color:#111827;
  text-decoration:none;
  box-shadow: 0 8px calc(var(--fal-shadow)*0.6px) rgba(0,0,0,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.fal-pagination .page-numbers.current{
  background: rgba(22,163,74,.12);
  border-color: rgba(22,163,74,.35);
  font-weight:900;
}
.fal-pagination a.page-numbers:hover{
  transform: translateY(-1px);
  box-shadow: 0 12px calc(var(--fal-shadow)*0.8px) rgba(0,0,0,.08);
}


/* Load more button */
.fal-loadmore{display:flex;justify-content:center;margin:18px 0 8px;}
.fal-loadmore-btn{
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 900;
  border: 1px solid rgba(249,115,22,.28);
  background: rgba(249,115,22,.12);
  color: #c2410c;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.fal-loadmore-btn:hover{transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.10);}
.fal-loadmore-btn.is-loading{opacity:.75; cursor:wait;}


/* In-article images: smaller + zoom icon */
.fal-article__content a.fal-lightbox,
.entry-content a.fal-lightbox,
.elementor-widget-theme-post-content a.fal-lightbox,
.elementor-post__content a.fal-lightbox{
  display:block;
  position:relative;
  max-width: 92%;
  margin: 14px auto;
  border-radius:16px;
  overflow:hidden;
}
@media (max-width: 680px){
  .fal-article__content a.fal-lightbox,
.entry-content a.fal-lightbox,
.elementor-widget-theme-post-content a.fal-lightbox,
.elementor-post__content a.fal-lightbox{ max-width: 92%; }
}
.fal-article__content img.fal-content-img,
.entry-content img.fal-content-img,
.elementor-widget-theme-post-content img.fal-content-img,
.elementor-post__content img.fal-content-img,
.fal-article__content a.fal-lightbox img,
.entry-content a.fal-lightbox img,
.elementor-widget-theme-post-content a.fal-lightbox img,
.elementor-post__content a.fal-lightbox img{
  width:100%;
  height:auto;
  display:block;
  border-radius:16px;
  border:1px solid var(--fal-border);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.fal-article__content a.fal-lightbox::after,
.entry-content a.fal-lightbox::after,
.elementor-widget-theme-post-content a.fal-lightbox::after,
.elementor-post__content a.fal-lightbox::after{
  content:'';
  position:absolute;
  left:12px;
  bottom:12px;
  width:38px;
  height:38px;
  border-radius:14px;
  background: rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z' stroke='%23111111' stroke-width='2'/%3E%3Cpath d='M16.3 16.3 21 21' stroke='%23111111' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M10.5 7v7' stroke='%23111111' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M7 10.5h7' stroke='%23111111' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:center;
  background-size:20px 20px;
  transition: transform .15s ease;
}
.fal-article__content a.fal-lightbox:hover::after,
.entry-content a.fal-lightbox:hover::after,
.elementor-widget-theme-post-content a.fal-lightbox:hover::after,
.elementor-post__content a.fal-lightbox:hover::after{ transform: translateY(-1px); }


/* Force any in-content images/videos to never appear huge */
.fal-article__content img:not(.wp-smiley):not(.emoji),
.entry-content img:not(.wp-smiley):not(.emoji),
.elementor-widget-theme-post-content img:not(.wp-smiley):not(.emoji),
.elementor-post__content img:not(.wp-smiley):not(.emoji){
  display:block;
  margin:14px auto;
  max-width:92%;
  height:auto;
}

.fal-article__content img.fal-content-img,
.entry-content img.fal-content-img,
.elementor-widget-theme-post-content img.fal-content-img,
.elementor-post__content img.fal-content-img{
  max-height:520px;
  object-fit:contain;
}

/* Responsive embeds */
.fal-embed{
  max-width:92%;
  margin:14px auto;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--fal-border);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
  background:#000;
}
.fal-embed iframe,
.fal-embed video{
  width:100%;
  display:block;
}
.fal-embed iframe{ aspect-ratio:16/9; height:auto; }

@media (max-width: 680px){
  .fal-article__content a.fal-lightbox,
  .entry-content a.fal-lightbox,
  .elementor-widget-theme-post-content a.fal-lightbox,
  .elementor-post__content a.fal-lightbox{ max-width: 88%; }

  .fal-embed{ max-width:88%; }
  .fal-article__content img:not(.wp-smiley):not(.emoji),
  .entry-content img:not(.wp-smiley):not(.emoji),
  .elementor-widget-theme-post-content img:not(.wp-smiley):not(.emoji),
  .elementor-post__content img:not(.wp-smiley):not(.emoji){
    max-width:88%;
  }

  .fal-article__content img.fal-content-img,
  .entry-content img.fal-content-img,
  .elementor-widget-theme-post-content img.fal-content-img,
  .elementor-post__content img.fal-content-img{
    max-height:360px;
  }
}

/* Lightbox modal */
.fal-lightbox-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding: 20px;
  z-index: 999999;
  background: rgba(0,0,0,.78);
}
.fal-lightbox-modal.is-open{ display:flex; }
html.fal-lightbox-open, html.fal-lightbox-open body{ overflow:hidden; }

.fal-lightbox-modal__img{
  max-width: 95vw;
  max-height: 88vh;
  width:auto;
  height:auto;
  border-radius: 18px;
  box-shadow: 0 16px 60px rgba(0,0,0,.55);
}
.fal-lightbox-modal__close{
  position:absolute;
  top:16px;
  right:16px;
  width:44px;
  height:44px;
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
}
.fal-lightbox-modal__close:hover{ background: rgba(0,0,0,.55); }
