/* MIS Club — Public site styles
   هوية النادي: برتقالي #F68939 + IBM Plex Sans Arabic */

:root {
  --brand-50:  #fff5ec;
  --brand-100: #ffe6d1;
  --brand-200: #fdc99c;
  --brand-300: #fbab66;
  --brand-400: #f9963f;
  --brand-500: #f68939;
  --brand-600: #e26a17;
  --brand-700: #bb5210;
  --brand-800: #943f0d;
  --brand-900: #6e2f0a;

  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --amber-50:  #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;

  --shadow-card: 0 4px 24px -8px rgba(15, 23, 42, 0.12);
  --shadow-lg:   0 10px 30px -10px rgba(15, 23, 42, 0.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
  font-family: 'IBM Plex Sans Arabic', 'Tajawal', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #fff;
  color: var(--slate-900);
  direction: rtl;
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-800); }

/* Layout helpers */
.container { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }
.flex   { display: flex; }
.grid   { display: grid; gap: 1rem; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; inset: 0; }
.overflow-hidden { overflow: hidden; }
.text-center { text-align: center; }
.text-white  { color: #fff; }

/* === HEADER === */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--slate-200);
}
.header-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 1rem;
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
}
.brand-link {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1.05rem; color: var(--brand-700); white-space: nowrap;
}
.brand-link img,
.brand-link .brand-fallback {
  width: 36px; height: 36px; border-radius: 12px; object-fit: contain;
}
.brand-link .brand-fallback {
  background: var(--brand-600); color: #fff;
  display: grid; place-items: center; font-weight: 800;
}
.main-nav {
  display: flex; align-items: center; gap: 2px;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--slate-600); font-size: 0.875rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-link:hover  { background: var(--slate-100); color: var(--slate-900); }
.nav-link.active { background: var(--brand-50); color: var(--brand-700); }
.nav-link svg { width: 15px; height: 15px; flex-shrink: 0; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.lang-toggle {
  background: transparent; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 10px; border-radius: 8px;
  font-size: 0.75rem; font-weight: 700; color: var(--slate-700);
}
.lang-toggle:hover { background: var(--slate-100); }
.menu-toggle {
  display: none; background: transparent; border: 0; cursor: pointer;
  padding: 8px; border-radius: 8px; color: var(--slate-700);
}
.menu-toggle:hover { background: var(--slate-100); }

@media (max-width: 1023px) {
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}

.mobile-drawer {
  display: none;
  background: #fff; border-top: 1px solid var(--slate-200);
}
.mobile-drawer.open { display: block; }
.mobile-drawer .nav-link { width: 100%; padding: 10px 12px; font-size: 0.95rem; }
.mobile-drawer-inner { max-width: 72rem; margin: 0 auto; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px;
  font-size: 0.875rem; font-weight: 600; cursor: pointer;
  border: 0; transition: all .15s; text-decoration: none;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary  { background: var(--brand-600); color: #fff !important; }
.btn-primary:hover { background: var(--brand-700); color: #fff !important; }
.btn-white-on-brand { background: #fff; color: var(--brand-700) !important; font-weight: 700; }
.btn-white-on-brand:hover { background: var(--amber-50); }
.btn-outline-white { background: transparent; color: #fff !important; border: 1px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }
.btn-outline {
  background: #fff; color: var(--slate-800) !important;
  border: 1px solid var(--slate-300);
}
.btn-outline:hover { background: var(--slate-50); }
.btn-ghost { background: transparent; color: var(--slate-700) !important; }
.btn-ghost:hover { background: var(--slate-100); }
.btn-danger { background: #dc2626; color: #fff !important; }
.btn-danger:hover { background: #b91c1c; }

/* === HERO === */
.hero {
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(225deg, var(--brand-500) 0%, var(--brand-600) 50%, var(--brand-800) 100%);
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.1;
  background-image:
    radial-gradient(circle at 20% 30%, white 1px, transparent 1px),
    radial-gradient(circle at 70% 80%, white 1px, transparent 1px);
  background-size: 40px 40px, 60px 60px;
}
.hero-content {
  position: relative; max-width: 72rem; margin: 0 auto;
  padding: 5rem 1rem; color: #fff;
}
@media (min-width: 768px) { .hero-content { padding: 7rem 1rem; } }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1); backdrop-filter: blur(8px);
  padding: 6px 16px; border-radius: 999px;
  font-size: 0.75rem; margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 2.25rem; font-weight: 700;
  line-height: 1.15; margin: 0 0 1.25rem;
}
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; } }
.hero h1 .highlight { color: var(--amber-200); display: block; }
.hero-sub {
  font-size: 1.125rem; max-width: 42rem;
  color: rgba(255,255,255,0.85); margin: 0 0 2rem; line-height: 1.7;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* === STATS bar floating over hero === */
.stats-wrap {
  max-width: 72rem; margin: -2.5rem auto 0; padding: 0 1rem;
  position: relative; z-index: 10;
}
.stats {
  background: #fff; padding: 1.5rem;
  border-radius: 1rem; box-shadow: var(--shadow-card);
  border: 1px solid var(--slate-100);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
  text-align: center;
}
@media (min-width: 768px) {
  .stats.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .stats.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
.stats .num { font-size: 2rem; font-weight: 700; color: var(--brand-600); }
@media (min-width: 768px) { .stats .num { font-size: 2.25rem; } }
.stats .lbl { font-size: 0.75rem; color: var(--slate-500); margin-top: 4px; }

/* === CARDS GRID (sections, labs, etc) === */
.section { padding: 4rem 1rem; }
.section .container { max-width: 72rem; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: 1.875rem; font-weight: 700; margin: 0 0 8px; }
.section-head p  { color: var(--slate-600); margin: 0; }

.cards-grid {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px){ .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--slate-100);
  border-radius: 1rem; padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: border-color .2s, box-shadow .2s, transform .2s;
  display: block; color: var(--slate-900);
  text-decoration: none;
}
.card:hover {
  border-color: var(--brand-300);
  box-shadow: var(--shadow-lg);
  color: var(--slate-900);
}
.card .icon-tile {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-500) 0%, var(--brand-700) 100%);
  color: #fff; display: grid; place-items: center;
  margin-bottom: 1rem; transition: transform .2s;
}
.card:hover .icon-tile { transform: scale(1.1); }
.card .icon-tile svg { width: 22px; height: 22px; }
.card h3 { font-weight: 700; margin: 0 0 8px; font-size: 1.05rem; transition: color .15s; }
.card:hover h3 { color: var(--brand-700); }
.card p  { color: var(--slate-600); font-size: 0.875rem; line-height: 1.6; margin: 0 0 12px; }
.card .more {
  font-size: 0.75rem; font-weight: 600; color: var(--brand-600);
  display: inline-flex; align-items: center; gap: 4px;
}
.card .tag {
  display: inline-block; background: var(--brand-50); color: var(--brand-700);
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; margin-bottom: 8px;
}
.card .meta { color: var(--slate-500); font-size: 0.8rem; margin: 4px 0 8px; }

/* === BOTTOM CTA card === */
.cta-bottom {
  max-width: 56rem; margin: 0 auto; padding: 4rem 1rem; text-align: center;
}
.cta-card {
  border-radius: 1rem;
  padding: 2.5rem;
  color: #fff;
  background: linear-gradient(135deg, var(--slate-900) 0%, var(--brand-900) 100%);
  box-shadow: var(--shadow-lg);
}
.cta-card h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 12px; }
@media (min-width: 768px) { .cta-card h2 { font-size: 1.875rem; } }
.cta-card p { color: rgba(255,255,255,0.8); margin: 0 auto 1.5rem; max-width: 36rem; }

.signature {
  margin-top: 2.5rem; font-size: 0.875rem; color: var(--slate-500);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.signature svg { color: var(--brand-500); width: 14px; height: 14px; }
.signature strong { color: var(--slate-700); }

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--slate-200);
  margin-top: 3rem; background: #fff;
}
.footer-inner {
  max-width: 72rem; margin: 0 auto; padding: 2rem 1rem;
  display: grid; grid-template-columns: 1fr; gap: 1.5rem; font-size: 0.875rem;
}
@media (min-width: 768px) { .footer-inner { grid-template-columns: repeat(3, 1fr); } }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--brand-700); margin-bottom: 8px; }
.footer-brand img,
.footer-brand .brand-fallback {
  width: 32px; height: 32px; border-radius: 8px; object-fit: contain;
}
.footer-brand .brand-fallback { background: var(--brand-600); color: #fff; display: grid; place-items: center; font-weight: 800; }
.footer-blurb { color: var(--slate-500); line-height: 1.7; }
.footer-col .lbl { font-weight: 700; margin-bottom: 8px; color: var(--slate-900); }
.footer-col .name { color: var(--slate-700); }
.footer-col .role { font-size: 0.75rem; color: var(--slate-500); margin-top: 4px; }
.copyright {
  border-top: 1px solid var(--slate-100);
  padding: 1rem;
  text-align: center; font-size: 0.75rem; color: var(--slate-400);
}

/* === FORMS === */
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 0.875rem; color: var(--slate-700); }
input, textarea, select {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--slate-300); border-radius: 12px;
  font-size: 0.875rem; font-family: inherit; background: #fff; color: var(--slate-900);
  box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(246,137,57,0.2);
}
textarea { min-height: 100px; resize: vertical; }
.row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .row { grid-template-columns: 1fr; } }

/* === ALERTS === */
.alert { padding: 12px 14px; border-radius: 12px; margin: 12px 0; font-size: 0.875rem; border: 1px solid; }
.alert.ok   { background: #DCFCE7; color: #166534; border-color: #86EFAC; }
.alert.err  { background: #FEE2E2; color: #991B1B; border-color: #FCA5A5; }
.alert.warn { background: var(--amber-100); color: #854D0E; border-color: #FCD34D; }

.muted { color: var(--slate-500); }
.small { font-size: 0.75rem; }

/* === Sub-hero (interior pages) === */
.sub-hero {
  background: linear-gradient(135deg, var(--brand-50) 0%, #fff 100%);
  border-bottom: 1px solid var(--slate-200);
  padding: 3rem 1rem;
  text-align: center;
}
.sub-hero h1 { font-size: 2rem; font-weight: 700; margin: 0 0 8px; color: var(--slate-900); }
.sub-hero p  { color: var(--slate-600); max-width: 38rem; margin: 0 auto; }

/* Tables (admin) */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: 12px; text-align: right; border-bottom: 1px solid var(--slate-200); font-size: 0.875rem; }
th { background: var(--slate-50); font-weight: 700; color: var(--slate-700); }

/* Utility */
.mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-4 { margin-bottom: 1rem; }
.gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; }
.flex-wrap { flex-wrap: wrap; }
