@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal {
  display: none; 
  position: fixed; 
  top: 0; left: 0; width: 100%; height: 100%; 
  background-color: rgba(0, 0, 0, 0.8); 
  z-index: 1000;
  justify-content: center; align-items: center;
}

.modal.activ {
  display: flex; 
  animation: fadeIn 0.3s ease-out; /* Folosește @keyframes fadeIn din pagina principală */
}

.modal-content {
  background-color: #fff; 
  padding: 30px; 
  border-radius: 12px; 
  max-width: 800px; 
  width: 90%; 
  position: relative; 
  text-align: left;
  max-height: 90vh; overflow-y: auto; 
  animation: zoomIn 0.3s ease-out forwards; 
}

.close-modal {
  position: absolute; 
  top: 15px; 
  right: 20px; 
  font-size: 30px; 
  font-weight: bold; 
  color: #333; 
  cursor: pointer; 
  transition: color 0.3s ease;
}

.close-modal:hover { 
  color: #d9534f; 
}

.modal-content h2 { 
  color: #002b5e; 
  margin-top: 0; 
  margin-bottom: 5px; 
  font-size: 2rem;
}

.modal-content h3 { 
  color: #666; 
  font-size: 1.1rem; 
  margin-top: 0; 
  margin-bottom: 20px; 
  border-bottom: 1px solid #ddd; 
  padding-bottom: 10px; 
  background: none; 
  box-shadow: none;
}

.modal-content p { 
  color: #444; 
  line-height: 1.6; 
  font-size: 1.05rem;
}

.modal-galerie {
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 15px; 
  margin-bottom: 20px;
}

.modal-galerie img {
  width: 100%; 
  height: 150px; 
  object-fit: cover; 
  border-radius: 8px; 
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.slider-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 51, 102, 0.7); 
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 18px;
  border-radius: 5px;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.slider-btn:hover {
  background-color: rgba(0, 51, 102, 1);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

@media (max-width: 850px) {
  .modal-galerie { 
    position: relative;
    display: block; 
  }
  
  .modal-galerie img { 
    display: none;
    width: 100%;
    height: auto; 
    aspect-ratio: 16/9; 
    border-radius: 8px;
  }

  .modal-galerie img.slide-activ {
    display: block; 
    animation: fadeIn 0.3s ease-out; /* Folosește @keyframes fadeIn din pagina principală */
  }

  .slider-btn {
    display: block; 
  }
}