/* ======================================================
   روابط غزة — Design System
   Lightweight, RTL-first, Mobile-first CSS
   ====================================================== */

/* --- Google Fonts (Cairo — Arabic sans-serif) --- */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Primary Palette */
  --primary-dark: #0E3A4D;
  --primary: #1A6B8A;
  --primary-light: #2A8BAA;
  --primary-gradient: linear-gradient(135deg, #0E3A4D 0%, #1A6B8A 50%, #2A8BAA 100%);

  /* Backgrounds */
  --bg-body: #F5F1EB;
  --bg-card: #FFFFFF;
  --bg-section: #EDE9E3;
  --bg-hero: linear-gradient(160deg, #0B2E3D 0%, #14536E 50%, #1A6B8A 100%);

  /* Text */
  --text-primary: #1A1A2E;
  --text-secondary: #4A5568;
  --text-muted: #6B7280;
  --text-on-dark: #FFFFFF;
  --text-on-dark-muted: rgba(255, 255, 255, 0.75);

  /* Accents */
  --accent-orange: #F97316;
  --accent-red: #EF4444;
  --accent-gradient: linear-gradient(135deg, #F97316 0%, #EF4444 100%);

  /* Status Colors */
  --status-active: #10B981;
  --status-active-bg: rgba(16, 185, 129, 0.12);
  --status-expiring: #F59E0B;
  --status-expiring-bg: rgba(245, 158, 11, 0.12);
  --status-closed: #EF4444;
  --status-closed-bg: rgba(239, 68, 68, 0.12);

  /* Borders & Shadows */
  --border-color: #E5E1DB;
  --border-radius-sm: 6px;
  --border-radius: 10px;
  --border-radius-lg: 16px;
  --border-radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography Scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --header-height: 60px;
  --max-width: 1100px;
}

/* --- Dark Mode --- */
[data-theme="dark"] {
  --bg-body: #0F172A;
  --bg-card: #1E293B;
  --bg-section: #162032;
  --bg-hero: linear-gradient(160deg, #0B1929 0%, #0E3A4D 50%, #14536E 100%);
  --text-primary: #E2E8F0;
  --text-secondary: #B0BEC5;
  --text-muted: #94A3B8;
  --border-color: #2D3A4A;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);
  --status-active-bg: rgba(16, 185, 129, 0.2);
  --status-expiring-bg: rgba(245, 158, 11, 0.2);
  --status-closed-bg: rgba(239, 68, 68, 0.2);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  font-size: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  direction: rtl;
}

ul, ol {
  list-style: none;
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* --- Fade-in Animation --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ======================================================
   HEADER
   ====================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary-dark);
  height: var(--header-height);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-on-dark);
  font-weight: 800;
  font-size: var(--text-lg);
}

.header__logo-icon {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header__nav-link {
  color: var(--text-on-dark-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.header__nav-link:hover,
.header__nav-link.active {
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.1);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-theme-toggle {
  color: var(--text-on-dark-muted);
  font-size: var(--text-xl);
  padding: var(--space-xs);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.btn-theme-toggle:hover {
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.1);
}

/* Mobile menu toggle */
.header__menu-btn {
  display: none;
  color: var(--text-on-dark);
  font-size: var(--text-xl);
  padding: var(--space-xs);
}

@media (max-width: 767px) {
  .header__nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    background: var(--primary-dark);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-xs);
    box-shadow: var(--shadow-lg);
    animation: slideDown var(--transition) forwards;
  }

  .header__nav.open {
    display: flex;
  }

  .header__nav-link {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    text-align: right;
  }

  .header__menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
  }
}

/* ======================================================
   HERO SECTION
   ====================================================== */

/* Map-specific animations */
@keyframes mapFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes mapDotPulse {
  0% { r: 7; opacity: 0.6; }
  50% { r: 12; opacity: 0; }
  100% { r: 7; opacity: 0; }
}

@keyframes mapDotPulse2 {
  0% { r: 6; opacity: 0.6; }
  50% { r: 11; opacity: 0; }
  100% { r: 6; opacity: 0; }
}

@keyframes mapGlow {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes mapLandShimmer {
  0% { fill-opacity: 1; }
  50% { fill-opacity: 0.85; }
  100% { fill-opacity: 1; }
}

.hero {
  background: var(--bg-hero);
  padding: var(--space-2xl) 0 var(--space-lg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(42, 139, 170, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -15%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Two-column hero layout */
.hero__layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  position: relative;
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: right;
  flex: 1;
  max-width: 550px;
}

.hero__title {
  color: var(--text-on-dark);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: var(--space-md);
  animation: fadeInUp var(--transition-slow) forwards;
}

.hero__title span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__desc {
  color: var(--text-on-dark-muted);
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  animation: fadeInUp var(--transition-slow) 100ms forwards;
  opacity: 0;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--text-on-dark);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: var(--text-base);
  padding: var(--space-sm) var(--space-xl);
  border-radius: var(--border-radius-full);
  border: 2px solid transparent;
  transition: all var(--transition);
  animation: fadeInUp var(--transition-slow) 200ms forwards;
  opacity: 0;
}

.hero__cta:hover {
  background: transparent;
  color: var(--text-on-dark);
  border-color: var(--text-on-dark);
}

.hero__scroll-hint {
  display: block;
  text-align: center;
  padding-bottom: var(--space-sm);
  color: var(--text-on-dark-muted);
  font-size: var(--text-2xl);
  animation: pulse 2s infinite;
  opacity: 0.6;
}

/* ======================================================
   GAZA MAP IN HERO
   ====================================================== */
.hero__map-wrapper {
  position: relative;
  flex-shrink: 0;
  width: 320px;
  animation: fadeInUp 0.6s 0.3s both;
}

.hero__map-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 380px;
  background: radial-gradient(ellipse, rgba(249, 115, 22, 0.15) 0%, rgba(42, 139, 170, 0.08) 40%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: mapGlow 4s ease-in-out infinite;
}

.hero__map-card {
  position: relative;
  background: rgba(14, 58, 77, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(42, 139, 170, 0.2);
  border-radius: 20px;
  padding: 12px 12px 8px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 60px rgba(249, 115, 22, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: mapFloat 6s ease-in-out infinite;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero__map-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.25),
    0 0 80px rgba(249, 115, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero__map-canvas {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* City animations handled by SVG SMIL - no CSS needed */

/* Land entrance */
.hero__map-land {
  opacity: 0;
}

/* Map legend */
.hero__map-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 4px;
}

.hero__map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  font-family: 'Cairo', sans-serif;
}

@keyframes legendDotPulse {
  0%, 100% { box-shadow: 0 0 4px rgba(249, 115, 22, 0.5), 0 0 0 0 rgba(249, 115, 22, 0.4); }
  50% { box-shadow: 0 0 8px rgba(249, 115, 22, 0.8), 0 0 0 6px rgba(249, 115, 22, 0); }
}

.hero__map-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #F97316;
  box-shadow: 0 0 6px rgba(249, 115, 22, 0.5);
}

.hero__map-legend-dot--pulse {
  animation: legendDotPulse 2s ease-in-out infinite;
}

.hero__map-legend-line {
  width: 16px;
  height: 0;
  border-top: 1.5px dashed rgba(249, 115, 22, 0.5);
}

/* ======================================================
   HERO RESPONSIVE
   ====================================================== */

/* Mobile: stack layout, smaller map */
@media (max-width: 767px) {
  .hero {
    padding: var(--space-xl) 0 var(--space-md);
  }

  .hero__layout {
    flex-direction: column;
    text-align: center;
  }

  .hero__content {
    text-align: center;
    order: 2;
    max-width: 100%;
  }

  .hero__map-wrapper {
    order: 1;
    width: 240px;
    margin: 0 auto;
  }

  .hero__map-glow {
    width: 200px;
    height: 280px;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero__map-wrapper {
    width: 260px;
  }

  .hero__title {
    font-size: var(--text-3xl);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .hero {
    padding: var(--space-3xl) 0 var(--space-xl);
  }

  .hero__title {
    font-size: var(--text-4xl);
  }

  .hero__map-wrapper {
    width: 340px;
  }
}

/* ======================================================
   PWA INSTALL BOTTOM SHEET
   ====================================================== */
@keyframes sheetSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes sheetSlideDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounceIn {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.15); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes checkPop {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  60% { transform: scale(1.2) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.install-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  display: none;
  animation: overlayFadeIn 0.3s ease forwards;
}

.install-sheet-overlay.open {
  display: block;
}

.install-sheet {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 400px;
  z-index: 9999;
  background: var(--bg-card);
  border-radius: 24px;
  padding: 24px 24px 32px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, 50%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
  will-change: transform;
}

.install-sheet.open {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: auto;
}

.install-sheet.closing {
  animation: sheetSlideDownCentral 0.35s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

@keyframes sheetSlideDownCentral {
  from { transform: translate(-50%, -50%); opacity: 1; }
  to { transform: translate(-50%, 50%); opacity: 0; }
}

.install-sheet__handle {
  display: none;
}

.install-sheet__close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-section);
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
}

.install-sheet__close:hover {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-red);
}

.install-sheet__content {
  text-align: center;
}

.install-sheet__icon-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
}

.install-sheet__icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(14, 58, 77, 0.25);
  animation: bounceIn 0.5s 0.2s both;
}

.install-sheet__badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 24px;
  height: 24px;
  background: var(--status-active);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
  animation: checkPop 0.4s 0.5s both;
}

.install-sheet__title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.install-sheet__subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: 20px;
}

.install-sheet__features {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.install-sheet__feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: var(--bg-section);
  padding: 6px 12px;
  border-radius: var(--border-radius-full);
  border: 1px solid var(--border-color);
}

.install-sheet__feature-icon {
  font-size: 14px;
}

.install-sheet__btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 24px;
  background: var(--primary-gradient);
  color: white;
  font-weight: 700;
  font-size: var(--text-base);
  border: none;
  border-radius: var(--border-radius-lg);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(14, 58, 77, 0.3);
}

.install-sheet__btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  background-size: 200% 100%;
  animation: shimmer 2.5s infinite;
}

.install-sheet__btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(14, 58, 77, 0.4);
}

.install-sheet__btn-primary:active {
  transform: translateY(0);
}

.install-sheet__btn-icon {
  font-size: 20px;
}

.install-sheet__btn-secondary {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.install-sheet__btn-secondary:hover {
  color: var(--text-primary);
}

/* iOS Step Guide */
.install-sheet__ios-guide {
  margin-top: 8px;
  text-align: right;
}

.install-sheet__ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-section);
  border-radius: var(--border-radius);
  margin-bottom: 8px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.install-sheet__ios-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-sheet__ios-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  border-radius: 6px;
  vertical-align: middle;
}

/* Install Success State */
.install-sheet__success {
  text-align: center;
  padding: 24px 0;
}

.install-sheet__success-check {
  font-size: 64px;
  margin-bottom: 12px;
  animation: bounceIn 0.5s both;
}

.install-sheet__success-title {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--status-active);
  margin-bottom: 8px;
}

.install-sheet__success-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ======================================================
   MINI INSTALL BANNER (Sticky Bottom)
   ====================================================== */
@keyframes miniSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.install-mini-banner {
  position: fixed;
  bottom: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 450px;
  z-index: 900;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: miniSlideUp 0.4s cubic-bezier(0.32, 0.72, 0, 1) forwards;
}

.install-mini-banner__content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.install-mini-banner__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(14, 58, 77, 0.2);
  flex-shrink: 0;
}

.install-mini-banner__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.install-mini-banner__text strong {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.install-mini-banner__text span {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.install-mini-banner__btn {
  flex-shrink: 0;
  padding: 8px 20px;
  background: var(--primary-gradient);
  color: white;
  font-weight: 700;
  font-size: var(--text-sm);
  border: none;
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(14, 58, 77, 0.25);
}

.install-mini-banner__btn:hover {
  transform: scale(1.05);
}

.install-mini-banner__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-section);
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.install-mini-banner__close:hover {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-red);
}

/* Dark mode enhancements */
[data-theme="dark"] .install-sheet {
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .install-mini-banner {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .install-sheet__icon {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Desktop: true centered modal */
@media (min-width: 768px) {
  .install-sheet {
    max-width: 420px;
    top: 50%;
    left: 50%;
    bottom: auto; /* override any bottom stickiness if it exists */
    transform: translate(-50%, -40%) scale(0.95);
    border-radius: 24px;
    opacity: 0;
  }

  .install-sheet.open {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  .install-mini-banner {
    bottom: var(--space-xl);
    max-width: 500px;
    animation: none;
  }
}

/* ======================================================
   STATS BAR
   ====================================================== */
.stats {
  padding: var(--space-xl) 0;
  background: var(--bg-body);
}

.stats__title {
  text-align: center;
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

.stats__count {
  color: var(--primary);
}

.stats__categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.stat-chip:hover,
.stat-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.stat-chip__icon {
  font-size: var(--text-base);
}

.stat-chip__count {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
  font-size: var(--text-xs);
  padding: 1px 6px;
  border-radius: var(--border-radius-full);
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.stat-chip:hover .stat-chip__count,
.stat-chip.active .stat-chip__count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

/* ======================================================
   SEARCH & FILTER SECTION
   ====================================================== */
.search-section {
  padding: var(--space-xl) 0;
  background: var(--bg-section);
}

.search-section__inner {
  max-width: 700px;
  margin: 0 auto;
}

.search-box {
  position: relative;
  margin-bottom: var(--space-md);
}

.search-box__input {
  width: 100%;
  padding: var(--space-sm) var(--space-lg) var(--space-sm) var(--space-2xl);
  font-size: var(--text-base);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-full);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: border-color var(--transition-fast);
  outline: none;
}

.search-box__input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 138, 0.15);
}

.search-box__input::placeholder {
  color: var(--text-muted);
}

.search-box__icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--text-lg);
  pointer-events: none;
}

.search-box__clear {
  position: absolute;
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: var(--text-sm);
  padding: 2px 6px;
  border-radius: var(--border-radius-sm);
  display: none;
}

.search-box__clear.visible {
  display: block;
}

.search-box__clear:hover {
  color: var(--accent-red);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
}

.filter-select {
  flex: 1;
  min-width: 180px;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
}

.filter-select:focus {
  border-color: var(--primary);
}

.btn-favorites {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-favorites:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-favorites.active {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-red);
}

.btn-status-filter {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-full);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--text-xs);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-status-filter:hover,
.btn-status-filter.active {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(26, 107, 138, 0.08);
}

/* ======================================================
   LINKS FEED
   ====================================================== */
.feed {
  padding: var(--space-xl) 0 var(--space-3xl);
}

.feed__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.feed__title {
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.feed__title-icon {
  color: var(--primary);
}

.feed__count {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 400;
}

.feed__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .feed__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feed__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* When sidebar is active on average 1024px desktop, shrink grid to 2 columns */
  .feed-with-sidebar .feed__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (min-width: 1350px) {
  /* Only go back to 3 columns with sidebar if the screen is super wide */
  .feed-with-sidebar .feed__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Empty State */
.feed__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-3xl) var(--space-md);
  color: var(--text-muted);
}

.feed__empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.feed__empty-text {
  font-size: var(--text-lg);
  font-weight: 600;
}

/* ======================================================
   LINK CARD
   ====================================================== */
.link-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.link-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--primary-light);
}

.link-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.link-card__category {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--primary);
  background: rgba(26, 107, 138, 0.1);
  padding: 2px 8px;
  border-radius: var(--border-radius-full);
  white-space: nowrap;
}

.link-card__status {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 10px;
  border-radius: var(--border-radius-full);
  white-space: nowrap;
}

.link-card__status--active {
  color: var(--status-active);
  background: var(--status-active-bg);
}

.link-card__status--expiring {
  color: var(--status-expiring);
  background: var(--status-expiring-bg);
}

.link-card__status--closed {
  color: var(--status-closed);
  background: var(--status-closed-bg);
}

.link-card__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-xs);
}

.link-card__logo {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  object-fit: contain;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover .link-card__logo {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

[data-theme="dark"] .link-card__logo {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.modal__title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--space-sm);
}

.modal__logo {
  width: 60px;
  height: 60px;
  min-width: 60px;
  border-radius: 14px;
  background: #fff;
  padding: 5px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
  object-fit: contain;
}

[data-theme="dark"] .modal__logo {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 3px 12px rgba(0,0,0,0.4);
}

.link-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.link-card__provider {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.link-card__provider-verified {
  color: var(--status-active);
  font-size: var(--text-sm);
}

.link-card__desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.link-card__tag {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-section);
  padding: 1px 8px;
  border-radius: var(--border-radius-full);
}

.link-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
}

.link-card__date {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.link-card__actions-mini {
  display: flex;
  gap: var(--space-xs);
}

.link-card__action {
  font-size: var(--text-sm);
  padding: var(--space-xs);
  border-radius: var(--border-radius-sm);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.link-card__action:hover {
  color: var(--primary);
  background: rgba(26, 107, 138, 0.1);
}

/* ── Card CTA Buttons ── */
.link-card__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: var(--space-sm);
  margin-top: var(--space-sm);
  border-top: 1px solid var(--border-color);
}

.link-card__btn {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 6px;
  border-radius: var(--border-radius);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1.5px solid transparent;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-card__btn svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

/* Primary Green Button — سجل الآن */
.link-card__btn--primary {
  background: var(--status-active);
  color: #fff;
  border-color: var(--status-active);
}

.link-card__btn--primary:hover {
  background: #0ea572;
  border-color: #0ea572;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
  transform: translateY(-1px);
}

/* Outlined Gray Button — اطلع على التفاصيل */
.link-card__btn--outline {
  background: var(--bg-section);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.link-card__btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(26, 107, 138, 0.06);
}

/* Save/Bookmark Button — حفظ الرابط */
.link-card__btn--save {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.link-card__btn--save:hover {
  background: rgba(26, 107, 138, 0.08);
  box-shadow: 0 2px 8px rgba(26, 107, 138, 0.15);
}

.link-card__btn--saved {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.link-card__btn--saved:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.link-card__new-badge {
  position: absolute;
  top: -1px;
  left: -1px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 0 0 var(--border-radius) 0;
  z-index: 1;
}

/* ======================================================
   MODAL (Link Details)
   ====================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  backdrop-filter: blur(2px);
}

.modal-overlay.open {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp var(--transition) forwards;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-card);
  z-index: 1;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal__close {
  font-size: var(--text-xl);
  color: var(--text-muted);
  padding: var(--space-xs);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.modal__close:hover {
  background: var(--bg-section);
  color: var(--text-primary);
}

.modal__body {
  padding: var(--space-xl);
}

@media (max-width: 767px) {
  .modal__body {
    padding: var(--space-lg);
  }
}

.modal__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--border-radius-full);
  margin-bottom: var(--space-md);
}

.modal__title {
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-sm);
  line-height: 1.4;
}

.modal__provider {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.modal__desc {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.modal__info {
  background: var(--bg-section);
  border-radius: var(--border-radius);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}

.modal__info-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-xs) 0;
  font-size: var(--text-sm);
}

.modal__info-row + .modal__info-row {
  border-top: 1px solid var(--border-color);
}

.modal__info-label {
  color: var(--text-muted);
  font-weight: 600;
}

.modal__info-value {
  color: var(--text-primary);
  font-weight: 700;
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: var(--text-base);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius);
  transition: all var(--transition);
  text-align: center;
}

.btn--primary {
  background: var(--primary);
  color: white;
}
.btn--primary:hover {
  background: var(--primary-light);
  color: white;
  box-shadow: var(--shadow);
}

.btn--accent {
  background: var(--accent-gradient);
  color: white;
}
.btn--accent:hover {
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
  color: white;
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
}
.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--danger-outline {
  background: transparent;
  color: var(--accent-red);
  border: 2px solid rgba(239, 68, 68, 0.3);
}
.btn--danger-outline:hover {
  background: var(--status-closed-bg);
  border-color: var(--accent-red);
}

.btn--sm {
  font-size: var(--text-sm);
  padding: var(--space-xs) var(--space-md);
}

/* ======================================================
   PRIVACY NOTICE (Floating)
   ====================================================== */
.privacy-notice {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--status-active);
  font-weight: 600;
  margin: var(--space-md) auto;
  max-width: 600px;
}

.privacy-notice__icon {
  margin-left: var(--space-xs);
}

/* ======================================================
   FOOTER
   ====================================================== */
.footer {
  background: var(--primary-dark);
  color: var(--text-on-dark-muted);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  text-align: center;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
}

.footer__link {
  color: var(--text-on-dark-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--text-on-dark);
}

.footer__copy {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

.footer__disclaimer {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.35);
  max-width: 600px;
  line-height: 1.6;
}

/* ======================================================
   BACK TO TOP
   ====================================================== */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
}

/* ======================================================
   FORM STYLES (Submit & Report)
   ====================================================== */
.form-page {
  padding: var(--space-2xl) 0;
  min-height: calc(100vh - var(--header-height) - 200px);
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

.form-title {
  font-size: var(--text-2xl);
  font-weight: 800;
  margin-bottom: var(--space-xs);
}

.form-subtitle {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-xl);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.form-label .required {
  color: var(--accent-red);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 107, 138, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-xs);
}

.form-success {
  background: var(--status-active-bg);
  color: var(--status-active);
  padding: var(--space-md);
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 700;
  display: none;
}

.form-success.visible {
  display: block;
}

/* ======================================================
   ABOUT PAGE
   ====================================================== */
.about-page {
  padding: var(--space-2xl) 0;
}

.about-content {
  max-width: 700px;
  margin: 0 auto;
}

.about-content h1 {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.about-content h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.about-content p {
  color: var(--text-secondary);
  line-height: 1.9;
  margin-bottom: var(--space-md);
}

.about-highlight {
  background: var(--bg-section);
  border-right: 4px solid var(--primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
  margin: var(--space-lg) 0;
}

.about-highlight p {
  color: var(--text-primary);
  font-weight: 600;
}

/* ======================================================
   TOAST NOTIFICATION
   ====================================================== */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: 50%;
  transform: translateX(50%) translateY(20px);
  background: var(--primary-dark);
  color: white;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  opacity: 0;
  transition: all var(--transition);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(50%) translateY(0);
}

/* ======================================================
   REPORT MODAL
   ====================================================== */
.report-form {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  display: none;
}

.report-form.open {
  display: block;
}

/* ======================================================
   LOADING SKELETON
   ====================================================== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-section) 25%, var(--bg-body) 50%, var(--bg-section) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius);
}

/* ======================================================
   PRINT STYLES
   ====================================================== */
@media print {
  .header,
  .hero,
  .app-banner,
  .search-section,
  .back-to-top,
  .footer,
  .btn-theme-toggle,
  .link-card__actions {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .link-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* ======================================================
   LOAD MORE BUTTON
   ====================================================== */
.btn-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  max-width: 400px;
  margin: var(--space-xl) auto 0;
  padding: var(--space-md) var(--space-xl);
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 700;
  font-size: var(--text-base);
  border: 2px solid var(--primary);
  border-radius: var(--border-radius-full);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-load-more:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.load-more-count {
  font-size: var(--text-sm);
  font-weight: 400;
  opacity: 0.7;
}

/* ======================================================
   MODAL ACTIONS ROW
   ====================================================== */
.modal__actions-row {
  display: flex;
  gap: var(--space-sm);
}

.modal__actions-row .btn {
  flex: 1;
  font-size: var(--text-sm);
}

@media (max-width: 480px) {
  .modal__actions-row {
    flex-direction: column;
  }
}

/* ======================================================
   STAGGERED CARD ANIMATION
   ====================================================== */
.link-card {
  opacity: 0;
  animation: fadeIn var(--transition) forwards;
}

/* ======================================================
   WHATSAPP & SHARE BUTTONS
   ====================================================== */
.link-card__action[title*="واتساب"]:hover {
  color: #25D366;
  background: rgba(37, 211, 102, 0.1);
}

.btn--whatsapp {
  background: #25D366;
  color: white;
  border-color: #25D366;
}

.btn--whatsapp:hover {
  background: #128C7E;
  color: white;
  border-color: #128C7E;
  transform: translateY(-1px);
}

.btn-export {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-export:hover {
  border-color: #25D366;
  color: #25D366;
}

/* ======================================================
   RECENTLY VIEWED SECTION
   ====================================================== */
.recent-section {
  padding: var(--space-lg) 0 0;
  background: var(--bg-section);
}

.recent-section__title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.recent-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.recent-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-full);
  font-size: var(--text-sm);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  max-width: 200px;
}

.recent-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.recent-chip__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ======================================================
   QR CODE MODAL SECTION
   ====================================================== */
.modal__qr {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px dashed var(--border-color);
  text-align: center;
}

.modal__qr-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

/* QR canvas styles moved to IMPROVED QR CODE SECTION below */
/* ======================================================
   EMERGENCY MODE
   ====================================================== */
.btn-emergency {
  color: var(--accent-red);
  font-size: var(--text-sm);
  font-weight: 700;
  padding: 4px 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--border-radius-full);
  background: rgba(239, 68, 68, 0.1);
  transition: all var(--transition-fast);
}

.btn-emergency:hover,
.btn-emergency.active {
  background: var(--accent-red);
  color: white;
}

body.emergency-mode {
  --bg-body: #ffffff;
  --bg-section: #f8f9fa;
  --bg-hero: #dc3545;
  --text-primary: #000000;
}

body.emergency-mode[data-theme="dark"] {
  --bg-body: #121212;
  --bg-section: #1e1e1e;
  --bg-hero: #8b0000;
  --text-primary: #ffffff;
}

.hero--emergency {
  padding: var(--space-2xl) 0;
}

.hero--emergency .hero__desc {
  display: none;
}

body.emergency-mode .search-section {
  display: none;
}

body.emergency-mode .link-card {
  border: 2px solid #dc3545;
  box-shadow: none;
}

body.emergency-mode .link-card__desc {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  display: block;
}

/* ======================================================
   CONNECTION STATUS INDICATOR
   ====================================================== */
.connection-status {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 99;
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 700;
  padding: var(--space-sm) var(--space-md);
  display: none;
  animation: slideDown var(--transition) forwards;
}

.connection-status.offline {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
}

.connection-status.online {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

/* ======================================================
   NEW BADGE (for recently added links)
   ====================================================== */
.link-card__new-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--accent-gradient);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--border-radius-full);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
  animation: pulse 2s infinite;
  z-index: 2;
}

/* ======================================================
   ENHANCED CARD HOVER (Ripple Effect)
   ====================================================== */
.link-card {
  overflow: hidden;
}

.link-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(26, 107, 138, 0.05);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease;
  pointer-events: none;
}

.link-card:hover::after {
  width: 400px;
  height: 400px;
}

/* ======================================================
   KEYBOARD SHORTCUTS HINT
   ====================================================== */
.kbd-hint {
  display: none;
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-xs);
  color: var(--text-muted);
  box-shadow: var(--shadow);
  z-index: 50;
}

@media (min-width: 768px) {
  .kbd-hint {
    display: block;
  }
}

.kbd-hint kbd {
  display: inline-block;
  background: var(--bg-section);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin: 0 2px;
}

/* ======================================================
   IMPROVED QR CODE SECTION
   ====================================================== */
#qr-canvas {
  background: white;
  padding: 10px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}

#qr-canvas:hover {
  transform: scale(1.05);
}

[data-theme="dark"] #qr-canvas {
  background: var(--bg-section);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ======================================================
   GLASSMORPHISM MODAL ENHANCEMENT
   ====================================================== */
.modal-overlay {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal {
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal {
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* ======================================================
   FAVORITE HEART ANIMATION
   ====================================================== */
@keyframes heartBeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.3); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

.link-card__action--fav.saved {
  animation: heartBeat 0.8s ease-in-out;
}

/* ======================================================
   SMOOTH SCROLL ANCHOR HIGHLIGHT
   ====================================================== */
:target {
  scroll-margin-top: calc(var(--header-height) + var(--space-md));
}

/* ======================================================
   ENHANCED HEADER INSTALL BUTTON
   ====================================================== */
.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: var(--text-on-dark);
  background: rgba(255, 255, 255, 0.08);
  transition: all var(--transition-fast);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ======================================================
   AD MANAGEMENT SYSTEM
   ====================================================== */
.ad-container {
  width: 100%;
  text-align: center;
  overflow: hidden;
  animation: fadeIn var(--transition) forwards;
}

.ad-container--header {
  background: var(--bg-section);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-sm) var(--space-md);
}

.ad-container--afterHero {
  background: var(--bg-section);
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-color);
}

.ad-container--feed {
  grid-column: 1 / -1;
  padding: var(--space-md) 0;
}

.ad-container--in-card {
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px dashed var(--border-color);
}

.ad-container--modal-inner {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.ad-container--beforeFooter {
  background: var(--bg-section);
  padding: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.ad-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  opacity: 0.7;
}

/* ── Test Mode Placeholder ── */
.ad-placeholder {
  background: linear-gradient(135deg, 
    rgba(22, 160, 133, 0.06) 0%, 
    rgba(26, 107, 138, 0.06) 50%, 
    rgba(14, 58, 77, 0.06) 100%);
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.ad-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(26, 107, 138, 0.05), transparent);
  animation: shimmer 3s infinite;
}

.ad-placeholder__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-md);
  position: relative;
  z-index: 1;
}

.ad-placeholder__icon {
  font-size: 28px;
  opacity: 0.6;
}

.ad-placeholder__text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
}

.ad-placeholder__size {
  font-size: var(--text-xs);
  color: var(--primary);
  background: rgba(26, 107, 138, 0.1);
  padding: 2px 10px;
  border-radius: var(--border-radius-full);
  font-weight: 600;
  direction: ltr;
}

.ad-placeholder__hint {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

[data-theme="dark"] .ad-placeholder {
  background: linear-gradient(135deg, 
    rgba(22, 160, 133, 0.08) 0%, 
    rgba(26, 107, 138, 0.08) 50%, 
    rgba(14, 58, 77, 0.08) 100%);
}

/* ── Feed-with-Sidebar Layout ── */
.feed-with-sidebar {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.feed-with-sidebar .feed__grid {
  flex: 1;
  min-width: 0;
}

.ad-sidebar-wrapper {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-height) + var(--space-md));
  align-self: flex-start;
}

@media (max-width: 1023px) {
  .feed-with-sidebar {
    display: block;
  }
  .ad-sidebar-wrapper {
    display: none;
  }
}

/* ── AdSense ins styling ── */
.ad-container ins.adsbygoogle {
  margin: 0 auto;
}

/* ── Responsive Ad Sizing ── */
@media (max-width: 767px) {
  .ad-container--header,
  .ad-container--afterHero,
  .ad-container--beforeFooter {
    padding: var(--space-sm);
  }
  .ad-placeholder {
    min-height: 60px;
  }
}
