/**
 * شبكة الحسكة الإعلامية — حزمة التصميم والتخصيص المتقدم
 * HMN Sport Master Theme: Dark/Light Mode, Mood Color Switcher, Font Zoom & 4 Dock Designs
 * الإصدار: 4.0.0 (Awwwards-Grade Interactive UI)
 */

/* ==========================================================================
   1. متغيرات الألوان وأنماط المزاج (Mood Themes & Design Tokens)
   ========================================================================== */
:root {
  /* المزاج الافتراضي: الكحلي الملكي (Royal Navy) */
  --hmn-primary: #102f53;
  --hmn-primary-hover: #0c233f;
  --hmn-accent: #3b82f6;
  --hmn-accent-glow: rgba(59, 130, 246, 0.35);
  --hmn-gradient: linear-gradient(135deg, #102f53 0%, #1e40af 100%);
  --hmn-badge-bg: #e12729;
  
  /* مقياس الخط الافتراضي (Font Scaling) */
  --hmn-font-scale: 1;
  
  /* ألوان الوضع النهاري (Light Mode) */
  --hmn-bg-body: #f8fafc;
  --hmn-bg-card: #ffffff;
  --hmn-bg-header: #102f53;
  --hmn-text-main: #0f172a;
  --hmn-text-muted: #64748b;
  --hmn-border: #e2e8f0;
  --hmn-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  --hmn-dock-bg: rgba(255, 255, 255, 0.82);
  --hmn-dock-border: rgba(255, 255, 255, 0.6);
  --hmn-dock-text: #0f172a;
}

/* 2. حالات المزاج اللوني (Mood Color Palettes) */
html[data-mood="navy"] {
  --hmn-primary: #102f53;
  --hmn-primary-hover: #0a1e36;
  --hmn-accent: #3b82f6;
  --hmn-accent-glow: rgba(59, 130, 246, 0.4);
  --hmn-gradient: linear-gradient(135deg, #102f53 0%, #1e40af 100%);
  --hmn-bg-header: #102f53;
}

html[data-mood="gold"] {
  --hmn-primary: #b45309;
  --hmn-primary-hover: #92400e;
  --hmn-accent: #f59e0b;
  --hmn-accent-glow: rgba(245, 158, 11, 0.4);
  --hmn-gradient: linear-gradient(135deg, #78350f 0%, #d97706 100%);
  --hmn-bg-header: #78350f;
}

html[data-mood="crimson"] {
  --hmn-primary: #b91c1c;
  --hmn-primary-hover: #991b1b;
  --hmn-accent: #ef4444;
  --hmn-accent-glow: rgba(239, 68, 68, 0.4);
  --hmn-gradient: linear-gradient(135deg, #7f1d1d 0%, #dc2626 100%);
  --hmn-bg-header: #7f1d1d;
}

html[data-mood="emerald"] {
  --hmn-primary: #047857;
  --hmn-primary-hover: #065f46;
  --hmn-accent: #10b981;
  --hmn-accent-glow: rgba(16, 185, 129, 0.4);
  --hmn-gradient: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  --hmn-bg-header: #064e3b;
}

html[data-mood="violet"] {
  --hmn-primary: #6d28d9;
  --hmn-primary-hover: #5b21b6;
  --hmn-accent: #8b5cf6;
  --hmn-accent-glow: rgba(139, 92, 246, 0.4);
  --hmn-gradient: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%);
  --hmn-bg-header: #4c1d95;
}

html[data-mood="sunset"] {
  --hmn-primary: #c2410c;
  --hmn-primary-hover: #9a3412;
  --hmn-accent: #f97316;
  --hmn-accent-glow: rgba(249, 115, 22, 0.4);
  --hmn-gradient: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%);
  --hmn-bg-header: #7c2d12;
}

/* 3. الوضع الليلي (Dark Mode) */
html[data-theme="dark"] {
  --hmn-bg-body: #0b1120;
  --hmn-bg-card: #131c31;
  --hmn-text-main: #f8fafc;
  --hmn-text-muted: #94a3b8;
  --hmn-border: #1e293b;
  --hmn-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --hmn-dock-bg: rgba(15, 23, 42, 0.85);
  --hmn-dock-border: rgba(255, 255, 255, 0.12);
  --hmn-dock-text: #f8fafc;
}

html[data-theme="dark"] body.home-style8 {
  background-color: var(--hmn-bg-body) !important;
  color: var(--hmn-text-main) !important;
}

html[data-theme="dark"] .bg-gray4 {
  background-color: var(--hmn-bg-body) !important;
}

html[data-theme="dark"] .bg-white {
  background-color: var(--hmn-bg-card) !important;
  color: var(--hmn-text-main) !important;
}

html[data-theme="dark"] .text-dark,
html[data-theme="dark"] h1, 
html[data-theme="dark"] h2, 
html[data-theme="dark"] h3, 
html[data-theme="dark"] h4, 
html[data-theme="dark"] h5, 
html[data-theme="dark"] h6 {
  color: #f1f5f9 !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] .text-muted {
  color: var(--hmn-text-muted) !important;
}

html[data-theme="dark"] .border,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border-top {
  border-color: var(--hmn-border) !important;
}

html[data-theme="dark"] .results-navbar {
  background-color: #111a2e !important;
  border-bottom: 1px solid #1e293b;
}

html[data-theme="dark"] .tc-featured-news-sport .news-card,
html[data-theme="dark"] .tc-whats-new-sport .card-item,
html[data-theme="dark"] .tc-columnist-sport,
html[data-theme="dark"] .widget-Standings,
html[data-theme="dark"] .categories-box {
  background-color: var(--hmn-bg-card) !important;
  border-color: var(--hmn-border) !important;
}

/* 4. تغيير حجم الخط ديناميكياً (Font Scaling) */
html[data-font-size="sm"] { --hmn-font-scale: 0.9; }
html[data-font-size="md"] { --hmn-font-scale: 1; }
html[data-font-size="lg"] { --hmn-font-scale: 1.12; }
html[data-font-size="xl"] { --hmn-font-scale: 1.25; }

body {
  font-size: calc(15px * var(--hmn-font-scale)) !important;
  transition: background-color 0.3s ease, color 0.3s ease;
}

p, a, span, button, input {
  font-size: calc(1em * var(--hmn-font-scale));
}

/* تطبيق اللون النشط على الهيدر والخلفيات الرئيسية */
.bg-blue2, .navbar-container.bg-blue2 {
  background: var(--hmn-gradient) !important;
  transition: background 0.4s ease;
}

/* ==========================================================================
   5. شريط أدوات التحكم العلوي (Mood & Font Toolbar)
   ========================================================================== */
.hmn-top-controls {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 14px;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
}

.hmn-mood-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hmn-mood-circle:hover {
  transform: scale(1.3);
  border-color: #ffffff;
}
.hmn-mood-circle.active {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

.hmn-font-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hmn-font-btn:hover, .hmn-font-btn.active {
  background: #ffffff;
  color: var(--hmn-primary);
  border-color: #ffffff;
}

/* ==========================================================================
   6. النماذج الأربعة للدك العائم (4 Master Dock Designs)
   ========================================================================== */

/* الحاوية الأساسية للدك */
.hmn-floating-dock-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
}

/* --------------------------------------------------------------------------
   DESIGN 1: macOS Glassmorphic Capsule (كابسولة زجاجية ماك أو إس)
   -------------------------------------------------------------------------- */
.dock-style-macos {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--hmn-dock-bg);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid var(--hmn-dock-border);
  border-radius: 40px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.dock-style-macos .dock-item {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--hmn-dock-text);
  text-decoration: none;
  font-size: 20px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-style-macos .dock-item:hover {
  transform: translateY(-8px) scale(1.18);
  background: var(--hmn-accent);
  color: #ffffff !important;
  box-shadow: 0 10px 20px var(--hmn-accent-glow);
}

.dock-style-macos .dock-item.active {
  background: var(--hmn-primary);
  color: #ffffff !important;
}

.dock-style-macos .dock-item.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hmn-accent);
}

/* --------------------------------------------------------------------------
   DESIGN 2: VisionOS 3D Floating Island (جزيرة فيجن أو إس ثلاثية الأبعاد)
   -------------------------------------------------------------------------- */
.dock-style-visionos {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(35px) saturate(200%);
  -webkit-backdrop-filter: blur(35px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 25px var(--hmn-accent-glow);
  transform: perspective(600px) rotateX(4deg);
}

.dock-style-visionos .dock-item {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  font-size: 21px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-style-visionos .dock-item:hover {
  transform: translateY(-6px) scale(1.15) translateZ(20px);
  background: var(--hmn-gradient);
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   DESIGN 3: Apple Dynamic Island Pill (حبة الجزيرة الذكية التفاعلية)
   -------------------------------------------------------------------------- */
.dock-style-dynamic {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  color: #ffffff;
}

.dock-style-dynamic .dock-live-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  color: #22c55e;
}

.dock-style-dynamic .dock-pulse-dot {
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: hmnPulse 1.5s infinite;
}

.dock-style-dynamic .dock-item {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  transition: all 0.2s ease;
}

.dock-style-dynamic .dock-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   DESIGN 4: Cyber Sport Tactical HUD (شريط السايبر الرياضي التكتيكي)
   -------------------------------------------------------------------------- */
.dock-style-cybersport {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: linear-gradient(180deg, #111827 0%, #030712 100%);
  border: 2px solid var(--hmn-accent);
  border-radius: 12px;
  box-shadow: 0 0 20px var(--hmn-accent-glow), inset 0 0 15px rgba(0, 0, 0, 0.8);
  clip-path: polygon(12px 0%, calc(100% - 12px) 0%, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0% calc(100% - 12px), 0% 12px);
}

.dock-style-cybersport .dock-item {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  text-decoration: none;
  font-size: 20px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  transition: all 0.2s ease;
}

.dock-style-cybersport .dock-item:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px #38bdf8;
}

/* تلميحات الدك الذكية (Tooltips) */
.dock-tooltip {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background: #0f172a;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: all 0.2s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* فاصل بين عناصر الدك */
.dock-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 4px;
}

/* قائمة خيارات الدك المنبثقة */
.dock-menu-dropdown {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--hmn-bg-card);
  border: 1px solid var(--hmn-border);
  border-radius: 16px;
  padding: 12px;
  min-width: 220px;
  box-shadow: var(--hmn-shadow);
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 100000;
}
.dock-menu-dropdown.show {
  display: flex;
}

@keyframes hmnPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (max-width: 768px) {
  .hmn-floating-dock-container {
    bottom: 12px;
    width: 95%;
  }
  .dock-style-macos, .dock-style-visionos, .dock-style-dynamic, .dock-style-cybersport {
    padding: 6px 10px;
    gap: 4px;
    justify-content: space-around;
    width: 100%;
  }
  .dock-item {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }
}

/* ==========================================================================
   4. ترندات عربية وفلاتر التصنيفات وتبويبات الأخبار الدولية القابلة للتخصيص
   ========================================================================== */

/* ترندات عربية حية */
.hot-trends-tabs-style1 .trend-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 47, 83, 0.05);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--hmn-text-main, #1e293b);
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: all 0.25s ease;
  white-space: nowrap;
  text-decoration: none !important;
}
.hot-trends-tabs-style1 .trend-tag:hover {
  background: var(--hmn-primary, #102f53);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 47, 83, 0.15);
}
.hot-trends-tabs-style1 .trend-rank {
  font-size: 11px;
  background: var(--hmn-accent, #3b82f6);
  color: #fff;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: bold;
}
html[data-theme="dark"] .hot-trends-tabs-style1 .trend-tag {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}
html[data-theme="dark"] .hot-trends-tabs-style1 .trend-tag:hover {
  background: var(--hmn-accent, #3b82f6);
  color: #ffffff !important;
}

/* فلاتر التصنيفات في ترويسات الأقسام (Hasakah & Syria & Middle East Taxonomy) */
.taxonomy-control .cat-filter {
  color: #64748b;
  font-weight: 600;
  font-size: 13px;
  padding: 4px 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  text-decoration: none !important;
  display: inline-block;
}
.taxonomy-control .cat-filter:hover,
.taxonomy-control .cat-filter.active {
  background: var(--hmn-primary, #102f53);
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(16, 47, 83, 0.2);
}
html[data-theme="dark"] .taxonomy-control .cat-filter {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}
html[data-theme="dark"] .taxonomy-control .cat-filter:hover,
html[data-theme="dark"] .taxonomy-control .cat-filter.active {
  background: var(--hmn-accent, #3b82f6);
  color: #ffffff !important;
}

/* فلاتر شريط الأخبار السورية (شريط أحمر عاجل) */
.tc-breaking-title .taxonomy-control .cat-filter {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
}
.tc-breaking-title .taxonomy-control .cat-filter:hover,
.tc-breaking-title .taxonomy-control .cat-filter.active {
  background: #ffffff;
  color: #b91c1c !important;
  font-weight: bold;
}

/* تبويبات الأخبار الدولية القابلة للتعديل */
#pills-tab-intl {
  gap: 4px;
}
#pills-tab-intl .nav-link {
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  border-radius: 20px;
  padding: 6px 14px;
  background: #f1f5f9;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
#pills-tab-intl .nav-link:hover {
  background: #e2e8f0;
  color: #0f172a;
}
#pills-tab-intl .nav-link.active {
  background: var(--hmn-primary, #102f53) !important;
  color: #ffffff !important;
  border-color: var(--hmn-accent, #3b82f6);
  box-shadow: 0 4px 12px rgba(16, 47, 83, 0.18);
}
html[data-theme="dark"] #pills-tab-intl .nav-link {
  background: #1e293b;
  color: #cbd5e1;
}
html[data-theme="dark"] #pills-tab-intl .nav-link.active {
  background: var(--hmn-accent, #3b82f6) !important;
  color: #ffffff !important;
}

.bg-gold {
  background-color: #d97706 !important;
  color: #fff !important;
}
