/* ==========================================================================
   Senior Care Macomb — site stylesheet (v5)
   ========================================================================== */

:root {
  --green-dark: #1f4a30;
  --green: #3d7a53;
  --green-mid: #4f8f65;
  --green-light: #7bb391;
  --accent-soft: #eaf4ec;
  --gold: #e0a736;
  --cream: #faf8f4;
  --text: #2a2f2a;
  --text-light: #5b645c;
  --white: #ffffff;
  --border: #e3e0d8;
  --shadow: 0 8px 24px rgba(31, 74, 48, 0.10);
  --shadow-hover: 0 14px 34px rgba(31, 74, 48, 0.16);
  --shadow-lg: 0 20px 50px rgba(20, 40, 26, 0.22);
  --radius: 16px;
  --font-serif: 'Lora', Georgia, serif;
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--green-dark);
  line-height: 1.25;
  margin: 0 0 12px;
  font-weight: 600;
}

h1 { font-size: 3.1rem; letter-spacing: -0.01em; }
h2 { font-size: 2.1rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; margin-bottom: 6px; }

p { margin: 0 0 14px; color: var(--text-light); }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }

ul { margin: 0; padding: 0; }

img { max-width: 100%; display: block; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 90px 0; }

.section-label {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 50px;
}

.section-header p { margin-top: 10px; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--green-dark);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 0 0 10px 0;
  z-index: 500;
}
.skip-link:focus { left: 0; color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.98rem;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 6px 18px rgba(61, 122, 83, 0.35);
}
.btn-primary:hover {
  background: var(--green-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(31, 74, 48, 0.35);
}

.btn-lg { padding: 16px 34px; font-size: 1.05rem; }

.btn-outline {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: var(--white);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
}
.btn-ghost-light:hover {
  background: var(--white);
  color: var(--green-dark);
  transform: translateY(-2px);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--green-dark);
  text-decoration: none;
}

.nav-logo .logo-img {
  height: 46px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green);
  border-bottom-color: var(--green);
}

.nav-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white) !important;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 20px;
  border-radius: 50px;
  white-space: nowrap;
  border-bottom: none !important;
  transition: background 0.2s, transform 0.2s;
}
.nav-call:hover { background: var(--green-dark); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--green-dark);
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 110px 0 90px;
  color: var(--white);
  overflow: hidden;
  background-image:
    linear-gradient(100deg, rgba(13, 30, 19, 0.72) 0%, rgba(13, 30, 19, 0.50) 35%, rgba(13, 30, 19, 0.28) 60%, rgba(13, 30, 19, 0.14) 100%),
    url('images/hero-bg.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.hero h1 { color: var(--white); text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25); }
.hero p { color: rgba(255, 255, 255, 0.94); }

.hero .section-label {
  color: #b9dfc6;
  background: rgba(255, 255, 255, 0.13);
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-lede { font-size: 1.15rem; margin: 20px 0 26px; max-width: 520px; }

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 56px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: var(--white);
  line-height: 1.2;
}

.hero-stat span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.85); }

.hero-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.hero-card h3 {
  margin-bottom: 20px;
  font-size: 1.15rem;
  color: var(--green-dark);
}

.hero-card-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.hero-card-item:first-of-type { border-top: none; padding-top: 0; }

.hero-card-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: 50%;
}

.hero-card-item h4 { color: var(--green-dark); margin-bottom: 2px; font-size: 1rem; }
.hero-card-item p { margin: 0; font-size: 0.92rem; color: var(--text-light); }

/* ---------- Showcase (homepage photo strip) ---------- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.showcase-grid img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.showcase-grid img:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-hover); }

.showcase-cta { text-align: center; margin-top: 40px; }

/* ---------- Why-choose grid ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.why-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 34px 26px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.why-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}

.why-card h3 { font-size: 1.1rem; }
.why-card p { font-size: 0.95rem; margin: 0; }

.badge-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 36px auto 0;
  padding: 16px 32px;
  background: var(--white);
  border: 1.5px solid var(--accent-soft);
  border-radius: 50px;
  max-width: fit-content;
  flex-wrap: wrap;
  text-align: center;
  box-shadow: var(--shadow);
}

.badge-pill strong { color: var(--green-dark); }
.badge-pill span.badge-sep { color: var(--text-light); font-size: 0.9rem; }

/* ---------- Services grids ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.services-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.service-group {
  background: var(--white);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-group:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.service-group h3 { margin-bottom: 14px; }

.service-group ul { list-style: none; }

.service-group ul li {
  position: relative;
  padding: 6px 0 6px 24px;
  color: var(--text-light);
  border-bottom: 1px dashed var(--border);
}
.service-group ul li:last-child { border-bottom: none; }

.service-group ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }

.faq-item {
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: var(--green-light); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 54px 20px 24px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--green-dark);
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-family: var(--font-sans);
  transition: transform 0.25s;
}
.faq-item[open] summary::after { content: '−'; transform: translateY(-50%) rotate(180deg); }

.faq-item .faq-answer { padding: 0 24px 20px; }
.faq-item .faq-answer p { margin-bottom: 8px; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
    linear-gradient(120deg, var(--green-dark), var(--green));
  color: var(--white);
  padding: 74px 0;
  text-align: center;
}
.cta-band--photo {
  background:
    linear-gradient(120deg, rgba(31, 74, 48, 0.88) 0%, rgba(43, 92, 61, 0.80) 55%, rgba(61, 122, 83, 0.72) 100%),
    url('images/img1.jpg') center 55% / cover no-repeat;
}

.cta-band--photo h2,
.cta-band--photo p { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }

.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255, 255, 255, 0.9); max-width: 560px; margin: 0 auto 26px; }
.cta-band .btn-primary {
  background: var(--white);
  color: var(--green-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.cta-band .btn-primary:hover { background: var(--accent-soft); color: var(--green-dark); }
.cta-band .cta-sub {
  margin-top: 18px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
}
.cta-band .cta-sub a { color: var(--white); font-weight: 700; text-decoration: underline; }

/* ---------- Footer ---------- */
.footer {
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 60px 0 30px;
}
.footer h4 { color: var(--white); margin-bottom: 16px; }
.footer a { color: rgba(255, 255, 255, 0.8); }
.footer a:hover { color: var(--white); }
.footer p { color: rgba(255, 255, 255, 0.75); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
}

.footer-bottom {
  text-align: center;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.9rem;
  opacity: 0.75;
}

/* ---------- Mobile call bar ---------- */
.mobile-call-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 300;
  background: var(--green-dark);
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  gap: 10px;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.18);
}
.mobile-call-bar a {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 10px;
  border-radius: 12px;
}
.mobile-call-bar .m-call { background: var(--white); color: var(--green-dark); }
.mobile-call-bar .m-tour { background: var(--green); color: var(--white); border: 1px solid rgba(255,255,255,0.35); }

/* ---------- About page ---------- */
.about-text p { color: var(--text-light); }

.timeline {
  position: relative;
  padding-left: 30px;
  border-left: 3px solid var(--accent-soft);
}

.timeline-item { margin-bottom: 36px; position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -39px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--green);
}

.timeline-year {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--green-dark);
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.timeline-desc { color: var(--text-light); }

/* ---------- Contact / Careers ---------- */
.contact-info-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 0 auto 50px;
}

.contact-info-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  box-shadow: var(--shadow);
}

.ci-icon { font-size: 1.8rem; margin-bottom: 8px; }
.contact-info-item h4 { margin-bottom: 4px; }

.map-embed {
  max-width: 900px;
  margin: 50px auto 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}
.map-embed iframe { width: 100%; height: 360px; border: 0; }

.careers-intro {
  max-width: 720px;
  margin: 0 auto 50px;
  text-align: center;
}

.form-container {
  max-width: 760px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 44px;
  box-shadow: var(--shadow);
}

.form-container h2 { text-align: center; }
.form-sub { text-align: center; margin-bottom: 30px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-sans);
  font-size: 0.96rem;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--cream);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(61, 122, 83, 0.14);
}

.form-group textarea { min-height: 110px; resize: vertical; }

.form-submit { text-align: center; margin-top: 30px; }

.form-note {
  text-align: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ---------- Gallery ---------- */
.gallery-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.gallery-filter button {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 30px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.gallery-filter button:hover { border-color: var(--green); color: var(--green); }
.gallery-filter button.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 13, 0.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 30px;
}
.lightbox.open { display: flex; }

.lightbox-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.lightbox-caption {
  color: var(--white);
  margin-top: 16px;
  font-size: 0.95rem;
}

.lightbox-nav {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.lightbox-nav button {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: 600;
}
.lightbox-nav button:hover { background: rgba(255, 255, 255, 0.25); }

.lightbox-close {
  position: absolute;
  top: 26px;
  right: 30px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
}

/* ---------- Reviews ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.review-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 28px 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.review-card::before {
  content: '\201C';
  position: absolute;
  top: 14px;
  left: 24px;
  font-family: var(--font-serif);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--green-light);
  opacity: 0.7;
}

.review-stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 12px; }
.review-text { font-style: italic; color: var(--text); flex-grow: 1; }
.review-author { font-weight: 700; color: var(--green-dark); margin-top: 10px; }
.review-location { font-size: 0.85rem; color: var(--text-light); }

/* ---------- Fade-in (scroll-triggered when JS available) ---------- */
.fade-in { animation: fadeInUp 0.6s ease both; }

.js .fade-in {
  animation: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .fade-in.visible { opacity: 1; transform: translateY(0); }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in, .js .fade-in { animation: none; opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .nav-call { display: none; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr; }
  .services-grid,
  .services-grid-2col { grid-template-columns: 1fr 1fr; }
  .why-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .contact-info-bar { grid-template-columns: 1fr; }
  h1 { font-size: 2.3rem; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px 20px;
    border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; }
  .section { padding: 60px 0; }
  .hero { padding: 80px 0 70px; }
  .about-hero { grid-template-columns: 1fr !important; }
  .form-grid { grid-template-columns: 1fr; }
  .services-grid,
  .services-grid-2col { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .mobile-call-bar { display: flex; }
  body { padding-bottom: 66px; }
}
