/*
Theme Name: MaFidia TikTok Pro
Theme URI: https://mafidia.com
Author: Absi (MaFidia)
Author URI: https://mafidia.com
Description: قالب مافيديا ستايل تيك توك – شروحات مجانية، عرض أعمال، خدمات، صفحة انتظار للروابط، ونظام إعلانات من لوحة التخصيص.
Version: 1.3
Text Domain: mafidia-tiktok-pro
*/

/* ========== Reset بسيط ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* دعم RTL / LTR */
body {
  margin: 0;
  padding: 0;
  direction: rtl;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #050816;
  color: #f9fafb;
  line-height: 1.6;
}

html[dir="ltr"] body {
  direction: ltr;
  text-align: left;
}

/* روابط */
a {
  color: #25f4ee;
  text-decoration: none;
}
a:hover {
  opacity: .9;
}

/* حاوية عامة */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========== الهيدر (الشريط الأسود + الكبسولات) ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #111827;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 0;
}

/* الشعار */
.site-logo a,
.site-logo {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .03em;
  color: #f9fafb;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.site-logo img {
  max-height: 32px;
  width: auto;
}

/* شريط الكبسولات داخل الهيدر */
.pill-main-nav {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .25rem;
  border-radius: 999px;
  background: rgba(15,23,42,.95);
  border: 1px solid #1f2937;
}

/* روابط الكبسولات */
.pill-link {
  padding: .32rem .9rem;
  border-radius: 999px;
  font-size: .85rem;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  background: transparent;
  white-space: nowrap;
}

.pill-link:hover {
  border-color: #9ca3af;
}

/* الرابط النشِط (الصفحة الحالية) */
.pill-link-active {
  border-color: transparent;
  background: linear-gradient(135deg,#fe2c55,#25f4ee);
  color: #ffffff;
}

/* موبايل الهيدر */
@media (max-width: 768px){
  .site-header-inner {
    gap: .7rem;
  }
  .pill-main-nav {
    max-width: 100%;
    overflow-x: auto;
  }
}

/* ========== أزرار عامة ========== */
.btn-cta {
  background: linear-gradient(135deg,#fe2c55,#25f4ee);
  color: #fff;
  padding: .5rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  border: none;
  display: inline-block;
}

.btn-secondary {
  border: 1px solid #4b5563;
  padding: .5rem 1.2rem;
  border-radius: 999px;
  color: #e5e7eb;
  font-size: .9rem;
  background: transparent;
  display: inline-block;
}

/* ========== الهيرو (الواجهة) ========== */
.hero {
  position: relative;
  padding: 4rem 0 3rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 0 0,#111827 0,transparent 55%),
    radial-gradient(circle at 100% 100%,#020617 0,transparent 55%),
    #020617;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .24;
  background-image:
    radial-gradient(circle at 10% 20%,#25f4ee 0,transparent 55%),
    radial-gradient(circle at 80% 0,#fe2c55 0,transparent 55%);
  mix-blend-mode: screen;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0,2fr) minmax(0,1.4fr);
  gap: 2rem;
  align-items: center;
}

/* بادج صغير فوق عنوان الهيرو */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: rgba(15,23,42,.9);
  border-radius: 999px;
  padding: .25rem .7rem;
  border: 1px solid rgba(148,163,184,.6);
  font-size: .75rem;
  margin-bottom: .6rem;
}

.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
}

.hero-title {
  font-size: 2.3rem;
  line-height: 1.3;
  margin: 0 0 1rem;
}

.hero-subtitle {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
}

/* إطار الفيديو / الديمو */
.hero-frame {
  border-radius: 22px;
  border: 1px solid rgba(148,163,184,.5);
  background:
    radial-gradient(circle at 10% 0,#020617 0,#020617 40%,#0b1120 100%);
  padding: 1rem;
  box-shadow: 0 18px 45px rgba(0,0,0,.75);
}

.hero-frame-video {
  border-radius: 16px;
  border: 1px solid rgba(31,41,55,.9);
  overflow: hidden;
  position: relative;
  background: transparent;
  width: 100%;
  aspect-ratio: 9/16;
}

/* شريط علوي داخل إطار الفيديو */
.hero-frame-bar {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 4px;
  border-radius: 999px;
  background: rgba(148,163,184,.35);
  pointer-events: none;
}

/* TikTok embed داخل الإطار */
.tiktok-embed {
  width: 100% !important;
  height: 100% !important;
}

/* ========== الأقسام العامة ========== */
.section,
.social-proof,
.services,
.final-cta {
  padding: 2.5rem 0;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: .6rem;
}

.section-subtitle {
  color: #9ca3af;
  margin-bottom: 1.3rem;
}

/* أرقام الإنجازات */
.social-stats {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: .7rem;
}

.stat-box {
  background: rgba(15,23,42,.95);
  border-radius: 12px;
  padding: .7rem .9rem;
  font-size: .9rem;
  border: 1px solid #111827;
}

/* كروت الخدمات / الشروحات / المقالات */
.services-grid,
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(230px,1fr));
  gap: 1.1rem;
}

.card {
  background: rgba(15,23,42,.96);
  border-radius: 16px;
  padding: 1.1rem;
  border: 1px solid #111827;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(37,244,238,.6);
  box-shadow: 0 14px 30px rgba(15,23,42,.8);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: .5rem;
}

/* تدوينات */
.post-meta {
  font-size: .75rem;
  color: #6b7280;
  margin-bottom: .5rem;
}

.blog-posts {
  padding: 2rem 0 2.5rem;
}

/* ========== الفوتر ========== */
.site-footer {
  background: #020617;
  padding: 2rem 0 1rem;
  margin-top: 2.5rem;
  border-top: 1px solid #111827;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.footer-title {
  font-weight: 600;
  margin-bottom: .6rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: .3rem;
}

.footer-bottom {
  font-size: .8rem;
  color: #6b7280;
  text-align: center;
}

/* ========== شريط الأقسام (المدونة / شروحات تيك توك) ========== */
.maf-cats-bar {
  display: inline-flex;
  align-items: center;
  gap: 1.2rem;
  padding: .25rem 1rem;
  border: 1px solid #4b5563;
  border-radius: 999px;
  background: rgba(0,0,0,.7);
  margin-bottom: 1.5rem;
  font-size: .85rem;
}

.maf-cats-bar a {
  color: #f9fafb;
}

.maf-cats-bar a:hover {
  opacity: .9;
  text-decoration: underline;
}

.maf-cats-bar .maf-cats-label {
  color: #9ca3af;
  font-size: .8rem;
}

.maf-cats-bar a.active {
  font-weight: 600;
}

.maf-cats-bar--tiktok {
  margin-top: .3rem;
}

/* ========== شريط مشاركة المحتوى ========== */
.maf-share-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  padding: .6rem .9rem;
  border-radius: 999px;
  border: 1px solid #374151;
  background: rgba(15,23,42,.9);
  font-size: .8rem;
  margin: 1rem 0 1.4rem;
}

.maf-share-label {
  color: #9ca3af;
}

.maf-share-bar a,
.maf-share-bar button {
  border: none;
  background: transparent;
  color: #f9fafb;
  cursor: pointer;
  font-size: .8rem;
  padding: .15rem .4rem;
}

.maf-share-bar a:hover,
.maf-share-bar button:hover {
  text-decoration: underline;
}

/* ========== أماكن الإعلانات ========== */
.ad-slot {
  margin: 1.5rem 0;
  padding: 1rem;
  border-radius: 14px;
  border: 1px dashed #4b5563;
  background: rgba(15,23,42,.75);
  text-align: center;
  font-size: .8rem;
  color: #9ca3af;
}

.ad-slot-top {
  margin-bottom: 1.5rem;
}

.ad-slot-middle {
  margin-top: 2rem;
}

.ad-slot-bottom {
  margin-top: 2rem;
}

/* إعلان صفحة الانتظار يمكن تخصيصه لوحده */
.ad-slot-gate {
  margin-top: 1.2rem;
}

/* ========== سيكشن المتابعة على Google News / Flipboard ========== */
.maf-follow-news {
  margin-top: 2rem;
  padding: 1.2rem 1rem;
  border-radius: 16px;
  border: 1px solid #111827;
  background: rgba(15,23,42,.96);
}

.maf-follow-news h3 {
  margin-top: 0;
  margin-bottom: .4rem;
}

.maf-follow-news p {
  margin-top: 0;
  margin-bottom: .8rem;
  color: #9ca3af;
}

.maf-follow-news-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

/* ========== صفحة انتظار الروابط (Link Gate) ========== */
.link-gate-section {
  padding: 3rem 0;
}

.link-gate-card {
  max-width: 520px;
  margin: 0 auto;
  background: rgba(15,23,42,.96);
  border-radius: 18px;
  border: 1px solid #111827;
  padding: 1.8rem 1.4rem;
  text-align: center;
  box-shadow: 0 18px 40px rgba(0,0,0,.75);
}

.link-gate-title {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: .6rem;
}

.link-gate-subtitle {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #9ca3af;
}

#maf-countdown {
  font-weight: 700;
  font-size: 1.4rem;
  color: #fbbf24;
}

.link-gate-note {
  margin-top: 1rem;
  margin-bottom: 1.4rem;
  font-size: .85rem;
  color: #9ca3af;
}

.link-gate-btn {
  min-width: 180px;
  opacity: .6;
  cursor: not-allowed;
}

.link-gate-btn.is-ready {
  opacity: 1;
  cursor: pointer;
}

/* ========== Responsive عامة ========== */
@media (max-width: 900px){
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px){
  .maf-share-bar,
  .maf-cats-bar {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .link-gate-card {
    padding: 1.4rem 1rem;
  }
}
/* شريط كبسولات قانونية مثل كبسولات الهيدر */
.footer-legal-bar {
  display: flex;
  justify-content: center;
  margin: 1rem 0 .4rem;
}

.footer-legal-pill-nav {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .3rem .5rem;
  background: rgba(0,0,0,.85);
  border-radius: 100px;
  border: 1px solid #1f2937;
}

.footer-pill {
  display: inline-block;
  padding: .42rem 1.1rem;
  font-size: .82rem;
  border-radius: 100px;
  border: 1px solid #4b5563;
  color: #e5e7eb;
  white-space: nowrap;
  background: transparent;
  transition: .15s;
}

.footer-pill:hover {
  border-color: #9ca3af;
}

/* موبايل */
@media(max-width:600px){
  .footer-legal-pill-nav {
    flex-wrap: wrap;
    justify-content: center;
  }
}
.footer-pill-active {
  background: linear-gradient(135deg,#fe2c55,#25f4ee);
  border-color: transparent !important;
  color: #ffffff !important;
  font-weight: 600;
}
/* قائمة سوشيال ميديا تحت بعض */
.footer-social-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-social-list li {
  margin-bottom: .45rem;
}

.footer-social-list a {
  display: flex;
  align-items: center;
  gap: .45rem;
  color: #e5e7eb;
  font-size: .85rem;
  text-decoration: none;
}

.footer-social-list a:hover {
  opacity: .8;
}

/* أيقونات منصات */
.social-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background-size: contain;
  background-repeat: no-repeat;
}

/* TikTok icon */
.tiktok-icon {
  background-image: url('https://cdn-icons-png.flaticon.com/512/3046/3046120.png');
}

/* Facebook icon */
.facebook-icon {
  background-image: url('https://cdn-icons-png.flaticon.com/512/145/145802.png');
}

/* Instagram icon */
.instagram-icon {
  background-image: url('https://cdn-icons-png.flaticon.com/512/174/174855.png');
}

/* YouTube icon */
.youtube-icon {
  background-image: url('https://cdn-icons-png.flaticon.com/512/1384/1384060.png');
}
