.container {
  max-width: 80vw; /* or whatever fits your design */
  margin: 0 auto;    /* centers the container */
  padding: 0 20px;   /* prevents content from touching the edges on small screens */
}

@media (max-width: 600px) {
  .container {
    width: 100%;
    max-width: 95vw; /* more flexible on small screens */
    padding: 0 10px;   /* less padding on mobile */
  }
}

h1 {
  margin-bottom: 30px; /* space between heading and grid */
  margin-top: 30px;
  text-align: center;   /* optional: center heading */
  font-size: 2.7rem;
}

h2 {
  margin-top: 10px;
  margin-bottom: 10px;
  text-align: left; /* optional */
  font-size: 2.2rem;
}

/* Jump navigation */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 30px 0 50px;
  font-size: 0.95rem;
}

.jump-nav span {
  font-weight: 600;
}

.jump-nav a {
  text-decoration: none;
  color: #333;
  padding: 6px 12px;
  border-radius: 20px;
  background-color: #f2f2f2;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.jump-nav a:hover {
  background-color: #222;
  color: #fff;
}



/* Grid layout */
.destinations-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* exactly 3 columns */
  gap: 30px;
  padding-bottom: 20px;
  padding-top: 20px;
}

/* Image card */
.image-card {
  position: relative;
  height: 460px;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Image */
.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
transition: transform 0.5s ease, filter 0.5s ease;
}

/* Overlay */
.card-overlay {
  position: absolute;
  display: flex;
  align-items: flex-end; /* vertical alignment at bottom */
  justify-content: flex-start; /* horizontal alignment to left */
  padding: 10px;
  transition: background-color 0.4s ease;
}

.card-overlay h3 {
  color: white;
  margin: 0;
  padding: 4px 8px;
  border-radius: 4px;
}

/* Hover effect */
.image-card:hover .card-overlay {
  background: rgba(0, 0, 0, 0.35); /* darkens on hover */
}

.image-card:hover img {
  transform: scale(1.05); /* zoom image */
}

/* Overlay text stays visible */
.card-overlay h3 {
  color: #fff;
  font-size: 1.4rem;
  margin: 0;
  transition: color 0.4s ease;
}



@media (max-width: 992px) {
  .destinations-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 per row on tablet */
  }
}

@media (max-width: 600px) {
  .destinations-grid {
    grid-template-columns: 1fr; /* 1 per row on mobile */
  }
}



