/* Tanzania vijana hub - Custom Styles */

:root {
  --primary: #0d6efd;
  --secondary: #198754;
  --accent: #ffc107;
  --gradient-hero: linear-gradient(135deg, #0d6efd, #198754);
  --gradient-card: linear-gradient(180deg, #ffffff, #f8f9fa);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #212529;
}

/* Gradient Hero Text */
.gradient-hero {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hero Button */
.btn-hero {
  background: var(--gradient-hero);
  border: none;
  color: white;
  padding: 12px 24px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.3);
  color: white;
}

/* Card Hover Effect */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Stats Section */
.stats-card {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 2rem;
  background: white;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  animation: statsCardFadeIn 0.6s ease forwards;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stats-card:nth-child(1) {
  animation-delay: 0.1s;
  background: linear-gradient(135deg, #1eb53a 0%, #00a3dd 50%, #fcd116 100%);
  color: white;
}

.stats-card:nth-child(2) {
  animation-delay: 0.2s;
  background: linear-gradient(135deg, #fcd116 0%, #1eb53a 50%, #00a3dd 100%);
  color: white;
}

.stats-card:nth-child(3) {
  animation-delay: 0.3s;
  background: linear-gradient(135deg, #00a3dd 0%, #1a1a1a 50%, #1eb53a 100%);
  color: white;
}

.stats-card:nth-child(4) {
  animation-delay: 0.4s;
  background: linear-gradient(135deg, #1a1a1a 0%, #fcd116 50%, #00a3dd 100%);
  color: white;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 0;
  transition: all 0.5s ease;
}

.stats-card:hover::before {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.stats-card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.stats-icon {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 1rem;
  display: inline-block;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: iconPulse 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.stats-card:nth-child(2) .stats-icon {
  color: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.stats-card:hover .stats-icon {
  transform: scale(1.2) rotate(5deg);
  animation: iconBounce 0.6s ease;
}

.stats-value {
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  display: inline-block;
  transition: all 0.3s ease;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
}

.stats-card:hover .stats-value {
  transform: scale(1.15);
}

.stats-card .text-muted {
  color: rgba(255, 255, 255, 0.95) !important;
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stats-card:nth-child(2) .text-muted {
  color: rgba(255, 255, 255, 0.95) !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stats-card:nth-child(2) .stats-value {
  color: white;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Stats Animations */
@keyframes statsCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes iconBounce {
  0%, 100% {
    transform: scale(1.2) rotate(5deg);
  }
  25% {
    transform: scale(1.3) rotate(-5deg);
  }
  50% {
    transform: scale(1.25) rotate(5deg);
  }
  75% {
    transform: scale(1.3) rotate(-5deg);
  }
}

/* Step Animation */
.step-card {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.5s ease;
}

.step-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Background Gradient Hero */
.bg-gradient-hero {
  background: var(--gradient-hero) !important;
}

/* Ensure step card content is visible */
.step-card .card-body {
  color: #212529;
}

.step-card h5 {
  color: #212529;
}

.step-card .text-muted {
  color: #6c757d !important;
}

.step-card .text-primary {
  color: var(--primary) !important;
}

/* Navbar */
.navbar-logo {
  height: 50px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-logo:hover {
  transform: scale(1.05);
}

.footer-logo {
  height: 100px;
  width: auto;
  object-fit: contain;
}

.navbar-brand-icon {
  background: var(--gradient-hero);
  padding: 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-right: 8px;
}

/* Footer */
.footer {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  margin-top: 4rem;
}

.footer-link {
  color: #6c757d;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--primary);
}

/* Hero Section */
.hero-section {
  position: relative;
  padding: 5rem 0;
  overflow: hidden;
}

/* Animated Words */
.animated-words-container {
  position: relative;
  height: 120px;
  overflow: hidden;
}

.animated-word {
  position: absolute;
  font-size: 5rem;
  font-weight: 900;
  background: linear-gradient(135deg, #1eb53a 0%, #00a3dd 50%, #fcd116 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(100px);
  animation: wordRotate 9s infinite;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.animated-word:nth-child(1) {
  animation-delay: 0s;
}

.animated-word:nth-child(2) {
  animation-delay: 3s;
}

.animated-word:nth-child(3) {
  animation-delay: 6s;
}

@keyframes wordRotate {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.8);
  }
  10% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  33% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  43% {
    opacity: 0;
    transform: translateY(-100px) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0.8);
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 0.05;
}

.hero-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  border-radius: 1rem;
  filter: blur(40px);
  opacity: 0.2;
  z-index: -1;
}

.hero-image-wrapper img {
  transition: transform 0.6s ease, opacity 0.6s ease;
  animation: heroImageFade 1.2s ease-in-out;
}

.hero-image-wrapper:hover img {
  transform: scale(1.05);
}

@keyframes heroImageFade {
  0% {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.hero-logo-wrapper {
  animation: heroLogoFade 1.5s ease-in-out 0.3s backwards;
}

.hero-logo {
  max-width: 600px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(13, 110, 253, 0.3));
  transition: all 0.4s ease;
  animation: heroLogoPulse 3s ease-in-out infinite;
}

.hero-logo:hover {
  transform: scale(1.1) rotate(2deg);
  filter: drop-shadow(0 15px 40px rgba(13, 110, 253, 0.5));
}

@keyframes heroLogoFade {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroLogoPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* CTA Section */
.cta-section {
  background: var(--gradient-hero);
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  color: white;
}

/* Badge Custom */
.badge-custom {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
}

/* Project Card */
.project-card-img {
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card-hover:hover .project-card-img {
  transform: scale(1.05);
}

/* Competition Card */
.competition-badge-active {
  background-color: var(--secondary);
  color: white;
}

.competition-badge-upcoming {
  background-color: var(--accent);
  color: #212529;
}

.competition-badge-closed {
  background-color: #6c757d;
  color: white;
}

/* Form Styles */
.form-section {
  padding: 4rem 0;
}

.upload-area {
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: var(--primary);
  background-color: #f8f9fa;
}

/* Modal Styles */
.modal-content {
  border-radius: 1rem;
  border: none;
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
  max-height: 70vh;
  overflow-y: auto;
}

/* Animation for steps */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

/* Center single competition card on desktop */
.row.g-4 > .col-md-6:only-child {
  max-width: 50%;
  margin: 0 auto;
  float: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  
  .row.g-4 > .col-md-6:only-child {
    max-width: 100%;
  }
  .hero-section {
    padding: 3rem 0;
  }
  
  .stats-card {
    padding: 2.5rem 1.5rem;
    min-height: 180px;
  }
  
  .stats-value {
    font-size: 2.5rem;
  }
  
  .stats-icon {
    font-size: 2.5rem;
  }
  
  .navbar-logo {
    height: 30px;
  }
  
  .hero-logo {
    max-width: 350px;
  }
  
  .footer-logo {
    height: 80px;
  }
  
  .footer .col-md-3 {
    text-align: center;
  }
  
  .footer .d-flex {
    justify-content: center !important;
  }
  
  .animated-words-container {
    height: 80px;
  }
  
  .animated-word {
    font-size: 3rem;
  }
}


