/* ==================== HERO SECTION (Final Responsive) ==================== */

/* ==================== ROOT VARIABLES ==================== */
:root {
  --redev-primary: #0f172a;
  --redev-secondary: #1e293b;
  --redev-accent: #4338ca;
  --redev-accent-light: #6366f1;
  --redev-accent-glow: rgba(67, 56, 202, 0.5);
  --redev-text-light: #f8fafc;
  --redev-text-dark: #1e293b;
  --redev-text-muted: #64748b;
  --redev-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --redev-gradient-accent: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
  --redev-gradient-glow: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --redev-glass-bg: rgba(255, 255, 255, 0.05);
  --redev-glass-border: rgba(255, 255, 255, 0.1);
  --redev-shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
  --redev-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.15);
  --redev-shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.2);
  --redev-shadow-glow: 0 20px 60px rgba(67, 56, 202, 0.15);
  --redev-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --redev-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==================== HERO SECTION BASE ==================== */
.redev-home {
  padding-top: 0;
}

.redev-hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--redev-primary);
  padding-top: 150px;
}

.redev-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('../src/building-2.webp');
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 10s ease-out;
}

.redev-hero:hover .redev-hero-bg {
  transform: scale(1.05);
}

.redev-hero-grid,
.redev-particles,
.redev-orbs {
  display: none !important;
}

.redev-hero-tracker .redev-progress-bar {
  justify-content: center;
}

.redev-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--redev-accent-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--redev-accent-glow);
  animation: redevParticleFloat 20s infinite linear;
}

.redev-hero-content {
  text-align: center;
  z-index: 5;
  padding: 20px;
  position: relative;
  color: var(--redev-text-dark);
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Global Section Headers */
.redev-section-header {
  text-align: left;
  margin-bottom: 60px;
}

.redev-section-title {
  font-size: 56px;
  font-weight: 900;
  color: var(--redev-text-dark);
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.redev-section-subtitle {
  font-size: 18px;
  color: var(--redev-text-muted);
  max-width: 700px;
  line-height: 1.8;
}

.redev-hero-line {
  width: 60px;
  height: 4px;
  background: var(--redev-gradient-glow);
  margin: 0 auto 18px;
  border-radius: 2px;
  animation: redevLineExpand 1s ease 0.5s both;
}

.redev-hero-title {
  font-family: var(--redev-font);
  font-size: 46px;
  font-weight: 900;
  color: var(--redev-text-dark);
  margin-bottom: 10px;
  line-height: 1.1;
}

.redev-title-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(50px);
  animation: redevTitleReveal 0.8s ease forwards;
}

.redev-title-word:nth-child(1) {
  animation-delay: 0.3s;
  color: #ffffff;
}

.redev-title-word:nth-child(2) {
  animation-delay: 0.5s;
}

.redev-title-highlight {
  background: var(--redev-gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.redev-hero-subtitle {
  font-size: 17px;
  color: #ffffff;
  max-width: 600px;
  margin: 0 auto 25px;
  line-height: 1.6;
  animation: redevFadeIn 1s ease 0.8s both;
}

.redev-typing-cursor {
  display: inline-block;
  color: var(--redev-accent);
  animation: redevBlink 1s step-end infinite;
}

.redev-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin-top: 25px;
  margin-bottom: 25px;
  opacity: 0;
  animation: redevFadeInUp 1s ease 1.4s forwards;
  flex-wrap: wrap;
}

.redev-stat {
  text-align: center;
}

.redev-stat-number {
  font-family: var(--redev-font);
  font-size: 38px;
  font-weight: 800;
  background: var(--redev-gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.redev-stat-suffix {
  font-family: var(--redev-font);
  font-size: 18px;
  font-weight: 600;
  color: var(--redev-text-muted);
}

.redev-stat-label {
  display: block;
  font-family: var(--redev-font);
  font-size: 10px;
  font-weight: 500;
  color: var(--redev-text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-top: 4px;
}

.redev-stat-divider {
  width: 1px;
  height: 38px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--redev-text-muted),
    transparent
  );
}

/* ==================== INTEGRATED HERO TRACKER ==================== */
.redev-hero-tracker {
  background: var(--redev-glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--redev-glass-border);
  border-radius: 22px;
  padding: 35px 30px 25px;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  box-shadow: var(--redev-shadow-glow);
  animation: redevFadeIn 1s ease 1s both;
}

.redev-hero-progress {
  width: 100%;
  overflow-x: auto;
  padding: 8px 0;
}

.redev-hero-progress::-webkit-scrollbar {
  display: none;
}

.redev-hero-ticker {
  margin-top: 12px;
  background: rgba(10, 10, 26, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  z-index: 10;
}

.redev-ticker-wrapper {
  display: flex;
  flex-direction: column;
}

.redev-ticker-label {
  background: var(--redev-gradient-accent);
  padding: 9px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
  text-align: center;
}

.redev-ticker-label i {
  font-size: 18px;
  color: var(--redev-text-light);
  animation: redevBellRing 2s ease-in-out infinite;
}

.redev-ticker-label span {
  font-family: var(--redev-font);
  font-size: 11px;
  font-weight: 700;
  color: var(--redev-text-light);
  letter-spacing: 2px;
}

.redev-ticker-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0;
  position: relative;
}

#latestUploadsContainer {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.ticker-track {
  display: flex;
  gap: 0;
  animation: tickerScroll 40s linear infinite;
  width: fit-content;
}

.ticker-track:hover {
  animation-play-state: paused !important;
}

.ticker-upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.03);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 330px;
  transition: all 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}

.ticker-upload-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
}

.ticker-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: white;
  flex-shrink: 0;
}

.ticker-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.ticker-filename {
  color: rgba(255, 255, 255, 0.95);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--redev-font);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticker-category {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 9px;
  text-transform: uppercase;
}

.redev-progress-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 12px;
}

.redev-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
}

.redev-stage-node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--redev-text-light);
  border: 3px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--redev-transition);
  position: relative;
  cursor: pointer;
}

.redev-stage-number {
  font-family: var(--redev-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--redev-text-muted);
}

.redev-stage-check {
  display: none;
  font-size: 22px;
  color: var(--redev-text-light);
}

.redev-stage-label {
  font-family: var(--redev-font);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff !important;
  text-align: center;
}

.redev-stage-complete .redev-stage-node {
  background: var(--redev-gradient-accent);
  border-color: var(--redev-accent);
}

.redev-stage-complete .redev-stage-number { display: none; }
.redev-stage-complete .redev-stage-check { display: block; }

.redev-stage-active .redev-stage-node {
  animation: redevActivePulse 2s ease-in-out infinite;
  border-color: var(--redev-accent);
}

.redev-stage-connector {
  width: 48px;
  height: 3px;
  background: #e2e8f0;
  margin-top: 28px;
}

.redev-connector-complete {
  background: var(--redev-gradient-accent);
}

.redev-stage-upcoming .redev-stage-node {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* ==================== ANIMATIONS ==================== */
@keyframes redevLineExpand { from { width: 0; } to { width: 60px; } }
@keyframes redevTitleReveal { to { opacity: 1; transform: translateY(0); } }
@keyframes redevFadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes redevFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes redevBlink { 50% { opacity: 0; } }
@keyframes tickerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@keyframes redevActivePulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(67, 56, 202, 0.1); }
  50% { box-shadow: 0 0 0 15px rgba(67, 56, 202, 0.05); }
}

@keyframes redevBellRing {
  0%, 100% { transform: rotate(0); }
  10%, 20% { transform: rotate(15deg); }
  30%, 40% { transform: rotate(-10deg); }
  50% { transform: rotate(0); }
}

/* ==================== RESPONSIVE STYLES (Mobile 100vh Fix) ==================== */

@media (max-width: 991.98px) {
  .redev-hero { 
    height: auto; 
    min-height: 100vh;
    padding: 100px 0 40px; 
  }
  
  .redev-hero-content { 
    padding: 20px;
  }
  
  .redev-hero-title { font-size: 38px; }
  
  /* Tablet: Vertical Stack */
  .redev-progress-bar {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 20px;
  }

  .redev-stage {
    flex-direction: row;
    gap: 20px;
    margin-bottom: 0;
  }

  .redev-stage-connector {
    width: 3px;
    height: 30px;
    margin: 0 0 0 26px;
  }

  .redev-stage-label { text-align: left; }

  .redev-hero-tracker { 
    padding: 25px 20px; 
    margin-top: 20px; 
    border-radius: 20px; 
  }
}

@media (max-width: 768px) {
  /* 1. LOCK HERO SECTION */
  .redev-hero {
    height: 100vh !important;
    height: 100dvh !important;
    min-height: unset !important;
    padding: 0 !important;
    align-items: center !important;
    overflow: hidden !important;
    display: flex !important;
  }
  
  /* 2. FLEX LAYOUT FOR CONTENT */
  .redev-hero-content {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 85px 20px 20px 20px !important;
    max-height: 100vh !important;
  }

  /* 3. COMPACT TITLE & SUBTITLE */
  .redev-hero-line { margin: 0 auto 10px !important; width: 40px !important; height: 3px !important; }
  
  .redev-hero-title {
    font-size: 2.2rem !important;
    margin-bottom: 5px !important;
  }
  
  .redev-hero-subtitle {
    font-size: 0.9rem !important;
    margin-bottom: 10px !important;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 4. COMPACT STATS ROW */
  .redev-hero-stats {
    margin: 10px 0 15px 0 !important;
    gap: 15px !important;
    flex-wrap: nowrap !important; /* Force single row */
    justify-content: center !important;
  }
  
  .redev-stat { min-width: auto !important; flex: 0 1 auto !important; }
  .redev-stat-number { font-size: 1.5rem !important; }
  .redev-stat-label { font-size: 0.7rem !important; letter-spacing: 0.5px !important; }
  .redev-stat-divider { display: block !important; height: 25px !important; margin: 0 5px; }

  /* 5. HERO TRACKER (Scrollable Box) */
  .redev-hero-tracker {
    margin-top: 0 !important;
    padding: 15px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    width: 100% !important;
    flex-grow: 1 !important; /* Fill remaining space */
    max-height: 40% !important; /* Limit height */
    display: flex !important;
    flex-direction: column !important;
    position: relative !important; /* Required for pseudo-element */
  }
  
  /* ✅ SCROLL HINT: Fade Right Edge */
  .redev-hero-tracker::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 40px; 
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.15));
    pointer-events: none;
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 5;
  }

  /* 6. PROGRESS BAR (Horizontal Scroll) */
  .redev-hero-progress {
    padding: 5px 0 !important;
    overflow-x: auto !important;
    width: 100% !important;
    /* Fade mask for content */
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }
  
  .redev-progress-bar {
    flex-direction: row !important; /* Force horizontal row */
    flex-wrap: nowrap !important; /* Don't stack */
    justify-content: flex-start !important; /* Start from left */
    gap: 15px !important;
    margin-bottom: 0 !important;
    padding-bottom: 5px !important;
    min-width: max-content !important; /* Ensure it scrolls */
    padding-right: 40px !important; /* Space for scroll hint */
  }

  .redev-stage {
    flex-direction: column !important; /* Node on top, text below */
    gap: 5px !important;
    width: 60px !important; /* Fixed width per item */
  }
  
  .redev-stage-node { width: 40px !important; height: 40px !important; border-width: 2px !important; }
  .redev-stage-number { font-size: 14px !important; }
  .redev-stage-label { 
    font-size: 0.7rem !important; 
    white-space: normal !important; 
    line-height: 1.1 !important;
    height: 2.2em; /* fixed height for alignment */
    overflow: hidden;
  }
  
  .redev-stage-connector { display: none !important; }

  /* 7. TICKER (Hide or Compact) */
  .redev-hero-ticker {
    margin-top: auto !important; /* Push to bottom */
    padding: 5px !important;
  }
  
  .redev-ticker-label { padding: 5px 10px !important; }
  .redev-ticker-label span { font-size: 0.7rem !important; }
  .redev-ticker-label i { font-size: 0.9rem !important; }
  
  .ticker-upload-item { 
    min-width: 220px !important; 
    padding: 6px 10px !important; 
  }
  .ticker-icon { width: 28px !important; height: 28px !important; font-size: 0.8rem !important; }
  .ticker-filename { font-size: 0.7rem !important; }
}
