/* Regions & destinations — listing + detail page zones */

.rbbe-places {
  margin: 1.5rem 0;
}

.rbbe-places-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.rbbe-place-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.rbbe-place-card__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.rbbe-place-card__title a {
  text-decoration: none;
}

.rbbe-place-card__excerpt {
  margin: 0 0 12px;
  color: rgba(0, 0, 0, 0.72);
  font-size: 0.95rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.rbbe-place-card__meta {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(0, 0, 0, 0.65);
}

.rbbe-place-card__link {
  font-weight: 600;
}

/* =========================================================
 * Detail pages — scoped layout (departures + prose + widgets)
 * ========================================================= */

.rbbe-page--destination-detail,
.rbbe-page--region-detail,
.rbbe-page--port-detail {
  --rbbe-ink: var(--ramaya-heading, #0e1f29);
  --rbbe-body: var(--ramaya-body-text, #2a3b46);
  --rbbe-muted: var(--ramaya-muted, #5b6f7a);
  --rbbe-teal: var(--ramaya-sea-deep, var(--ramaya-link, #2c5f6b));
  --rbbe-sea: var(--ramaya-sea, #52a9b8);
  --rbbe-sea-hover: var(--ramaya-sea-hover, #4496a4);
  --rbbe-accent: var(--ramaya-sea, #52a9b8);
  --rbbe-line: var(--ramaya-border, #e3eaee);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  color: var(--rbbe-body);
}

/*
 * Route — map plugin tokens from --rbbe-route-* (canonical hex in ramaya-wp-theme
 * assets/css/rbbe-place-guides.css on body.rbbe-route-detail). Fallbacks if theme bridge absent.
 */
body.rbbe-route-detail {
  --rbbe-route-ink: #3a2f26;
  --rbbe-route-body: #52483f;
  --rbbe-route-muted: #7a6e60;
  --rbbe-route-accent: #8b6f4e;
  --rbbe-route-accent-deep: #6b543d;
  --rbbe-route-line: #e5ddd2;
  --rbbe-route-soft: #f6f1ea;
  --rbbe-route-surface: #fffdf9;
}

.rbbe-page--route-detail {
  --rbbe-ink: var(--rbbe-route-ink);
  --rbbe-body: var(--rbbe-route-body);
  --rbbe-muted: var(--rbbe-route-muted);
  --rbbe-teal: var(--rbbe-route-accent);
  --rbbe-teal-deep: var(--rbbe-route-accent-deep);
  --rbbe-sea: var(--rbbe-route-accent);
  --rbbe-sea-hover: color-mix(in srgb, var(--rbbe-route-accent) 90%, #fff);
  --rbbe-sea-deep: var(--rbbe-route-accent-deep);
  --rbbe-accent: var(--rbbe-route-accent);
  --rbbe-line: var(--rbbe-route-line);
  --rbbe-bg-soft: var(--rbbe-route-soft);
  --rbbe-surface: var(--rbbe-route-surface);
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  color: var(--rbbe-body);
}

.rbbe-page--destination-detail *,
.rbbe-page--region-detail *,
.rbbe-page--route-detail *,
.rbbe-page--port-detail *,
.rbbe-page--destination-detail *::before,
.rbbe-page--region-detail *::before,
.rbbe-page--route-detail *::before,
.rbbe-page--port-detail *::before,
.rbbe-page--destination-detail *::after,
.rbbe-page--region-detail *::after,
.rbbe-page--route-detail *::after,
.rbbe-page--port-detail *::after {
  box-sizing: border-box;
}

.rbbe-place-article {
  margin: 0 0 1rem;
}

.rbbe-place-article__head {
  margin-bottom: 0;
}

.rbbe-place-article__title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.2;
  color: var(--rbbe-ink, #0e1f29);
}

.rbbe-place-article__excerpt {
  margin: 0;
  color: var(--rbbe-muted, rgba(0, 0, 0, 0.72));
  font-size: 1.05rem;
  line-height: 1.5;
}

.rbbe-place-article__meta {
  margin: 0 0 0.5rem;
  color: var(--rbbe-muted, rgba(0, 0, 0, 0.65));
  font-size: 0.95rem;
}

.rbbe-place-article__meta a {
  color: var(--rbbe-teal, #2c5f6b);
  text-decoration: none;
  font-weight: 500;
}

.rbbe-place-article__meta a:hover {
  text-decoration: underline;
}

/* Departures block: isolated from theme .entry-content form/input rules */
.rbbe-page__departures {
  margin: 0 0 1.5rem;
  width: 100%;
  max-width: 100%;
  clear: both;
}

.rbbe-page__departures .rbbe-schedules {
  margin-bottom: 0;
}

.rbbe-page--route-detail .rbbe-page__departures {
  margin-top: -0.125rem;
}

.rbbe-page--route-detail .rbbe-place-article {
  margin-bottom: 0.375rem;
}

/* Prose: editor content only — theme typography reset inside zone */
.rbbe-page__prose {
  margin: 0 0 1.5rem;
  width: 100%;
  max-width: 100%;
  clear: both;
}

.rbbe-page__prose .rbbe-prose {
  font-size: 1.02rem;
  line-height: 1.75;
  color: var(--rbbe-body, #2a3b46);
}

.rbbe-page__prose .rbbe-prose > :first-child {
  margin-top: 0;
}

.rbbe-page__prose .rbbe-prose > :last-child {
  margin-bottom: 0;
}

.rbbe-page__prose .rbbe-prose p {
  margin: 0 0 1.1em;
}

/* Section-based destination articles */
.rbbe-destination-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Destination detail: scannable section cards (not a long essay wall) */
.rbbe-destination-detail .rbbe-destination-sections {
  gap: 1.1rem;
  margin: 0.35rem 0 0.5rem;
}
.rbbe-destination-detail .rbbe-destination-section {
  padding: 1.15rem 1.25rem 1.3rem;
  border: 1px solid var(--rbbe-line, #d9e4e8);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fafb 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}
.rbbe-destination-detail .rbbe-destination-section__title {
  margin: 0 0 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rbbe-line, #d9e4e8) 85%, #1d5b66);
  font-size: clamp(1.12rem, 2.4vw, 1.32rem);
  letter-spacing: -0.01em;
}
.rbbe-destination-detail .rbbe-destination-section__body {
  max-width: none;
  width: 100%;
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--rbbe-body, #2a3b46);
}
.rbbe-destination-detail .rbbe-destination-section__body p {
  margin: 0 0 0.85em;
}
.rbbe-destination-detail .rbbe-destination-section__body p:last-child {
  margin-bottom: 0;
}
.rbbe-destination-detail .rbbe-destination-section__body > p:first-of-type {
  font-size: 1.02rem;
  color: #1a3340;
}
/* Best time: keep short + emphasize the key window */
.rbbe-destination-detail .rbbe-destination-section--best_time_to_visit .rbbe-destination-section__body > p:first-of-type {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #eef7f4;
  border: 1px solid #cfe6df;
  color: #1d5b66;
  font-weight: 600;
}
/* Nearby / attractions: fill section width with card grid */
.rbbe-destination-detail .rbbe-destination-section--top_attractions .rbbe-destination-section__body,
.rbbe-destination-detail .rbbe-destination-section--things_to_do .rbbe-destination-section__body,
.rbbe-destination-detail .rbbe-destination-section--travel_tips .rbbe-destination-section__body {
  max-width: none;
  width: 100%;
}
.rbbe-destination-detail .rbbe-destination-section--top_attractions .rbbe-prose ul,
.rbbe-destination-detail .rbbe-destination-section--things_to_do .rbbe-prose ul {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.7rem;
  width: 100%;
}
.rbbe-destination-detail .rbbe-destination-section--top_attractions .rbbe-prose li,
.rbbe-destination-detail .rbbe-destination-section--things_to_do .rbbe-prose li {
  position: relative;
  margin: 0;
  padding: 0.85rem 0.95rem 0.85rem 2.35rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--rbbe-line, #d9e4e8);
  height: 100%;
}
.rbbe-destination-detail .rbbe-destination-section--top_attractions .rbbe-prose li::before,
.rbbe-destination-detail .rbbe-destination-section--things_to_do .rbbe-prose li::before {
  content: "";
  position: absolute;
  left: 0.85rem;
  top: 1.05rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--rbbe-teal, #2c5f6b);
}
.rbbe-destination-detail .rbbe-destination-section--top_attractions .rbbe-prose li strong,
.rbbe-destination-detail .rbbe-destination-section--things_to_do .rbbe-prose li strong {
  color: #163642;
}
/* Travel tips: tip cards fill container */
.rbbe-destination-detail .rbbe-destination-section--travel_tips .rbbe-prose ul {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.7rem;
  width: 100%;
}
.rbbe-destination-detail .rbbe-destination-section--travel_tips .rbbe-prose li {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--rbbe-line, #d9e4e8);
  box-shadow: 0 6px 16px rgba(16, 48, 58, 0.04);
}
.rbbe-destination-detail .rbbe-destination-section--how_to_get_there {
  background: #fff;
}
.rbbe-destination-detail .rbbe-destination-section--how_to_get_there .rbbe-destination-section__body {
  max-width: none;
}
@media (max-width: 720px) {
  .rbbe-destination-detail .rbbe-destination-section {
    padding: 1rem 0.95rem 1.1rem;
    border-radius: 14px;
  }
}

/* Route detail reuses the boat layout: separate the first section (e.g.
   "Destination") from the schedule/excerpt above it so the leading gap matches
   the 2rem spacing used between sections. */
.rbbe-destination-sections--route {
  margin-top: 2rem;
}

.rbbe-destination-section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  line-height: 1.25;
  color: var(--rbbe-ink, #0e1f29);
}

.rbbe-destination-section__body .rbbe-schedules {
  margin-top: 1.25rem;
}

.rbbe-destination-section__booking {
  margin-top: 1.25rem;
  width: 100%;
  max-width: 100%;
  clear: both;
}

/* Inside How to Get There: section title + prose already set context — hide widget headline */
.rbbe-destination-section__booking .rbbe-schedules__head {
  display: none;
}

.rbbe-destination-section__booking .rbbe-schedules__bar {
  gap: 0;
  margin-bottom: 8px;
}

.rbbe-destination-section__booking .rbbe-schedules {
  margin-top: 0;
  margin-bottom: 0;
}

/* Route page — multi-section layout */
.rbbe-route-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.rbbe-route-section__title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.2rem, 3vw, 1.45rem);
  line-height: 1.25;
  color: var(--rbbe-ink, #0e1f29);
}

.rbbe-route-section__body {
  color: var(--rbbe-body, #2a3b46);
  line-height: 1.65;
}

.rbbe-route-section__list {
  margin: 0;
  padding-left: 1.25rem;
}

.rbbe-route-section__list li {
  margin: 0 0 0.45rem;
}

.rbbe-route-section__more {
  margin: 1rem 0 0;
}

.rbbe-route-section__more-link {
  color: var(--rbbe-teal, #2c5f6b);
  font-weight: 600;
  text-decoration: none;
}

.rbbe-route-section__more-link:hover {
  text-decoration: underline;
}

.rbbe-route-section__booking {
  margin-top: 0;
  width: 100%;
  max-width: 100%;
}

.rbbe-route-section__booking .rbbe-schedules {
  margin-bottom: 0;
}

.rbbe-route-section__gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.rbbe-route-section__gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--rbbe-radius-sm, 8px);
}

/* Departures embedded in a section — theme isolation */
body.rbbe-destination-detail .rbbe-destination-section__booking .rbbe-schedules form,
body.rbbe-region-detail .rbbe-destination-section__booking .rbbe-schedules form,
body.rbbe-destination-detail .rbbe-destination-section__body .rbbe-schedules form,
body.rbbe-region-detail .rbbe-destination-section__body .rbbe-schedules form {
  margin: 0;
  padding: 0;
  max-width: none;
}

body.rbbe-destination-detail .rbbe-destination-section__booking .rbbe-schedules input,
body.rbbe-destination-detail .rbbe-destination-section__booking .rbbe-schedules select,
body.rbbe-destination-detail .rbbe-destination-section__booking .rbbe-schedules button,
body.rbbe-region-detail .rbbe-destination-section__booking .rbbe-schedules input,
body.rbbe-region-detail .rbbe-destination-section__booking .rbbe-schedules select,
body.rbbe-region-detail .rbbe-destination-section__booking .rbbe-schedules button {
  font-family: inherit;
  box-sizing: border-box;
  line-height: inherit;
}

.rbbe-destination-section__gallery-grid {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.rbbe-destination-section__gallery-item {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--rbbe-line, #e3eaee);
}

.rbbe-destination-section__gallery-item a {
  display: block;
  aspect-ratio: 4 / 3;
}

.rbbe-destination-section__gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rbbe-page__prose .rbbe-prose h2,
.rbbe-page__prose .rbbe-prose h3,
.rbbe-page__prose .rbbe-prose h4 {
  color: var(--rbbe-ink, #0e1f29);
  line-height: 1.3;
  margin: 1.8em 0 0.6em;
  font-weight: 700;
}

.rbbe-page__prose .rbbe-prose a {
  color: var(--rbbe-teal, #2c5f6b);
}

.rbbe-page__prose .rbbe-prose ul,
.rbbe-page__prose .rbbe-prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

.rbbe-page__section {
  margin: 0 0 1.5rem;
}

.rbbe-place-article__section h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  color: var(--rbbe-ink, #0e1f29);
}

.rbbe-place-list {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.rbbe-page__section--tpm-products .rbbe-place-list a {
  color: var(--rbbe-teal, #2c5f6b);
  font-weight: 600;
  text-decoration: none;
}

.rbbe-page__section--tpm-products .rbbe-place-list a:hover {
  text-decoration: underline;
}

/* Theme often forces .entry-content forms — reinforce departures isolation */
body.rbbe-destination-detail .rbbe-page__departures form,
body.rbbe-region-detail .rbbe-page__departures form,
body.rbbe-route-detail .rbbe-page__departures form,
body.rbbe-place-detail .rbbe-page__departures form,
body.rbbe-port-detail .rbbe-page__departures form {
  margin: 0;
  padding: 0;
  max-width: none;
}

body.rbbe-destination-detail .rbbe-page__departures input,
body.rbbe-destination-detail .rbbe-page__departures select,
body.rbbe-destination-detail .rbbe-page__departures button,
body.rbbe-region-detail .rbbe-page__departures input,
body.rbbe-region-detail .rbbe-page__departures select,
body.rbbe-region-detail .rbbe-page__departures button,
body.rbbe-route-detail .rbbe-page__departures input,
body.rbbe-route-detail .rbbe-page__departures select,
body.rbbe-route-detail .rbbe-page__departures button,
body.rbbe-place-detail .rbbe-page__departures input,
body.rbbe-place-detail .rbbe-page__departures select,
body.rbbe-place-detail .rbbe-page__departures button,
body.rbbe-port-detail .rbbe-page__departures input,
body.rbbe-port-detail .rbbe-page__departures select,
body.rbbe-port-detail .rbbe-page__departures button {
  font-family: inherit;
}

@media (max-width: 720px) {
  .rbbe-destination-section__booking .rbbe-schedules,
  .rbbe-destination-section__booking .rbbe-schedules__list,
  .rbbe-destination-section__booking .rbbe-schedule,
  .rbbe-destination-section__booking .rbbe-schedule__inner,
  .rbbe-destination-section__booking .rbbe-schedule__content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}
