/* =====================================================================
   W.I. Freight — Sailing Schedules page
   Scoped under .wifs so the old page CSS can't clash.
   ===================================================================== */

.wifs {
  --ws-primary: var(--color-primary, #2e3192);
  --ws-accent: var(--color-secondary, #be0119);
  --ws-ink: #14163a;
  --ws-muted: #5f6380;
  --ws-line: rgba(20, 22, 58, .08);
  --ws-tint: rgba(46, 49, 146, .06);
  --ws-font: "Grotesk", "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --ws-ease: cubic-bezier(.2, .8, .2, 1);

  display: block;
  background: #f5f6fb;
  color: var(--ws-ink);
  padding-bottom: 4.5rem;
}
.wifs *, .wifs *::before, .wifs *::after { box-sizing: border-box; }
.wifs *:not(.bi) { font-family: var(--ws-font); }
.wifs a { text-decoration: none; }
.ws-container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.ws-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Hero ---------- */
.ws-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0 5.5rem;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(900px 400px at 85% -10%, rgba(255, 255, 255, .14), transparent 60%),
    radial-gradient(600px 300px at -10% 110%, rgba(2, 116, 193, .45), transparent 60%),
    linear-gradient(135deg, var(--ws-primary) 0%, #1d1f6b 100%);
}
.ws-wave { /* slow moving waves along the bottom */
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 70px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 70' preserveAspectRatio='none'%3E%3Cpath d='M0 35 Q150 0 300 35 T600 35 T900 35 T1200 35 V70 H0Z' fill='%23ffffff' fill-opacity='.07'/%3E%3Cpath d='M0 45 Q150 15 300 45 T600 45 T900 45 T1200 45 V70 H0Z' fill='%23ffffff' fill-opacity='.08'/%3E%3C/svg%3E") repeat-x 0 0 / 1200px 70px;
  animation: ws-waves 14s linear infinite;
  pointer-events: none;
}
@keyframes ws-waves { to { background-position: 1200px 0; } }
.ws-hero .ws-container { position: relative; z-index: 1; }
.ws-crumbs {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-bottom: 1.1rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  font-size: .85rem;
  color: rgba(255, 255, 255, .75);
}
.ws-crumbs a { color: rgba(255, 255, 255, .9); }
.ws-crumbs a:hover { color: #fff; }
.ws-crumbs .bi { font-size: .7rem; }
.ws-hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.08;
  color: #fff;
}
.ws-hero p { margin: 0 auto 2rem; max-width: 36rem; font-size: 1.1rem; line-height: 1.6; color: rgba(255, 255, 255, .82); }

.ws-search {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  max-width: 720px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .55);
}
.ws-field {
  position: relative;
  display: flex; align-items: center; gap: .6rem;
  height: 54px;
  margin: 0;
  padding: 0 1.1rem;
  border-radius: 999px;
  color: var(--ws-muted);
  cursor: text;
  transition: background .2s;
}
.ws-field + .ws-field { border-left: 1px solid var(--ws-line); border-radius: 0 999px 999px 0; }
.ws-field:focus-within { background: var(--ws-tint); }
.ws-field .bi { color: var(--ws-primary); font-size: 1.1rem; }
.ws-field input, .ws-field select {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ws-ink);
  font-size: 1rem;
  font-weight: 500;
}
.ws-field select { cursor: pointer; appearance: auto; }
.ws-field select:disabled { cursor: default; color: var(--ws-muted); }

/* ---------- Country chips ---------- */
.ws-chips-wrap { margin-top: -2.4rem; position: relative; z-index: 2; }
.ws-chips {
  display: flex;
  gap: .6rem;
  overflow-x: auto;
  padding: .6rem;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 36px -22px rgba(20, 22, 58, .4);
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.ws-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: .55rem;
  height: 46px;
  padding: 0 1rem 0 .35rem;
  border: 1px solid var(--ws-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ws-primary);
  font-size: .92rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  scroll-snap-align: center;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.ws-chip:hover { border-color: rgba(46, 49, 146, .3); transform: translateY(-2px); }
.wifs .ws-chip img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.ws-chip-dot {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ws-tint); color: var(--ws-accent);
}
.ws-chip.is-active { background: var(--ws-primary); border-color: var(--ws-primary); color: #fff; }
.ws-chip.is-active .ws-chip-dot { background: rgba(255, 255, 255, .2); color: #fff; }
.ws-chip:focus-visible { outline: 3px solid rgba(46, 49, 146, .45); outline-offset: 2px; }

/* ---------- Main ---------- */
.ws-main { padding-top: 2rem; }
.ws-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }

.ws-banner {
  position: relative;
  display: flex; align-items: flex-end;
  min-height: 220px;
  margin-bottom: 1.25rem;
  padding: 1.6rem;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--ws-primary), #0274c1);
  box-shadow: 0 24px 48px -28px rgba(20, 22, 58, .6);
}
.wifs .ws-banner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 25%;
  animation: ws-pan 20s ease-in-out infinite alternate;
}
@keyframes ws-pan { from { transform: scale(1.05); } to { transform: scale(1.15) translate(-2%, 1%); } }
.ws-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14, 16, 50, .85), rgba(14, 16, 50, .15) 70%);
}
.ws-banner-text { position: relative; z-index: 1; }
.ws-route { display: inline-flex; align-items: center; gap: .45rem; font-size: .9rem; color: rgba(255, 255, 255, .85); }
.ws-banner h2 { margin: .25rem 0 .5rem; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -.01em; color: #fff; }
.ws-count {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: .85rem;
  font-weight: 600;
}

/* Sailing cards */
.ws-list { display: grid; gap: 1rem; }
.ws-sail {
  padding: 1.35rem 1.5rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--ws-line);
  box-shadow: 0 16px 32px -26px rgba(20, 22, 58, .45);
  animation: ws-in .5s var(--ws-ease) both;
  animation-delay: calc(var(--i, 0) * 70ms);
  transition: transform .25s var(--ws-ease), box-shadow .25s;
}
.ws-sail:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -26px rgba(20, 22, 58, .55); }
@keyframes ws-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.ws-sail-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.ws-ports { display: flex; align-items: center; gap: .9rem; flex: 1 1 320px; min-width: 0; }
.ws-port small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ws-muted); }
.ws-port strong { display: block; font-size: 1.15rem; font-weight: 700; color: var(--ws-primary); line-height: 1.25; }
.ws-port-to { text-align: right; }
.ws-line {
  position: relative;
  flex: 1 1 auto;
  min-width: 60px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(46, 49, 146, .35) 0 6px, transparent 6px 12px);
}
.ws-boat {
  position: absolute; top: 50%; left: 0;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  margin-top: -15px;
  border-radius: 50%;
  background: var(--ws-accent);
  color: #fff;
  font-size: .85rem;
  box-shadow: 0 0 0 5px rgba(190, 1, 25, .12);
  animation: ws-sail 6s ease-in-out infinite alternate;
}
@keyframes ws-sail { from { left: 0; } to { left: calc(100% - 30px); } }

.ws-status {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .8rem;
  border-radius: 999px;
  background: var(--ws-tint);
  color: var(--ws-muted);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
.ws-status.is-open { background: rgba(37, 211, 102, .12); color: #128c4a; }
.ws-status.is-urgent { background: rgba(255, 152, 0, .14); color: #b25e00; }
.ws-status.is-closed { background: rgba(190, 1, 25, .08); color: var(--ws-accent); }

.ws-dates { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.ws-date { padding: .8rem .9rem; border-radius: 14px; background: #f5f6fb; }
.ws-date span { display: flex; align-items: center; gap: .4rem; font-size: .78rem; color: var(--ws-muted); }
.ws-date strong { display: block; margin-top: .2rem; font-size: .98rem; font-weight: 600; color: var(--ws-ink); }
.ws-date-close { background: rgba(190, 1, 25, .06); }
.ws-date-close span .bi { color: var(--ws-accent); }

.ws-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1rem; font-size: .88rem; color: var(--ws-muted); }
.ws-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.ws-meta .bi { color: var(--ws-primary); }

.ws-more {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%;
  height: 50px;
  margin-top: 1rem;
  border: 1.5px dashed rgba(46, 49, 146, .3);
  border-radius: 16px;
  background: transparent;
  color: var(--ws-primary);
  font-size: .98rem;
  font-weight: 600;
  cursor: pointer;
}
.ws-more:hover { background: var(--ws-tint); }
.ws-more[hidden] { display: none; }

/* Loading skeleton */
.ws-skel { display: grid; gap: .8rem; animation: none; }
.ws-skel span {
  height: 18px; border-radius: 8px;
  background: linear-gradient(90deg, #eceef6 25%, #f6f7fb 50%, #eceef6 75%) 0 0 / 200% 100%;
  animation: ws-shimmer 1.2s linear infinite;
}
.ws-skel span:nth-child(1) { width: 60%; height: 24px; }
.ws-skel span:nth-child(2) { width: 100%; height: 56px; }
.ws-skel span:nth-child(3) { width: 40%; }
@keyframes ws-shimmer { to { background-position: -200% 0; } }

/* Empty state */
.ws-empty {
  padding: 2.5rem 1.5rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--ws-line);
  text-align: center;
  animation: ws-in .4s var(--ws-ease) both;
}
.ws-empty-icon {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 20px;
  background: var(--ws-tint);
  color: var(--ws-primary);
  font-size: 1.7rem;
}
.ws-empty h3 { margin: 1rem 0 .4rem; font-size: 1.3rem; font-weight: 700; color: var(--ws-ink); }
.ws-empty p { margin: 0 auto 1.4rem; max-width: 30rem; color: var(--ws-muted); line-height: 1.6; }
.ws-empty-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; }

/* Buttons */
.ws-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 46px;
  padding: 0 1.2rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: transform .15s, background .2s, color .2s;
}
.ws-btn:hover { transform: translateY(-2px); }
.ws-btn-green { background: #25d366; color: #fff; }
.ws-btn-green:hover { color: #fff; background: #1ebe5b; }
.ws-btn-outline { border-color: rgba(46, 49, 146, .3); color: var(--ws-primary); }
.ws-btn-outline:hover { color: var(--ws-primary); background: var(--ws-tint); }
.ws-btn-light { background: #fff; color: var(--ws-primary); }
.ws-btn-light:hover { color: var(--ws-primary); }

/* Sidebar */
.ws-side { display: grid; gap: 1.25rem; position: sticky; top: 100px; }
.ws-card { padding: 1.5rem; border-radius: 22px; background: #fff; border: 1px solid var(--ws-line); box-shadow: 0 16px 32px -26px rgba(20, 22, 58, .45); }
.ws-card h3 { margin: 0 0 1rem; font-size: 1.15rem; font-weight: 700; color: var(--ws-ink); }
.ws-offer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.ws-offer li { display: flex; gap: .75rem; font-size: .93rem; line-height: 1.45; color: var(--ws-ink); }
.ws-offer li .bi {
  flex: 0 0 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--ws-tint);
  color: var(--ws-accent);
}
.ws-help {
  color: #fff;
  border: 0;
  background:
    radial-gradient(300px 160px at 100% 0, rgba(255, 255, 255, .16), transparent 60%),
    linear-gradient(135deg, var(--ws-primary), #1d1f6b);
}
.ws-help h3 { color: #fff; margin-bottom: .35rem; }
.ws-help p { margin: 0 0 1.1rem; color: rgba(255, 255, 255, .8); }
.ws-help-icon {
  display: inline-grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: .8rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, .14);
  font-size: 1.3rem;
}
.ws-help-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.wifs input:focus-visible, .wifs select:focus-visible, .wifs button:focus-visible, .wifs a:focus-visible { outline: 3px solid rgba(46, 49, 146, .45); outline-offset: 2px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .ws-grid { grid-template-columns: 1fr; }
  .ws-side { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .ws-container { padding: 0 16px; }
  .ws-hero { padding: 2.5rem 0 5rem; }
  .ws-hero p { font-size: 1rem; margin-bottom: 1.5rem; }
  .ws-search { grid-template-columns: 1fr; border-radius: 22px; }
  .ws-field + .ws-field { border-left: 0; border-top: 1px solid var(--ws-line); border-radius: 0 0 18px 18px; }
  .ws-field { height: 50px; }
  .ws-chips { border-radius: 18px; }
  .ws-banner { min-height: 180px; padding: 1.25rem; border-radius: 20px; }
  .ws-sail { padding: 1.1rem; border-radius: 18px; }
  .ws-port strong { font-size: 1rem; }
  .ws-dates { grid-template-columns: 1fr; gap: .45rem; }
  .ws-date { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .65rem .8rem; }
  .ws-date strong { margin: 0; font-size: .92rem; text-align: right; }
  .ws-side { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .wifs *, .wifs *::before, .wifs *::after { animation: none !important; transition-duration: .01ms !important; }
}
