/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  background-color: white;
  margin: auto;
  padding: 0;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-header {
  padding: 15px;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  margin: 0;
  font-family: var(--font-secondary);
  font-size: 1.5rem;
}

.close {
  color: white;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: #f0c0b0;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-main {
  width: 100%;
  height: 500px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 100%;
  padding: 0 20px;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  overflow: hidden;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active {
  border-color: var(--primary-color);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.7);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  color: var(--dark-color);
  transition: all 0.3s ease;
  z-index: 10;
}

.gallery-nav:hover {
  background-color: var(--primary-color);
  color: white;
}

.gallery-prev {
  left: 10px;
}

.gallery-next {
  right: 10px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .gallery-main {
    height: 350px;
  }
  
  .gallery-thumb {
    width: 60px;
    height: 60px;
  }
  
  .modal-content {
    width: 95%;
  }
}

@media (max-width: 576px) {
  .gallery-main {
    height: 250px;
  }
  
  .gallery-thumb {
    width: 50px;
    height: 50px;
  }
  
  .modal-title {
    font-size: 1.2rem;
  }
}
