/* Phase Card Expansion Styles - Similar to Blog Post Expansion */

/* Card flip transition effect */
@keyframes cardFlipEffect {
  0% {
    transform: perspective(1000px) rotateY(0deg);
    opacity: 1;
  }
  50% {
    transform: perspective(1000px) rotateY(90deg);
    opacity: 0.5;
  }
  100% {
    transform: perspective(1000px) rotateY(0deg);
    opacity: 1;
  }
}

.card-flip-transition {
  animation: cardFlipEffect 0.5s ease-in-out;
}

/* Phase card expanded state */
.phase-expanded-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.phase-expanded-overlay.active {
  opacity: 1;
  visibility: visible;
  display: flex !important;
}

.phase-expanded-content {
  background-color: var(--color-surface, rgba(12, 18, 24, 1));
  border: 1px solid var(--color-primary, rgba(0, 255, 255, 1));
  border-radius: 4px;
  padding: 2rem;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  transform: translateY(50px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.phase-expanded-overlay.active .phase-expanded-content {
  transform: translateY(0);
  opacity: 1;
}

.phase-expanded-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-primary-glow, rgba(0, 255, 255, 0.3));
  padding-bottom: 1rem;
}

.phase-expanded-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary, rgba(0, 255, 255, 1));
}

.phase-expanded-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-secondary, rgba(160, 180, 200, 1));
}

.phase-expanded-body {
  line-height: 1.8;
  margin-bottom: 2rem;
}

.phase-expanded-body p {
  margin-bottom: 1rem;
  color: var(--color-text, rgba(220, 235, 245, 1));
}

.phase-expanded-body h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--color-primary, rgba(0, 255, 255, 1));
}

.phase-expanded-body ul {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.phase-expanded-body li {
  margin-bottom: 0.5rem;
  position: relative;
}

.phase-expanded-body li::before {
  content: '›';
  position: absolute;
  left: -1rem;
  color: var(--color-primary, rgba(0, 255, 255, 1));
}

.phase-expanded-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-primary-glow, rgba(0, 255, 255, 0.3));
  text-align: center;
}

.phase-expanded-close {
  background: transparent;
  border: 1px solid var(--color-primary, rgba(0, 255, 255, 1));
  color: var(--color-primary, rgba(0, 255, 255, 1));
  padding: 0.5rem 1.5rem;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.phase-expanded-close:hover {
  background: rgba(0, 255, 255, 0.1);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Tron-style grid overlay for expanded content */
.phase-expanded-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: -1;
}

/* Animation for expanded content appearance */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.phase-expanded-content {
  animation: fadeInUp 0.5s ease forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .phase-expanded-content {
    padding: 1.5rem;
    width: 95%;
  }
  
  .phase-expanded-title {
    font-size: 1.5rem;
  }
  
  .phase-expanded-subtitle {
    font-size: 1.1rem;
  }
}