/* ============================================================
   extras.css — مكونات إضافية
   digital-marketin.work
   ============================================================ */

/* ============================================================
   MOBILE NAV
   ============================================================ */
.nav-links-wrap.mobile-open {
  display: flex !important;
  flex-direction: column;
  position: fixed;
  top: 72px;
  inset-inline: 0;
  background: rgba(12, 12, 12, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 899;
  gap: 1.5rem;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-links-wrap.mobile-open .nav-links  { flex-direction: column; gap: 0.5rem; }
.nav-links-wrap.mobile-open .search-bar { width: 100%; }
.nav-links-wrap.mobile-open .search-bar input { width: 100%; }

/* ============================================================
   TAB PANES — الإصلاح الرئيسي لمشكلة الشاشة السوداء
   ============================================================ */
.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeInPane 0.35s ease;
}
@keyframes fadeInPane {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TABS BAR
   ============================================================ */
.tabs-section {
  padding: 0 1.5rem;
  max-width: 1400px;
  margin: 2rem auto 0;
}
.tabs-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.tabs-bar::-webkit-scrollbar { display: none; }
.tab-btn {
  background: transparent;
  border: none;
  color: var(--mid, #888);
  font-family: var(--font-en, 'Poppins', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover  { color: var(--light, #fff); }
.tab-btn.active { color: var(--brand, #D83F1A); border-bottom-color: var(--brand, #D83F1A); }

/* ============================================================
   PORTFOLIO GRID
   ============================================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 1.5rem 1.5rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* ============================================================
   CASE STUDY MODAL — إصلاح ثاني
   ============================================================ */
#case-study-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}
#case-study-modal.open {
  display: flex;
}
.case-study-box {
  background: var(--card-bg, #1a1a1a);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  scrollbar-width: thin;
}
.cs-close-row {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-start;
  padding: 1rem 1.25rem 0;
  background: var(--card-bg, #1a1a1a);
}
.cs-close {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--light, #fff);
  border-radius: 50%;
  width: 36px; height: 36px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.cs-close:hover { background: rgba(255,255,255,0.14); }
.cs-body { padding: 1.25rem 1.75rem 2rem; }
.cs-full-img {
  width: 100%; height: 260px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  display: block;
}
.cs-header {
  display: flex; align-items: center;
  gap: 1rem; margin-bottom: 1.25rem;
}
.cs-header img {
  width: 52px; height: 52px;
  border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.cs-client-name {
  font-size: 1.2rem; font-weight: 800;
  color: var(--light, #fff); margin-bottom: 0.15rem;
}
.cs-client-niche {
  font-size: 0.78rem; color: var(--mid, #888);
  font-family: var(--font-en, 'Poppins', sans-serif);
}
.cs-stats-row {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 0.75rem; margin-bottom: 1.5rem;
}
.cs-stat-chip {
  background: rgba(216,63,26,0.08);
  border: 1px solid rgba(216,63,26,0.2);
  border-radius: 10px; padding: 0.85rem 1rem; text-align: center;
}
.cs-stat-chip .val {
  font-size: 1.3rem; font-weight: 800;
  color: var(--brand, #D83F1A);
  font-family: var(--font-en, 'Poppins', sans-serif);
  margin-bottom: 0.2rem;
}
.cs-stat-chip .lbl { font-size: 0.7rem; color: var(--mid, #888); font-family: var(--font-en, 'Poppins', sans-serif); }
.cs-desc { font-size: 0.9rem; color: var(--light, #fff); line-height: 1.8; opacity: 0.87; }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash-message {
  display: flex; align-items: center; gap: 0.6rem;
  border-radius: 10px; padding: 0.85rem 1rem;
  margin-bottom: 1.25rem; font-size: 0.88rem;
}
.flash-success { background: rgba(34,197,94,0.1);  border: 1px solid rgba(34,197,94,0.3);  color: #4ade80; }
.flash-error   { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.3);   color: #f87171; }
.flash-info    { background: rgba(99,102,241,0.1);  border: 1px solid rgba(99,102,241,0.3);  color: #a5b4fc; }
.flash-warning { background: rgba(234,179,8,0.1);   border: 1px solid rgba(234,179,8,0.3);   color: #fde047; }
.flash-icon  { font-size: 1rem; flex-shrink: 0; }
.flash-text  { flex: 1; }
.flash-close { background: none; border: none; cursor: pointer; color: inherit; opacity: 0.6; font-size: 0.9rem; padding: 0.2rem; }
.flash-close:hover { opacity: 1; }

/* ============================================================
   INFO CARDS
   ============================================================ */
.info-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.055);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition);
}
.info-card:hover { border-color: rgba(216,63,26,0.25); }
.info-card-label {
  font-size: 0.65rem; font-family: var(--font-en);
  letter-spacing: 4px; text-transform: uppercase;
  color: var(--brand); margin-bottom: 0.6rem; font-weight: 600;
}
.info-card-value { font-size: 0.95rem; font-weight: 600; color: var(--light); line-height: 1.6; }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dash-wrap {
  display: flex;
  min-height: 100vh;
  padding-top: 72px;
}
.dash-sidebar {
  width: 240px; flex-shrink: 0;
  background: rgba(255,255,255,0.02);
  border-inline-end: 1px solid rgba(255,255,255,0.07);
  padding: 2rem 1rem;
  position: sticky; top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
}
.dash-main { flex: 1; padding: 2.5rem 2rem; max-width: 1100px; }
.dash-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem; border-radius: 8px;
  color: var(--mid); text-decoration: none;
  font-size: 0.88rem; font-weight: 600;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 0.25rem;
}
.dash-nav-item:hover, .dash-nav-item.active {
  background: rgba(216,63,26,0.1); color: var(--light);
}
.dash-nav-item.active { color: var(--brand); }
.dash-nav-section {
  font-size: 0.6rem; letter-spacing: 3px; text-transform: uppercase;
  color: rgba(255,255,255,0.2); font-family: var(--font-en);
  margin: 1.25rem 0 0.5rem 0.25rem;
}
.dash-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 1rem; margin-bottom: 2.5rem;
}
.dash-stat-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}
.dash-stat-card:hover { border-color: rgba(216,63,26,0.25); transform: translateY(-2px); }
.dash-stat-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.dash-stat-val  { font-size: 2rem; font-weight: 800; color: var(--light); margin-bottom: 0.2rem; font-family: var(--font-en); }
.dash-stat-lbl  { font-size: 0.75rem; color: var(--mid); }
.dash-section-title {
  font-size: 1.1rem; font-weight: 700; color: var(--light);
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem;
}
.dash-section-title::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,0.06);
  margin-inline-start: 0.75rem;
}
.dash-card {
  background: var(--card-bg);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 1.5rem; margin-bottom: 1.25rem;
}
.profile-score-bar {
  height: 8px; background: rgba(255,255,255,0.07);
  border-radius: 999px; overflow: hidden; margin-top: 0.75rem;
}
.profile-score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #ff6b35);
  border-radius: 999px; transition: width 1.2s ease;
}
.dash-action-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--brand); color: #fff; border: none;
  border-radius: 8px; padding: 0.65rem 1.25rem;
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  text-decoration: none; transition: background 0.2s, transform 0.15s;
  font-family: var(--font-ar, 'Tajawal', sans-serif);
}
.dash-action-btn:hover { background: #c0360e; transform: translateY(-1px); }
.dash-action-btn.ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12); color: var(--light);
}
.dash-action-btn.ghost:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.04); }

@media (max-width: 768px) {
  .dash-wrap { flex-direction: column; }
  .dash-sidebar {
    width: 100%; height: auto; position: static;
    border-inline-end: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 0.75rem 1rem;
    display: flex; flex-wrap: wrap; gap: 0.25rem;
  }
  .dash-nav-section { display: none; }
  .dash-main { padding: 1.5rem 1.25rem; }
  .dash-stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .dash-stat-grid { grid-template-columns: 1fr; }
  .cs-stats-row { grid-template-columns: 1fr 1fr; }
}
