/* Matrix Effect Styling */
:root {
  --matrix-green: #007C37;
  --matrix-dark-green: #00A34A;
  --matrix-black: #f8f8f8;
  --matrix-shadow: 0 0 10px rgba(0, 124, 55, 0.3);
}

.matrix-hero {
  position: relative;
  overflow: hidden;
  background-color: var(--matrix-black);
  color: var(--matrix-green);
  padding: 80px 0;
  text-align: center;
}

.matrix-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(248, 248, 248, 0.85), rgba(232, 245, 240, 0.85));
  z-index: 1;
}

/* Video Background Styles */
.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.7;
}

/* Image Background Styles */
.image-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.7;
}

/* Hero Content Styles (adjust z-index to appear above background) */
.matrix-hero-content {
  position: relative;
  z-index: 2;
}

.matrix-title {
  font-family: 'Segoe UI', sans-serif;
  color: var(--matrix-green);
  text-shadow: var(--matrix-shadow);
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  animation: pulse 2s infinite;
}

.matrix-subtitle {
  font-family: 'Segoe UI', sans-serif;
  color: var(--matrix-green);
  text-shadow: var(--matrix-shadow);
  font-size: 1.5rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.matrix-btn {
  background-color: transparent;
  color: var(--matrix-green);
  border: 2px solid var(--matrix-green);
  padding: 10px 30px;
  font-family: 'Courier New', monospace;
  text-transform: uppercase;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px;
  text-shadow: var(--matrix-shadow);
  position: relative;
  overflow: hidden;
}

.matrix-btn:hover {
  background-color: var(--matrix-dark-green);
  box-shadow: var(--matrix-shadow);
  transform: scale(1.05);
}

.matrix-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.2), transparent);
  transition: all 0.5s;
}

.matrix-btn:hover::before {
  left: 100%;
}

.matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.formation-card {
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--matrix-green);
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 30px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.formation-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--matrix-shadow);
}

.formation-card h3 {
  color: var(--matrix-green);
  font-family: 'Courier New', monospace;
  margin-bottom: 15px;
  text-shadow: var(--matrix-shadow);
}

.formation-card p {
  color: #cccccc;
  margin-bottom: 15px;
}

.formation-card .matrix-btn {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
}

.section-title {
  color: var(--matrix-green);
  font-family: 'Courier New', monospace;
  text-align: center;
  margin: 50px 0 30px;
  font-size: 2rem;
  text-shadow: var(--matrix-shadow);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background-color: var(--matrix-green);
  margin: 15px auto;
  box-shadow: var(--matrix-shadow);
}

/* Animations */
@keyframes pulse {
  0% {
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.8);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 255, 65, 1);
  }
  100% {
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.8);
  }
}

@keyframes flicker {
  0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
    opacity: 1;
  }
  20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
    opacity: 0.4;
  }
}

/* Formation page specific styling */
.formation-content {
  background-color: rgba(0, 0, 0, 0.9);
  padding: 40px;
  border: 1px solid var(--matrix-green);
  box-shadow: var(--matrix-shadow);
  margin-bottom: 40px;
}

.formation-content h2 {
  color: var(--matrix-green);
  font-family: 'Courier New', monospace;
  margin-bottom: 20px;
  text-shadow: var(--matrix-shadow);
  font-size: 1.8rem;
}

.formation-content h3 {
  color: var(--matrix-green);
  font-family: 'Courier New', monospace;
  margin: 30px 0 15px;
  text-shadow: var(--matrix-shadow);
  font-size: 1.5rem;
}

.formation-content p, .formation-content li {
  color: #cccccc;
  line-height: 1.6;
  margin-bottom: 15px;
}

.formation-content ul, .formation-content ol {
  padding-left: 25px;
  margin-bottom: 20px;
}

.formation-content li {
  margin-bottom: 10px;
}

.formation-details {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 20px;
  background-color: rgba(0, 59, 0, 0.3);
  border: 1px solid var(--matrix-green);
}

.formation-detail {
  flex: 0 0 48%;
  margin-bottom: 15px;
}

.formation-detail strong {
  color: var(--matrix-green);
  font-family: 'Courier New', monospace;
  display: block;
  margin-bottom: 5px;
}

@media (max-width: 768px) {
  .formation-detail {
    flex: 0 0 100%;
  }
}

/* Program module styling */
.program-module {
  margin-bottom: 30px;
  padding: 20px;
  background-color: rgba(0, 59, 0, 0.2);
  border-left: 3px solid var(--matrix-green);
}

.program-module h4 {
  color: var(--matrix-green);
  font-family: 'Courier New', monospace;
  margin-bottom: 15px;
  text-shadow: var(--matrix-shadow);
  font-size: 1.3rem;
}

.program-module:hover {
  background-color: rgba(0, 59, 0, 0.4);
  transform: translateX(5px);
  transition: all 0.3s ease;
}
