/* Ferries — Mallorca Meet content vertical (matches cities / beaches / venues) */

body.page-ferries-hub .site-main,
body.page-ferry-route .site-main {
  overflow-x: clip;
}

/* Hub */
.ferry-explorer {
  padding: clamp(0.5rem, 1.5vw, 1rem) 0 clamp(2rem, 4vw, 3rem);
  margin-top: clamp(-0.75rem, -1.5vw, -0.35rem);
}

.ferry-explorer--full-width .ferry-explorer__shell {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
  .ferry-explorer--full-width .ferry-explorer__shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

.ferry-explorer__panel {
  width: 100%;
}

/* Panel uses overflow:hidden — inner blocks need the same inset as other explorers */
.ferry-explorer__panel > .section-head,
.ferry-explorer__panel > .ferry-hub-glance,
.ferry-explorer__panel > .ferry-explorer__toolbar,
.ferry-explorer__panel > .ferry-route-grid {
  padding-inline: clamp(16px, 2.2vw, 22px);
}

.ferry-explorer__panel > .section-head {
  padding-top: clamp(16px, 2.2vw, 22px);
}

.ferry-explorer__panel > .ferry-route-grid {
  padding-bottom: clamp(16px, 2.2vw, 22px);
}

.ferry-explorer .section-head .eyebrow {
  margin-inline: 0;
  padding-inline: 0;
  transform: none;
  position: static;
  display: block;
  width: auto;
  max-width: 100%;
}

.ferry-explorer .section-head {
  margin-bottom: 0.75rem;
}

.ferry-explorer .section-head p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  max-width: 42rem;
}

.ferry-hub-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 1rem 0 1.1rem;
  max-width: 520px;
}

.ferry-hub-glance__item {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(2, 48, 71, 0.05);
}

.ferry-hub-glance__item strong {
  display: block;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.ferry-hub-glance__item span {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--brand-violet);
}

.ferry-explorer__toolbar {
  margin-bottom: 1rem;
}

.ferry-route-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  width: 100%;
}

@media (min-width: 640px) {
  .ferry-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .ferry-route-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ferry-route-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.ferry-route-card .ce-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.ferry-route-card .ce-card__cta {
  margin-top: auto;
  padding-top: 10px;
}

.ferry-route-card .ce-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ferry-route-card.is-hidden {
  display: none;
}

.ferry-route-card__visual {
  position: relative;
  min-height: 72px;
  height: 72px;
}

.ferry-route-card__visual--mainland {
  background: linear-gradient(135deg, #2563a8, #08b69b);
}

.ferry-route-card__visual--islands {
  background: linear-gradient(135deg, #8735b5, #4fd1c5);
}

.ferry-route-visual {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px 12px;
  font-size: 0.78rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.96);
}

.ferry-route-visual__port {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ferry-route-visual__ship {
  flex: 0 0 auto;
  font-size: 1.1rem;
}

/* Route page — reuse city vertical rhythm */
.ferry-page--route .city-body .section {
  padding: clamp(1.35rem, 3vw, 2rem) 0;
}

.ferry-planning-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 640px) {
  .ferry-planning-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .ferry-planning-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ferry-planning-card h3 {
  font-size: 0.98rem;
  margin: 0 0 6px;
}

.ferry-planning-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 500;
}

.ferry-discovery-grid {
  gap: 14px;
}

.ferry-discovery-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ferry-discovery-card .ce-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.ferry-discovery-card .ce-card__meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.ferry-discovery-card .ce-card__cta {
  margin-top: auto;
  padding-top: 10px;
}

.ferry-route-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ferry-page--route .city-overview-side .city-bestfor-label {
  line-height: 1.35;
}

.ferry-planning-card p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ferry-discovery-grid .ce-card__visual {
  min-height: 72px;
  height: 72px;
}

/* End booking module — subtle, Mallorca Meet tone */
.ferry-booking-cta {
  background: linear-gradient(165deg, rgba(255, 242, 217, 0.55), rgba(40, 136, 161, 0.08));
  border-top: 1px solid var(--line);
}

.ferry-booking-cta__inner {
  max-width: 720px;
}

.ferry-booking-cta__lede {
  margin: 0 0 0.5rem;
  color: var(--muted);
  line-height: 1.55;
}

.ferry-booking-cta__note {
  margin: 0 0 1rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.ferry-booking-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0.75rem;
}

.ferry-booking-cta__trust {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.ferry-page--route .faq {
  max-width: 820px;
}

.ferryhopper-widget--compact {
  display: none;
}

/* Legacy / removed booking-first UI */
.ferry-route-cta-bar,
.ferry-trust,
.ferry-section--booking,
.ferry-section--trips,
.ferry-snapshot-banner,
.ferry-table-wrap,
.ferry-departure-cards,
.ferry-route-card__today,
.ferry-route-card__stale {
  display: none !important;
}

@media (max-width: 520px) {
  .ferry-hub-glance {
    grid-template-columns: 1fr;
  }
}
