@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

* {
  font-family: "Maven Pro", sans-serif;
}

.glass {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(26, 35, 126, 0.75);
}

.glass-dark {
  backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.125);
}

.text-stroke {
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.5);
  color: transparent;
}

.text-fill {
  background: linear-gradient(90deg, #e1a609, #ffea00);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-repeat: no-repeat;
}

.program-card {
  transition: all 0.3s ease;
}

.program-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(255, 214, 0, 0.2);
}

.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 0.5rem;
  overflow: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out forwards;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.scroll-animate.in-view {
  opacity: 1;
  transform: translateY(0);
}

.cyber-bg {
  background-image:
    radial-gradient(
      circle at 25px 25px,
      rgba(255, 214, 0, 0.1) 2px,
      transparent 2px
    ),
    radial-gradient(
      circle at 75px 75px,
      rgba(26, 35, 126, 0.1) 2px,
      transparent 2px
    );
  background-size: 100px 100px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion.active .accordion-content {
  max-height: 1000px;
}

.scholarship-badge {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #e1a609;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Strategic Partners Section Styles */

/* Ensure proper spacing and flow */
#partners .container {
  position: relative;
  z-index: 10;
}

/* Section header spacing */
#partners .text-center.mb-16 {
  margin-bottom: 4rem !important;
  position: relative;
  z-index: 20;
}

/* Partners grid proper positioning */
#partners .grid.grid-cols-1.md\:grid-cols-3 {
  margin-top: 0;
  margin-bottom: 4rem;
  position: relative;
  z-index: 15;
}

/* Call to action spacing */
#partners .text-center.animate-on-scroll:last-child {
  margin-top: 2rem;
  position: relative;
  z-index: 10;
}

/* Ensure proper vertical alignment */
#partners > .container > * {
  position: relative;
}

.glass-card {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-shadow-glow {
  text-shadow: 0 0 20px rgba(255, 214, 0, 0.5);
}

/* Particle Background Animation */
.particles-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  opacity: 0.3;
  animation: float-particle 20s infinite linear;
}

.particle-shield::before {
  content: "🛡️";
  font-size: 24px;
}

.particle-lock::before {
  content: "🔒";
  font-size: 20px;
}

.particle-binary::before {
  content: "01010101";
  font-family: "Maven Pro", monospace;
  font-size: 12px;
  color: #60a5fa;
}

.particle:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.particle:nth-child(2) {
  left: 30%;
  animation-delay: -5s;
  animation-duration: 20s;
}

.particle:nth-child(3) {
  left: 50%;
  animation-delay: -10s;
  animation-duration: 30s;
}

.particle:nth-child(4) {
  left: 70%;
  animation-delay: -15s;
  animation-duration: 22s;
}

.particle:nth-child(5) {
  left: 85%;
  animation-delay: -8s;
  animation-duration: 28s;
}

.particle:nth-child(6) {
  left: 15%;
  animation-delay: -12s;
  animation-duration: 35s;
}

.animate-on-scroll {
  transform: none !important;
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: none !important;
}

@keyframes float-particle {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Partner Card Styles */
.partner-card {
  position: relative;
  height: 320px;
  margin-bottom: 0;
}

.partner-front,
.partner-back {
  backface-visibility: hidden;
  transition: all 0.6s ease;
}

.partner-card:hover .partner-front {
  transform: rotateY(-180deg);
  opacity: 0;
}

.partner-card:hover .partner-back {
  transform: rotateY(0deg);
  opacity: 1;
}

/* Logo Ripple Effect */
.partner-logo-container {
  position: relative;
}

.logo-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 214, 0, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: ripple 2s infinite;
}

.partner-card:hover .logo-ripple {
  animation: ripple 1s infinite;
}

@keyframes ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
  }
}

/* ThinkCyber Specific Hover Effect */
.partner-card[data-partner="thinkcyber"]:hover .partner-front {
  background: linear-gradient(
    135deg,
    rgba(255, 214, 0, 0.2),
    rgba(30, 64, 175, 0.2)
  );
  animation: gradient-pulse 2s infinite;
}

@keyframes gradient-pulse {
  0%,
  100% {
    background: linear-gradient(
      135deg,
      rgba(255, 214, 0, 0.2),
      rgba(30, 64, 175, 0.2)
    );
  }
  50% {
    background: linear-gradient(
      135deg,
      rgba(255, 214, 0, 0.4),
      rgba(30, 64, 175, 0.4)
    );
  }
}

/* CISCO Logo Morph Effect */
.partner-card[data-partner="cisco"]:hover img {
  animation: logo-morph 1s ease-in-out;
}

@keyframes logo-morph {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(5deg);
  }
  75% {
    transform: scale(0.9) rotate(-5deg);
  }
}

/* Rwanda Coding Academy Typing Effect */
.partner-card[data-partner="rca"]:hover .partner-front::after {
  content: "Coding...";
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #60f566;
  font-family: "Maven Pro", monospace;
  font-size: 14px;
  animation: typing 2s steps(10, end) infinite;
}

@keyframes typing {
  0% {
    width: 0;
  }
  50% {
    width: 100%;
  }
  100% {
    width: 0;
  }
}

/* Stats Counter Animation */
.stats-counter {
  animation: counter-glow 3s ease-in-out infinite;
}

@keyframes counter-glow {
  0%,
  100% {
    text-shadow: 0 0 5px rgba(255, 214, 0, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 214, 0, 0.8);
  }
}

/* Multi-directional Partners Animation */
.partners-floating-logos {
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.floating-logos-track {
  position: relative;
  width: 800px;
  height: 500px;
}

.partner-logo-float {
  position: absolute;
  cursor: pointer;
  transition: all 2s cubic-bezier(0.4, 0, 0.2, 1);
  animation: logo-pulse 4s ease-in-out infinite;
  width: 192px;
  height: 192px;
}

@keyframes logo-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.partner-logo-float.rotating {
  animation: logo-rotate 1.5s linear;
}

@keyframes logo-rotate {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1);
  }
}

.logo-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  border: 3px solid rgba(255, 214, 0, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  animation: glow-ring 3s ease-in-out infinite;
}

@keyframes glow-ring {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.partner-tooltip {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  padding: 12px 16px;
  border-radius: 8px;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
}

.partner-logo-float:hover .partner-tooltip {
  opacity: 1;
  bottom: -50px;
}

/* Parallax Effect */
.partner-card {
  transform: translateY(0) !important;
}

.partner-card:hover {
  transform: translateY(-10px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .partners-floating-logos {
    display: grid;
  }
  .partner-card {
    transition: transform 0.3s ease;
  }

  .partner-card:hover {
    transform: translateY(-10px) !important;
  }

  .particle {
    font-size: 16px;
  }

  .particle-binary::before {
    font-size: 10px;
  }

  .partners-carousel {
    padding: 1rem;
  }

  .carousel-item {
    flex-direction: column;
    space-y: 2rem;
  }

  .partner-logo-small img {
    height: 3rem;
  }
}

/* Accessibility */
.partner-card:focus-within {
  outline: 2px solid #fbbf24;
  outline-offset: 4px;
}

.partner-card[tabindex="0"]:focus {
  outline: 2px solid #fbbf24;
  outline-offset: 4px;
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .glass-card {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Additional utility classes for partners section */
.rotateY-180 {
  transform: rotateY(180deg);
}

.preserve-3d {
  transform-style: preserve-3d;
}

.backface-hidden {
  backface-visibility: hidden;
}

/* Smooth transitions for all interactive elements */
.partner-card * {
  transition: all 0.3s ease;
}

/* Enhanced focus states for accessibility */
.partner-card:focus {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 30px rgba(255, 214, 0, 0.3);
}

/* Loading animation for images */
.partner-logo-container img {
  opacity: 0;
  animation: fadeInImage 0.5s ease-in-out forwards;
}

@keyframes fadeInImage {
  to {
    opacity: 1;
  }
}

/* Hero Section Optimizations */

/* Reduced blur effect for better video visibility */
.backdrop-blur-sm {
  backdrop-filter: blur(4px) saturate(150%);
  -webkit-backdrop-filter: blur(4px) saturate(150%);
}

.backdrop-blur-md {
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
}

/* Apply Now Button Advanced Animation */
.apply-now-animated {
  animation: pulse-glow-subtle 3s infinite;
  position: relative;
}

.apply-now-animated::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 0.5rem;
  background: linear-gradient(45deg, #e1a609, #091626, #e1a609);
  background-size: 200% 200%;
  animation: gradient-rotate 4s linear infinite;
  opacity: 0.5;
  filter: blur(6px);
  z-index: -1;
}

@keyframes pulse-glow-subtle {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
  }
  50% {
    box-shadow:
      0 0 20px rgba(96, 165, 250, 0.5),
      0 0 30px rgba(255, 214, 0, 0.3);
  }
}

@keyframes gradient-rotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Responsive typography improvements */
@media (max-width: 640px) {
  .text-stroke {
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.5);
  }
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Improved mobile spacing */
@media (max-width: 1024px) {
  #home {
    padding-top: 100px;
    padding-bottom: 60px;
  }
}
