body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f4f4f4;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  padding: 40px;
  max-width: 1200px;
  margin: auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.view-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .view-button {
  opacity: 1;
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
}

.popup .close,
.popup .nav {
  position: absolute;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
}

.popup .close {
  top: 20px;
  right: 30px;
}

.popup .nav.left {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.popup .nav.right {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

/* door */
.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1200px;
  margin: auto;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}

.card:hover {
  transform: translateY(-6px);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.05);
}

.overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 80, 0.8);
  color: white;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  transition: background 0.3s ease;
}

.overlay h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: white; /* Add this line */
}

.button {
  background: white;
  color: #00007c;
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: bold;
  font-size: 0.8rem;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .button {
  opacity: 1;
}

@media (max-width: 500px) {
  .overlay {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .button {
    align-self: flex-end;
  }
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  font-family: Arial, sans-serif;
}
.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: rgba(0, 0, 139, 0.9); /* Dark Blue */
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
}

.card-title {
  font-weight: bold;
}

.view-more-btn {
  background-color: white;
  color: #00008b; /* Dark Blue */
  border: none;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover .view-more-btn {
  opacity: 1;
}
