/* ===== FAIR DEAL TECHNOLOGY - ADVANCED STYLES ===== */
/* Premium Visual Enhancements */

/* ===== PRELOADER ===== */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--blue-dark);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}
.preloader-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  animation: preloader-pulse 1s ease infinite;
}
@keyframes preloader-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.preloader-hex {
  width: 60px; height: 60px;
  background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 900; color: white;
  font-family: var(--font-en);
}
.preloader-text { color: white; font-size: 1.4rem; font-weight: 700; }
.preloader-text span { color: var(--orange-primary); }
.preloader-bar {
  width: 200px; height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  overflow: hidden;
}
.preloader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-light), var(--orange-primary));
  border-radius: 2px;
  animation: preloader-fill 1.5s ease forwards;
}
@keyframes preloader-fill {
  from { width: 0; }
  to { width: 100%; }
}

/* ===== SCROLL TO TOP ===== */
#scroll-top {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-medium));
  color: white;
  border: none;
  border-radius: 14px;
  font-size: 18px;
  cursor: pointer;
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(13,59,122,0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
}
#scroll-top.visible {
  transform: translateY(0);
  opacity: 1;
}
#scroll-top:hover {
  background: linear-gradient(135deg, var(--orange-primary), var(--orange-dark));
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(244,124,32,0.5);
}

/* ===== WHATSAPP BUTTON ===== */
#whatsapp-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 54px; height: 54px;
  background: #25d366;
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 8px 24px rgba(37,211,102,0.5);
  z-index: 500;
  transition: all 0.3s ease;
  animation: wa-bounce 3s ease infinite;
}
#whatsapp-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 12px 36px rgba(37,211,102,0.7);
}
@keyframes wa-bounce {
  0%, 80%, 100% { transform: scale(1); }
  40% { transform: scale(1.1); }
}

/* ===== ENHANCED HERO ===== */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  animation: particle-float linear infinite;
}
@keyframes particle-float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}
.hero-image-side {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 42%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.hero-tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  opacity: 0.12;
  transform: rotate(-8deg);
}
.hero-tech-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: white;
  font-size: 28px;
}

/* ===== FEATURE TICKER ===== */
.ticker-bar {
  background: linear-gradient(90deg, var(--orange-primary), var(--orange-dark));
  padding: 10px 0;
  overflow: hidden;
}
.ticker-track {
  display: flex;
  gap: 60px;
  animation: ticker-move 25s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 14px;
  font-weight: 600;
}
.ticker-item i { font-size: 16px; }
@keyframes ticker-move {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ===== ENHANCED CARDS ===== */
.news-card, .system-card {
  position: relative;
}
.news-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
              linear-gradient(135deg, var(--blue-primary), var(--orange-primary)) border-box;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.news-card:hover::after { opacity: 1; }

/* ===== ADVANCED SECTION BACKGROUNDS ===== */
.section-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none'%3E%3Cg fill='%230d3b7a' fill-opacity='0.04'%3E%3Cpath d='M40 0L0 40l40 40 40-40z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ===== TESTIMONIALS ===== */
.testimonials-section {
  background: linear-gradient(135deg, var(--blue-dark) 0%, #0f2952 100%);
  padding: 80px 0;
  overflow: hidden;
  position: relative;
}
.testimonials-section::before {
  content: '"';
  position: absolute;
  top: -20px;
  right: 10%;
  font-size: 300px;
  color: rgba(244,124,32,0.06);
  font-family: Georgia, serif;
  line-height: 1;
}
.testimonials-track {
  display: flex;
  gap: 28px;
  animation: testimonials-scroll 35s linear infinite;
  width: max-content;
}
.testimonials-track:hover { animation-play-state: paused; }
@keyframes testimonials-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.testimonial-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-width: 340px;
  max-width: 340px;
  transition: var(--transition);
  flex-shrink: 0;
}
.testimonial-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-4px);
  border-color: var(--orange-primary);
}
.testimonial-stars { color: #ffd700; margin-bottom: 12px; font-size: 15px; }
.testimonial-text {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  line-height: 2;
  margin-bottom: 20px;
  font-style: italic;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 46px; height: 46px;
  background: linear-gradient(135deg, var(--orange-primary), var(--blue-light));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.testimonial-name {
  font-weight: 700;
  color: white;
  font-size: 15px;
  display: block;
}
.testimonial-role { font-size: 12px; color: var(--orange-primary); }

/* ===== TECHNOLOGY STACK ===== */
.tech-stack-section { background: var(--gray-100); padding: 60px 0; }
.tech-stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: center;
}
.tech-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 12px 20px;
  font-weight: 700;
  color: var(--gray-800);
  font-size: 14px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.tech-badge:hover {
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.tech-badge i { font-size: 22px; }
.tech-badge .fab.fa-python { color: #3776ab; }
.tech-badge .fab.fa-js { color: #f7df1e; }
.tech-badge .fab.fa-react { color: #61dafb; }
.tech-badge .fab.fa-html5 { color: #e34f26; }
.tech-badge .fab.fa-css3-alt { color: #1572b6; }
.tech-badge .fab.fa-android { color: #3ddc84; }
.tech-badge .fab.fa-apple { color: #555; }
.tech-badge .fab.fa-docker { color: #2496ed; }
.tech-badge .fas.fa-database { color: var(--blue-primary); }
.tech-badge .fab.fa-linux { color: #333; }

/* ===== PROCESS STEPS ===== */
.process-section { padding: 80px 0; }
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin-top: 48px;
}
.process-steps::before {
  content: '';
  position: absolute;
  top: 38px;
  right: 12.5%;
  left: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, var(--blue-primary), var(--orange-primary));
  z-index: 0;
}
.process-step {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 16px;
}
.process-step-num {
  width: 76px; height: 76px;
  background: white;
  border: 3px solid var(--blue-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--blue-primary);
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}
.process-step:hover .process-step-num {
  background: var(--blue-primary);
  color: white;
  transform: scale(1.1);
  border-color: var(--orange-primary);
}
.process-step h4 {
  font-weight: 700;
  color: var(--blue-primary);
  margin-bottom: 8px;
  font-size: 1rem;
}
.process-step p { font-size: 13px; color: var(--gray-600); line-height: 1.7; }

/* ===== ADVANCED COUNTER BAR ===== */
.live-stats-bar {
  background: var(--blue-dark);
  padding: 16px 0;
  border-bottom: 3px solid var(--orange-primary);
}
.live-stats-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.live-stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.live-stat-icon {
  width: 40px; height: 40px;
  background: rgba(244,124,32,0.15);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--orange-primary);
}
.live-stat-num {
  font-size: 1.3rem;
  font-weight: 900;
  color: white;
  line-height: 1;
  display: block;
}
.live-stat-label { font-size: 11px; color: rgba(255,255,255,0.5); }

/* ===== ENHANCED NEWS DETAIL ===== */
.article-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: transparent;
  z-index: 9999;
}
.article-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-primary), var(--orange-primary));
  width: 0;
  transition: width 0.1s linear;
}

.article-toc {
  background: var(--blue-pale);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
  border-right: 4px solid var(--blue-primary);
}
.article-toc h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-primary);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.article-toc ul { padding-right: 16px; }
.article-toc li { margin-bottom: 6px; }
.article-toc a { font-size: 13px; color: var(--gray-600); }
.article-toc a:hover { color: var(--orange-primary); }

/* ===== ENHANCED FOOTER ===== */
.footer-wave {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}
.footer-wave svg { display: block; }

/* ===== SEARCH BAR ===== */
.search-bar-section {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
  padding: 30px 0;
}
.search-input-wrapper {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}
.search-input {
  width: 100%;
  padding: 16px 56px 16px 20px;
  border-radius: 50px;
  border: 3px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: white;
  font-size: 15px;
  outline: none;
  font-family: var(--font-ar);
  transition: var(--transition);
}
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-input:focus {
  border-color: var(--orange-primary);
  background: rgba(255,255,255,0.15);
}
.search-btn {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--orange-primary);
  color: white;
  border: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.search-btn:hover { background: var(--orange-dark); }

/* ===== NOTIFICATION TOAST ===== */
.toast-container {
  position: fixed;
  top: 90px;
  left: 20px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: white;
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  border-right: 4px solid var(--blue-primary);
  font-size: 14px;
  min-width: 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.4s ease both;
  transition: var(--transition);
}
.toast.success { border-right-color: #10b981; }
.toast.error { border-right-color: #ef4444; }
.toast i { font-size: 18px; }
.toast.success i { color: #10b981; }
.toast.error i { color: #ef4444; }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ===== TAG CLOUD ===== */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  display: inline-block;
  background: var(--gray-100);
  color: var(--gray-600);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
}
.tag-pill:hover {
  background: var(--blue-primary);
  color: white;
  border-color: var(--blue-primary);
}

/* ===== ENHANCED MODULES ===== */
.module-card {
  position: relative;
  overflow: hidden;
}
.module-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%; height: 100%;
  background: radial-gradient(circle, rgba(13,59,122,0.05) 0%, transparent 70%);
  transition: var(--transition);
}
.module-card:hover::before {
  top: 0; right: 0;
  background: radial-gradient(circle, rgba(244,124,32,0.08) 0%, transparent 70%);
}

/* ===== COOKIE CONSENT ===== */
.cookie-bar {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background: var(--blue-dark);
  color: white;
  padding: 16px 0;
  z-index: 5000;
  border-top: 3px solid var(--orange-primary);
  transform: translateY(100%);
  transition: transform 0.4s ease;
}
.cookie-bar.show { transform: translateY(0); }
.cookie-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-bar p { font-size: 13px; color: rgba(255,255,255,0.8); max-width: 600px; }
.cookie-bar a { color: var(--orange-primary); }
.cookie-accept {
  background: var(--orange-primary);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-ar);
  white-space: nowrap;
  transition: var(--transition);
}
.cookie-accept:hover { background: var(--orange-dark); }

/* ===== STATS DASHBOARD ===== */
.stats-dashboard {
  background: var(--gray-100);
  min-height: 100vh;
  padding: 40px 0;
}
.stats-header-card {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-primary));
  border-radius: var(--radius-lg);
  padding: 28px;
  color: white;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.stats-header-card h2 { font-size: 1.5rem; font-weight: 700; }
.stats-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stats-mini-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  display: flex;
  gap: 14px;
  align-items: center;
}
.stats-mini-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stats-mini-icon.blue { background: var(--blue-pale); color: var(--blue-primary); }
.stats-mini-icon.orange { background: var(--orange-pale); color: var(--orange-primary); }
.stats-mini-icon.green { background: #d1fae5; color: #059669; }
.stats-mini-icon.purple { background: #ede9fe; color: #7c3aed; }
.stats-mini-num { font-size: 1.6rem; font-weight: 900; color: var(--text-dark); display: block; }
.stats-mini-label { font-size: 12px; color: var(--gray-400); }
.stats-chart-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
}
.stats-chart-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-200);
  display: flex; align-items: center; gap: 8px;
}
.stats-chart-card h3 i { color: var(--orange-primary); }
.visits-chart-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.visits-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.visits-bar-date { font-size: 12px; color: var(--gray-400); min-width: 80px; text-align: left; direction: ltr; }
.visits-bar-track {
  flex: 1;
  height: 10px;
  background: var(--gray-100);
  border-radius: 5px;
  overflow: hidden;
}
.visits-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue-primary), var(--orange-primary));
  border-radius: 5px;
  transition: width 1s ease;
}
.visits-bar-num { font-size: 12px; font-weight: 700; color: var(--gray-800); min-width: 40px; }

/* ===== MOBILE NAV ENHANCED ===== */
@media (max-width: 768px) {
  .main-nav ul {
    padding: 8px 0;
  }
  .main-nav li a {
    padding: 12px 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
  }
  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .process-steps::before { display: none; }
  .stats-mini-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-card { min-width: 280px; max-width: 280px; }
  #scroll-top { bottom: 20px; left: 20px; }
  #whatsapp-btn { bottom: 20px; right: 20px; }
  .hero-image-side { display: none; }
}

@media (max-width: 480px) {
  .stats-mini-grid { grid-template-columns: 1fr; }
}

/* ===== PRINT STYLES ===== */
@media print {
  .site-header, .live-bar, .newsletter-section, .site-footer,
  #scroll-top, #whatsapp-btn, .cookie-bar, #preloader { display: none !important; }
  body { font-size: 12pt; color: black; }
  a { color: black; }
  .page-banner { background: #eee !important; color: black !important; }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue-primary), var(--orange-primary));
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--orange-primary); }

/* ===== SELECTION COLOR ===== */
::selection { background: var(--orange-primary); color: white; }

/* ===== FOCUS VISIBLE ===== */
:focus-visible {
  outline: 3px solid var(--orange-primary);
  outline-offset: 2px;
  border-radius: 4px;
}
