/* ==========================================================
   Rhapsody Cruises - ocean theme (blue / white, minimal)
   ========================================================== */

:root {
  /* Ocean palette */
  --navy: #0b2340;      /* editor toolbar / dialog backdrop */
  --deep: #0e3a66;      /* banners + footer */
  --ocean: #145a8d;     /* ocean sections, primary buttons */
  --wave: #2b8ac6;      /* accents */
  --sea: #eaf4f9;       /* light alternate sections */
  --white: #ffffff;

  --text: #1a2e42;
  --muted: #5a6f83;
  --border: #d3e4ef;     /* every light border */
  --sky: #cfe2f0;        /* light blue: TBC label, hover accents on dark blue */
  --sea-deep: #d9ebf5;   /* photo placeholder gradient */
  --footer-text: #b9cde0;
  --danger: #b42318;     /* errors / delete (editor) */

  /* One shadow pair for every card on the site */
  --shadow-rest: 0 4px 14px rgba(14, 58, 102, 0.08);
  --shadow-lift: 0 12px 28px rgba(14, 58, 102, 0.14);
  --radius: 8px;
  --max-width: 1100px;
  --wave-h: 70px;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ocean);
}

a:hover,
a:focus {
  color: var(--deep);
}

:focus-visible {
  outline: 3px solid var(--wave);
  outline-offset: 2px;
}

h1, h2, h3 {
  color: var(--deep);
  line-height: 1.25;
  margin-top: 0;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--deep);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.logo span {
  color: var(--wave);
}

/* Mobile "Menu" toggle: same caps style, with a waterline instead of a box */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  border-bottom: 2px solid var(--wave);
  border-radius: 0;
  padding: 0.4rem 0.1rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep);
  cursor: pointer;
}

.nav-toggle[aria-expanded="true"] {
  color: var(--ocean);
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
}

/* Nav links: same small, widely spaced caps as the buttons, with a little
   wave that rolls in underneath on hover and marks the current page. */
.nav-list a {
  position: relative;
  display: inline-block;
  padding: 0.55rem 0 0.7rem;
  color: var(--deep);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.18em; /* ignore the trailing letter-spacing */
  bottom: 0;
  height: 6px;
  background: var(--wave);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 6'%3E%3Cpath d='M0 3 Q4 0 8 3 T16 3' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") left center / 16px 6px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 6'%3E%3Cpath d='M0 3 Q4 0 8 3 T16 3' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") left center / 16px 6px repeat-x;
  /* Starts below and invisible, then rises up like the tide coming in */
  opacity: 0;
  transform: translateY(7px);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list a[aria-current="page"] {
  color: var(--ocean);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after,
.nav-list a[aria-current="page"]::after {
  opacity: 1;
  transform: translateY(0);
}

/* The current page's wave gently drifts, like the section waves */
.nav-list a[aria-current="page"]::after {
  animation: nav-wave 2.4s linear infinite;
}

@keyframes nav-wave {
  from { -webkit-mask-position: 0 center; mask-position: 0 center; }
  to   { -webkit-mask-position: 16px center; mask-position: 16px center; }
}

/* ---------- Buttons ----------
   .btn        Hull: tapered bottom corners with a waterline stripe.
               The waterline rises on hover.
   .btn-light  White hull, for dark backgrounds.
   .btn-outline Text link on a waterline with an arrow (used on cards).
   The hull shape lives on ::before so focus outlines aren't clipped. */
.btn {
  --hull: var(--ocean);
  --waterline: var(--wave);
  --wl: 3px;
  position: relative;
  isolation: isolate;
  display: inline-block;
  padding: 0.8rem 2rem 0.9rem;
  border: 0;
  background: none;
  color: var(--white);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--hull);
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 12px 100%);
  box-shadow: inset 0 calc(var(--wl) * -1) 0 var(--waterline);
  transition: background-color 0.2s, box-shadow 0.2s;
}

.btn:hover,
.btn:focus {
  --hull: var(--deep);
  --wl: 15px; /* waterline rises about a third of the way up the hull */
  color: var(--white);
}

.btn-light {
  --hull: var(--white);
  color: var(--deep);
}

.btn-light:hover,
.btn-light:focus {
  --hull: var(--sea);
  color: var(--deep);
}

.btn-outline {
  padding: 0.35rem 0;
  color: var(--ocean);
}

.btn-outline::before {
  inset: auto 0 0 0;
  height: 1px;
  background: var(--border);
  clip-path: none;
  box-shadow: none;
  transition: background-color 0.2s, height 0.2s;
}

.btn-outline::after {
  content: "\2192";
  display: inline-block;
  margin-left: 0.6rem;
  transition: transform 0.2s;
}

.btn-outline:hover,
.btn-outline:focus {
  color: var(--deep);
}

.btn-outline:hover::before,
.btn-outline:focus::before {
  height: 2px;
  background: var(--wave);
}

.btn-outline:hover::after,
.btn-outline:focus::after {
  transform: translateX(4px);
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(ellipse at 70% 0%, rgba(43, 138, 198, 0.35), transparent 60%),
    linear-gradient(180deg, var(--deep) 0%, var(--ocean) 100%);
  color: var(--white);
  padding: 6rem 0;
  text-align: center;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 2rem;
  opacity: 0.88;
}

.page-hero {
  background: linear-gradient(180deg, var(--deep) 0%, var(--ocean) 100%);
  color: var(--white);
  padding: 3.5rem 0;
  text-align: center;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.page-hero p {
  margin: 0;
  opacity: 0.85;
}

/* ---------- Sections ---------- */
.section {
  padding: 4rem 0;
}

.section-sea {
  background: var(--sea);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.5rem;
}

.section-header p {
  color: var(--muted);
}

.section-action {
  text-align: center;
  margin-top: 2.5rem;
}

/* ---------- Wave dividers ----------
   Add .wave plus a color modifier (.wave-white, .wave-sea, .wave-ocean,
   .wave-navy) to a section. The modifier should match the NEXT section's
   background so the wave flows into it. */
.wave {
  position: relative;
  overflow-x: clip; /* hide the off-screen part of the drifting waves */
  padding-bottom: calc(4rem + var(--wave-h));
}

/* Keep section content above decorative layers */
.wave > .container {
  position: relative;
  z-index: 1;
}

/* Each wave is a seamless 1440px tile, repeated horizontally and slid
   left/right with transform (GPU-friendly). */
.wave::before,
.wave::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: calc(100% + 1440px);
  height: var(--wave-h);
  background: var(--wave-to);
  pointer-events: none;
  will-change: transform;
  -webkit-mask-repeat: repeat-x;
  mask-repeat: repeat-x;
  -webkit-mask-size: 1440px 100%;
  mask-size: 1440px 100%;
  -webkit-mask-position: left bottom;
  mask-position: left bottom;
}

/* Back wave: softer, drifts the opposite way for depth */
.wave::before {
  opacity: 0.35;
  animation:
    wave-drift 26s linear infinite reverse,
    wave-swell 7s ease-in-out -2s infinite;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,32 C240,0 480,64 720,32 C960,0 1200,64 1440,32 L1440,80 L0,80 Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,32 C240,0 480,64 720,32 C960,0 1200,64 1440,32 L1440,80 L0,80 Z'/%3E%3C/svg%3E");
}

/* Front wave */
.wave::after {
  animation:
    wave-drift 16s linear infinite,
    wave-swell 5s ease-in-out infinite;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,42 C180,72 540,12 720,42 C900,72 1260,12 1440,42 L1440,80 L0,80 Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0,42 C180,72 540,12 720,42 C900,72 1260,12 1440,42 L1440,80 L0,80 Z'/%3E%3C/svg%3E");
}

@keyframes wave-drift {
  from { transform: translateX(0); }
  to   { transform: translateX(-1440px); }
}

/* Vertical rise and fall. Uses the separate `translate` property so it
   combines with the horizontal drift. Only moves downward so no gap
   opens at the bottom edge. */
@keyframes wave-swell {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 8px; }
}

/* ---------- Decorative: gulls & boat ----------
   Gulls: <span class="gull" style="--x; --y; --s; --t; --d"></span>
   --x/--y position, --s size, --t glide duration, --d delay. */
.gulls {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: rgba(255, 255, 255, 0.7);
}

.gull {
  position: absolute;
  left: var(--x, 10%);
  top: var(--y, 20%);
  width: var(--s, 22px);
  height: calc(var(--s, 22px) * 0.42);
  animation: gull-glide var(--t, 10s) ease-in-out var(--d, 0s) infinite;
}

.gull::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  transform-origin: 50% 70%;
  animation: gull-flap 2.6s ease-in-out var(--d, 0s) infinite;
  /* Gull silhouette: tapered wings, slight body at center */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 20'%3E%3Cpath d='M1,8 C9,2 18,3 24,11 C30,3 39,2 47,8 C38,5 31,8 26,14 L24,17 L22,14 C17,8 10,5 1,8 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 20'%3E%3Cpath d='M1,8 C9,2 18,3 24,11 C30,3 39,2 47,8 C38,5 31,8 26,14 L24,17 L22,14 C17,8 10,5 1,8 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@keyframes gull-glide {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(18px, -10px); }
}

@keyframes gull-flap {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.6); }
}

/* River-ship silhouette riding the hero wave: raked bow (right),
   rounded stern, tiered decks with windows, funnel and mast. */
.boat {
  position: absolute;
  left: 10%;
  bottom: calc(var(--wave-h) * 0.32);
  width: 180px;
  aspect-ratio: 160 / 46;
  z-index: 1;
  background: rgba(255, 255, 255, 0.95);
  pointer-events: none;
  transform-origin: 50% 100%;
  animation: boat-bob 5s ease-in-out infinite;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 46'%3E%3Cpath fill-rule='evenodd' d='M2,30 L150,30 L158,25 Q154,38 146,44 L12,44 Q6,40 2,30 Z M14,21 H130 Q137,21 140,28 H14 Z M20,23h5v2.5h-5z M30,23h5v2.5h-5z M40,23h5v2.5h-5z M50,23h5v2.5h-5z M60,23h5v2.5h-5z M70,23h5v2.5h-5z M80,23h5v2.5h-5z M90,23h5v2.5h-5z M100,23h5v2.5h-5z M110,23h5v2.5h-5z M120,23h5v2.5h-5z M26,14 H116 Q122,14 125,19 H26 Z M96,7 H112 Q116,7 118,12 H96 Z M56,7 H66 L67,12 H55 Z M104,1 H105.5 V7 H104 Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 46'%3E%3Cpath fill-rule='evenodd' d='M2,30 L150,30 L158,25 Q154,38 146,44 L12,44 Q6,40 2,30 Z M14,21 H130 Q137,21 140,28 H14 Z M20,23h5v2.5h-5z M30,23h5v2.5h-5z M40,23h5v2.5h-5z M50,23h5v2.5h-5z M60,23h5v2.5h-5z M70,23h5v2.5h-5z M80,23h5v2.5h-5z M90,23h5v2.5h-5z M100,23h5v2.5h-5z M110,23h5v2.5h-5z M120,23h5v2.5h-5z M26,14 H116 Q122,14 125,19 H26 Z M96,7 H112 Q116,7 118,12 H96 Z M56,7 H66 L67,12 H55 Z M104,1 H105.5 V7 H104 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Mirror placement for variety on inner pages */
.boat-right {
  left: auto;
  right: 10%;
}

@keyframes boat-bob {
  0%, 100% { transform: translateY(0) rotate(-1.8deg); }
  50%      { transform: translateY(5px) rotate(1.8deg); }
}

.wave-white { --wave-to: var(--white); }
.wave-sea   { --wave-to: var(--sea); }
.wave-ocean { --wave-to: var(--ocean); }
.wave-navy  { --wave-to: var(--deep); } /* matches the footer */

/* ---------- Grid & Cards ---------- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-rest);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.card:hover {
  border-color: var(--wave);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h2,
.card-body h3 {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 600;
}

.card-body p {
  color: var(--muted);
  flex: 1;
}

.card-body .btn {
  align-self: flex-start;
}

/* Hidden visually but still read by screen readers */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Cruise list: horizontal cards stacked like pancakes ---------- */
.cruise-list {
  display: grid;
  gap: 1.5rem;
}

.cruise-card {
  flex-direction: row;
  background: var(--sea); /* light blue, same as the light sections */
}

/* Photo is always exactly 16:9. It's inset slightly and centred so that if
   the text is taller than the photo, the extra space looks intentional
   instead of stretching the photo out of shape. */
.cruise-card > .img-placeholder {
  flex: 0 0 32%;
  aspect-ratio: 16 / 9;
  min-height: 0;
  align-self: center;
  margin: 0.75rem 0 0.75rem 0.75rem;
  border-radius: 4px;
}

.cruise-card .card-body {
  position: relative;
  padding: 1.15rem 1.5rem;
  justify-content: center;
}

.cruise-card h2,
.cruise-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  padding-right: 9.5rem; /* room for the Book Now button */
}

/* Book Now sits in the top-right corner. Moved with CSS (not in the HTML)
   so saved edits keep pointing at the right elements. */
.cruise-card .card-actions {
  position: absolute;
  top: 1.15rem;
  right: 1.5rem;
  margin: 0;
}

/* Date / Time / Location on one line (wraps if long) */
.cruise-card .cruise-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.25rem;
  margin-bottom: 0.6rem;
  font-size: 0.92rem;
}

/* Description: up to 3 lines for visitors, shown in full while editing */
.cruise-card .card-body p {
  flex: 0 1 auto;
  margin: 0;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.cms-editing .cruise-card .card-body p {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: none;
  overflow: visible;
}

@media (max-width: 700px) {
  .cruise-card {
    flex-direction: column;
  }

  .cruise-card > .img-placeholder {
    flex: none;
    align-self: stretch;
    aspect-ratio: 16 / 9;
    min-height: 0;
    margin: 0;
    border-radius: 0;
  }

  .cruise-card .card-body {
    padding: 1.25rem;
  }

  /* Narrow screens: button moves above the title, aligned right */
  .cruise-card .card-actions {
    position: static;
    order: -1;
    align-self: flex-end;
    margin-bottom: 0.5rem;
  }

  .cruise-card h2,
  .cruise-card h3 {
    padding-right: 0;
  }
}

/* Cruise fields: Date / Time / Location with icons */
.cruise-facts {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.45rem;
}

.cruise-facts > div {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.cruise-facts dd {
  margin: 0;
  color: var(--text);
}

/* Blue silhouette icons (CSS masks so they inherit the theme color) */
.fact-icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  background: var(--wave);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.fact-date {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M7 2h2v2h6V2h2v2h2a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2z M5 9v10h14V9z M7 11h4v4H7z'/%3E%3C/svg%3E");
}

.fact-time {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 0 0 20a10 10 0 1 0 0-20z M11 6h2v5.4l3.8 2.2-1 1.7L11 12.6z'/%3E%3C/svg%3E");
}

.fact-location {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7z M12 6.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 1 0 0-5z'/%3E%3C/svg%3E");
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: 0.5rem;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--wave);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.feature {
  text-align: center;
  padding: 1rem;
}

.feature-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--wave);
  background: var(--white);
  color: var(--ocean);
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Why Rhapsody cards: whole card is a link to its own page.
   White card on the light-blue section, lifts on hover, icon fills in. */
.feature-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-rest);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, background-color 0.2s;
}

.feature-link:hover,
.feature-link:focus-visible {
  color: var(--text);
  background: var(--sky); /* same light blue as the other hover accents */
  border-color: var(--wave);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}

.feature-link p {
  flex: 1;
  color: var(--muted);
}

.feature-link .feature-icon {
  transition: background-color 0.2s, color 0.2s;
}

.feature-link:hover .feature-icon,
.feature-link:focus-visible .feature-icon {
  background: var(--ocean);
  border-color: var(--ocean);
  color: var(--white);
}

/* "Learn more" with the same rising-wave underline as the menu */
.feature-more {
  position: relative;
  padding-bottom: 0.5rem;
  color: var(--ocean);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.feature-more::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0.18em;
  bottom: 0;
  height: 6px;
  background: var(--wave);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 6'%3E%3Cpath d='M0 3 Q4 0 8 3 T16 3' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") left center / 16px 6px repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 6'%3E%3Cpath d='M0 3 Q4 0 8 3 T16 3' fill='none' stroke='black' stroke-width='1.6'/%3E%3C/svg%3E") left center / 16px 6px repeat-x;
  opacity: 0.45;
  transition: opacity 0.25s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateY(3px);
}

.feature-link:hover .feature-more::after,
.feature-link:focus-visible .feature-more::after {
  opacity: 1;
  transform: translateY(0);
}

/* In the editor the cards are text to edit, so don't lift them.
   "Learn more" becomes an "Open page" button that still navigates. */
.cms-editing .feature-link:hover {
  transform: none;
}

.cms-editing .feature-more {
  margin-top: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  background: var(--navy);
  color: var(--white);
  font-size: 0;
  letter-spacing: 0;
  cursor: pointer;
}

.cms-editing .feature-more::before {
  content: "Open page \2192";
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.cms-editing .feature-more::after {
  display: none;
}

/* "Back to home" on the Why Rhapsody pages: a normal hull button */
.why-back {
  margin-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  .feature-link,
  .feature-link .feature-icon,
  .feature-more::after {
    transition: none;
  }

  .feature-link:hover,
  .feature-link:focus-visible {
    transform: none;
  }
}

/* Placeholder box for future photos */
.img-placeholder {
  background: linear-gradient(180deg, var(--sea), var(--sea-deep));
  color: var(--ocean);
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.split .img-placeholder,
.detail-layout .img-placeholder,
.contact-info .img-placeholder {
  border-radius: var(--radius);
}

/* ---------- Two-column layout ---------- */
.split {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.split-top {
  align-items: start;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.gallery-item {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.gallery-item .img-placeholder {
  aspect-ratio: 4 / 3;
}

.gallery-item figcaption {
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- Cruise detail ---------- */
.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}

.detail-layout .img-placeholder + h2 {
  margin-top: 2rem;
}

.itinerary {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  border-left: 2px solid var(--wave);
}

.itinerary li {
  padding: 0 0 1.25rem 1.25rem;
  position: relative;
}

.itinerary li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--ocean);
}

.itinerary h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.itinerary p {
  margin: 0;
  color: var(--muted);
}

.sidebar-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  background: var(--sea);
  position: sticky;
  top: 90px;
}

.sidebar-box dl {
  margin: 0 0 1.5rem;
}

.sidebar-box dt {
  font-weight: 600;
  color: var(--deep);
}

.sidebar-box dd {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

/* ---------- Forms ---------- */
.form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  gap: 0.35rem;
}

.form label {
  font-weight: 600;
  color: var(--deep);
}

.form input,
.form select,
.form textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  border-color: var(--wave);
  outline: 2px solid var(--sea);
}

/* ---------- CTA band ---------- */
.cta {
  background: var(--ocean);
  color: var(--white);
  text-align: center;
  padding: 4rem 0;
}

.cta h2 {
  color: var(--white);
}

.cta p {
  opacity: 0.88;
  margin-bottom: 1.75rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep); /* same dark blue as the top of the page banners */
  color: var(--footer-text);
  padding: 1.5rem 0 2rem;
  font-size: 0.9rem;
  text-align: center;
}

.footer-contact {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 2rem;
  padding: 0;
  margin: 0 0 1rem;
}

.site-footer a {
  color: var(--footer-text);
}

.site-footer a:hover,
.site-footer a:focus {
  color: var(--white);
}

.footer-copy {
  margin: 0;
  opacity: 0.7;
  font-size: 0.85rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 800px) {
  :root {
    --wave-h: 40px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
  }

  .nav-list li + li {
    border-top: 1px solid var(--border);
  }

  /* Full-width tap target; the wave stays short under the word */
  .nav-list a {
    display: block;
    padding: 0.95rem 0 1rem;
  }

  .nav-list a::after {
    bottom: 0.45rem;
    right: auto;
    width: 3rem;
  }

  .split,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .sidebar-box {
    position: static;
  }

  .hero {
    padding-top: 4rem;
  }

  .boat {
    width: 120px;
    left: 6%;
  }

  .boat-right {
    left: auto;
    right: 6%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .btn::before,
  .btn::after {
    transition: none;
  }

  .card:hover {
    transform: none;
  }

  .nav-list a::after {
    animation: none;
    transition: none;
  }

  .wave::before,
  .wave::after,
  .gull,
  .gull::before,
  .boat {
    animation: none;
  }
}

/* ==========================================================
   Content editor (js/cms.js)
   ========================================================== */

.img-placeholder {
  position: relative;
  overflow: hidden;
}

.img-placeholder.has-image {
  color: transparent;
}

.cms-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
}

.cms-admin-link {
  margin-top: 0.75rem;
  background: none;
  border: 0;
  padding: 0.25rem;
  font: inherit;
  font-size: 0.75rem;
  color: var(--footer-text);
  opacity: 0.55;
  cursor: pointer;
  text-decoration: underline;
}

.cms-admin-link:hover,
.cms-admin-link:focus {
  opacity: 1;
}

/* Login dialog */
.cms-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  width: min(360px, 90vw);
  color: var(--text);
}

.cms-dialog::backdrop {
  background: rgba(11, 35, 64, 0.55);
}

.cms-login {
  display: grid;
  gap: 0.5rem;
}

.cms-login h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.cms-login label {
  font-weight: 600;
  color: var(--deep);
}

.cms-login input {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.cms-error {
  min-height: 1.3em;
  margin: 0;
  font-size: 0.85rem;
  color: var(--danger);
}

.cms-dialog-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.cms-link-btn {
  background: none;
  border: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
}

/* Floating toolbar */
.cms-toolbar {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem 0.5rem 1rem;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(11, 35, 64, 0.3);
  font-size: 0.85rem;
}

.cms-status {
  margin-right: 0.5rem;
  opacity: 0.85;
}

.cms-toolbar button,
.cms-slot-tools button {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
}

.cms-toolbar button:hover,
.cms-toolbar button:focus,
.cms-slot-tools button:hover,
.cms-slot-tools button:focus {
  background: rgba(255, 255, 255, 0.15);
}

.cms-toolbar [data-save] {
  background: var(--wave);
  border-color: var(--wave);
}

.cms-toolbar [data-save]:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Editable text */
.cms-editing [contenteditable="true"] {
  outline: 1px dashed transparent;
  outline-offset: 3px;
  cursor: text;
}

.cms-editing [contenteditable="true"]:hover {
  outline-color: var(--wave);
}

.cms-editing [contenteditable="true"]:focus {
  outline: 2px solid var(--wave);
}

/* Photo slots */
.cms-slot {
  cursor: grab;
}

.cms-slot:not(.has-image) {
  cursor: default;
}

.cms-slot.is-panning {
  cursor: grabbing;
}

.cms-slot:focus-visible {
  outline: 3px solid var(--wave);
  outline-offset: -3px;
}

.cms-slot.cms-drop {
  outline: 3px dashed var(--wave);
  outline-offset: -6px;
}

.cms-slot-tools {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}

.cms-slot:hover .cms-slot-tools,
.cms-slot:focus-within .cms-slot-tools,
.cms-slot:not(.has-image) .cms-slot-tools {
  opacity: 1;
}

.cms-slot-tools button {
  background: rgba(11, 35, 64, 0.8);
  border-color: transparent;
}

.cms-slot-tools button:hover,
.cms-slot-tools button:focus {
  background: var(--navy);
}

/* Only show image-specific tools once there's an image */
.cms-slot:not(.has-image) .cms-slot-tools [data-act="in"],
.cms-slot:not(.has-image) .cms-slot-tools [data-act="out"],
.cms-slot:not(.has-image) .cms-slot-tools [data-act="alt"],
.cms-slot:not(.has-image) .cms-slot-tools [data-act="remove"] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .cms-slot-tools {
    transition: none;
  }
}

/* Photo library panel */
.cms-library {
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  z-index: 150;
  width: 240px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 20px rgba(11, 35, 64, 0.12);
  font-size: 0.85rem;
}

.cms-library[hidden] {
  display: none;
}

/* Make room for the panel so it doesn't cover the page */
@media (min-width: 900px) {
  body.cms-library-open {
    padding-left: 240px;
  }
}

.cms-library.cms-drop {
  outline: 3px dashed var(--wave);
  outline-offset: -6px;
}

.cms-library-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 0.75rem 0.25rem 1rem;
}

.cms-library-head h2 {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
}

.cms-library-head button {
  font: inherit;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--deep);
  cursor: pointer;
}

.cms-library-head button:hover,
.cms-library-head button:focus {
  background: var(--sea);
}

.cms-library-hint {
  margin: 0;
  padding: 0 1rem 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.cms-library-list {
  list-style: none;
  margin: 0;
  padding: 0 0.75rem 1rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-content: start;
}

.cms-library-empty {
  grid-column: 1 / -1;
  color: var(--muted);
}

.cms-thumb {
  width: 100%;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: var(--sea);
  cursor: grab;
  text-align: left;
  font: inherit;
  overflow: hidden;
}

.cms-thumb:active {
  cursor: grabbing;
}

.cms-thumb:hover,
.cms-thumb:focus-visible {
  border-color: var(--border);
}

.cms-thumb[aria-pressed="true"] {
  border-color: var(--wave);
}

.cms-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cms-thumb span {
  display: block;
  padding: 0.2rem 0.35rem;
  font-size: 0.7rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Booking link text box (edit mode) */
.cms-link-field {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.9rem;
  font-size: 0.78rem;
}

.cms-link-field label {
  font-weight: 600;
  color: var(--muted);
}

.cms-link-field input {
  font: inherit;
  padding: 0.45rem 0.6rem;
  border: 1px dashed var(--wave);
  border-radius: 4px;
  background: var(--white);
  color: var(--text);
}

.cms-link-field input:focus {
  border-style: solid;
  outline: 2px solid var(--sea);
}

.cms-link-field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.cms-link-hint {
  color: var(--danger);
  min-height: 1em;
}

/* Cruise editing: reorder / featured / delete controls */
.cms-editing .cruise-card {
  position: relative;
}

.cms-editing .card:hover {
  transform: none;
}

.cms-cruise-tools {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
}

.cms-cruise-tools button,
.cms-feature-toggle {
  font: inherit;
  padding: 0.3rem 0.6rem;
  border: 0;
  border-radius: 4px;
  background: rgba(11, 35, 64, 0.85);
  color: var(--white);
  cursor: pointer;
}

.cms-cruise-tools button:hover,
.cms-cruise-tools button:focus-visible,
.cms-feature-toggle:hover {
  background: var(--navy);
}

.cms-drag-handle {
  cursor: grab;
  touch-action: none;
}

.cms-feature-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cms-feature-toggle input {
  margin: 0;
  accent-color: var(--wave);
}

.cms-feature-toggle.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cms-cruise-tools [data-act="delete"]:hover,
.cms-cruise-tools [data-act="delete"]:focus-visible {
  background: var(--danger);
}

/* Gallery editing: each slot gets the same drag / move / delete bar as cruise cards */
.cms-editing .gallery-item {
  position: relative;
}

.cms-editing .gallery-item figcaption:empty::before {
  content: attr(data-placeholder);
  font-style: italic;
  opacity: 0.6;
}

.gallery-item.is-dragging,
.cruise-card.is-dragging {
  opacity: 0.7;
  outline: 2px dashed var(--wave);
  outline-offset: 2px;
  box-shadow: 0 12px 30px rgba(11, 35, 64, 0.2);
}

.cms-add-cruise {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem;
  border: 2px dashed var(--wave);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ocean);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.cms-add-cruise:hover,
.cms-add-cruise:focus-visible {
  background: var(--sea);
}

.cms-cruise-hint {
  margin: 0 0 1rem;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--wave);
  background: var(--sea);
  color: var(--muted);
  font-size: 0.85rem;
}

/* Cruise status tags (TBC / hidden) */
.cruise-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cruise-badges:not(:empty) {
  margin-bottom: 0.4rem;
}

.cruise-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--wave);
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ocean);
  background: var(--white);
}

.badge-hidden {
  border-color: var(--muted);
  color: var(--muted);
}

/* TBC label: same hull shape and waterline as the buttons, in a soft
   blue so it reads as a status rather than something to click */
.btn.cruise-tbc,
.btn.cruise-tbc:hover,
.btn.cruise-tbc:focus {
  --hull: var(--sky);
  --wl: 0px; /* no waterline on TBC */
  color: var(--deep);
  cursor: default;
}

.card-actions [hidden] {
  display: none;
}

/* Hidden cruises are only rendered for the editor: show them faded */
.cruise-card.is-hidden > .img-placeholder,
.cruise-card.is-hidden > .card-body {
  opacity: 0.5;
}

/* ---------- Home hero photo ----------
   Full-bleed photo behind the hero text. Until a photo is added, the
   ocean gradient shows through. A navy tint keeps white text readable. */
.hero-has-photo {
  min-height: min(78vh, 680px);
  display: flex;
  align-items: center;
}

.hero-has-photo > .container {
  width: 100%;
}

.hero-photo {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  background: transparent;
  color: rgba(255, 255, 255, 0.35);
  align-items: flex-start;
  padding-top: 1.25rem;
}

.hero-photo.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  /* Light tint behind the heading only; clear at the bottom so the photo
     meets the waves without any haze */
  background: linear-gradient(180deg, rgba(11, 35, 64, 0.45) 0%, rgba(11, 35, 64, 0.2) 55%, rgba(11, 35, 64, 0) 85%);
  pointer-events: none;
}

.hero-has-photo h1,
.hero-has-photo p {
  text-shadow: 0 2px 16px rgba(11, 35, 64, 0.45);
}

.hero-has-photo p {
  margin-bottom: 0;
}

/* Keep both wave layers above the photo */
.hero-has-photo::before,
.hero-has-photo::after {
  z-index: 1;
}

/* Blend into the waves with transparency only (no fade over the photo):
   the back wave is see-through so the photo shows through it. */
.hero-has-photo::before {
  opacity: 0.5;
}

/* Editor tools for the hero photo sit at the top, clear of the text and wave */
.hero-photo .cms-slot-tools {
  top: 0.75rem;
  bottom: auto;
}

/* ---------- Home: Featured Cruises on ocean blue ----------
   The hero's wave flows straight into this section; the boat rides its
   bottom wave into the white "Why Rhapsody" section. */
.section-boat {
  margin-top: -1px; /* no hairline under the hero wave */
}

/* Gulls fly in the space just above the boat, not over the cruise cards */
.section-boat .gulls {
  inset: auto 0 0 0;
  height: calc(4rem + var(--wave-h));
}

.section-boat .boat {
  left: 9%;
}

/* ---------- Ocean-blue section style ---------- */
.section-ocean {
  background: linear-gradient(180deg, var(--ocean) 0%, var(--deep) 100%);
  color: rgba(255, 255, 255, 0.88);
}

.section-ocean h2,
.section-ocean h3 {
  color: var(--white);
}

.section-ocean a:not(.btn) {
  color: var(--white);
}

.section-ocean .section-header p {
  color: rgba(255, 255, 255, 0.8);
}

/* Cards keep their normal look (same border + shadow) on the blue background */
.section-ocean .card {
  color: var(--text);
}

.section-ocean .card h2,
.section-ocean .card h3 {
  color: var(--deep);
}

.section-ocean .card a:not(.btn) {
  color: var(--ocean);
}

/* Editor hint reads on blue */
.section-ocean .cms-cruise-hint {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- Contact details with blue silhouette icons ---------- */
/* Icon sits in the left padding, so the editable text flows normally */
.contact-line {
  position: relative;
  padding-left: 2rem;
  margin: 0 0 1rem;
}

.contact-line::before {
  content: "";
  content: "" / var(--label); /* screen-reader label where supported */
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 20px;
  height: 20px;
  background: var(--wave);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.contact-phone {
  --label: "Phone";
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
}

.contact-email {
  --label: "Email";
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z M4 7.2V18h16V7.2l-8 5z M5.2 6l6.8 4.25L18.8 6z'/%3E%3C/svg%3E");
}

.contact-address {
  --label: "Address";
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7z M12 6.5a2.5 2.5 0 1 0 0 5a2.5 2.5 0 1 0 0-5z'/%3E%3C/svg%3E");
}

.contact-info .contact-line:last-of-type {
  margin-bottom: 1.5rem;
}

/* ---------- Footer: details (centre) / Facebook (right) ---------- */
.footer-layout {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem 2rem;
}

.footer-main {
  grid-column: 2;
}

.footer-social {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

/* Facebook: white circle with an ocean-blue logo + "Facebook" label.
   The white circle stands out clearly against the dark blue footer. */
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.social-icon {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
  transition: background-color 0.2s, transform 0.2s;
}

.social-icon::before {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--ocean);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.site-footer .social-link:hover,
.site-footer .social-link:focus-visible {
  color: var(--sky);
  text-decoration: none;
}

.social-link:hover .social-icon,
.social-link:focus-visible .social-icon {
  background: var(--sky);
  transform: translateY(-2px);
}

.social-facebook {
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 12a10 10 0 1 0-11.56 9.88v-6.99H7.9V12h2.54V9.8c0-2.5 1.49-3.89 3.78-3.89 1.09 0 2.24.2 2.24.2v2.46h-1.26c-1.24 0-1.63.77-1.63 1.56V12h2.78l-.44 2.89h-2.34v6.99A10 10 0 0 0 22 12z'/%3E%3C/svg%3E");
}

/* Editor link box on the dark footer */
.site-footer .cms-link-field {
  text-align: left;
  min-width: 220px;
}

.site-footer .cms-link-field label {
  color: var(--sky);
}

/* Phones: one column, Facebook above the contact details */
@media (max-width: 800px) {
  .footer-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-main,
  .footer-social {
    grid-column: 1;
  }

  .footer-social {
    justify-self: center;
    text-align: center;
    grid-row: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .social-icon {
    transition: none;
  }
}

/* ---------- Contact form ---------- */
/* Spam trap: invisible to people (and skipped by keyboards / screen readers) */
.contact-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.contact-form {
  position: relative;
}

.contact-status {
  min-height: 1.4em;
  font-size: 0.95rem;
}

.contact-status.is-success {
  color: var(--ocean);
  font-weight: 600;
}

.contact-status.is-error {
  color: var(--danger);
}

.contact-form [aria-invalid="true"] {
  border-color: var(--danger);
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: default;
}
