/* Modal Overlay (Background) */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black */
  backdrop-filter: blur(4px); /* Nice modern blur effect */
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* The Modal Box */
.modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 0;
  width: 90%;
  max-width: 700px;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  overflow: hidden;
}

/* Modal Layout (Flexbox for side-by-side img/text) */
.modal-body {
  display: flex;
  flex-direction: row;
}

.modal-image-wrapper {
  flex: 1;
  min-height: 300px;
}

.modal-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-text {
  flex: 1.5;
  padding: 2rem;
}

/* Typography matching your theme */
.modal-text h3 {
  margin-top: 0;
  color: #333;
  font-size: 1.8rem;
}

.modal-subtitle {
  color: #481B79; /* Your theme purple */
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Close Button */
.close-btn {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.close-btn:hover {
  color: #481B79;
}

/* Visible State (toggled by JS) */
.modal-overlay.show {
  display: block;
  opacity: 1;
}

.modal-overlay.show .modal-content {
  transform: translateY(0);
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .modal-body {
    flex-direction: column;
  }
  .modal-image-wrapper {
    height: 200px;
  }
}