/* ---- MODAL STYLES ---- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background-color: rgba(0,0,0,0.85);
  overflow: auto;
}
.modal-content {
  background: #fff;
  margin: 4vw auto;
  padding: 0;
  border-radius: 12px;
  max-width: 650px;
  width: 90vw;
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
  position: relative;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn {
  from { transform: scale(0.97); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 12px; right: 24px;
  font-size: 2rem;
  font-weight: bold;
  color: #444;
  cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover { color: #2196f3; }
.modal-body {
  display: flex;
  flex-direction: row;
  gap: 24px;
  padding: 32px 32px 24px 32px;
}
.modal-img {
  flex: 0 0 220px;
  text-align: center;
}
.modal-img img {
  width: 200px; height: 130px;
  object-fit: cover;
  border-radius: 7px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
  background: #222;
}
.modal-img-caption {
  font-size: 0.92em;
  color: #777;
  margin-top: 7px;
  text-align: center;
}
.modal-info {
  flex: 1 1 0;
  min-width: 0; /* <--- ADD THIS LINE */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.modal-info h2 {
  margin-top: 0;
  font-size: 1.6em;
  margin-bottom: 12px;
}
.modal-info p {
  margin: 0 0 18px 0;
  font-size: 1.05em;
  color: #222;
  line-height: 1.7;
}
.tools-used-title {
  margin: 10px 0 8px 0;
  font-weight: bold;
  color: #333;
  font-size: 1em;
}
.tools-row {
  display: flex;
  flex-direction: row;
  gap: 18px;
  margin-bottom: 20px;
}
.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  font-size: 0.93em;
}
.tool img {
  width: 32px; height: 32px;
  margin-bottom: 5px;
  background: #eee;
  border-radius: 6px;
}
.button {
  display: inline-block;
  padding: 12px 28px;
  background: #2196f3;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.05em;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(33,150,243,0.09);
  cursor: pointer;
  transition: background 0.18s;
}
.button:hover {
  background: #1976d2;
}

/* Responsive styles */
@media (max-width: 600px) {
  .modal-content {
    padding: 0;
    max-width: 97vw;
  }
  .modal-body {
    flex-direction: column;
    gap: 16px;
    padding: 22px 8px 18px 8px;
  }
  .modal-img {
    margin-bottom: 5px;
  }
  .modal-img img {
    width: 100%;
    height: auto;
    max-width: 330px;
    max-height: 170px;
  }
}
@keyframes fadeOut {
  from { opacity: 1; transform: scale(1);}
  to { opacity: 0; transform: scale(0.97);}
}
.modal-content.fade-out {
  animation: fadeOut 0.2s forwards;
}
