/* ==========================================================================
   Compassionate Manor Assisted Living
   Palette and typography carried over from the Opeka theme.
   ========================================================================== */

:root {
  --main: #eea839;          /* amber accent */
  --main-dark: #d8912a;
  --second: #0d6764;        /* deep teal */
  --second-dark: #095350;
  --gray: #f5f2ec;          /* cream */
  --black-dark: #152527;
  --border: #e9e9e9;
  --white: #ffffff;
  --text: #4a5658;

  --font-headers: 'Inter Tight', system-ui, sans-serif;
  --font-main: 'Hind', system-ui, sans-serif;

  --wrap: 1200px;
  --radius: 14px;
  --shadow: 0 18px 45px rgba(21, 37, 39, .10);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: var(--second); text-decoration: none; transition: color .2s; }
a:hover { color: var(--main); }
h1, h2, h3, h4, h5 {
  font-family: var(--font-headers);
  color: var(--black-dark);
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1.1em; }
ul { margin: 0 0 1.1em; padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--main); outline-offset: 3px; }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: min(100% - 3rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--cream { background: var(--gray); }
.section--teal { background: var(--second); }
.section--teal h2, .section--teal h3 { color: var(--white); }
.section--teal p { color: rgba(255, 255, 255, .82); }
.grid { display: grid; gap: 2rem; }
.center { text-align: center; }

/* --- Eyebrow + section heads ---------------------------------------------- */
.eyebrow {
  font-family: var(--font-headers);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--main);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .9rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--main);
}
.center .eyebrow::after,
.band__in .eyebrow::after {
  content: "";
  width: 26px; height: 2px;
  background: var(--main);
}
.sec-head { max-width: 760px; margin-bottom: 3rem; }
.center .sec-head { margin-inline: auto; }
.lead { font-size: 1.1rem; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-headers);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: .95rem 2rem;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--main { background: var(--main); color: var(--black-dark); }
.btn--main:hover { background: var(--main-dark); color: var(--black-dark); }
.btn--teal { background: var(--second); color: var(--white); }
.btn--teal:hover { background: var(--second-dark); color: var(--white); }
.btn--ghost { border-color: currentColor; color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--black-dark); border-color: var(--white); }

/* --- Photo placeholders --------------------------------------------------- */
.cm-photo { border-radius: var(--radius); width: 100%; object-fit: cover; }

/* Branded fallback shown when a photo file isn't present yet. */
.cm-photo--empty {
  display: grid;
  place-items: center;
  min-height: 260px;
  background:
    radial-gradient(circle at 30% 25%, rgba(238, 168, 57, .16), transparent 60%),
    linear-gradient(150deg, var(--second) 0%, #0a4f4d 55%, var(--black-dark) 100%);
  color: rgba(255, 255, 255, .16);
  overflow: hidden;
  position: relative;
}
.cm-photo__mark { width: 34%; max-width: 120px; height: auto; }
.cm-photo__name { display: none; }

/* Dev variant: SHOW_PLACEHOLDER_LABELS = true in inc/config.php */
.cm-photo--label {
  background:
    repeating-linear-gradient(45deg, rgba(13,103,100,.05) 0 12px, transparent 12px 24px),
    var(--gray);
  border: 2px dashed rgba(13, 103, 100, .28);
  color: rgba(13, 103, 100, .5);
  gap: .6rem;
  padding: 1rem;
}
.cm-photo--label .cm-photo__mark { width: 40px; }
.cm-photo--label .cm-photo__name {
  display: block;
  font-family: var(--font-headers);
  font-size: .8rem;
  letter-spacing: .05em;
  text-align: center;
}

/* ==========================================================================
   Top bar + header
   ========================================================================== */
.topbar {
  background: var(--black-dark);
  color: rgba(255, 255, 255, .75);
  font-size: .87rem;
}
.topbar__in {
  display: flex; flex-wrap: wrap; gap: .5rem 1.8rem;
  align-items: center; justify-content: space-between;
  padding: .65rem 0;
}
.topbar a { color: rgba(255, 255, 255, .85); }
.topbar a:hover { color: var(--main); }
.topbar__list { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; }

.header { background: var(--white); position: sticky; top: 0; z-index: 60; box-shadow: 0 2px 20px rgba(21,37,39,.07); }
.header__in { display: flex; align-items: center; gap: 2rem; padding: 1rem 0; }

.logo { display: flex; align-items: center; gap: .75rem; margin-right: auto; }
.logo__mark {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  background: var(--second);
  display: grid; place-items: center;
  color: var(--main);
}
.logo__mark svg { width: 24px; height: 24px; }
.logo__txt { line-height: 1.05; }
.logo__name {
  font-family: var(--font-headers); font-weight: 700;
  font-size: 1.28rem; color: var(--second); letter-spacing: -.02em;
  display: block;
}
.logo__sub {
  font-size: .66rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--main); font-weight: 600;
}

.nav { display: flex; gap: 1.6rem; }
.nav a {
  font-family: var(--font-headers); font-weight: 500;
  color: var(--black-dark); font-size: 1rem;
  padding: .35rem 0; position: relative;
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; background: var(--main); transition: width .25s;
}
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--second); }

.burger {
  display: none; background: none; border: 0; cursor: pointer;
  padding: .5rem; color: var(--black-dark);
}
.burger svg { width: 26px; height: 26px; }

/* ==========================================================================
   Hero rotator
   ========================================================================== */
.hero { position: relative; background: var(--black-dark); overflow: hidden; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .9s ease;
  display: grid; align-items: center;
}
.hero__slide.is-on { opacity: 1; visibility: visible; position: relative; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img, .hero__bg .cm-photo--empty {
  width: 100%; height: 100%; border-radius: 0; border: 0; min-height: 0;
  object-fit: cover;
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(9,40,42,.92) 0%, rgba(9,40,42,.72) 45%, rgba(9,40,42,.35) 100%);
}
.hero__in { position: relative; z-index: 2; padding: clamp(4.5rem, 13vw, 9.5rem) 0; }
.hero__copy { max-width: 640px; }
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero p { color: rgba(255, 255, 255, .88); font-size: 1.15rem; max-width: 520px; }
.hero__btns { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.8rem; }
.hero__dots {
  position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; gap: .6rem;
}
.hero__dots button {
  width: 11px; height: 11px; border-radius: 50%; cursor: pointer;
  border: 2px solid rgba(255,255,255,.7); background: transparent; padding: 0;
  transition: background .2s, transform .2s;
}
.hero__dots button.is-on { background: var(--main); border-color: var(--main); transform: scale(1.25); }

/* ==========================================================================
   Care strip (the nine care points)
   ========================================================================== */
.strip { background: var(--second); }
.strip__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px; background: rgba(255, 255, 255, .16);
}
.strip__item {
  background: var(--second);
  padding: 1.7rem 1.4rem;
  display: flex; align-items: flex-start; gap: .85rem;
  transition: background .25s;
}
.strip__item:hover { background: var(--second-dark); }
.strip__ico { color: var(--main); flex: none; margin-top: .15rem; }
.strip__ico svg { width: 22px; height: 22px; }
.strip__t {
  font-family: var(--font-headers); font-weight: 600; color: var(--white);
  font-size: 1rem; line-height: 1.3;
}
.strip__s { color: rgba(255, 255, 255, .68); font-size: .86rem; line-height: 1.4; }

/* ==========================================================================
   Split (image + copy)
   ========================================================================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--flip .split__media { order: 2; }
.split__media { position: relative; }
.split__media .cm-photo { min-height: 420px; height: 100%; }
.badge {
  position: absolute; right: -14px; bottom: -14px;
  background: var(--main); color: var(--black-dark);
  border-radius: var(--radius); padding: 1.1rem 1.4rem; max-width: 200px;
  box-shadow: var(--shadow);
}
.badge strong {
  display: block; font-family: var(--font-headers);
  font-size: 2.1rem; line-height: 1;
}
.badge span { font-size: .85rem; line-height: 1.3; display: block; }

/* --- Room / feature cards -------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.6rem; }
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem 1.8rem;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card__ico {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--gray); color: var(--second);
  display: grid; place-items: center; margin-bottom: 1.2rem;
  transition: background .25s, color .25s;
}
.card:hover .card__ico { background: var(--main); color: var(--black-dark); }
.card__ico svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .5rem; }
.card p:last-child { margin-bottom: 0; }
.card--photo { padding: 0; overflow: hidden; }
.card--photo .cm-photo { border-radius: 0; min-height: 230px; }
.card--photo .card__body { padding: 1.8rem; }

/* --- Amenity ticks --------------------------------------------------------- */
.ticks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .55rem 1.8rem; }
.ticks li { position: relative; padding-left: 1.9rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--main); box-shadow: 0 0 0 4px rgba(238, 168, 57, .22);
}

/* --- Meals timeline -------------------------------------------------------- */
.meals { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.6rem; }
.meal {
  background: var(--white); border-radius: var(--radius);
  padding: 1.8rem; border-top: 4px solid var(--main);
}
.meal__time {
  font-family: var(--font-headers); font-weight: 700; color: var(--second);
  font-size: .95rem; letter-spacing: .04em; display: block; margin-bottom: .3rem;
}
.meal h4 { margin-bottom: .4rem; }
.meal p { margin: 0; font-size: .95rem; }

/* --- CTA band -------------------------------------------------------------- */
.band { position: relative; background: var(--second); overflow: hidden; }
.band__bg { position: absolute; inset: 0; opacity: .18; }
.band__bg img, .band__bg .cm-photo--empty { width: 100%; height: 100%; object-fit: cover; border-radius: 0; border: 0; min-height: 0; }
.band__in { position: relative; z-index: 2; text-align: center; padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.band h2 { color: var(--white); }
.band p { color: rgba(255, 255, 255, .85); max-width: 620px; margin-inline: auto; }

/* --- FAQ accordion --------------------------------------------------------- */
.faq { max-width: 880px; margin-inline: auto; display: grid; gap: .8rem; }
.faq details {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.faq details[open] { border-color: var(--main); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.25rem 3.2rem 1.25rem 1.5rem;
  font-family: var(--font-headers); font-weight: 600; font-size: 1.08rem;
  color: var(--black-dark); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.4rem; top: 50%;
  transform: translateY(-50%); font-size: 1.5rem; font-weight: 400;
  color: var(--main); line-height: 1;
}
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { color: var(--second); }
.faq__body { padding: 0 1.5rem 1.4rem; }
.faq__body > :last-child { margin-bottom: 0; }
.faq__body ol, .faq__body ul { padding-left: 1.2rem; }
.faq__body li { margin-bottom: .4rem; }

/* --- Testimonials ---------------------------------------------------------- */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.6rem; }
.quote {
  background: var(--white); border-radius: var(--radius);
  padding: 2.2rem 1.9rem; position: relative;
  border: 1px solid var(--border);
}
.quote::before {
  content: "\201C"; position: absolute; top: .1em; right: .35em;
  font-family: var(--font-headers); font-size: 5rem; line-height: 1;
  color: rgba(238, 168, 57, .28);
}
.quote__stars { color: var(--main); letter-spacing: .15em; margin-bottom: .7rem; }
.quote p { font-style: italic; }
.quote__who { font-family: var(--font-headers); font-weight: 600; color: var(--second); }

/* --- Page header (interior pages) ------------------------------------------ */
.phead { position: relative; background: var(--second); overflow: hidden; }
.phead__bg { position: absolute; inset: 0; opacity: .25; }
.phead__bg img, .phead__bg .cm-photo--empty { width: 100%; height: 100%; object-fit: cover; border-radius: 0; border: 0; min-height: 0; }
.phead__in { position: relative; z-index: 2; padding: clamp(3rem, 7vw, 5rem) 0; }
.phead h1 { color: var(--white); margin-bottom: .3rem; }
.crumbs { color: rgba(255, 255, 255, .7); font-size: .9rem; }
.crumbs a { color: rgba(255, 255, 255, .9); }
.crumbs a:hover { color: var(--main); }

/* --- Levels of care -------------------------------------------------------- */
.level {
  background: var(--white); border: 1px solid var(--border);
  border-left: 5px solid var(--main); border-radius: var(--radius);
  padding: 2rem; margin-bottom: 1.6rem;
}
.level__tag {
  display: inline-block; background: var(--gray); color: var(--second);
  font-family: var(--font-headers); font-weight: 600; font-size: .75rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: .8rem;
}
.level h3 { margin-bottom: .6rem; }

/* --- Contact --------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
.info-row { display: flex; gap: 1rem; margin-bottom: 1.6rem; }
.info-row__ico {
  width: 46px; height: 46px; flex: none; border-radius: 50%;
  background: var(--main); color: var(--black-dark);
  display: grid; place-items: center;
}
.info-row__ico svg { width: 20px; height: 20px; }
.info-row h4 { margin-bottom: .1rem; }
.info-row p { margin: 0; }

.form { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.6rem, 3vw, 2.4rem); }
.field { margin-bottom: 1.1rem; }
.field label {
  display: block; font-family: var(--font-headers); font-weight: 600;
  font-size: .9rem; color: var(--black-dark); margin-bottom: .35rem;
}
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem 1rem; font: inherit; font-size: 1rem;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--gray); color: var(--black-dark);
  transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--main); background: var(--white); outline: none;
}
.field textarea { min-height: 130px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.note {
  padding: 1rem 1.2rem; border-radius: 8px; margin-bottom: 1.4rem;
  font-size: .95rem;
}
.note--ok { background: #e8f5ec; border: 1px solid #5B9B37; color: #2c5c1c; }
.note--bad { background: #fdecec; border: 1px solid #c3161b; color: #8d1114; }
.map iframe { width: 100%; height: 420px; border: 0; display: block; border-radius: var(--radius); }

/* --- Footer ---------------------------------------------------------------- */
.footer { background: var(--black-dark); color: rgba(255, 255, 255, .68); }
.footer__grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem; padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.footer h4 { color: var(--white); margin-bottom: 1.1rem; font-size: 1.05rem; }
.footer a { color: rgba(255, 255, 255, .68); }
.footer a:hover { color: var(--main); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: .5rem; }
.footer .logo__name { color: var(--white); }
.footer .logo { margin-bottom: 1.2rem; }
.footer__bar {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding: 1.4rem 0; font-size: .87rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split--flip .split__media { order: 0; }
  .split__media .cm-photo { min-height: 300px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .badge { right: 12px; bottom: -14px; }
}

@media (max-width: 820px) {
  .burger { display: block; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(80vw, 320px);
    background: var(--white); flex-direction: column; gap: 0;
    padding: 5.5rem 2rem 2rem; z-index: 70;
    transform: translateX(100%); transition: transform .3s ease;
    box-shadow: -10px 0 40px rgba(0,0,0,.15);
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { padding: .9rem 0; border-bottom: 1px solid var(--border); width: 100%; }
  .nav a::after { display: none; }
  .header__cta { display: none; }
  .topbar__in { justify-content: center; text-align: center; }
}

@media (max-width: 620px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bar { justify-content: center; text-align: center; }
  .hero p { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .hero__slide { transition: none; }
}
