/* ==========================================================================
   Polish layer (loaded after motion.css) — visual refinements only.
   ========================================================================== */

/* ---------- Background: same multi-color wash, calmer ----------
   Was a full hue-rotate every 6s (repaints the whole screen each frame and
   cycles pink/green blotches). Now the same palette slowly drifts. */
body::before {
  inset: -12%;
  background:
    radial-gradient(60% 55% at 12% 4%, rgba(22,104,227,.20), transparent 70%),
    radial-gradient(55% 50% at 92% 6%, rgba(255,184,28,.20), transparent 68%),
    radial-gradient(60% 60% at 90% 94%, rgba(233,72,110,.13), transparent 70%),
    radial-gradient(60% 55% at 6% 94%, rgba(52,168,83,.14), transparent 70%),
    radial-gradient(50% 45% at 50% 50%, rgba(140,110,240,.08), transparent 72%);
  will-change: transform;
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: mav-aurora 40s ease-in-out infinite alternate; }
}
@keyframes mav-aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(4%, -3%, 0) scale(1.06); }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.03); }
}

/* ---------- Type rhythm ---------- */
.home-title { letter-spacing: -.015em; line-height: 1.12; }
.home-title, .home-section-label, .xds-h { text-wrap: balance; }
/* category row scrolls sideways on small screens: fade the edge so it reads as scrollable */
@media (max-width: 760px) {
  .hw-tabs { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); scrollbar-width: none; }
  .hw-tabs::-webkit-scrollbar { display: none; }
}
.home-section-label { font-size: 1.4rem; letter-spacing: -.015em; margin: 2.6rem 0 1rem; }
.xds-h { letter-spacing: -.015em; }

/* ---------- Top nav: refined active state ---------- */
@media (min-width: 1201px) {
  .nav-group.active-group > .nav-group-btn,
  .nav-group.open > .nav-group-btn { background: transparent; border-bottom-color: transparent; position: relative; }
  .nav-group.active-group > .nav-group-btn::after {
    content: ""; position: absolute; left: 1rem; right: 1rem; bottom: 0; height: 3px;
    border-radius: 3px 3px 0 0; background: #1668e3;
  }
  .nav-group.open > .nav-group-btn { color: #191e3b; }
  .mav-navpill { background: #e9ecf4; }
}

/* ---------- "Explore all tools": aligned, compact, even rows ---------- */
.home-grid { max-width: none; gap: .9rem; }
@media (min-width: 1150px) { .home-grid { grid-template-columns: repeat(7, 1fr); } }
.home-card {
  padding: 1.25rem .7rem 1.1rem; border-radius: 16px; gap: .2rem;
  border-color: #e6e7ee; box-shadow: 0 1px 2px rgba(25,30,59,.04);
}
.home-card:hover { border-color: #cfd9f2; box-shadow: 0 10px 24px rgba(25,30,59,.10); }
.home-ico {
  width: 52px; height: 52px; margin-bottom: .55rem; font-size: 1.55rem;
  background: #f0f4fd; box-shadow: inset 0 0 0 1px rgba(22,104,227,.08);
  transition: background .2s ease;
}
.home-card:hover .home-ico { background: #e3ecfd; }
.home-name { font-size: .97rem; color: #191e3b; }
.home-desc { font-size: .78rem; color: #5f5f65; }

/* ---------- Photo cards: crisper edges ---------- */
.photo-card { border-color: #e6e7ee; box-shadow: 0 1px 2px rgba(25,30,59,.05); }
.pc-heart { width: 32px; height: 32px; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); color: #b4b8c6; }

/* ---------- Destination cards: shimmer until the photo arrives, then fade in ---------- */
.xds-card { border-color: #e6e7ee; }
.xds-img:not([style*="background-image"]) {
  background-image: linear-gradient(100deg, #e6eaf3 30%, #f3f5fa 50%, #e6eaf3 70%);
  background-size: 300% 100%;
  animation: mav-shimmer 1.4s ease-in-out infinite;
}
.xds-img[style*="background-image"] { animation: mav-img-in 600ms ease; }
@keyframes mav-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes mav-img-in { from { opacity: .35; } }

/* ---------- Keyboard focus: one consistent ring ---------- */
:is(button, a, [role="button"]):focus-visible {
  outline: 2px solid #1668e3; outline-offset: 2px;
}
.photo-card:focus-visible, .home-card:focus-visible, .xds-card:focus-visible { outline-offset: 3px; }

/* ---------- Island: subtle depth ---------- */
#mav-island { box-shadow: 0 12px 32px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.10); }
.mav-ls-pill { box-shadow: 0 14px 34px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.10); }

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .xds-img:not([style*="background-image"]), .xds-img[style*="background-image"] { animation: none; }
}

/* ==========================================================================
   Polish pass 2 — consistency across tabs
   ========================================================================== */

/* Trains: helper line sits quietly under the fields like the other tabs */
#tab-trains .flt-controls { justify-content: flex-start; margin-top: .55rem; padding: 0 .4rem; }
#tab-trains .flt-controls span { color: #8a8fa3 !important; }

/* Cruises: native selects → same field style as every other search */
.cruise-form { padding: .8rem; border-color: #e6e7ee; box-shadow: 0 1px 2px rgba(25,30,59,.04); align-items: center; }
.cruise-form input, .cruise-form select { min-height: 54px; border-color: #c9ccd8; transition: border-color .15s, box-shadow .15s; }
.cruise-form input:focus, .cruise-form select:focus { border-color: #1668e3; box-shadow: 0 0 0 1px #1668e3; }
.cruise-form select {
  -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23191e3b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center;
}

/* Cruise line cards: lift on hover, arrow nudges */
.cruise-card { transition: transform 250ms var(--ease-out), box-shadow 250ms var(--ease-out); }
.cruise-card em { display: inline-block; transition: transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .cruise-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(15,20,40,.28); }
  .cruise-card:hover em { transform: translateX(3px); }
}
.cruise-card:active { transform: scale(.98); }

/* Trip Planner wizard: brand navy instead of flat black */
.wizard-header { background: linear-gradient(135deg, #191e3b 0%, #14417e 100%); padding: 1.3rem 1.6rem 1.2rem; }
.wizard-header h2 { font-weight: 600; letter-spacing: -.015em; }

/* My Trip: hide the empty trip-length badge */
.trip-duration:empty { display: none; }

/* Footer: one continuous block instead of three bands */
footer:not(.site-footer) {
  background: #f6f6f9; color: #8a8fa3; padding: 0 1rem 1.4rem; font-size: .76rem;
}
.site-footer { border-top: none; padding-bottom: .7rem; }
.footer-link { text-underline-offset: 3px; text-decoration-color: rgba(95,95,101,.35); transition: color .15s, text-decoration-color .15s; }
.footer-link:hover { color: #1668e3; text-decoration-color: currentColor; }

/* Newsletter band: input + button share one rounded group */
.nl-signup-form input { border-radius: 10px; }
.nl-signup-btn { border-radius: 10px; transition: transform var(--dur-bouncy) var(--spring-bouncy), filter .15s; }
.nl-signup-btn:hover { filter: brightness(1.05); }
.nl-signup-btn:active { transform: scale(.96); transition-duration: 120ms; }

/* Right-rail product cards: hover lift + arrow nudge */
@media (hover: hover) and (pointer: fine) {
  .flt-gear-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(25,30,59,.10); border-color: #cfd9f2; }
  .flt-gear-card:hover .flt-gear-btn { transform: translateX(2px); }
}
.flt-gear-card { transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color .15s; }
.flt-gear-btn { display: inline-block; transition: transform 300ms var(--ease-out); }

/* Cruises: destination field gets the extra room its placeholder needs */
.cruise-form input { flex: 1.8 1 300px; }
