/* ============================================================
   Ocean Vista Senior Living — Shared Stylesheet
   ============================================================ */

/* Hide the "Coded by Netlify" branding rendered inside the Netlify Identity
   login modal. The widget renders an <a class="callOut"> linking to
   netlify.com, containing a <span class="netlifyLogo"> icon plus the text.
   We target both classes (and any element whose href points at netlify.com
   inside the widget container) so the rule survives widget version bumps. */
#netlify-identity-widget .callOut,
#netlify-identity-widget [class*="callOut"],
#netlify-identity-widget .netlifyLogo,
#netlify-identity-widget a[href*="netlify.com"] {
  display: none !important;
}

/* ---------- Design Tokens ---------- */
:root {
  --ivory: #FAF7F2;
  --cream: #F3ECDF;
  --sand:  #E8DDC8;
  --sand-deep: #D4C4A8;
  --seafoam: #A8C7BE;
  --seafoam-deep: #7FA89E;
  --navy: #1B3A4B;
  --navy-soft: #2C4E61;
  --teal: #527F7A;
  --gold: #B8924A;
  --gold-soft: #C9A961;
  --ink: #2A2A2A;
  --muted: #6B6358;
  --hairline: rgba(27, 58, 75, 0.12);

  --serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --page-max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 2px;

  --ease: cubic-bezier(.2,.7,.2,1);

  /* Hero overlay — live-tunable from the editor. RGB (no alpha) + scale multiplier.
     Defaults reproduce the original navy overlay. Scale 0 = no tint; 1 = default; 2 = very dark. */
  --hero-overlay-rgb: 27, 58, 75;
  --hero-overlay-scale: 1;

  /* Home-hero image (overridden by editor at runtime). */
  --hero-image: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=2400&q=80&auto=format&fit=crop');
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.6;
  font-weight: 400;
  font-size: 16px;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.75rem, 6.5vw, 5.75rem); font-weight: 300; }
h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); font-weight: 400; }
h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 500; }
h4 { font-size: 1.1rem; font-weight: 500; letter-spacing: 0.02em; }
p  { color: var(--muted); font-size: 1rem; line-height: 1.75; }
.lead { font-size: 1.125rem; line-height: 1.7; color: var(--ink); font-weight: 300; }
em { font-style: italic; color: var(--teal); }

.container { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2.25rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all .35s var(--ease);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--navy);
  color: var(--ivory);
}
.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -12px rgba(184, 146, 74, 0.45);
}
.btn-ghost {
  background: transparent;
  color: var(--ivory);
  border-color: rgba(250, 247, 242, 0.4);
}
.btn-ghost:hover {
  background: rgba(250, 247, 242, 0.08);
  border-color: var(--ivory);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--ivory);
}
.btn svg { width: 14px; height: 14px; transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;              /* above the mobile menu so the X stays visible */
  padding: 1.25rem 0;
  transition: all .4s var(--ease);
}
.nav.scrolled,
body.menu-open .nav {
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  padding: 0.85rem 0;
  box-shadow: 0 1px 0 var(--hairline);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ivory);
  transition: color .4s var(--ease);
}
.nav.scrolled .logo,
body.menu-open .logo { color: var(--navy); }
.logo-mark {
  width: 40px; height: 40px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.25rem;
  overflow: hidden;
  position: relative;
}
/* The letter ("O") sits underneath as a fallback. The uploaded logo image,
   if present, covers it fully. If the image 404s, .logo-mark keeps the
   letter + border look that shipped with the site. */
.logo-mark .logo-mark-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
/* When the image successfully loads, drop the surrounding border so the
   logo sits cleanly against the background. */
.logo-mark:has(.logo-mark-img.is-loaded) {
  border-color: transparent;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
  white-space: nowrap;
}
.logo-text .name {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.logo-text .sub {
  font-size: 0.62rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 3px;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}
.nav-links a {
  color: var(--ivory);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 400;
  position: relative;
  transition: color .3s var(--ease);
  white-space: nowrap;
}
.nav.scrolled .nav-links a { color: var(--navy); }
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -6px; left: 0;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width .35s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.current::after { width: 100%; }
.nav-links a.current { color: var(--gold); }
.nav.scrolled .nav-links a.current { color: var(--gold); }

.nav-cta {
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--ivory);
  color: var(--ivory);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all .3s var(--ease);
  white-space: nowrap;
}
.nav.scrolled .nav-cta,
body.menu-open .nav-cta {
  border-color: var(--navy);
  color: var(--navy);
}
.nav-cta:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ivory);
}

/* Hamburger */
.menu-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
  color: var(--ivory);
  transition: color .3s var(--ease);
}
.nav.scrolled .menu-toggle,
body.menu-open .menu-toggle { color: var(--navy); }
.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  position: absolute;
  left: 50%;
  width: 22px; height: 1.5px;
  background: currentColor;
  transition: transform .35s var(--ease), top .35s var(--ease), opacity .2s var(--ease), background-color .2s var(--ease);
}
.menu-toggle span {
  top: 50%;
  transform: translate(-50%, -50%);
}
.menu-toggle span::before {
  content: "";
  top: -7px;
  transform: translateX(-50%);
}
.menu-toggle span::after {
  content: "";
  top: 7px;
  transform: translateX(-50%);
}
body.menu-open .menu-toggle span { background: transparent; }
body.menu-open .menu-toggle span::before {
  top: 0;
  transform: translateX(-50%) rotate(45deg);
}
body.menu-open .menu-toggle span::after {
  top: 0;
  transform: translateX(-50%) rotate(-45deg);
}

/* ---------- Mobile Menu Panel ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--ivory);
  z-index: 100;              /* below the nav (200), so the X stays tappable */
  display: flex;
  flex-direction: column;
  padding: 6rem var(--gutter) 2.5rem;
  transform: translateY(-101%);
  transition: transform .5s var(--ease);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
}
body.menu-open .mobile-menu {
  transform: translateY(0);
  visibility: visible;
}
.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hairline);
}
.mobile-menu li {
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu ul a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 0;
  font-family: var(--serif);
  font-size: 1.75rem;
  color: var(--navy);
  font-weight: 400;
  transition: color .3s var(--ease), padding-left .3s var(--ease);
}
.mobile-menu ul a:hover,
.mobile-menu ul a.current { color: var(--gold); padding-left: 0.5rem; }
.mobile-menu ul a .idx {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--gold);
}
.mobile-menu-foot {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
/* Explicit color for the CTA inside mobile menu — overrides the generic
   ".mobile-menu ul a" rule so button text stays ivory on navy. */
.mobile-menu-foot .btn.btn-primary {
  justify-content: center;
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.78rem;
  padding: 1rem 2.25rem;
}
.mobile-menu-foot .btn.btn-primary:hover { color: var(--ivory); }
.mobile-menu-foot .contact-line {
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.7;
}
body.menu-open { overflow: hidden; }

/* ---------- Hero (full screen, homepage) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: center;
  color: var(--ivory);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg,
      rgba(var(--hero-overlay-rgb), calc(0.35 * var(--hero-overlay-scale))) 0%,
      rgba(var(--hero-overlay-rgb), calc(0.55 * var(--hero-overlay-scale))) 60%,
      rgba(var(--hero-overlay-rgb), calc(0.85 * var(--hero-overlay-scale))) 100%),
    var(--hero-image);
  /* First value applies to the gradient (top layer), second to the photo.
     --ovbg-size / --ovbg-pos let the editor zoom and reposition the photo
     independently while the overlay gradient stays pinned to cover. */
  background-size: cover, var(--ovbg-size, cover);
  background-position: center, var(--ovbg-pos, center);
  background-repeat: no-repeat;
  z-index: -1;
  animation: slowZoom 20s ease-out infinite alternate;
}
/* When the user has applied their own zoom/position, suppress the kenburns
   animation so the image sits exactly where they placed it. */
.hero-bg.ov-has-bg-transform {
  animation: none;
}
@keyframes slowZoom {
  from { transform: scale(1); }
  to   { transform: scale(1.08); }
}

/* ---- Home-page hero video (plays above .hero-bg when a video is uploaded) */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;       /* same level as .hero-bg; later in DOM → paints on top */
  display: none;
  pointer-events: none;
}
.hero-video[data-has-video="1"] { display: block; }

/* Hide the CSS-background hero image ONLY while the video is actually
   painting frames. The `.ov-video-active` class is toggled by
   editor.js in response to the <video> element's own `playing` /
   `pause` / `ended` / `error` / `waiting` events. If playback stops for
   any reason — decoder hiccup, memory reclaim, network cut, loop glitch
   — the hero-bg image re-appears immediately as a graceful fallback
   instead of a dark empty rectangle. */
.hero.ov-video-active .hero-bg { display: none; }

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(var(--hero-overlay-rgb), calc(0.35 * var(--hero-overlay-scale))) 0%,
    rgba(var(--hero-overlay-rgb), calc(0.55 * var(--hero-overlay-scale))) 60%,
    rgba(var(--hero-overlay-rgb), calc(0.85 * var(--hero-overlay-scale))) 100%);
  z-index: -1;
  pointer-events: none;
  display: none;
}
.hero-video[data-has-video="1"] + .hero-video-overlay { display: block; }

/* ============================================================
   Weather widget — lives inside the nav so it sits at the same
   vertical baseline as the menu. Populated by script.js from
   Open-Meteo. Hidden until data loads.
   ============================================================ */
.ov-weather {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.85rem 0.4rem 0.7rem;
  background: rgba(250, 247, 242, 0.10);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(250, 247, 242, 0.22);
  border-radius: 100px;
  color: var(--ivory);
  font-family: var(--sans);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .6s ease, transform .6s ease, color .4s var(--ease), border-color .4s var(--ease), background .4s var(--ease);
  pointer-events: none;
  white-space: nowrap;
}
.ov-weather.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* When the nav gets the light solid background on scroll (or when the
   mobile menu is open), darken the weather pill to match. */
.nav.scrolled .ov-weather,
body.menu-open .ov-weather {
  background: rgba(27, 58, 75, 0.06);
  border-color: rgba(27, 58, 75, 0.18);
  color: var(--navy);
}
.nav.scrolled .ov-weather-desc,
body.menu-open .ov-weather-desc { color: rgba(27, 58, 75, 0.7); }

.ov-weather-icon {
  width: 22px;
  height: 22px;
  color: var(--sand);
  flex-shrink: 0;
}
.nav.scrolled .ov-weather-icon,
body.menu-open .ov-weather-icon { color: var(--gold); }
.ov-weather-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ov-weather-info {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1;
}
.ov-weather-temp {
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  font-family: var(--serif);
}
.ov-weather-desc {
  font-size: 0.54rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.75);
}

/* Small subtle pulse on the icon so it feels alive */
@keyframes ovWeatherPulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}
.ov-weather.loaded .ov-weather-icon { animation: ovWeatherPulse 4s ease-in-out infinite; }

/* Slight compression once the hamburger takes over the nav, but keep the
   full "CLEAR NIGHT · SAN PEDRO" descriptor visible while there's room. */
@media (max-width: 960px) {
  .ov-weather {
    padding: 0.35rem 0.7rem 0.35rem 0.55rem;
    gap: 0.45rem;
  }
  .ov-weather-icon { width: 18px; height: 18px; }
  .ov-weather-temp { font-size: 0.95rem; }
}
/* On narrow phones the sub-label crowds the hamburger — hide it there. */
@media (max-width: 520px) {
  .ov-weather-desc { display: none; }
}
@media (max-width: 380px) {
  /* Keep the hamburger accessible — shrink even further on tiny phones. */
  .ov-weather { padding: 0.3rem 0.55rem 0.3rem 0.45rem; }
  .ov-weather-temp { font-size: 0.85rem; }
}
.hero-content {
  padding: 10rem 0 6rem;
  max-width: 820px;
}
.hero .eyebrow { color: var(--sand); }
.hero .eyebrow::before { background: var(--sand); }
.hero h1 {
  color: var(--ivory);
  margin: 1.5rem 0 1.75rem;
}
.hero h1 em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--sand);
  font-weight: 300;
}
.hero-sub {
  font-size: 1.125rem;
  line-height: 1.75;
  color: rgba(250, 247, 242, 0.88);
  font-weight: 300;
  max-width: 560px;
  margin-bottom: 2.5rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-meta {
  position: absolute;
  bottom: 3rem; left: 0; right: 0;
  /* 3-column grid: left | center | right, with equal-width side columns
     so the center column (the scroll cue) always lands at true center. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  padding: 0 var(--gutter);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.7);
}
.hero-meta > :first-child  { justify-self: start; }
.hero-meta > :nth-child(2) { justify-self: center; }
.hero-meta > :last-child   { justify-self: end; }
.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(180deg, transparent, var(--sand));
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50%      { transform: scaleY(1.2); opacity: 1; }
}

/* ---------- Inner-page Hero (shorter) ---------- */
.page-hero {
  position: relative;
  min-height: 58vh;
  min-height: 58svh;
  display: grid;
  align-items: end;
  color: var(--ivory);
  overflow: hidden;
  isolation: isolate;
  padding-bottom: 4.5rem;
}
.page-hero .hero-bg {
  background-image:
    linear-gradient(180deg,
      rgba(var(--hero-overlay-rgb), calc(0.35 * var(--hero-overlay-scale))) 0%,
      rgba(var(--hero-overlay-rgb), calc(0.70 * var(--hero-overlay-scale))) 100%),
    var(--page-hero-image, url('https://images.unsplash.com/photo-1493809842364-78817add7ffb?w=2400&q=80&auto=format&fit=crop'));
  background-size: cover, var(--ovbg-size, cover);
  background-position: center, var(--ovbg-pos, center);
  background-repeat: no-repeat;
}
.page-hero-content {
  padding-top: 8rem;
  max-width: 760px;
}
.page-hero h1 {
  color: var(--ivory);
  font-size: clamp(2.25rem, 5vw, 4rem);
  margin: 1rem 0 1rem;
}
.page-hero h1 em { color: var(--sand); font-style: italic; font-weight: 300; }
.page-hero .breadcrumbs {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.7);
  display: flex;
  gap: 0.6rem;
}
.page-hero .breadcrumbs a { color: rgba(250,247,242,0.85); }
.page-hero .breadcrumbs a:hover { color: var(--sand); }
.page-hero .breadcrumbs .sep { opacity: 0.5; }
.page-hero .hero-sub { max-width: 620px; }

/* ---------- Section base ---------- */
section { padding: clamp(5rem, 10vw, 8rem) 0; position: relative; }
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 4.5rem;
}
.section-head h2 { margin: 1.25rem 0 1rem; }
.divider-ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--gold);
}
.divider-ornament::before,
.divider-ornament::after {
  content: "";
  width: 60px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

/* ---------- About ---------- */
.about { background: var(--ivory); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.about-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}
.about-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease);
}
.about-image:hover img { transform: scale(1.04); }
.about-image::after {
  content: "";
  position: absolute;
  top: 1.25rem; left: 1.25rem; right: -1.25rem; bottom: -1.25rem;
  border: 1px solid var(--gold);
  z-index: -1;
}
.about-content h2 { margin: 1.25rem 0 1.5rem; }
.about-content .lead { margin-bottom: 1.5rem; }
.about-content p + p { margin-top: 1rem; }
.signature {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.signature-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--navy);
}
.signature-role {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Values (inner page) ---------- */
.values {
  background: var(--cream);
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.value-card {
  background: var(--ivory);
  padding: 2.5rem 2rem;
  border-top: 2px solid var(--gold);
}
.value-card h3 { margin-bottom: 0.75rem; font-size: 1.5rem; }
.value-card .num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--gold);
  font-size: 1.25rem;
}

/* ---------- Care & Services ---------- */
.care {
  background: var(--cream);
  position: relative;
}
.care::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.3;
}
.care-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.care-card {
  background: var(--ivory);
  padding: clamp(2rem, 3.5vw, 3rem);
  transition: all .4s var(--ease);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.care-card:hover {
  background: var(--navy);
  color: var(--ivory);
}
.care-card:hover h3,
.care-card:hover p,
.care-card:hover .care-num { color: var(--ivory); }
.care-card:hover .care-icon { color: var(--gold-soft); }
.care-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
  transition: color .4s var(--ease);
}
.care-icon {
  width: 48px; height: 48px;
  margin: 2rem 0 1.5rem;
  color: var(--teal);
  transition: color .4s var(--ease);
}
.care-card h3 {
  margin-bottom: 1rem;
  transition: color .4s var(--ease);
}
.care-card p {
  font-size: 0.95rem;
  transition: color .4s var(--ease);
}

/* ---------- Detailed Care (care.html) ---------- */
.care-detail {
  background: var(--ivory);
}
.care-block {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding: 4rem 0;
  border-bottom: 1px solid var(--hairline);
}
.care-block:last-child { border-bottom: none; }
.care-block.reverse .care-visual { order: 2; }
.care-visual {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.care-visual img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease);
}
.care-visual:hover img { transform: scale(1.04); }
.care-detail h2 { margin: 1rem 0 1.25rem; font-size: clamp(1.75rem, 3vw, 2.5rem); }
.care-detail ul {
  list-style: none;
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}
.care-detail ul li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.care-detail ul li::before {
  content: "";
  width: 5px; height: 5px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Amenities Split ---------- */
.amenities {
  background: var(--ivory);
}
.amenity-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-bottom: 5rem;
}
.amenity-row:last-child { margin-bottom: 0; }
.amenity-row.reverse > .amenity-visual { order: 2; }
.amenity-visual {
  aspect-ratio: 5/4;
  overflow: hidden;
  position: relative;
}
.amenity-visual img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.amenity-visual:hover img { transform: scale(1.05); }
.amenity-text h3 {
  margin: 1rem 0 1.25rem;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
}
.amenity-list {
  list-style: none;
  margin-top: 1.5rem;
}
.amenity-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
  color: var(--ink);
}
.amenity-list li::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Gallery ---------- */
.gallery {
  background: var(--navy);
  color: var(--ivory);
}
.gallery .section-head h2 { color: var(--ivory); }
.gallery .section-head p { color: rgba(250,247,242,0.75); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 1rem;
}
.gallery-grid.gallery-full {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  background: rgba(27,58,75,0.08);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease), filter .5s var(--ease);
  filter: saturate(0.85) brightness(0.88);
  display: block;
}
.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1) brightness(1);
}
/* Legacy span overrides — neutralized for uniform grid */
.gallery-item.span-2,
.gallery-item.span-row-2 {
  grid-column: auto;
  grid-row: auto;
}

/* ---------- Lightbox ---------- */
.ov-lightbox {
  position: fixed; inset: 0;
  background: rgba(15, 33, 42, 0.96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  opacity: 0;
  transition: opacity .25s var(--ease);
  /* Let the lightbox itself allow default gestures; the image below
     intercepts touches so we can handle pinch + pan ourselves. */
  touch-action: manipulation;
  user-select: none;
}
.ov-lightbox.open {
  display: flex;
  opacity: 1;
}
body.lb-open { overflow: hidden; }
.ov-lb-stage {
  margin: 0;
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ov-lb-img {
  max-width: 92vw;
  max-height: 86vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
  border-radius: 2px;
  display: block;
  transition: opacity .2s var(--ease);
  /* Image captures all touches so we can implement pinch-zoom + pan.
     The origin is centered so `scale()` grows out from the middle. */
  touch-action: none;
  transform-origin: 50% 50%;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
.ov-lb-img.fading { opacity: 0; }
.ov-lb-img.zoom-anim { transition: transform .22s var(--ease), opacity .2s var(--ease); }

.ov-lb-close,
.ov-lb-prev,
.ov-lb-next {
  position: absolute;
  background: rgba(250, 247, 242, 0.08);
  border: 1px solid rgba(250, 247, 242, 0.25);
  color: var(--ivory);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ov-lb-close svg,
.ov-lb-prev svg,
.ov-lb-next svg {
  width: 22px; height: 22px;
}
.ov-lb-close:hover,
.ov-lb-prev:hover,
.ov-lb-next:hover {
  background: rgba(250, 247, 242, 0.18);
  border-color: rgba(250, 247, 242, 0.5);
}
.ov-lb-close { top: 1.5rem; right: 1.5rem; }
.ov-lb-prev { left: 1.75rem; top: 50%; transform: translateY(-50%); }
.ov-lb-next { right: 1.75rem; top: 50%; transform: translateY(-50%); }
.ov-lb-prev:hover { transform: translateY(-50%) translateX(-2px); }
.ov-lb-next:hover { transform: translateY(-50%) translateX(2px); }

.ov-lb-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(250, 247, 242, 0.7);
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ---------- Testimonial ---------- */
.testimonial {
  background: var(--sand);
  text-align: center;
}
.testimonial-inner {
  max-width: 820px;
  margin: 0 auto;
}
.quote-mark {
  font-family: var(--serif);
  font-size: 7rem;
  color: var(--gold);
  line-height: 0.3;
  font-style: italic;
  opacity: 0.6;
}
.testimonial-text {
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.5;
  color: var(--navy);
  font-weight: 300;
  font-style: italic;
  margin: 1.5rem 0 2.5rem;
}
.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.testimonial-author .name {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--navy);
}
.testimonial-author .role {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Teaser cards (home) ---------- */
.teasers {
  background: var(--ivory);
}
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.teaser {
  display: flex;
  flex-direction: column;
  background: var(--ivory);
  border: 1px solid var(--hairline);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.teaser:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -24px rgba(27,58,75,0.25);
}
.teaser-image {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.teaser-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.teaser:hover .teaser-image img { transform: scale(1.05); }
.teaser-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.teaser-body h3 { margin: 0.75rem 0 0.75rem; font-size: 1.5rem; }
.teaser-body p { font-size: 0.95rem; margin-bottom: 1.5rem; flex: 1; }
.teaser-link {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: color .3s var(--ease), gap .3s var(--ease);
  align-self: flex-start;
}
.teaser-link svg { width: 14px; height: 14px; }
.teaser-link:hover { color: var(--gold); gap: 1rem; }

/* ---------- CTA Band ---------- */
.cta-band {
  background: var(--navy);
  color: var(--ivory);
  text-align: center;
}
.cta-band h2 { color: var(--ivory); }
.cta-band h2 em { color: var(--sand); }
.cta-band p {
  color: rgba(250,247,242,0.75);
  max-width: 540px;
  margin: 1.25rem auto 2rem;
}

/* ---------- Contact / Visit ---------- */
.contact {
  background: var(--ivory);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.contact-info h2 { margin: 1.25rem 0 2rem; }
.info-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: start;
}
.info-item:last-child { border-bottom: 1px solid var(--hairline); }
.info-label {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  padding-top: 4px;
}
.info-value {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--navy);
  line-height: 1.4;
}
.info-value small {
  display: block;
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
  letter-spacing: 0;
}

.form-card {
  background: var(--cream);
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
}
.form-card::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 3px;
  background: var(--gold);
}
.form-card h3 {
  margin-bottom: 0.5rem;
}
.form-card > p {
  margin-bottom: 2rem;
  font-size: 0.95rem;
}
.form-field { margin-bottom: 1.25rem; }
.form-field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.9rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color .3s var(--ease);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--gold);
}
.form-field textarea {
  resize: vertical;
  min-height: 90px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.form-card .btn-primary {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

/* ---------- Footer ---------- */
footer {
  background: var(--navy);
  color: rgba(250,247,242,0.75);
  padding: 5rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand .logo-text .name,
.footer-brand .logo { color: var(--ivory); }
.footer-brand p {
  margin-top: 1.5rem;
  font-size: 0.92rem;
  color: rgba(250,247,242,0.65);
  line-height: 1.7;
  max-width: 320px;
}
.footer-col h4 {
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-col a {
  font-size: 0.92rem;
  color: rgba(250,247,242,0.7);
  transition: color .3s var(--ease);
}
.footer-col a:hover { color: var(--gold-soft); }
.footer-bottom {
  border-top: 1px solid rgba(250,247,242,0.12);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(250,247,242,0.5);
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-bottom .credit {
  font-family: var(--serif);
  font-style: italic;
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-grid .footer-brand { grid-column: 1 / -1; }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gallery-grid.gallery-full {
    grid-template-columns: repeat(3, 1fr);
  }
  .teaser-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
}

/* The nav items stay on one line until ~1080px. Past that, even with
   nowrap applied, the five links + CTA won't fit alongside the logo and
   the weather pill, so we collapse to the hamburger menu earlier. */
@media (max-width: 1080px) {
  .nav-links, .nav-cta { display: none; }
  .menu-toggle { display: block; }
}

@media (max-width: 960px) {
  .hero-content { padding: 8rem 0 9rem; }
  .hero-sub { font-size: 1.05rem; }

  .page-hero { min-height: 50vh; min-height: 50svh; padding-bottom: 3rem; }
  .page-hero-content { padding-top: 7rem; }

  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image { max-width: 480px; aspect-ratio: 4/5; }
  .about-image::after { top: 0.75rem; left: 0.75rem; right: -0.75rem; bottom: -0.75rem; }

  .amenity-row { grid-template-columns: 1fr; gap: 1.75rem; margin-bottom: 3.5rem; }
  .amenity-row.reverse > .amenity-visual { order: 0; }

  .care-grid { grid-template-columns: 1fr; }

  .care-block { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0; }
  .care-block.reverse .care-visual { order: 0; }
  .care-detail ul { grid-template-columns: 1fr; }

  .gallery-grid,
  .gallery-grid.gallery-full {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .teaser-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }

  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
  .info-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.25rem 0;
  }
  .info-label { padding-top: 0; }

  .form-row { grid-template-columns: 1fr; gap: 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer-brand { grid-column: 1 / -1; }

  .testimonial-text { font-size: 1.35rem; }
  .quote-mark { font-size: 5rem; }
}

@media (max-width: 640px) {
  :root { --gutter: 1.25rem; }
  section { padding: 4.5rem 0; }

  .logo-mark { width: 34px; height: 34px; font-size: 1.05rem; }
  .logo-text .name { font-size: 1rem; }
  .logo-text .sub { font-size: 0.52rem; letter-spacing: 0.26em; }

  .hero-content { padding: 7rem 0 10rem; }
  .hero h1 { margin: 1.25rem 0 1.25rem; }
  .hero-sub { margin-bottom: 2rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-meta {
    bottom: 2rem;
    display: flex;            /* override desktop grid for stacking */
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.68rem;
  }
  .scroll-cue { display: none; }

  .page-hero-content { padding-top: 6rem; }

  .section-head { margin-bottom: 3rem; }

  .care-card { padding: 2rem 1.5rem; }

  .amenity-visual { aspect-ratio: 4/3; }
  .care-visual { aspect-ratio: 4/3; }

  .gallery-grid,
  .gallery-grid.gallery-full {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .gallery-item { aspect-ratio: 4 / 3; }

  .ov-lb-close { top: 0.85rem; right: 0.85rem; width: 44px; height: 44px; }
  .ov-lb-prev,
  .ov-lb-next { width: 44px; height: 44px; }
  .ov-lb-prev { left: 0.6rem; }
  .ov-lb-next { right: 0.6rem; }
  .ov-lb-counter { bottom: 0.85rem; font-size: 0.7rem; }

  .form-card { padding: 1.75rem 1.25rem; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .divider-ornament::before,
  .divider-ornament::after { width: 40px; }

  .btn { padding: 0.95rem 1.75rem; font-size: 0.72rem; letter-spacing: 0.18em; }

  .mobile-menu ul a { font-size: 1.5rem; padding: 1rem 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-bg { animation: none; }
}

/* ============================================================
   EDITOR MODE — login, toolbar, inline editing affordances
   ============================================================ */

/* Edit-mode accent color (separate from brand gold so it's visually distinct) */
:root {
  --edit-accent: #E07A2B;          /* warm orange */
  --edit-accent-soft: #F5C79B;
  --edit-danger: #C14B4B;
}

/* ---------- Login Modal ---------- */
.ov-login-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(27, 58, 75, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  animation: ovFade .3s ease-out forwards;
}
@keyframes ovFade { to { opacity: 1; } }
.ov-login-card {
  background: var(--ivory);
  border-radius: 6px;
  padding: 3rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.4);
  text-align: center;
  position: relative;
}
.ov-login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 6px 6px 0 0;
}
.ov-login-card .logo-mark {
  margin: 0 auto 1rem;
  color: var(--navy);
}
.ov-login-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.ov-login-card p {
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
  color: var(--muted);
}
.ov-login-card input {
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--cream);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color .3s ease;
  text-align: center;
  letter-spacing: 0.1em;
}
.ov-login-card input:focus { border-color: var(--gold); }
.ov-login-card .ov-error {
  color: var(--edit-danger);
  font-size: 0.82rem;
  min-height: 1.2rem;
  margin-top: 0.75rem;
  letter-spacing: 0.05em;
}
.ov-login-card .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }
.ov-login-card .ov-hint {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}
.ov-login-card .ov-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
  background: transparent;
  border: none;
}
.ov-login-card .ov-close:hover { background: var(--hairline); color: var(--navy); }

/* ---------- Editor Toolbar ---------- */
.ov-toolbar {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 9000;
  background: var(--navy);
  color: var(--ivory);
  border-radius: 50px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.45);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: transform .4s var(--ease);
  max-width: calc(100vw - 2.5rem);
}
body.ov-editing .ov-toolbar { transform: translateX(-50%) translateY(0); }
.ov-toolbar-status {
  padding: 0 1rem 0 1.25rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.8);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-right: 1px solid rgba(250,247,242,0.15);
  margin-right: 0.5rem;
  white-space: nowrap;
}
.ov-toolbar-status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--edit-accent);
  box-shadow: 0 0 8px var(--edit-accent);
  animation: ovPulse 1.8s ease-in-out infinite;
}
@keyframes ovPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.ov-toolbar-status.saved .dot {
  background: #7BC47F;
  box-shadow: 0 0 8px #7BC47F;
  animation: none;
}
.ov-toolbar button {
  padding: 0.65rem 1rem;
  background: transparent;
  color: rgba(250,247,242,0.85);
  border: none;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 40px;
  transition: background .25s ease, color .25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.ov-toolbar button:hover { background: rgba(250,247,242,0.1); color: var(--ivory); }
.ov-toolbar button.danger:hover { background: var(--edit-danger); color: var(--ivory); }
.ov-toolbar button svg { width: 14px; height: 14px; }

.ov-toast {
  position: fixed;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  z-index: 9500;
  background: var(--navy);
  color: var(--ivory);
  padding: 0.75rem 1.5rem;
  border-radius: 40px;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s var(--ease);
  box-shadow: 0 15px 40px -10px rgba(0,0,0,0.4);
}
.ov-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ov-toast.error { background: var(--edit-danger); }

/* ---------- Editable element affordances (only active in edit mode) ---------- */
body.ov-editing [data-edit],
body.ov-editing [data-edit-img] {
  position: relative;
  cursor: text;
  outline: 1.5px dashed rgba(224, 122, 43, 0);
  outline-offset: 4px;
  border-radius: 2px;
  transition: outline-color .2s ease, background-color .2s ease;
}
body.ov-editing [data-edit]:hover,
body.ov-editing [data-edit-img]:hover {
  outline-color: var(--edit-accent);
  background-color: rgba(224, 122, 43, 0.06);
}
body.ov-editing [data-edit-img] {
  cursor: grab;
  /* Lock the wrap as the positioning + clipping context for the image.
     Some templates rely on overflow:hidden being on the wrap, so re-assert it
     here — without this, transforms + filters on the img can leak outside. */
  position: relative !important;
  overflow: hidden !important;
}
body.ov-editing [data-edit-img].ov-dragging,
body.ov-editing [data-edit-img].ov-dragging img { cursor: grabbing; }
body.ov-editing [data-edit-img]:hover img { filter: brightness(0.7); }
body.ov-editing [data-edit-img] img {
  /* Force the img into a clean, predictable box regardless of what the page's
     own CSS or any old inline styles do. This stops the "duplicated image with
     a navy band" hover glitch where the img was being painted outside the wrap. */
  display: block !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover !important;
  transition: filter .25s ease;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;     /* let the wrap receive mousedown cleanly */
}
/* Kill the marketing-hover zoom in edit mode — it fights with our
   drag-to-reposition transforms. */
body.ov-editing .about-image:hover img,
body.ov-editing .care-visual:hover img,
body.ov-editing .amenity-visual:hover img,
body.ov-editing .teaser:hover .teaser-image img,
body.ov-editing .gallery-item:hover img { transform: none; }

/* Neutralize decorative ::after pseudos on editable image wraps while in
   edit mode. Templates like .about-image use ::after for a gold accent
   frame with right: -1.25rem; bottom: -1.25rem. When the hover tooltip
   below overrides content/top/left/background, those right/bottom values
   leak through, producing a giant navy rectangle across the middle of
   the image. Explicitly zero the decorative frame so the tooltip rule
   starts from a clean slate. */
body.ov-editing .about-image::after,
body.ov-editing .care-visual::after,
body.ov-editing .amenity-visual::after,
body.ov-editing .teaser-image::after,
body.ov-editing [data-edit-img]::after {
  border: none !important;
  background: transparent !important;
  inset: auto !important;
}

/* Tooltips above editable elements */
body.ov-editing [data-edit]:hover::after,
body.ov-editing [data-edit-img]:hover::after {
  content: attr(data-edit-hint);
  position: absolute;
  top: -30px; left: 50%;
  right: auto;
  bottom: auto;
  width: auto;
  height: auto;
  transform: translateX(-50%);
  background: var(--navy) !important;
  color: var(--ivory);
  padding: 4px 10px;
  border: none !important;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  font-weight: 500;
  z-index: 50;
  font-style: normal;
  pointer-events: none;
}
body.ov-editing [data-edit]:hover::before,
body.ov-editing [data-edit-img]:hover::before {
  content: "";
  position: absolute;
  top: -6px; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--navy);
  z-index: 50;
  pointer-events: none;
}
body.ov-editing [data-edit][contenteditable="true"] {
  outline: 2px solid var(--edit-accent);
  background-color: rgba(224, 122, 43, 0.08);
  cursor: text;
  caret-color: var(--edit-accent);
}
body.ov-editing [data-edit][contenteditable="true"]:hover::after,
body.ov-editing [data-edit][contenteditable="true"]:hover::before { display: none; }

/* Image upload overlay — sits UNDER the edit controls (delete / drag / zoom)
   so the user can always see and reach those buttons even while hovering. */
body.ov-editing [data-edit-img] .ov-img-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--ivory);
  background: rgba(27, 58, 75, 0.35);
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 1;
}
body.ov-editing [data-edit-img]:hover .ov-img-overlay { opacity: 1; }
/* When any popover is open for this tile, or a reorder drag is in progress,
   hide the hover overlay so it doesn't obscure what the user is doing. */
body.ov-editing [data-edit-img]:has(.ov-reposition-popover.open) .ov-img-overlay,
body.ov-editing [data-ov-repeat].ov-reorder-ghost .ov-img-overlay {
  opacity: 0 !important;
}
body.ov-editing [data-edit-img] .ov-img-overlay svg {
  width: 28px; height: 28px;
}

/* ---- Hero background / video edit buttons (floating on the hero) ---- */
.ov-hero-edit-group {
  display: none;
}
body.ov-editing .ov-hero-edit-group {
  position: absolute;
  top: 5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
}
body.ov-editing .ov-hero-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(27, 58, 75, 0.9);
  color: var(--ivory);
  border: 1px solid var(--edit-accent);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .2s ease, transform .2s ease;
  white-space: nowrap;
}
body.ov-editing .ov-hero-edit-btn:hover {
  background: var(--edit-accent);
  transform: translateY(-1px);
}
body.ov-editing .ov-hero-edit-btn svg {
  width: 14px; height: 14px;
}
body.ov-editing .ov-hero-edit-btn.danger {
  border-color: var(--edit-danger);
}
body.ov-editing .ov-hero-edit-btn.danger:hover {
  background: var(--edit-danger);
}
@media (max-width: 720px) {
  body.ov-editing .ov-hero-edit-group {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
  }
  body.ov-editing .ov-hero-edit-btn {
    font-size: 0.62rem;
    padding: 0.5rem 0.7rem;
  }
}

/* ---- Overlay-tuning popover (opens from the hero edit group) ---- */
.ov-overlay-popover {
  display: none;
  position: absolute;
  top: 5rem;
  right: 12rem;
  z-index: 60;
  width: 280px;
  padding: 1rem 1.1rem 1.1rem;
  background: rgba(27, 58, 75, 0.94);
  border: 1px solid var(--edit-accent);
  border-radius: 6px;
  color: var(--ivory);
  font-family: var(--sans);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
body.ov-editing .ov-overlay-popover.open {
  display: block;
}
.ov-overlay-popover h4 {
  color: var(--ivory);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.ov-overlay-popover label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 247, 242, 0.75);
  margin: 0.85rem 0 0.4rem;
}
.ov-overlay-popover .ov-overlay-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.ov-overlay-popover input[type="color"] {
  width: 44px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(250, 247, 242, 0.25);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.ov-overlay-popover input[type="range"] {
  flex: 1;
  accent-color: var(--edit-accent);
}
.ov-overlay-popover .ov-overlay-value {
  font-size: 0.75rem;
  color: var(--ivory);
  min-width: 2.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ov-overlay-popover .ov-overlay-swatch {
  font-size: 0.7rem;
  color: rgba(250, 247, 242, 0.85);
  font-family: var(--sans);
  letter-spacing: 0.04em;
}
.ov-overlay-popover .ov-overlay-actions {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(250, 247, 242, 0.15);
}
.ov-overlay-popover .ov-overlay-actions button {
  flex: 1;
  padding: 0.55rem 0.8rem;
  background: transparent;
  color: var(--ivory);
  border: 1px solid rgba(250, 247, 242, 0.3);
  border-radius: 4px;
  font-family: var(--sans);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s ease;
}
.ov-overlay-popover .ov-overlay-actions button:hover {
  background: rgba(250, 247, 242, 0.1);
}
.ov-overlay-popover .ov-overlay-actions .primary {
  background: var(--edit-accent);
  border-color: var(--edit-accent);
}
.ov-overlay-popover .ov-overlay-actions .primary:hover {
  background: var(--edit-accent);
  opacity: 0.85;
}
@media (max-width: 720px) {
  .ov-overlay-popover {
    top: auto;
    bottom: 5rem;
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

/* ============================================================
   Reposition / zoom control on every editable image
   - Floating circular button (top-right of the tile)
   - Popover with Zoom + Horizontal + Vertical sliders
   ============================================================ */
.ov-reposition-btn {
  display: none;
}
body.ov-editing .ov-reposition-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  /* Bottom-right corner — leaves the top-right free for the × delete button
     (repeatable items) and the top-left free for the drag-reorder handle. */
  bottom: 0.6rem;
  right: 0.6rem;
  /* Must sit above the hover overlay (z-index: 1) so it's always clickable. */
  z-index: 25;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 30, 40, 0.78);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  /* Always visible in edit mode — users were missing the zoom/reposition
     feature entirely because it only appeared on hover. */
  opacity: 0.85;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  padding: 0;
}
body.ov-editing [data-edit-img]:hover .ov-reposition-btn,
body.ov-editing .ov-reposition-btn:hover {
  opacity: 1;
  transform: translateY(0);
}
body.ov-editing .ov-reposition-btn:hover {
  background: rgba(15, 30, 40, 0.95);
}
.ov-reposition-btn svg {
  width: 16px;
  height: 16px;
}

/* When the popover is open, keep the button visible even without hover */
body.ov-editing [data-edit-img]:has(.ov-reposition-popover.open) .ov-reposition-btn {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Hero background zoom / reposition
   - The "Adjust Photo" button lives in the existing hero edit group
   - A popover appears centered in the hero with a zoom slider
   - The hero itself becomes draggable to pan the background image
   ============================================================ */
body.ov-editing .ov-hero-bg-popover {
  /* Float above the hero edit group so it's not covered by those buttons */
  z-index: 60 !important;
}
body.ov-editing .hero,
body.ov-editing .page-hero {
  cursor: grab;
}
body.ov-editing .hero.ov-bg-dragging,
body.ov-editing .page-hero.ov-bg-dragging {
  cursor: grabbing;
  user-select: none;
}
/* But inner interactive controls keep their normal cursor */
body.ov-editing .hero .ov-hero-edit-group,
body.ov-editing .hero .ov-hero-edit-btn,
body.ov-editing .hero [data-edit],
body.ov-editing .hero [data-edit-img],
body.ov-editing .hero .ov-reposition-popover,
body.ov-editing .hero .ov-overlay-popover,
body.ov-editing .hero .ov-weather,
body.ov-editing .hero .ov-toolbar,
body.ov-editing .page-hero .ov-hero-edit-group,
body.ov-editing .page-hero .ov-hero-edit-btn,
body.ov-editing .page-hero [data-edit],
body.ov-editing .page-hero [data-edit-img],
body.ov-editing .page-hero .ov-reposition-popover,
body.ov-editing .page-hero .ov-overlay-popover {
  cursor: default;
}

.ov-reposition-popover {
  display: none;
}
body.ov-editing .ov-reposition-popover.open {
  display: block;
  /* Positioned as a floating panel anchored to the viewport so it never
     covers the image being adjusted. JS sets top/left dynamically based
     on the tile/hero location and available viewport space. */
  position: fixed;
  top: 0;
  left: 0;
  transform: none;
  z-index: 70;
  width: 260px;
  background: var(--ivory, #faf7f2);
  color: var(--navy, #1b3a4b);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 1.1rem 1.15rem 1rem;
  font-family: var(--sans, system-ui, sans-serif);
  /* Small pointer arrow — subtle, direction updated via data attribute */
}
/* Tiny directional tail so the popover visibly "points" at the tile */
body.ov-editing .ov-reposition-popover.open::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--ivory, #faf7f2);
  transform: rotate(45deg);
  box-shadow: -2px -2px 6px rgba(0,0,0,0.08);
  display: none;
}
body.ov-editing .ov-reposition-popover.open[data-ov-side="right"]::before {
  display: block;
  left: -6px;
  top: 22px;
}
body.ov-editing .ov-reposition-popover.open[data-ov-side="left"]::before {
  display: block;
  right: -6px;
  top: 22px;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.08);
}
body.ov-editing .ov-reposition-popover.open[data-ov-side="below"]::before {
  display: block;
  top: -6px;
  left: 22px;
  box-shadow: -2px 2px 6px rgba(0,0,0,0.08);
}
body.ov-editing .ov-reposition-popover.open[data-ov-side="above"]::before {
  display: block;
  bottom: -6px;
  left: 22px;
  box-shadow: 2px -2px 6px rgba(0,0,0,0.08);
}
.ov-reposition-popover h4 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ov-reposition-popover .ov-rz-hint {
  margin: 0 0 0.85rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: rgba(27, 58, 75, 0.6);
}
.ov-reposition-popover label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(27, 58, 75, 0.6);
  margin: 0.7rem 0 0.3rem;
  font-weight: 500;
}
.ov-reposition-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.ov-reposition-row input[type="range"] {
  flex: 1;
  margin: 0;
  accent-color: #c8a46c;
  cursor: pointer;
}
.ov-reposition-row .val {
  font-size: 0.72rem;
  color: rgba(27, 58, 75, 0.7);
  min-width: 40px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ov-reposition-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
.ov-reposition-actions button {
  font-family: inherit;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  border: 1px solid rgba(27, 58, 75, 0.22);
  background: transparent;
  color: var(--navy, #1b3a4b);
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ov-reposition-actions button:hover {
  background: rgba(27, 58, 75, 0.06);
}
.ov-reposition-actions button.primary {
  background: var(--navy, #1b3a4b);
  color: var(--ivory, #faf7f2);
  border-color: var(--navy, #1b3a4b);
}
.ov-reposition-actions button.primary:hover {
  background: #122b38;
  border-color: #122b38;
}
@media (max-width: 480px) {
  body.ov-editing .ov-reposition-popover.open {
    width: calc(100vw - 2.5rem);
    max-width: 280px;
  }
}


/* ============================================================
   Drag-to-reorder handle on repeatable items (gallery, etc.)
   ============================================================ */
.ov-reorder-handle {
  display: none;
}
body.ov-editing .ov-reorder-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  /* Above the hover overlay (z-index: 1) so the six-dot handle is visible. */
  z-index: 25;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(15, 30, 40, 0.78);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: grab;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease, background .2s ease;
  padding: 0;
}
body.ov-editing [data-ov-repeat]:hover .ov-reorder-handle {
  opacity: 1;
  transform: translateY(0);
}
body.ov-editing .ov-reorder-handle:hover { background: rgba(15, 30, 40, 0.95); }
body.ov-editing .ov-reorder-handle:active { cursor: grabbing; }
.ov-reorder-handle svg { width: 16px; height: 16px; }

/* Ghost state of the item being dragged */
body.ov-editing [data-ov-repeat].ov-reorder-ghost {
  opacity: 0.35;
  transition: opacity .15s ease;
}
/* Drop indicators — a thin gold bar on the leading/trailing edge of the
   hovered item. Using :before/:after keeps it from affecting layout. */
body.ov-editing [data-ov-repeat] { position: relative; }
body.ov-editing [data-ov-repeat].ov-reorder-over-before::before,
body.ov-editing [data-ov-repeat].ov-reorder-over-after::after {
  content: "";
  position: absolute;
  top: -4px; bottom: -4px;
  width: 3px;
  background: var(--edit-accent);
  border-radius: 2px;
  z-index: 7;
  pointer-events: none;
  box-shadow: 0 0 8px var(--edit-accent);
}
body.ov-editing [data-ov-repeat].ov-reorder-over-before::before { left: -6px; }
body.ov-editing [data-ov-repeat].ov-reorder-over-after::after  { right: -6px; }

/* Add / remove controls on repeatable items */
.ov-remove-btn,
.ov-add-btn {
  display: none;
}
body.ov-editing .ov-remove-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  width: 32px; height: 32px;
  background: var(--edit-danger);
  color: var(--ivory);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 4px 12px -4px rgba(0,0,0,0.3);
  transition: transform .2s ease;
}
.ov-remove-btn:hover { transform: scale(1.08); }
body.ov-editing [data-ov-repeat] {
  position: relative;
}
body.ov-editing .ov-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1.5rem;
  margin-top: 1.5rem;
  background: transparent;
  color: var(--edit-accent);
  border: 1.5px dashed var(--edit-accent);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s ease;
}
.ov-add-btn:hover {
  background: var(--edit-accent);
  color: var(--ivory);
}
body.ov-editing [data-ov-repeat-container] {
  padding-bottom: 1rem;
}

/* Keep smooth-scroll from jumping during in-place edits */
body.ov-editing { scroll-padding-top: 6rem; }

/* Mobile tweaks for toolbar */
@media (max-width: 640px) {
  .ov-toolbar {
    bottom: 0.75rem;
    border-radius: 40px;
    padding: 0.4rem;
  }
  .ov-toolbar-status { padding: 0 0.75rem; font-size: 0.64rem; }
  .ov-toolbar button { padding: 0.5rem 0.7rem; font-size: 0.64rem; }
  .ov-toolbar button .btn-label { display: none; }
  .ov-login-card { padding: 2rem 1.5rem; }
}

