/* ═══════════════════════════════════════════
   WraqPS – أوراق فلسطين – Complete Stylesheet
   ═══════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;900&display=swap');

:root {
  --wq-primary:   #1a5276;
  --wq-accent:    #27ae60;
  --wq-accent2:   #e74c3c;
  --wq-gold:      #f39c12;
  --wq-bg:        #f0f4f8;
  --wq-card:      #ffffff;
  --wq-text:      #2c3e50;
  --wq-muted:     #7f8c8d;
  --wq-border:    #dce4ec;
  --wq-radius:    14px;
  --wq-shadow:    0 4px 24px rgba(0,0,0,.09);
  --wq-shadow-h:  0 8px 32px rgba(0,0,0,.16);
}

.wq-wrap * { box-sizing: border-box; font-family: 'Cairo', sans-serif; }
.wq-wrap { direction: rtl; color: var(--wq-text); background: var(--wq-bg); min-height: 100vh; }

/* ── HERO ─────────────────────────────────── */
.wq-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #1a5276 50%, #0e6655 100%);
  padding: 70px 20px 80px; text-align: center; color: #fff;
}
.wq-hero-inner { position: relative; z-index: 2; }
.wq-logo { font-size: 64px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-12px)} }

.wq-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; margin: 10px 0 8px;
  background: linear-gradient(90deg, #fff, #a8e6cf, #fff);
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.wq-hero-title span { color: #a8e6cf; -webkit-text-fill-color: #a8e6cf; }
.wq-hero-sub { font-size: 1.15rem; opacity: .85; margin-bottom: 28px; }

.wq-stats { display: flex; justify-content: center; gap: 32px; margin-bottom: 28px; }
.wq-stat { text-align: center; }
.wq-stat-num { display: block; font-size: 2rem; font-weight: 900; color: #a8e6cf; }

.wq-btn-upload {
  display: inline-block; padding: 14px 36px; border-radius: 50px;
  background: linear-gradient(135deg, #27ae60, #1e8449);
  color: #fff; font-size: 1.1rem; font-weight: 700; text-decoration: none;
  box-shadow: 0 4px 20px rgba(39,174,96,.4);
  transition: transform .2s, box-shadow .2s;
  animation: pulse-btn 2.5s infinite;
}
.wq-btn-upload:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(39,174,96,.5); color: #fff; }
@keyframes pulse-btn {
  0%,100%{box-shadow:0 4px 20px rgba(39,174,96,.4)}
  50%{box-shadow:0 4px 32px rgba(39,174,96,.7)}
}

/* Particles canvas */
.wq-particles { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* ── FILTERS ──────────────────────────────── */
.wq-filters-bar {
  background: var(--wq-card); border-bottom: 1px solid var(--wq-border);
  padding: 16px 24px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
}
.wq-filter-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; max-width: 1200px; margin: 0 auto; }
.wq-search-input {
  flex: 1; min-width: 200px; padding: 10px 16px; border: 2px solid var(--wq-border);
  border-radius: 8px; font-size: .95rem; font-family: 'Cairo',sans-serif;
  transition: border-color .2s;
}
.wq-search-input:focus { border-color: var(--wq-primary); outline: none; }
.wq-select {
  padding: 10px 14px; border: 2px solid var(--wq-border); border-radius: 8px;
  font-family: 'Cairo',sans-serif; font-size: .9rem; background: #fff;
  cursor: pointer; transition: border-color .2s;
}
.wq-select:focus { border-color: var(--wq-primary); outline: none; }
.wq-btn-filter {
  padding: 10px 24px; background: var(--wq-primary); color: #fff;
  border: none; border-radius: 8px; font-family: 'Cairo',sans-serif;
  font-size: .95rem; font-weight: 700; cursor: pointer; transition: background .2s;
}
.wq-btn-filter:hover { background: #154360; }

/* ── GRID ─────────────────────────────────── */
.wq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px; padding: 28px 24px; max-width: 1200px; margin: 0 auto;
}
.wq-empty { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--wq-muted); font-size: 1.1rem; }
.wq-empty a { color: var(--wq-accent); }

/* ── CARD ─────────────────────────────────── */
.wq-card {
  background: var(--wq-card); border-radius: var(--wq-radius);
  box-shadow: var(--wq-shadow); transition: transform .25s, box-shadow .25s;
  opacity: 0; transform: translateY(20px);
}
.wq-card.wq-visible { opacity: 1; transform: translateY(0); transition: opacity .4s, transform .4s, box-shadow .25s; }
.wq-card:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--wq-shadow-h); }
.wq-card-inner { display: flex; gap: 14px; padding: 18px; text-decoration: none; color: inherit; }
.wq-card-icon { font-size: 2.6rem; flex-shrink: 0; }
.wq-card-body { flex: 1; min-width: 0; }
.wq-card-title { font-size: 1rem; font-weight: 700; margin: 0 0 4px; line-height: 1.4; }
.wq-card-teacher { font-size: .85rem; color: var(--wq-muted); margin: 0 0 8px; }
.wq-card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.wq-tag { font-size: .75rem; padding: 2px 10px; border-radius: 20px; font-weight: 600; }
.wq-tag-branch { background: #d5e8f7; color: #1a5276; }
.wq-tag-subject { background: #d5f5e3; color: #1e8449; }
.wq-card-meta { font-size: .78rem; color: var(--wq-muted); display: flex; gap: 10px; flex-wrap: wrap; }

/* ── FILE PAGE ────────────────────────────── */
.wq-file-wrap { padding: 24px; max-width: 900px; margin: 0 auto; }
.wq-back { display: inline-block; margin-bottom: 16px; color: var(--wq-primary); text-decoration: none; font-weight: 600; }
.wq-back:hover { text-decoration: underline; }

.wq-file-card {
  background: var(--wq-card); border-radius: var(--wq-radius);
  box-shadow: var(--wq-shadow); padding: 28px; display: flex; gap: 20px;
  margin-bottom: 24px;
}
.wq-file-icon { font-size: 4rem; flex-shrink: 0; }
.wq-file-info { flex: 1; }
.wq-file-title { font-size: 1.5rem; font-weight: 900; margin: 0 0 8px; }
.wq-file-teacher { color: var(--wq-muted); margin: 0 0 10px; }
.wq-file-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.wq-file-desc { color: var(--wq-text); line-height: 1.7; margin: 12px 0; }
.wq-file-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--wq-muted); margin-bottom: 16px; }

.wq-file-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wq-btn-download {
  padding: 11px 24px; background: var(--wq-accent); color: #fff;
  border-radius: 8px; text-decoration: none; font-weight: 700; font-size: .95rem;
  transition: background .2s;
}
.wq-btn-download:hover { background: #1e8449; color: #fff; }
.wq-btn-like, .wq-btn-share, .wq-btn-report, .wq-btn-comment {
  padding: 10px 20px; border-radius: 8px; border: 2px solid var(--wq-border);
  background: #fff; cursor: pointer; font-family: 'Cairo',sans-serif;
  font-size: .9rem; font-weight: 600; transition: all .2s;
}
.wq-btn-like:hover   { border-color: #e74c3c; color: #e74c3c; background: #fdecea; }
.wq-btn-share:hover  { border-color: var(--wq-primary); color: var(--wq-primary); }
.wq-btn-report:hover { border-color: var(--wq-gold); color: var(--wq-gold); }
.wq-btn-comment      { background: var(--wq-primary); color: #fff; border-color: var(--wq-primary); }
.wq-btn-comment:hover{ background: #154360; }

/* ── PREVIEW ──────────────────────────────── */
.wq-preview { background: var(--wq-card); border-radius: var(--wq-radius); padding: 20px; margin-bottom: 24px; box-shadow: var(--wq-shadow); }
.wq-preview h3 { margin: 0 0 14px; font-size: 1.1rem; }
.wq-pdf-frame { width: 100%; height: 520px; border: none; border-radius: 8px; }

/* ── COMMENTS ─────────────────────────────── */
.wq-comments-section { background: var(--wq-card); border-radius: var(--wq-radius); padding: 24px; box-shadow: var(--wq-shadow); }
.wq-comments-section h3 { margin: 0 0 20px; font-size: 1.2rem; }
.wq-comment-form { margin-bottom: 28px; }
.wq-comments-list { display: flex; flex-direction: column; gap: 16px; }
.wq-comment { display: flex; gap: 14px; padding: 14px; background: var(--wq-bg); border-radius: 10px; }
.wq-comment-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: var(--wq-primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 700; flex-shrink: 0;
}
.wq-comment-body strong { font-size: 1rem; }
.wq-comment-date { font-size: .78rem; color: var(--wq-muted); margin-right: 10px; }
.wq-comment-body p { margin: 6px 0 0; line-height: 1.6; font-size: .92rem; }
.wq-no-comments { color: var(--wq-muted); text-align: center; padding: 20px; }

/* ── UPLOAD PAGE ──────────────────────────── */
.wq-upload-wrap { max-width: 800px; margin: 0 auto; padding: 24px; }
.wq-page-header { text-align: center; margin-bottom: 28px; }
.wq-page-header h2 { font-size: 1.7rem; font-weight: 900; color: var(--wq-primary); margin: 8px 0 6px; }
.wq-page-header p  { color: var(--wq-muted); }

/* ── FORMS ────────────────────────────────── */
.wq-form { background: var(--wq-card); border-radius: var(--wq-radius); padding: 28px; box-shadow: var(--wq-shadow); }
.wq-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wq-form-group { display: flex; flex-direction: column; gap: 6px; }
.wq-form-group label { font-weight: 600; font-size: .92rem; }
.wq-full { grid-column: 1/-1; }
.wq-input {
  padding: 11px 14px; border: 2px solid var(--wq-border); border-radius: 8px;
  font-family: 'Cairo',sans-serif; font-size: .95rem; transition: border-color .2s;
  width: 100%;
}
.wq-input:focus { border-color: var(--wq-primary); outline: none; }
.wq-file-input { padding: 8px; cursor: pointer; }
.wq-req { color: var(--wq-accent2); }
.wq-form-note { background: #eaf4fb; border-right: 4px solid var(--wq-primary); padding: 12px 16px; border-radius: 6px; font-size: .88rem; margin: 16px 0; }
.wq-btn-submit {
  width: 100%; padding: 14px; background: linear-gradient(135deg, var(--wq-primary), #2980b9);
  color: #fff; border: none; border-radius: 10px; font-family: 'Cairo',sans-serif;
  font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: opacity .2s;
}
.wq-btn-submit:hover { opacity: .9; }

/* ── ALERTS ───────────────────────────────── */
.wq-alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 16px; font-weight: 600; }
.wq-alert-success { background: #d5f5e3; color: #1e8449; border: 1px solid #a9dfbf; }
.wq-alert-error   { background: #fdecea; color: #c0392b; border: 1px solid #f1948a; }

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 640px) {
  .wq-form-grid { grid-template-columns: 1fr; }
  .wq-file-card { flex-direction: column; }
  .wq-stats { gap: 16px; }
  .wq-filter-form { flex-direction: column; }
  .wq-search-input, .wq-select { width: 100%; }
}
