/* =========================================================
   Soul Dog Stones: Memorial Collection home page + Explore Memorials
   Uses the colours and fonts from memorial-public.css
   ========================================================= */

/* ---------- 1. Every Dog Has a Story ---------- */
.sds-home-hero {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 26px 16px 34px;
}
.sds-home-title {
  font-family: var(--sds-script);
  font-weight: normal;
  font-size: clamp(50px, 6.4vw, 84px);
  line-height: 1.1;
  color: var(--sds-text);
  margin: 6px 0 14px;
}
.sds-home-title--sm { font-size: clamp(42px, 5vw, 64px); }
.sds-home-lead {
  font-family: var(--sds-serif);
  font-style: italic;
  font-size: 23px;
  line-height: 1.45;
  color: #4F4741;
  margin: 0 0 16px;
}
.sds-home-text {
  font-size: 16px;
  line-height: 1.75;
  color: #5A514A;
  margin: 0 0 10px;
}
.sds-home-hero--compact { padding-bottom: 20px; }
.sds-home-hero--compact .sds-search { margin-top: 18px; }

/* ---------- 2. Find a Special Dog ---------- */
.sds-home-find {
  position: relative;
  max-width: 100%;
  margin: 0 auto 48px;
  padding: 30px 34px 26px;
  text-align: center;
  background: var(--sds-card);
  border: 1px solid rgba(239, 232, 221, .8);
  border-radius: 24px;
  box-shadow: var(--sds-shadow);
}
.sds-home-find .sds-home-text { margin-bottom: 20px; }
.sds-home-count { margin-top: 12px; font-size: 13px; color: var(--sds-muted); }

.sds-search { position: relative; text-align: left; }
.sds-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  background: #fff;
  border: 1.5px solid #E4DACB;
  border-radius: 999px;
  transition: border-color .2s, box-shadow .2s;
}
.sds-search-box:focus-within { border-color: var(--sds-teal); box-shadow: 0 0 0 4px rgba(84, 205, 197, .18); }
.sds-search-icon { flex: 0 0 auto; color: var(--sds-muted); }
.sds-search-box input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 4px;
  font: 17px/1.3 var(--sds-sans);
  color: var(--sds-text);
}
.sds-search-box input::-webkit-search-cancel-button { cursor: pointer; }
.sds-search-btn { flex: 0 0 auto; padding: 11px 24px; }

/* live suggestions */
.sds-suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 8px);
  z-index: 20;
  list-style: none;
  margin: 0; padding: 6px;
  background: #fff;
  border: 1px solid var(--sds-line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(57, 52, 47, .14);
  max-height: 380px;
  overflow-y: auto;
}
.sds-suggest li a {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--sds-text);
  text-decoration: none;
}
.sds-suggest li a:hover,
.sds-suggest li.is-active a { background: var(--sds-ivory); }
.sds-suggest-photo {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sds-wash-beige);
  color: #C9AE8C;
  display: flex; align-items: center; justify-content: center;
}
.sds-suggest-photo img { width: 100%; height: 100%; object-fit: cover; }
.sds-suggest-photo svg { width: 22px; height: 22px; }
.sds-suggest-text { display: flex; flex-direction: column; min-width: 0; }
.sds-suggest-name { font-weight: 700; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sds-suggest-years { font-size: 12.5px; color: var(--sds-muted); }
.sds-suggest-all a { justify-content: center; font-size: 13.5px; font-weight: 600; color: var(--sds-terracotta) !important; border-top: 1px solid var(--sds-line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.sds-suggest-empty { padding: 12px 14px; font-size: 14px; color: var(--sds-muted); }

/* ---------- 3. Stories Worth Remembering ---------- */
.sds-home-section { margin-bottom: 52px; }
.sds-home-section-head { text-align: center; max-width: 720px; margin: 0 auto 24px; }
.sds-home-cta { text-align: center; margin-top: 28px; }
.sds-btn--lg { padding: 13px 30px; font-size: 15px; }

/* ---------- 4. A Living Tribute at Flip Farms ---------- */
.sds-home-farm {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 40px 36px 42px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(228, 235, 221, .85) 0%, rgba(250, 247, 241, .75) 55%, rgba(243, 228, 205, .65) 100%);
  border: 1px solid rgba(168, 182, 154, .35);
}
.sds-home-farm p {
  position: relative; z-index: 1;
  max-width: 660px;
  margin: 0 auto 12px;
  font-family: var(--sds-serif);
  font-size: 20px;
  line-height: 1.55;
  color: #4F5E43;
}
.sds-home-farm .sds-btn { position: relative; z-index: 1; margin-top: 14px; }
.sds-home-farm-leaf,
.sds-home-farm::after {
  content: '';
  position: absolute;
  width: 130px; height: 190px;
  background: url('../img/memorial/sprig.svg') no-repeat center / contain;
  opacity: .55;
  pointer-events: none;
}
.sds-home-farm-leaf { left: -18px; bottom: -44px; transform: rotate(-18deg); }
.sds-home-farm::after { right: -18px; top: -48px; transform: scaleX(-1) rotate(160deg); }

/* ---------- Explore Memorials ---------- */
.sds-explore-summary { text-align: center; font-size: 14px; color: var(--sds-muted); margin: 0 0 20px; }
.sds-explore-summary a { color: var(--sds-terracotta); font-weight: 600; }
.sds-pager--explore { border-top: 0; margin-top: 30px; }

/* ---------- grid ---------- */
/* Cards keep a steady width and every row sits in the middle,
   so 1 or 2 memorials, or a short last row, are centred too */
.sds-home-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}
.sds-home-grid > .sds-home-card { flex: 0 1 340px; min-width: 260px; }

.sds-home-card {
  display: flex;
  flex-direction: column;
  background: var(--sds-card);
  border: 1px solid rgba(239, 232, 221, .7);
  border-radius: var(--sds-radius);
  box-shadow: var(--sds-shadow);
  overflow: hidden;
  color: var(--sds-text);
  text-decoration: none;
  transition: transform .25s ease, box-shadow .25s ease;
}
.sds-home-card:hover {
  color: var(--sds-text);
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(57, 52, 47, .05), 0 14px 32px rgba(57, 52, 47, .10);
}
.sds-home-card:focus-visible { outline: 3px solid var(--sds-teal); outline-offset: 3px; }

/* featured: a soft warm ring so it stands out without shouting */
.sds-home-card.is-featured { border-color: #E7D6BF; box-shadow: 0 0 0 3px rgba(243, 228, 205, .9), var(--sds-shadow); }

.sds-home-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--sds-wash-beige);
  overflow: hidden;
}
.sds-home-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.sds-home-card:hover .sds-home-photo img { transform: scale(1.04); }
.sds-home-photo-empty {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #C9AE8C;
}
.sds-home-photo-empty svg { width: 64px; height: 64px; }

.sds-home-badge {
  position: absolute; left: 12px; top: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: var(--sds-terracotta);
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.sds-home-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 18px 22px 20px;
  text-align: center;
}
.sds-home-name {
  font-family: var(--sds-script);
  font-weight: normal;
  font-size: 40px;
  line-height: 1.15;
  margin: 0 0 4px;
  overflow-wrap: anywhere;
}
.sds-home-dates {
  font-size: 13px;
  color: var(--sds-muted);
  letter-spacing: .04em;
}
.sds-home-dedication {
  font-family: var(--sds-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: #5A514A;
  margin: 10px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sds-home-link {
  margin-top: auto;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sds-terracotta);
}

.sds-home-empty { text-align: center; }
.sds-home-empty p {
  margin: 0;
  font-family: var(--sds-serif);
  font-style: italic;
  font-size: 20px;
  color: #6E655E;
}

/* ---------- tablet / mobile ---------- */
@media (max-width: 991.98px) {
  .sds-home-grid { gap: 18px; }
}
@media (max-width: 575.98px) {
  .sds-home-grid { gap: 16px; }
  .sds-home-grid > .sds-home-card { flex-basis: 100%; min-width: 0; }
  .sds-home-hero { padding: 18px 4px 24px; }
  .sds-home-lead { font-size: 20px; }
  .sds-home-text { font-size: 15px; }
  .sds-home-name { font-size: 36px; }
  .sds-home-find { padding: 24px 16px 20px; border-radius: 20px; margin-bottom: 36px; }
  .sds-search-box { padding-left: 12px; }
  .sds-search-box input { font-size: 16px; }   /* 16px stops iPhone zooming in */
  .sds-search-btn { padding: 10px 16px; }
  .sds-home-farm { padding: 30px 18px 32px; border-radius: 20px; }
  .sds-home-farm p { font-size: 18px; }
  .sds-home-farm-leaf, .sds-home-farm::after { width: 84px; height: 124px; opacity: .4; }
}
@media (prefers-reduced-motion: reduce) {
  .sds-home-card, .sds-home-photo img { transition: none; }
}

/* =========================================================
   Header bar (public pages)
   ========================================================= */
.sds-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -12px 0 26px;
  padding: 12px 0;
}
.sds-brand { display: inline-block;}
.sds-brand:hover { color: var(--sds-text); }
.sds-brand-mark {
  /* width: 42px; height: 42px; */
  /* border-radius: 50%; */
  /* display: flex; align-items: center; justify-content: center; */
  /* color: #fff; */
  display: inline-block;
}
.sds-brand-mark svg { width: 22px; height: 22px; }
.sds-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.sds-brand-logo { display: block; height: 58px; width: auto; }   /* Soul Dog by Rocky Kanaka logo */
.sds-brand-name { font-family: var(--sds-serif); font-weight: 700; font-size: 21px; }
.sds-brand-sub { font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--sds-muted); margin-top: 2px; }

.sds-topnav { display: flex; align-items: center; gap: 6px; }
.sds-topnav-link {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: #5A514A;
  text-decoration: none;
}
.sds-topnav-link:hover,
.sds-topnav-link.is-active { background: rgba(255, 255, 255, .8); color: var(--sds-text); }
.sds-topnav-btn { margin-left: 6px; padding: 9px 18px; }

/* =========================================================
   Hero: text left, photo collage right
   ========================================================= */
.sds-hero-home {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: 36px;
  margin-bottom: 40px;
  padding: 46px 50px;
  border-radius: 28px;
  background:
    radial-gradient(600px 300px at 90% 10%, rgba(228, 235, 221, .9) 0%, transparent 70%),
    linear-gradient(120deg, rgba(243, 228, 205, .75) 0%, rgba(255, 252, 247, .85) 60%, rgba(228, 235, 221, .6) 100%);
  border: 1px solid rgba(231, 214, 191, .55);
  box-shadow: 0 1px 2px rgba(57, 52, 47, .03), 0 18px 48px rgba(57, 52, 47, .07);
  overflow: hidden;
}
.sds-hero-home-text { position: relative; z-index: 1; }
.sds-hero-home .sds-eyebrow { margin-bottom: 6px; }
.sds-hero-home .sds-home-title {
  font-size: clamp(46px, 5vw, 74px);
  line-height: 1.12;
  margin: 0 0 18px;
  padding-top: .06em;
}
.sds-hero-home .sds-home-lead { font-size: 22px; margin-bottom: 14px; }
.sds-hero-home .sds-home-text { font-size: 15.5px; }

.sds-hero-home-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.sds-hero-home-actions .sds-btn:not(.sds-btn--teal) { background: rgba(255, 255, 255, .85); }

.sds-hero-home-stats {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  margin-top: 20px;
  font-size: 14px;
  color: #6E655E;
}
.sds-hero-home-stats strong { color: var(--sds-text); font-weight: 700; }
.sds-dot { width: 4px; height: 4px; border-radius: 50%; background: #C9B9A4; }

/* photo collage */
.sds-hero-home-art { position: relative; height: 400px; }
.sds-collage {
  position: absolute;
  display: block;
  border-radius: 50%;
  padding: 7px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--sds-line), 0 16px 36px rgba(57, 52, 47, .16);
  transition: transform .35s ease;
  z-index: 1;                      /* photos sit above the leaf decoration */
}
.sds-collage:hover { transform: translateY(-4px) scale(1.02); z-index: 3; }
.sds-collage img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.sds-collage-name {
  position: absolute; left: 50%; bottom: -10px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 3px 12px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(57, 52, 47, .12);
  font-family: var(--sds-script);
  font-size: 22px;
  line-height: 1.2;
  color: var(--sds-text);
}
.sds-collage--empty {
  display: flex; align-items: center; justify-content: center;
  background: var(--sds-wash-beige); color: #C9AE8C;
}
.sds-collage--empty svg { width: 34%; height: 34%; }

/* 1 photo */
.sds-hero-home-art--1 .sds-collage--1 { width: 320px; height: 320px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.sds-hero-home-art--1 .sds-collage--1:hover { transform: translate(-50%, calc(-50% - 4px)) scale(1.02); }
/* 2 photos */
.sds-hero-home-art--2 .sds-collage--1 { width: 280px; height: 280px; left: 0; top: 20px; z-index: 1; }
.sds-hero-home-art--2 .sds-collage--2 { width: 190px; height: 190px; right: 0; bottom: 20px; z-index: 2; }
/* 3 photos */
.sds-hero-home-art--3 .sds-collage--1 { width: 260px; height: 260px; left: 0; top: 64px; z-index: 1; }
.sds-hero-home-art--3 .sds-collage--2 { width: 170px; height: 170px; right: 10px; top: 0; z-index: 2; }
.sds-hero-home-art--3 .sds-collage--3 { width: 150px; height: 150px; right: 40px; bottom: 10px; z-index: 2; }

.sds-hero-home-leaf {
  position: absolute;
  right: -40px; bottom: -70px;
  width: 170px; height: 250px;
  background: url('../img/memorial/sprig.svg') no-repeat center / contain;
  transform: scaleX(-1) rotate(12deg);
  opacity: .7;
  pointer-events: none;
  z-index: 0;
}

/* ---------- header + hero: tablet ---------- */
@media (max-width: 991.98px) {
  .sds-hero-home { grid-template-columns: 1fr; padding: 36px 30px; text-align: center; }
  .sds-hero-home-actions, .sds-hero-home-stats { justify-content: center; }
  .sds-hero-home-art { height: 300px; max-width: 420px; width: 100%; margin: 0 auto; order: -1; }
  .sds-hero-home-art--1 .sds-collage--1 { width: 250px; height: 250px; }
  .sds-hero-home-art--2 .sds-collage--1 { width: 220px; height: 220px; left: 20px; top: 10px; }
  .sds-hero-home-art--2 .sds-collage--2 { width: 150px; height: 150px; right: 20px; bottom: 16px; }
  .sds-hero-home-art--3 .sds-collage--1 { width: 210px; height: 210px; left: 10px; top: 50px; }
  .sds-hero-home-art--3 .sds-collage--2 { width: 140px; height: 140px; right: 20px; top: 0; }
  .sds-hero-home-art--3 .sds-collage--3 { width: 120px; height: 120px; right: 50px; bottom: 6px; }
}

/* ---------- header + hero: phone ---------- */
@media (max-width: 575.98px) {
  .sds-topbar { margin: -16px 0 18px; }
  .sds-brand-mark { width: 36px; height: 36px; }
  .sds-brand-logo { height: 44px; }
  .sds-brand-name { font-size: 18px; }
  .sds-brand-sub { font-size: 9.5px; }
  .sds-topnav-link { display: none; }          /* phones: brand + Login only */
  .sds-topnav-btn { padding: 8px 14px; font-size: 13px; }

  .sds-hero-home { padding: 26px 18px 28px; border-radius: 22px; gap: 22px; }
  .sds-hero-home .sds-home-title { font-size: clamp(40px, 12vw, 52px); }
  .sds-hero-home .sds-home-lead { font-size: 19px; }
  .sds-hero-home-actions .sds-btn { flex: 1 1 0; justify-content: center; padding: 12px 12px; font-size: 14px; white-space: nowrap; }
  .sds-hero-home-art { height: 230px; }
  .sds-hero-home-art--1 .sds-collage--1 { width: 190px; height: 190px; }
  .sds-hero-home-art--2 .sds-collage--1 { width: 170px; height: 170px; left: 8px; }
  .sds-hero-home-art--2 .sds-collage--2 { width: 120px; height: 120px; right: 8px; bottom: 10px; }
  .sds-hero-home-art--3 .sds-collage--1 { width: 160px; height: 160px; left: 0; top: 40px; }
  .sds-hero-home-art--3 .sds-collage--2 { width: 108px; height: 108px; right: 6px; top: 0; }
  .sds-hero-home-art--3 .sds-collage--3 { width: 96px; height: 96px; right: 34px; bottom: 0; }
  .sds-collage-name { font-size: 18px; bottom: -8px; }
  .sds-hero-home-leaf { width: 110px; height: 160px; opacity: .5; }
}
@media (prefers-reduced-motion: reduce) { .sds-collage { transition: none; } }

/* Text-only hero (no photo collage): one centred column */
.sds-hero-home--text {
  grid-template-columns: minmax(0, 1fr);
  text-align: center;
  padding: 52px 56px 48px;
}
.sds-hero-home--text .sds-hero-home-text { max-width: 720px; margin: 0 auto; }
.sds-hero-home--text .sds-hero-home-actions,
.sds-hero-home--text .sds-hero-home-stats { justify-content: center; }
.sds-hero-home--text .sds-home-title { margin-bottom: 20px; }
@media (max-width: 575.98px) {
  .sds-hero-home--text { padding: 32px 18px 30px; }
}