/* Desktop Dock-Style Navbar (desktop only)
   - Keeps existing nav/header behavior on mobile
   - Turns the desktop navbar into a centered bottom "dock"
*/

@media (min-width: 768px) {
  body.has-desktop-dock {
    /* Dock should overlay the hero (no layout whitespace) */
    padding-top: 0;
    padding-bottom: 0;
  }

  /* Support both <nav> and <header> (some pages use header as the navbar) */
  nav.dock-nav,
  header.dock-nav {
    position: fixed !important;
    top: 18px !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: min(920px, calc(100vw - 48px)) !important;
    z-index: 9999 !important;

    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    border-radius: 22px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18) !important;

    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }

  nav.dock-nav > div,
  header.dock-nav > div {
    max-width: none !important;
    padding: 10px 12px !important;
  }

  /* Use dock "glass" styling on other surfaces (e.g. index booking card) */
  .dock-surface {
    background: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }

  body.bg-black .dock-surface {
    background: rgba(17, 24, 39, 0.62) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
  }

  /* Sticky secondary bars (used on Tours filters) should sit under the dock */
  .has-desktop-dock .dock-secondary-sticky {
    top: 96px !important;
  }

  /* Neutralize the Tailwind nav height on desktop so the dock can shrink */
  nav.dock-nav .h-16,
  header.dock-nav .h-16 {
    height: auto !important;
  }

  /* Logo */
  .dock-nav .dock-logo img {
    height: 38px !important;
    width: auto !important;
  }

  /* Dock menu */
  .dock-nav .dock-menu {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-left: 12px !important;
  }

  .dock-nav .dock-menu a {
    position: relative;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 10px 14px !important;
    border-radius: 16px !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    color: #1f2937 !important;
    background: transparent !important;
    text-decoration: none !important;

    transition:
      transform 0.15s ease,
      background-color 0.15s ease,
      box-shadow 0.15s ease,
      filter 0.15s ease;
    will-change: transform;
  }

  .dock-nav .dock-menu a:hover {
    background: rgba(0, 0, 0, 0.06) !important;
    transform: translateY(-2px) scale(1.03);
  }

  .dock-nav .dock-menu a:active {
    transform: translateY(0) scale(0.98);
  }

  .dock-nav .dock-menu a.dock-cta {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35) !important;
  }

  .dock-nav .dock-menu a.dock-cta:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
  }

  .dock-nav .dock-menu a.dock-active {
    background: rgba(37, 99, 235, 0.12) !important;
    color: #1d4ed8 !important;
  }

  .dock-nav .dock-menu a.dock-active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 6px;
    height: 6px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #1d4ed8;
    opacity: 0.9;
  }

  /* Icon-only dock items (e.g. AFCON logo) */
  .dock-nav .dock-menu a.dock-icon {
    padding: 6px !important;
    border-radius: 999px !important;
  }

  .dock-nav .dock-menu a.dock-icon img {
    height: 28px !important;
    width: 28px !important;
  }

  /* Dark pages (Private booking) */
  body.bg-black .dock-nav {
    background: rgba(17, 24, 39, 0.62) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45) !important;
  }

  body.bg-black .dock-nav .dock-menu a {
    color: rgba(255, 255, 255, 0.92) !important;
  }

  body.bg-black .dock-nav .dock-menu a:hover {
    background: rgba(255, 255, 255, 0.10) !important;
  }

  body.bg-black .dock-nav .dock-menu a.dock-active {
    background: rgba(212, 175, 55, 0.18) !important;
    color: #d4af37 !important;
  }

  body.bg-black .dock-nav .dock-menu a.dock-active::after {
    background: #d4af37;
  }

  body.bg-black .dock-nav .dock-menu a.dock-cta {
    background: linear-gradient(135deg, #d4af37, #b5942e) !important;
    color: #111827 !important;
    box-shadow: 0 10px 22px rgba(212, 175, 55, 0.35) !important;
  }
}

/* Reusable button style that matches the dock CTA (opt-in via class) */
.dock-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

.dock-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
}

.dock-btn:active {
  transform: translateY(0) scale(0.99);
}

/* Image-only cards with desktop-only hover overlay (used by city-tours + other pages) */
.image-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem; /* rounded-xl */
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.10);
  background: #0b1220;
}

.image-card__img {
  display: block;
  width: 100%;
  height: 15rem; /* h-60 */
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 300ms ease;
}

.image-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.20), rgba(0, 0, 0, 0));
  color: #fff;
}

.image-card__title {
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 0;
}

.image-card__desc {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.88);
}

.image-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  margin-top: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}
.image-card__link:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.30);
}

@media (min-width: 768px) {
  .image-card__overlay {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 220ms ease, transform 220ms ease;
    pointer-events: none;
  }
  .image-card:hover .image-card__overlay {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .image-card:hover .image-card__img {
    transform: scale(1.06);
  }
}
