/* Go anywhere in Sri Lanka — premium motion */

#tours article {
  position: relative;
  overflow: hidden;

  transition:
    transform 350ms ease-out,
    box-shadow 350ms ease-out,
    border-color 350ms ease-out;
}

#tours article:hover,
#tours article:focus-within {
  transform: translateY(-6px);
  border-color: rgba(37,99,235,.35) !important;
  box-shadow: 0 22px 50px rgba(15,23,42,.16);
}

/* Image wrapper */
#tours article > div:first-child {
  position: relative;
  overflow: hidden;
}

/* Destination photo */
#tours article > div:first-child img {
  display: block;
  width: 100%;
  height: 100%;

  object-fit: cover;

  transform: scale(1);
  filter: saturate(.96) brightness(.98);

  transition:
    transform 700ms cubic-bezier(.2,.7,.2,1),
    filter 500ms ease-out;
}

/* Automatic zoom when mouse pointer is over card */
#tours article:hover > div:first-child img,
#tours article:focus-within > div:first-child img {
  transform: scale(1.12);
  filter: saturate(1.08) brightness(1.03);
}

/* Soft highlight over photo */
#tours article > div:first-child::after {
  content: "";
  position: absolute;
  inset: 0;

  pointer-events: none;

  background:
    linear-gradient(
      120deg,
      transparent 20%,
      rgba(255,255,255,.14) 48%,
      transparent 72%
    );

  transform: translateX(-130%);
  transition: transform 850ms ease-out;
}

#tours article:hover > div:first-child::after,
#tours article:focus-within > div:first-child::after {
  transform: translateX(130%);
}

/* Keyboard accessibility */
#tours article a:focus-visible,
#tours article button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

/* Mobile: slightly calmer */
@media (max-width: 639px) {
  #tours article:hover {
    transform: translateY(-3px);
  }

  #tours article:hover > div:first-child img {
    transform: scale(1.07);
  }
}

/* Respect reduced-motion setting */
@media (prefers-reduced-motion: reduce) {
  #tours article,
  #tours article > div:first-child img,
  #tours article > div:first-child::after {
    transition: none !important;
    transform: none !important;
  }
}
