/* ===== TAKWIN DZ - MAIN STYLES ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #0A1F5C;
  --blue-m:  #1435A0;
  --blue-l:  #1A4DC8;
  --yellow:  #F5C518;
  --yellow-l:#FFD84D;
  --ink:     #0D1526;
  --muted:   #5A6480;
  --bg:      #F4F6FB;
  --white:   #FFFFFF;
  --border:  #DDE2F0;
  --radius:  10px;
  --cfpa:    #1435A0;
  --insfp:   #8B1A3A;
}

body {
  font-family: 'Cairo', sans-serif;
  background: var(--bg);
  color: var(--ink);
  direction: rtl;
}

/* ── HEADER ── */
#site-header {
  background: var(--blue);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo-icon { width: 36px; height: 36px; background: var(--yellow); border-radius: 8px; display: grid; place-items: center; font-size: 18px; }
.site-logo-text { color: #fff; font-weight: 900; font-size: 18px; }
.site-logo-sub  { color: var(--yellow-l); font-size: 11px; font-weight: 400; }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: rgba(255,255,255,.8); text-decoration: none; font-size: 14px; font-weight: 600; transition: color .2s; }
.site-nav a:hover { color: var(--yellow-l); }
.divider-yellow { height: 4px; background: var(--yellow); }

/* ── BREADCRUMB ── */
.breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  font-size: 12px;
  color: var(--muted);
  font-family: 'Tajawal', sans-serif;
}
.breadcrumb a { color: var(--blue-l); text-decoration: none; }
.breadcrumb span { margin: 0 6px; }

/* ── HERO ── */
.home-hero {
  background: linear-gradient(135deg, var(--blue) 0%, #060E2E 100%);
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero-badge { display: inline-block; background: rgba(245,197,24,.15); border: 1px solid var(--yellow); color: var(--yellow-l); padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: 700; margin-bottom: 16px; }
.home-hero h1 { color: #fff; font-size: clamp(22px,5vw,40px); font-weight: 900; line-height: 1.3; margin-bottom: 10px; }
.home-hero h1 span { color: var(--yellow); }
.home-hero p { color: rgba(255,255,255,.7); font-size: 15px; max-width: 500px; margin: 0 auto 28px; font-family: 'Tajawal', sans-serif; }

/* SEARCH */
.search-wrap { max-width: 600px; margin: 0 auto; position: relative; }
.search-wrap input { width: 100%; padding: 16px 24px 16px 140px; border-radius: 12px; border: 2px solid transparent; font-family: 'Cairo', sans-serif; font-size: 15px; outline: none; transition: border .2s; direction: rtl; box-shadow: 0 8px 32px rgba(0,0,0,.25); }
.search-wrap input:focus { border-color: var(--yellow); }
.search-wrap .btn-search { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); background: var(--yellow); color: var(--ink); border: none; padding: 8px 18px; border-radius: 8px; font-family: 'Cairo', sans-serif; font-weight: 900; font-size: 13px; cursor: pointer; }

/* STATS */
.stats-bar { display: flex; justify-content: center; gap: 36px; margin-top: 32px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { color: var(--yellow); font-size: 28px; font-weight: 900; line-height: 1; }
.stat-lbl { color: rgba(255,255,255,.6); font-size: 12px; font-family: 'Tajawal', sans-serif; margin-top: 4px; }

/* ── FILTERS ── */
.filters { background: var(--white); border-bottom: 1px solid var(--border); padding: 12px 24px; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter-btn { border: 1.5px solid var(--border); background: transparent; padding: 7px 16px; border-radius: 20px; font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--muted); transition: all .2s; }
.filter-btn.active, .filter-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ── CONTAINER ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 26px 0 14px; }
.section-head h2 { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.section-head h2::before { content: ''; display: inline-block; width: 4px; height: 20px; background: var(--yellow); border-radius: 2px; }
.section-head a { color: var(--blue-l); font-size: 13px; font-weight: 600; text-decoration: none; }

/* ── WILAYAS GRID ── */
.wilayas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 12px; padding-bottom: 30px; }
.wilaya-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px 14px; text-align: center; cursor: pointer; transition: all .2s; text-decoration: none; color: var(--ink); }
.wilaya-card:hover { border-color: var(--blue-l); box-shadow: 0 4px 16px rgba(10,31,92,.1); transform: translateY(-2px); }
.wilaya-num { display: inline-block; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; width: 28px; height: 28px; border-radius: 50%; line-height: 28px; margin-bottom: 8px; }
.wilaya-name { font-weight: 700; font-size: 14px; display: block; margin-bottom: 3px; }
.wilaya-count { font-size: 12px; color: var(--muted); font-family: 'Tajawal', sans-serif; }

/* ── CENTERS GRID ── */
.centers-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; padding-bottom: 32px; }
.center-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .2s; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.center-card:hover { border-color: var(--blue-l); box-shadow: 0 6px 24px rgba(10,31,92,.12); transform: translateY(-2px); }
.card-stripe { height: 4px; }
.card-stripe.cfpa  { background: var(--blue); }
.card-stripe.insfp { background: var(--insfp); }
.card-top { padding: 14px 16px 12px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
.card-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.card-icon.cfpa  { background: #EAF0FF; }
.card-icon.insfp { background: #FFEAF0; }
.card-title { font-size: 13px; font-weight: 700; line-height: 1.4; margin-bottom: 5px; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.badge.cfpa  { background: #EAF0FF; color: var(--cfpa); }
.badge.insfp { background: #FFEAF0; color: var(--insfp); }
.card-body { padding: 12px 16px; flex: 1; }
.meta-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 5px; font-family: 'Tajawal', sans-serif; }
.card-footer { padding: 10px 16px; background: var(--bg); display: flex; align-items: center; justify-content: space-between; }
.mode-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.mode-tag { background: rgba(10,31,92,.07); color: var(--blue); padding: 2px 9px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.capacity { font-size: 11px; color: var(--muted); font-family: 'Tajawal', sans-serif; }
.capacity strong { color: var(--ink); }

/* ── ARTICLES GRID ── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding-bottom: 32px; }
.article-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all .2s; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.article-card:hover { border-color: var(--blue-l); box-shadow: 0 4px 16px rgba(10,31,92,.1); transform: translateY(-2px); }
.article-thumb { height: 120px; background: linear-gradient(135deg, var(--blue), var(--blue-m)); display: flex; align-items: center; justify-content: center; font-size: 36px; position: relative; }
.article-cat { position: absolute; top: 10px; right: 10px; background: var(--yellow); color: var(--ink); font-size: 10px; font-weight: 700; padding: 2px 10px; border-radius: 10px; font-family: 'Cairo', sans-serif; }
.article-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.article-title { font-size: 13px; font-weight: 700; line-height: 1.5; }
.article-meta  { font-size: 11px; color: var(--muted); font-family: 'Tajawal', sans-serif; margin-top: auto; }

/* ── PLATFORMS BANNER ── */
.platforms-banner { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.platforms-banner h3 { font-size: 14px; font-weight: 700; text-align: center; margin-bottom: 14px; }
.platforms-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.platform-btn { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-family: 'Cairo', sans-serif; font-size: 13px; font-weight: 700; text-decoration: none; transition: all .2s; flex: 1; justify-content: center; min-width: 140px; }
.platform-btn.takwin { background: #0EA5B0; color: #fff; }
.platform-btn.sanaa  { background: #1A4DC8; color: #fff; }
.platform-btn.tamhin { background: #0A6E7C; color: #fff; }
.platform-btn:hover { opacity: .88; transform: translateY(-1px); }

/* ── SINGLE CENTER PAGE ── */
.single-hero { background: var(--blue); padding: 26px 24px 0; }
.single-hero-inner { max-width: 900px; margin: 0 auto; }
.single-hero-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.single-inst-icon { width: 60px; height: 60px; background: var(--yellow); border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.single-inst-info h1 { color: #fff; font-size: clamp(14px,3vw,20px); font-weight: 900; line-height: 1.3; margin-bottom: 8px; }
.single-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.single-badge { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.single-badge.cfpa  { background: var(--yellow); color: var(--ink); }
.single-badge.insfp { background: #FFEAF0; color: var(--insfp); }
.single-badge.mode  { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.3); }
.single-tabs { display: flex; border-top: 1px solid rgba(255,255,255,.1); margin-top: 18px; }
.single-tab { padding: 12px 20px; color: rgba(255,255,255,.6); font-size: 13px; font-weight: 600; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.single-tab.active { color: var(--yellow); border-bottom-color: var(--yellow); }

/* SINGLE LAYOUT */
.single-body { max-width: 900px; margin: 22px auto; padding: 0 20px; display: grid; grid-template-columns: 1fr 280px; gap: 20px; }

/* CARDS */
.info-card { background: var(--white); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.info-card-head { padding: 13px 18px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.info-card-body { padding: 16px 18px; }

/* META LIST */
.meta-list { display: flex; flex-direction: column; }
.meta-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.meta-item:last-child { border-bottom: none; padding-bottom: 0; }
.meta-item:first-child { padding-top: 0; }
.meta-ico { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.meta-text { font-size: 13px; font-family: 'Tajawal', sans-serif; }
.meta-text strong { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.meta-link { color: var(--blue-l); text-decoration: none; font-weight: 600; }

/* ABOUT TEXT */
.about-text { font-size: 14px; font-family: 'Tajawal', sans-serif; line-height: 1.9; color: #3A4060; }
.about-text strong { color: var(--ink); }

/* SPECS */
.spec-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.spec-tag { background: #EEF2FF; color: var(--blue); padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid #C5D0F5; }
.spec-code { font-size: 10px; color: var(--muted); display: block; margin-bottom: 2px; }

/* MODES */
.mode-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.mode-item:last-child { border-bottom: none; }
.mode-name { font-size: 13px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.mode-dot { width: 8px; height: 8px; background: var(--yellow); border-radius: 50%; flex-shrink: 0; }

/* CORRECT BAR */
.correct-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; background: #FFF8E1; border-top: 1px solid #F0E0A0; font-size: 12px; color: #7A6000; font-family: 'Tajawal', sans-serif; }
.btn-correct { background: transparent; border: 1px solid #C0A000; color: #7A6000; padding: 4px 12px; border-radius: 6px; font-family: 'Cairo', sans-serif; font-size: 11px; font-weight: 700; cursor: pointer; }

/* RATINGS */
.rating-summary { display: flex; align-items: center; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.rating-big { text-align: center; }
.rating-num { font-size: 40px; font-weight: 900; line-height: 1; }
.stars { color: var(--yellow); font-size: 16px; letter-spacing: 2px; }
.rating-count { font-size: 11px; color: var(--muted); font-family: 'Tajawal', sans-serif; }
.rating-bars { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.bar-track { flex: 1; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bar-fill  { height: 100%; background: var(--yellow); border-radius: 3px; }

/* COMMENT FORM */
.comment-form { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.comment-form h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.role-select { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.role-btn { padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: transparent; font-family: 'Cairo', sans-serif; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--muted); transition: all .2s; }
.role-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.star-pick { display: flex; gap: 4px; margin-bottom: 10px; font-size: 22px; direction: ltr; justify-content: flex-end; cursor: pointer; }
.star-pick span { color: #DDD; transition: color .1s; }
.star-pick span.on { color: var(--yellow); }
.comment-form textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-family: 'Tajawal', sans-serif; font-size: 13px; resize: none; height: 80px; outline: none; direction: rtl; }
.comment-form textarea:focus { border-color: var(--blue-l); }
.btn-submit-comment { margin-top: 8px; width: 100%; padding: 10px; background: var(--yellow); color: var(--ink); border: none; border-radius: 8px; font-family: 'Cairo', sans-serif; font-weight: 900; font-size: 13px; cursor: pointer; }

/* COMMENTS */
.comments-list { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.comment-item { border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.comment-item:last-child { border-bottom: none; padding-bottom: 0; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.comment-meta { flex: 1; }
.comment-name { font-size: 13px; font-weight: 700; }
.comment-role { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 10px; margin-right: 6px; }
.role-mutarabis { background: #E8F5EE; color: #1B6B3A; }
.role-muwazaf   { background: #EEF2FF; color: var(--blue); }
.role-zayer     { background: #FFF8E1; color: #A07B00; }
.comment-stars  { color: var(--yellow); font-size: 12px; }
.comment-date   { font-size: 11px; color: var(--muted); font-family: 'Tajawal', sans-serif; }
.comment-text   { font-size: 13px; color: var(--muted); font-family: 'Tajawal', sans-serif; line-height: 1.6; }

/* SIDEBAR */
.action-btns { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.btn-action { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: 10px; font-family: 'Cairo', sans-serif; font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: all .2s; text-decoration: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-yellow  { background: var(--yellow); color: var(--ink); }
.btn-outline { background: transparent; color: var(--blue); border: 1.5px solid var(--border); }

/* SUGGEST */
.suggest-box { background: #EEF2FF; border: 1.5px dashed var(--blue-l); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.suggest-box h4 { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--blue); }
.suggest-box p  { font-size: 12px; color: var(--muted); font-family: 'Tajawal', sans-serif; margin-bottom: 10px; }
.suggest-fields { display: flex; flex-direction: column; gap: 8px; }
.suggest-fields select, .suggest-fields input { padding: 8px 12px; border-radius: 8px; border: 1.5px solid var(--border); font-family: 'Cairo', sans-serif; font-size: 12px; width: 100%; outline: none; direction: rtl; }
.btn-suggest { width: 100%; padding: 9px; background: var(--blue); color: #fff; border: none; border-radius: 8px; font-family: 'Cairo', sans-serif; font-weight: 700; font-size: 13px; cursor: pointer; margin-top: 4px; }

/* SIDE LINKS */
.side-link { text-decoration: none; color: var(--ink); display: block; padding: 10px 0; border-bottom: 1px solid var(--border); }
.side-link:last-child { border-bottom: none; padding-bottom: 0; }
.side-link-title { font-size: 13px; font-weight: 700; margin-bottom: 2px; }
.side-link-sub   { font-size: 11px; color: var(--muted); font-family: 'Tajawal', sans-serif; }
.art-link { text-decoration: none; color: var(--ink); display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.art-link:last-child { border-bottom: none; padding-bottom: 0; }
.art-ico { width: 42px; height: 42px; background: linear-gradient(135deg,var(--blue),var(--blue-m)); border-radius: 8px; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.art-title { font-size: 12px; font-weight: 700; line-height: 1.4; margin-bottom: 3px; }
.art-meta  { font-size: 11px; color: var(--muted); font-family: 'Tajawal', sans-serif; }

/* ── FOOTER ── */
#site-footer { background: var(--ink); color: rgba(255,255,255,.6); padding: 36px 24px 20px; margin-top: 40px; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px; margin-bottom: 28px; }
.footer-col h4 { color: var(--yellow); font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.footer-col p  { font-size: 13px; font-family: 'Tajawal', sans-serif; line-height: 1.8; }
.footer-col a  { display: block; color: rgba(255,255,255,.6); text-decoration: none; font-size: 13px; font-family: 'Tajawal', sans-serif; margin-bottom: 8px; transition: color .2s; }
.footer-col a:hover { color: var(--yellow-l); }
.footer-bottom { max-width: 1100px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; text-align: center; font-size: 12px; font-family: 'Tajawal', sans-serif; }
.footer-bottom span { color: var(--yellow); }
.footer-disclaimer { max-width: 1100px; margin: 0 auto 16px; background: rgba(245,197,24,.08); border: 1px solid rgba(245,197,24,.2); border-radius: 8px; padding: 10px 16px; font-size: 12px; font-family: 'Tajawal', sans-serif; text-align: center; color: rgba(255,255,255,.5); }

/* ── CTA SECTION ── */
.cta-section { background: var(--blue); border-radius: var(--radius); padding: 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 20px 0 32px; }
.cta-text h3 { color: #fff; font-size: 17px; font-weight: 900; margin-bottom: 6px; }
.cta-text p  { color: rgba(255,255,255,.7); font-size: 13px; font-family: 'Tajawal', sans-serif; }
.cta-btn { background: var(--yellow); color: var(--ink); border: none; padding: 11px 24px; border-radius: 10px; font-family: 'Cairo', sans-serif; font-weight: 900; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .site-nav { display: none; }
  .stats-bar { gap: 20px; }
  .stat-num { font-size: 22px; }
  .wilayas-grid { grid-template-columns: repeat(3, 1fr); }
  .centers-grid { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .single-body { grid-template-columns: 1fr; }
  .cta-section { text-align: center; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .platforms-btns { flex-direction: column; }
}
