/* components.css — أزرار، بطاقات، شارات، إلخ */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 24px;
  border-radius: 12px;
  font-weight: 700; font-size: .95rem;
  font-family: var(--font);
  cursor: pointer; border: 1px solid transparent;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary {
  background: linear-gradient(135deg, var(--emerald-2), var(--emerald-deep));
  color: #04130d;
  box-shadow: 0 12px 28px rgba(16,185,129,.32);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(16,185,129,.42); color: #04130d; }
.btn--ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--emerald-2); color: #fff; background: rgba(16,185,129,.08); }

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border-radius: 999px;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.32);
  color: var(--emerald-2);
  font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.badge--gold { background: rgba(216,178,92,.12); border-color: rgba(216,178,92,.32); color: var(--gold); }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--emerald-2);
  margin-bottom: 14px;
}

/* بطاقة */
.card {
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  position: relative;
  overflow: hidden;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.card:hover { transform: translateY(-5px); border-color: rgba(16,185,129,.45); box-shadow: var(--shadow); }
.card__icon {
  width: 50px; height: 50px; border-radius: 14px;
  background: rgba(16,185,129,.12);
  border: 1px solid rgba(16,185,129,.28);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card__icon svg { width: 26px; height: 26px; color: var(--emerald-2); }
.card h3 { margin-bottom: 10px; }
.card p { font-size: .94rem; }
.card__link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-weight: 700; font-size: .9rem;
}
.card__link svg { width: 16px; height: 16px; transition: transform var(--t); }
.card:hover .card__link svg { transform: translateX(-5px); }

/* بطاقة مادة مع صورة */
.post {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.post:hover { transform: translateY(-5px); border-color: rgba(16,185,129,.45); box-shadow: var(--shadow); }
.post__media {
  height: 168px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0e2a22, #16302a);
}
.post__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(11,20,17,.55));
}
.post__media svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.post__badge {
  position: absolute; top: 12px; right: 12px; z-index: 2;
}
.post__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.post__body h3 { font-size: 1.12rem; margin-bottom: 8px; }
.post__body p { font-size: .9rem; flex: 1; }
.post__meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: .8rem; color: var(--text-dim);
}
.post__meta .dotsep { width: 4px; height: 4px; border-radius: 50%; background: var(--text-dim); }

/* شبكات */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* إحصاءات */
.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}
.stat__num {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; color: var(--emerald-2); line-height: 1;
}
.stat__label { font-size: .85rem; color: var(--text-dim); margin-top: 8px; }

/* قائمة ميزات */
.flist { display: flex; flex-direction: column; gap: 14px; }
.flist li { display: flex; gap: 13px; align-items: flex-start; }
.flist .tick {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(16,185,129,.15); border: 1px solid rgba(16,185,129,.35);
  display: grid; place-items: center; margin-top: 3px;
}
.flist .tick svg { width: 13px; height: 13px; color: var(--emerald-2); }
.flist li span { color: var(--text-soft); }

/* جدول بيانات */
.tablewrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; min-width: 480px; }
table.data th, table.data td { padding: 13px 16px; text-align: right; border-bottom: 1px solid var(--border); font-size: .9rem; }
table.data th { background: var(--panel-2); color: #fff; font-weight: 700; }
table.data td { color: var(--text-soft); }
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(16,185,129,.05); }

/* اقتباس */
.quote {
  border-inline-start: 3px solid var(--emerald-2);
  padding: 6px 20px;
  font-size: 1.15rem; font-style: italic;
  color: var(--text); margin: 26px 0;
}

/* مربع تنبيه */
.callout {
  background: rgba(16,185,129,.07);
  border: 1px solid rgba(16,185,129,.25);
  border-radius: var(--radius);
  padding: 20px 22px;
  display: flex; gap: 14px; align-items: flex-start;
}
.callout svg { width: 22px; height: 22px; color: var(--emerald-2); flex: 0 0 auto; margin-top: 3px; }
.callout p { font-size: .92rem; margin: 0; }

/* شارة دولة */
.flagchip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--border);
  font-size: .82rem; color: var(--text-soft); font-weight: 600;
}
.flagchip .flag { width: 16px; height: 11px; border-radius: 2px; display: inline-block; }

/* لافتة الكوكيز */
.cookie {
  position: fixed; bottom: 18px; right: 18px; left: 18px;
  max-width: 480px; margin-inline-start: auto;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  z-index: 80;
  transform: translateY(150%);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.cookie.is-visible { transform: translateY(0); }
.cookie h4 { margin-bottom: 7px; }
.cookie p { font-size: .85rem; margin-bottom: 14px; }
.cookie__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie .btn { padding: 9px 18px; font-size: .85rem; }

@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
}
