/* ==========================================
   REHYA v2 - Unified Design System
   Modern Dark Theme with Dynamic Accent Colors
   ========================================== */

/* ==========================================
   15+ ACCENT COLOR PALETTE
   ========================================== */
:root {
  /* Background Colors */
  --bg-deep: #050508;
  --bg-elevated: #0a0a0f;
  --bg-card: #111118;
  --bg-hover: #1a1a24;
  --bg-glass: rgba(10, 10, 15, 0.85);
  
  /* Default Accent - Gold */
  --accent: #d4af37;
  --accent-soft: rgba(212, 175, 55, 0.15);
  --accent-glow: rgba(212, 175, 55, 0.4);
  --accent-gradient: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
  
  /* Text Colors */
  --text-primary: #faf9f6;
  --text-secondary: #a0a0a0;
  --text-muted: #6b7280;
  
  /* Status Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.03);
  
  /* Typography */
  --font-ui: 'Space Grotesk', -apple-system, sans-serif;
  --font-accent: 'Crimson Pro', Georgia, serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Container */
  --container-max: 1280px;
}

/* ==========================================
   15 ACCENT COLOR VARIANTS
   ========================================== */

/* 1. GOLD (Default) */
body[data-accent="gold"] {
  --accent: #d4af37;
  --accent-soft: rgba(212, 175, 55, 0.15);
  --accent-glow: rgba(212, 175, 55, 0.4);
  --accent-gradient: linear-gradient(135deg, #d4af37 0%, #f4d03f 50%, #d4af37 100%);
  --border-accent: rgba(212, 175, 55, 0.3);
  --accent-rgb: 212, 175, 55;
}

/* 2. EMERALD GREEN */
body[data-accent="emerald"] {
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.15);
  --accent-glow: rgba(16, 185, 129, 0.4);
  --accent-gradient: linear-gradient(135deg, #059669 0%, #34d399 50%, #059669 100%);
  --border-accent: rgba(16, 185, 129, 0.3);
  --accent-rgb: 16, 185, 129;
}

/* 3. TEAL */
body[data-accent="teal"] {
  --accent: #14b8a6;
  --accent-soft: rgba(20, 184, 166, 0.15);
  --accent-glow: rgba(20, 184, 166, 0.4);
  --accent-gradient: linear-gradient(135deg, #0d9488 0%, #2dd4bf 50%, #0d9488 100%);
  --border-accent: rgba(20, 184, 166, 0.3);
  --accent-rgb: 20, 184, 166;
}

/* 4. CYAN */
body[data-accent="cyan"] {
  --accent: #06b6d4;
  --accent-soft: rgba(6, 182, 212, 0.15);
  --accent-glow: rgba(6, 182, 212, 0.4);
  --accent-gradient: linear-gradient(135deg, #0891b2 0%, #22d3ee 50%, #0891b2 100%);
  --border-accent: rgba(6, 182, 212, 0.3);
  --accent-rgb: 6, 182, 212;
}

/* 5. SKY BLUE */
body[data-accent="sky"] {
  --accent: #0ea5e9;
  --accent-soft: rgba(14, 165, 233, 0.15);
  --accent-glow: rgba(14, 165, 233, 0.4);
  --accent-gradient: linear-gradient(135deg, #0284c7 0%, #38bdf8 50%, #0284c7 100%);
  --border-accent: rgba(14, 165, 233, 0.3);
  --accent-rgb: 14, 165, 233;
}

/* 6. BLUE */
body[data-accent="blue"] {
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --accent-glow: rgba(59, 130, 246, 0.4);
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #60a5fa 50%, #2563eb 100%);
  --border-accent: rgba(59, 130, 246, 0.3);
  --accent-rgb: 59, 130, 246;
}

/* 7. INDIGO */
body[data-accent="indigo"] {
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.15);
  --accent-glow: rgba(99, 102, 241, 0.4);
  --accent-gradient: linear-gradient(135deg, #4f46e5 0%, #818cf8 50%, #4f46e5 100%);
  --border-accent: rgba(99, 102, 241, 0.3);
  --accent-rgb: 99, 102, 241;
}

/* 8. VIOLET */
body[data-accent="violet"] {
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.15);
  --accent-glow: rgba(139, 92, 246, 0.4);
  --accent-gradient: linear-gradient(135deg, #7c3aed 0%, #a78bfa 50%, #7c3aed 100%);
  --border-accent: rgba(139, 92, 246, 0.3);
  --accent-rgb: 139, 92, 246;
}

/* 9. PURPLE */
body[data-accent="purple"] {
  --accent: #a855f7;
  --accent-soft: rgba(168, 85, 247, 0.15);
  --accent-glow: rgba(168, 85, 247, 0.4);
  --accent-gradient: linear-gradient(135deg, #9333ea 0%, #c084fc 50%, #9333ea 100%);
  --border-accent: rgba(168, 85, 247, 0.3);
  --accent-rgb: 168, 85, 247;
}

/* 10. FUCHSIA */
body[data-accent="fuchsia"] {
  --accent: #d946ef;
  --accent-soft: rgba(217, 70, 239, 0.15);
  --accent-glow: rgba(217, 70, 239, 0.4);
  --accent-gradient: linear-gradient(135deg, #c026d3 0%, #e879f9 50%, #c026d3 100%);
  --border-accent: rgba(217, 70, 239, 0.3);
  --accent-rgb: 217, 70, 239;
}

/* 11. PINK */
body[data-accent="pink"] {
  --accent: #ec4899;
  --accent-soft: rgba(236, 72, 153, 0.15);
  --accent-glow: rgba(236, 72, 153, 0.4);
  --accent-gradient: linear-gradient(135deg, #db2777 0%, #f472b6 50%, #db2777 100%);
  --border-accent: rgba(236, 72, 153, 0.3);
  --accent-rgb: 236, 72, 153;
}

/* 12. ROSE */
body[data-accent="rose"] {
  --accent: #f43f5e;
  --accent-soft: rgba(244, 63, 94, 0.15);
  --accent-glow: rgba(244, 63, 94, 0.4);
  --accent-gradient: linear-gradient(135deg, #e11d48 0%, #fb7185 50%, #e11d48 100%);
  --border-accent: rgba(244, 63, 94, 0.3);
  --accent-rgb: 244, 63, 94;
}

/* 13. ORANGE */
body[data-accent="orange"] {
  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --accent-glow: rgba(249, 115, 22, 0.4);
  --accent-gradient: linear-gradient(135deg, #ea580c 0%, #fb923c 50%, #ea580c 100%);
  --border-accent: rgba(249, 115, 22, 0.3);
  --accent-rgb: 249, 115, 22;
}

/* 14. AMBER */
body[data-accent="amber"] {
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.15);
  --accent-glow: rgba(245, 158, 11, 0.4);
  --accent-gradient: linear-gradient(135deg, #d97706 0%, #fbbf24 50%, #d97706 100%);
  --border-accent: rgba(245, 158, 11, 0.3);
  --accent-rgb: 245, 158, 11;
}

/* 15. LIME */
body[data-accent="lime"] {
  --accent: #84cc16;
  --accent-soft: rgba(132, 204, 22, 0.15);
  --accent-glow: rgba(132, 204, 22, 0.4);
  --accent-gradient: linear-gradient(135deg, #65a30d 0%, #a3e635 50%, #65a30d 100%);
  --border-accent: rgba(132, 204, 22, 0.3);
  --accent-rgb: 132, 204, 22;
}

/* 16. RED (Bonus) */
body[data-accent="red"] {
  --accent: #ef4444;
  --accent-soft: rgba(239, 68, 68, 0.15);
  --accent-glow: rgba(239, 68, 68, 0.4);
  --accent-gradient: linear-gradient(135deg, #dc2626 0%, #f87171 50%, #dc2626 100%);
  --border-accent: rgba(239, 68, 68, 0.3);
  --accent-rgb: 239, 68, 68;
}

/* 17. CRIMSON */
body[data-accent="crimson"] {
  --accent: #dc2626;
  --accent-soft: rgba(220, 38, 38, 0.15);
  --accent-glow: rgba(220, 38, 38, 0.4);
  --accent-gradient: linear-gradient(135deg, #991b1b 0%, #ef4444 50%, #991b1b 100%);
  --border-accent: rgba(220, 38, 38, 0.3);
  --accent-rgb: 220, 38, 38;
}

/* 18. EMERALD DARK */
body[data-accent="forest"] {
  --accent: #059669;
  --accent-soft: rgba(5, 150, 105, 0.15);
  --accent-glow: rgba(5, 150, 105, 0.4);
  --accent-gradient: linear-gradient(135deg, #047857 0%, #10b981 50%, #047857 100%);
  --border-accent: rgba(5, 150, 105, 0.3);
  --accent-rgb: 5, 150, 105;
}

/* 19. OCEAN */
body[data-accent="ocean"] {
  --accent: #0284c7;
  --accent-soft: rgba(2, 132, 199, 0.15);
  --accent-glow: rgba(2, 132, 199, 0.4);
  --accent-gradient: linear-gradient(135deg, #0369a1 0%, #38bdf8 50%, #0369a1 100%);
  --border-accent: rgba(2, 132, 199, 0.3);
  --accent-rgb: 2, 132, 199;
}

/* 20. SUNSET */
body[data-accent="sunset"] {
  --accent: #ea580c;
  --accent-soft: rgba(234, 88, 12, 0.15);
  --accent-glow: rgba(234, 88, 12, 0.4);
  --accent-gradient: linear-gradient(135deg, #c2410c 0%, #fb923c 50%, #c2410c 100%);
  --border-accent: rgba(234, 88, 12, 0.3);
  --accent-rgb: 234, 88, 12;
}

/* 21. MINT */
body[data-accent="mint"] {
  --accent: #34d399;
  --accent-soft: rgba(52, 211, 153, 0.15);
  --accent-glow: rgba(52, 211, 153, 0.4);
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #6ee7b7 50%, #10b981 100%);
  --border-accent: rgba(52, 211, 153, 0.3);
  --accent-rgb: 52, 211, 153;
}

/* 22. CORAL */
body[data-accent="coral"] {
  --accent: #fb7185;
  --accent-soft: rgba(251, 113, 133, 0.15);
  --accent-glow: rgba(251, 113, 133, 0.4);
  --accent-gradient: linear-gradient(135deg, #f43f5e 0%, #fda4af 50%, #f43f5e 100%);
  --border-accent: rgba(251, 113, 133, 0.3);
  --accent-rgb: 251, 113, 133;
}

/* 23. GOLD WARM */
body[data-accent="goldwarm"] {
  --accent: #eab308;
  --accent-soft: rgba(234, 179, 8, 0.15);
  --accent-glow: rgba(234, 179, 8, 0.4);
  --accent-gradient: linear-gradient(135deg, #ca8a04 0%, #facc15 50%, #ca8a04 100%);
  --border-accent: rgba(234, 179, 8, 0.3);
  --accent-rgb: 234, 179, 8;
}

/* 24. NEON */
body[data-accent="neon"] {
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.15);
  --accent-glow: rgba(34, 211, 238, 0.4);
  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #67e8f9 50%, #06b6d4 100%);
  --border-accent: rgba(34, 211, 238, 0.3);
  --accent-rgb: 34, 211, 238;
}

/* ==========================================
   BASE RESET
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-ui);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  min-height: 100vh;
  transition: background 0.5s ease, color 0.5s ease;
}

/* Mobile overflow safety */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Prevent overflow on media elements */
img, video, svg, iframe, embed, object {
  max-width: 100%;
  height: auto;
}

/* Mobile stats fix */
@media (max-width: 640px) {
  .stat-value { font-size: 1.5rem !important; }
  .stat-item { min-width: 0 !important; flex: 1 !important; }
  .counter-value { font-size: 1.5rem !important; }
}

/* Comprehensive mobile overflow fix */
@media (max-width: 768px) {
  *, *::before, *::after {
    max-width: 100vw !important;
  }
  .mega-menu {
    display: none !important;
  }
  .nav-dropdown:hover .mega-menu {
    display: none !important;
  }
  .featured-article .grid.lg\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  .news-hero {
    min-height: auto !important;
    padding: 6rem 0.75rem 2rem !important;
  }
  .news-hero h1, .heading-hero {
    font-size: clamp(2rem, 8vw, 3rem) !important;
  }
  .filter-container {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
  }
  .filter-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .press-item {
    flex-direction: column !important;
  }
  .newsletter-form {
    flex-direction: column !important;
  }
  .live-news-section {
    padding: 1rem !important;
  }
  .news-modal-content {
    width: 95% !important;
    padding: 1.5rem !important;
    max-height: 90vh !important;
  }
  .news-modal-content h2 {
    font-size: 1.25rem !important;
  }
  .category-badge {
    font-size: 0.6rem !important;
    padding: 0.35rem 0.6rem !important;
  }
}

@media (max-width: 480px) {
  .notification-dropdown {
    width: calc(100vw - 1rem) !important;
    right: -0.5rem !important;
  }
  .featured-content {
    padding: 1rem !important;
  }
  .featured-content h2 {
    font-size: 1.25rem !important;
  }
  .news-content {
    padding: 1rem !important;
  }
  .news-title {
    font-size: 0.95rem !important;
  }
}

::selection {
  background: var(--accent-soft);
  color: var(--accent);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-elevated);
}

::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ==========================================
   GRAIN OVERLAY
   ========================================== */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================
   CUSTOM CURSOR
   ========================================== */
.custom-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, border-color 0.3s;
  mix-blend-mode: difference;
}

.custom-cursor.hover {
  width: 50px;
  height: 50px;
  background: var(--accent-soft);
}

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10001;
  transform: translate(-50%, -50%);
}

@media (pointer: coarse) {
  .custom-cursor, .cursor-dot { display: none !important; }
}

/* ==========================================
   PARTICLES CANVAS
   ========================================== */
.particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ==========================================
   GLASS MORPHISM
   ========================================== */
.glass {
  background: linear-gradient(145deg, var(--bg-glass) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-accent { color: var(--accent); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.heading-hero {
  font-size: clamp(3rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.heading-xl {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.text-serif {
  font-family: var(--font-accent);
  font-style: italic;
}

.text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-deep);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow);
}

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

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

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================
   CARDS
   ========================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.feature-card {
  position: relative;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.feature-card:hover::before {
  width: 100%;
  opacity: 0.1;
}

/* ==========================================
   FORMS
   ========================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-ui);
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-secondary);
}

/* ==========================================
   NOTIFICATION BELL
   ========================================== */
.notification-bell {
  position: relative;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.notification-bell:hover {
  color: var(--accent);
  background: var(--bg-card);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

.notification-badge.hidden { display: none; }

.notification-bell.has-unread::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

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

/* ==========================================
   NOTIFICATION DROPDOWN
   ========================================== */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 380px;
  max-height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.notification-dropdown.show,
.notification-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mark-all-read {
  font-size: 0.75rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
}

.notification-list {
  max-height: 360px;
  overflow-y: auto;
}

.notification-item {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.notification-item:hover { background: var(--bg-hover); }
.notification-item.unread { background: var(--accent-soft); }

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
  position: relative;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex {
  display: flex;
}

.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-fadeIn { animation: fadeIn 0.6s ease forwards; }
.animate-slideUp { animation: slideUp 0.6s ease forwards; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .heading-hero { font-size: clamp(2.5rem, 8vw, 5rem); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .heading-hero { font-size: clamp(2rem, 10vw, 3.5rem); }
  .notification-dropdown {
    width: calc(100vw - 2rem);
    right: -70px;
  }
  /* Mobile overflow fixes */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .btn {
    font-size: 0.8rem;
    padding: 0.7rem 1.2rem;
  }
  .premium-header .header-top {
    display: none;
  }
}

/* ==========================================
   PREMIUM HEADER WITH MEGA-MENU
   ========================================== */
.premium-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.premium-header.compact {
  padding-top: 0;
  padding-bottom: 0;
}

.premium-header.hidden-scroll {
  transform: translateY(-100%);
}

.nav-accent-line {
  height: 2px;
  background: var(--accent-gradient);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ==========================================
   NAVIGATION ITEMS
   ========================================== */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.nav-item:hover::after {
  transform: scaleX(1);
}

/* ==========================================
   MEGA MENU
   ========================================== */
.nav-dropdown {
  position: relative;
}

.mega-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  width: 580px;
  padding: 1.5rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1001;
}

.nav-dropdown:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown:hover .chevron {
  transform: rotate(180deg);
}

.chevron {
  transition: transform 0.3s ease;
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.dropdown-link:hover {
  background: var(--accent-soft);
  color: var(--text-primary);
}

.dropdown-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: 10px;
  font-size: 1.25rem;
}

/* ==========================================
   THEME BUTTON
   ========================================== */
.theme-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ==========================================
   MOBILE MENU
   ========================================== */
.mobile-menu {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-elevated);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  overflow-y: auto;
}

.mobile-menu.active {
  transform: translateX(0);
}

.mobile-submenu {
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.mobile-submenu.hidden {
  display: none;
}

/* ==========================================
   GALLERY TRAIN
   ========================================== */
.gallery-train-container {
  position: relative;
  overflow: hidden;
  padding: 2rem 0;
}

.gallery-train {
  display: flex;
  gap: 1.5rem;
  padding: 0 2rem;
  will-change: transform;
}

.train-card {
  flex-shrink: 0;
  width: 380px;
  height: 280px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.train-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.train-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: translateY(-8px);
}

.train-card:hover img {
  transform: scale(1.1);
}

.train-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.train-card:hover .train-card-overlay {
  opacity: 1;
}

.train-card-overlay i {
  font-size: 1.5rem;
  color: var(--accent);
  background: rgba(0,0,0,0.6);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.gallery-nav:hover {
  background: var(--accent);
  color: var(--bg-deep);
  box-shadow: 0 0 30px var(--accent-glow);
}

.gallery-prev { left: 1rem; }
.gallery-next { right: 1rem; }

/* ==========================================
   LIGHTBOX
   ========================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.95);
  backdrop-filter: blur(20px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lightbox-close:hover {
  background: var(--accent);
  color: var(--bg-deep);
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  z-index: 10001;
}

.toast.show {
  transform: translateX(0);
}

.toast-success {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.1);
}

.toast-error {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

.toast-info {
  border-color: var(--info);
  background: rgba(59, 130, 246, 0.1);
}

.toast i {
  font-size: 1.25rem;
}

.toast-success i { color: var(--success); }
.toast-error i { color: var(--danger); }
.toast-info i { color: var(--info); }

/* ==========================================
   EMPTY STATES
   ========================================== */
.empty-notifications {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-notifications i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* ==========================================
   REVEAL ON SCROLL
   ========================================== */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   TABS
   ========================================== */
[data-tabs] [data-tab] {
  position: relative;
  padding: 1rem 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.3s ease;
}

[data-tabs] [data-tab]:hover {
  color: var(--accent);
}

[data-tabs] [data-tab].active {
  color: var(--accent);
}

[data-tabs] [data-tab].active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

[data-tab-content] {
  display: none;
  padding: 2rem 0;
  animation: fadeIn 0.4s ease;
}

[data-tab-content].active {
  display: block;
}

/* ==========================================
   NOTIFICATION DROPDOWN FIX
   ========================================== */
#notificationDropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.notification-dropdown .mark-all-read:hover {
  text-decoration: underline;
}

.notification-dropdown {
  overflow: hidden;
}

/* ==========================================
   MOBILE RESPONSIVE HEADER
   ========================================== */
@media (max-width: 1024px) {
  .mega-menu {
    display: none;
  }
  
  .nav-dropdown:hover .mega-menu {
    display: none;
  }
  
  .notification-dropdown {
    width: calc(100vw - 2rem);
    right: -1rem;
  }
}

@media (max-width: 480px) {
  .premium-header .btn-primary {
    display: none;
  }
  
  .train-card {
    width: 300px;
    height: 220px;
  }
}

/* ==========================================
   LIGHT MODE OVERRIDES
   ========================================== */
[data-theme="light"] .premium-header {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mega-menu,
[data-theme="light"] .mobile-menu {
  background: rgba(255, 255, 255, 0.95);
}

[data-theme="light"] .train-card {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

[data-theme="light"] .train-card:hover {
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* ==========================================
   NOTIFICATION TOAST POPUP
   ========================================== */
.notification-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 9999;
  animation: slideInRight 0.4s ease;
}

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

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

.notification-toast-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.notification-toast i {
  color: var(--accent);
  font-size: 1.25rem;
  margin-top: 0.125rem;
}

.notification-toast-text {
  flex: 1;
}

.notification-toast-text strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.notification-toast-text p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

.notification-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.notification-toast-close:hover {
  color: var(--text-primary);
}

/* Mobile Notification Toast */
@media (max-width: 480px) {
  .notification-toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    max-width: none;
  }
}

/* ==========================================
   NOTIFICATION ITEM STYLES (Dropdown)
   ========================================== */
.notification-item .notification-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.notification-item .notification-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.notification-item .notification-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.notification-item .notification-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.5rem;
}

.notification-item.read {
  opacity: 0.7;
}

.notification-item.read .notification-dot {
  display: none;
}
