/* ============================================================
   Tidal Church — Campus pages (Moncton / Shediac / Miramichi)
   Shared layer on top of styles.css. Each page sets its own
   --accent / --accent-2, so one stylesheet gives every campus
   its own colour.
   ============================================================ */

/* ---------- Hero: copy on the left, "next service" card on the right ---------- */
.cp-hero .container { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 5vw, 64px); align-items: center; }
.cp-hero .hero__inner { max-width: none; }
.cp-hero h1 { font-size: clamp(2.6rem, 5.6vw, 4.8rem); line-height: 1; letter-spacing: -.035em; }
.cp-hero .times { gap: 8px; }
.cp-hero .times .pill { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.cp-next {
  position: relative; z-index: 2; padding: 26px; border-radius: 26px; color: #fff;
  background: rgba(8,20,34,.55); border: 1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter: blur(16px) saturate(130%); backdrop-filter: blur(16px) saturate(130%);
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
  animation: cpIn .9s cubic-bezier(.2,.7,.2,1) .35s both;
}
.cp-next__label { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }
.cp-next__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent-2) 70%, transparent); animation: cpPing 2s infinite; }
.cp-next__day { margin: 0 0 14px; font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.cp-next__times { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.cp-next__times span { padding: 10px 16px; border-radius: 14px; font-weight: 800; font-size: 1.15rem; background: #fff; color: #0a2540; }
.cp-next__count { margin: 0 0 16px; color: rgba(255,255,255,.8); font-size: .95rem; min-height: 1.4em; }
.cp-next__addr { display: flex; gap: 10px; align-items: flex-start; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.15); color: #fff; text-decoration: none; font-size: .95rem; }
.cp-next__addr svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent-2); }
.cp-next__addr:hover { color: var(--accent-2); text-decoration: none; }
@keyframes cpIn { from { opacity: 0; transform: translateY(24px); } }
@keyframes cpPing { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- What to expect: a Sunday in three steps ---------- */
.cp-steps { position: relative; counter-reset: cpstep; }
.cp-steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 52px; height: 2px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 45%, transparent), transparent); z-index: 0; }
.cp-step { position: relative; z-index: 1; padding-top: 30px; text-align: left; border-radius: 24px; transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .35s ease; }
.cp-step:hover { transform: translateY(-6px); box-shadow: 0 22px 46px rgba(10,37,64,.12); border-color: transparent; }
.cp-step__icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 18px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 12px 26px color-mix(in srgb, var(--accent) 40%, transparent); transition: transform .45s cubic-bezier(.34,1.56,.64,1); }
.cp-step:hover .cp-step__icon { transform: rotate(-8deg) scale(1.08); }
.cp-step__icon svg { width: 28px; height: 28px; }
.cp-step::after { counter-increment: cpstep; content: "0" counter(cpstep); position: absolute; top: 24px; right: 26px; font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--line); }

/* ---------- Times & location: one card with the map ---------- */
.cp-details { display: grid; grid-template-columns: .9fr 1.1fr; gap: 0; border-radius: 28px; overflow: hidden; background: var(--white); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(10,37,64,.1); }
.cp-details > div:first-child { padding: clamp(28px, 4vw, 44px); }
.cp-details { align-items: stretch !important; }
.cp-details > div:last-child { min-height: 420px; align-self: stretch; display: flex; padding: 0; margin: 0; }
.cp-details > div:last-child .map-embed { flex: 1; margin: 0; height: auto; box-shadow: none; }
.cp-details .map-embed { width: 100%; height: 100%; min-height: 420px; border: 0; border-radius: 0; display: block; filter: saturate(.9); }
.cp-details .detail-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.cp-details .detail-list li:last-child { border-bottom: 0; }
.cp-details .ico { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); border-radius: 12px; }

/* ---------- Closing band ---------- */
.cp-cta { position: relative; overflow: hidden; background: linear-gradient(125deg, #0a2540 0%, color-mix(in srgb, var(--accent) 70%, #0a2540) 60%, var(--accent) 100%); background-size: 180% 180%; animation: cpShift 16s ease-in-out infinite; }
.cp-cta::before, .cp-cta::after { content: ""; position: absolute; border-radius: 50%; filter: blur(50px); pointer-events: none; }
.cp-cta::before { width: 380px; height: 380px; left: -120px; top: -160px; background: rgba(255,255,255,.14); }
.cp-cta::after { width: 320px; height: 320px; right: -80px; bottom: -150px; background: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.cp-cta .container { position: relative; z-index: 1; }
.cp-cta h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -.03em; }
.cp-cta__btns { margin-top: 26px; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }
@keyframes cpShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

@media (max-width: 960px) {
  .cp-hero .container { grid-template-columns: 1fr; }
  .cp-next { max-width: 440px; }
  .cp-details { grid-template-columns: 1fr; }
  .cp-details > div:last-child, .cp-details .map-embed { min-height: 300px; }
  .cp-steps::before { display: none; }
}
@media (prefers-color-scheme: dark) {
  .cp-step::after { color: rgba(255,255,255,.08); }
}
@media (prefers-reduced-motion: reduce) {
  .cp-next, .cp-next__label::before, .cp-cta { animation: none !important; }
}

/* ---------- Photo mosaic: rounded, captions rise on hover ---------- */
body.campus .mosaic { gap: 14px; }
body.campus .mtile { border-radius: 22px; box-shadow: 0 14px 36px rgba(10,37,64,.12); }
body.campus .mtile__img { transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .4s ease; }
body.campus .mtile:hover .mtile__img { transform: scale(1.07); filter: saturate(1.1); }
body.campus .mtile__body { transition: transform .45s cubic-bezier(.2,.7,.2,1); }
body.campus .mtile:hover .mtile__body { transform: translateY(-6px); }
body.campus .mtile__tag { background: var(--accent); color: #fff; border-radius: 999px; }
body.campus .mosaic.reveal > * { opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .7s ease, transform .8s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
body.campus .mosaic.reveal.is-visible > * { opacity: 1; transform: none; }
body.campus .mosaic.reveal.is-visible > :nth-child(2) { transition-delay: .08s; }
body.campus .mosaic.reveal.is-visible > :nth-child(3) { transition-delay: .16s; }
body.campus .mosaic.reveal.is-visible > :nth-child(4) { transition-delay: .24s; }
body.campus .mosaic.reveal.is-visible > :nth-child(5) { transition-delay: .32s; }
body.campus .mosaic.reveal.is-visible > :nth-child(6) { transition-delay: .4s; }

/* ---------- Your campus team (generated by the dashboard — styled here only) ---------- */
body.campus #pastor { position: relative; overflow: hidden; background: linear-gradient(160deg, #0a2540 0%, #0d3550 100%); color: #fff; }
body.campus #pastor::before { content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent), transparent 65%); pointer-events: none; }
body.campus #pastor .container { position: relative; }
body.campus #pastor h2 { color: #fff; }
body.campus #pastor .eyebrow { color: var(--accent-2); }
body.campus #pastor .split__text p { color: rgba(255,255,255,.84); }
body.campus #pastor .member { text-align: center; padding: 14px 14px 18px; border-radius: 24px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); transition: transform .35s cubic-bezier(.2,.7,.2,1), background .35s ease; }
body.campus #pastor .member:hover { transform: translateY(-6px); background: rgba(255,255,255,.1); }
body.campus #pastor .member__frame { border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 60%, transparent), 0 18px 40px rgba(0,0,0,.35); }
body.campus #pastor .member__photo { filter: grayscale(.15); transition: filter .4s ease, transform .6s ease; }
body.campus #pastor .member:hover .member__photo { filter: none; transform: scale(1.04); }
body.campus #pastor .member h3 { color: #fff; margin-top: 14px; }
body.campus #pastor .member__role { color: var(--accent-2); }
body.campus #pastor .member__initials { color: #fff; }

/* ---------- Calendar: one card, days as tiles ---------- */
body.campus #calendar .container > .cal, body.campus #calendar .cal {
  padding: clamp(18px, 3vw, 28px); border-radius: 26px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(10,37,64,.08);
}
body.campus .cal-day { border-radius: 18px; transition: transform .3s ease, box-shadow .3s ease; }
body.campus .cal-day:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(10,37,64,.1); }
body.campus .cal-day.is-today { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--white)), var(--white)); }
body.campus .cal-ev { border-radius: 12px; border-left: 3px solid var(--accent); transition: background .2s ease; }
body.campus .cal-ev:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
body.campus .cal-later__row { border-radius: 12px; padding-left: 10px; padding-right: 10px; transition: background .2s ease; }
body.campus .cal-later__row:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
body.campus .cc-calendar__foot { margin-top: 16px; }
body.campus .cc-calendar__foot a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; }
body.campus .cc-calendar__foot a:hover { filter: brightness(1.08); }

/* ---------- Messages ---------- */
body.campus #messages { background: linear-gradient(180deg, var(--white) 0%, var(--bg-soft) 100%); }
body.campus .cmsg__feature { border-radius: 24px; overflow: hidden; box-shadow: 0 24px 56px rgba(10,37,64,.14); transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease; }
body.campus .cmsg__feature:hover { transform: translateY(-4px); box-shadow: 0 30px 64px rgba(10,37,64,.18); }
body.campus .cmsg__banner { background: linear-gradient(135deg, #0a2540, var(--accent)); }

@media (prefers-color-scheme: dark) {
  body.campus #pastor { background: linear-gradient(160deg, #081a29, #0b2638); }
}
@media (prefers-reduced-motion: reduce) {
  body.campus .mosaic.reveal > * { opacity: 1; transform: none; transition: none; }
}

/* ---------- Messages: latest message + speakers ---------- */
body.campus .cmsg { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 44px); align-items: start; }
body.campus .cmsg__panel { padding: clamp(22px, 3vw, 30px); border-radius: 24px; background: var(--white); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(10,37,64,.08); display: flex; flex-direction: column; }
body.campus .cmsg__label { margin: 0 0 16px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
body.campus .cmsg__speakers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
body.campus .cmsg__spk { gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; border: 1px solid var(--line); transition: border-color .2s ease, background .2s ease, transform .2s ease; }
body.campus .cmsg__spk:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); transform: translateY(-2px); }
body.campus .cmsg__spk-name { white-space: normal; overflow: visible; line-height: 1.25; font-size: .95rem; }
body.campus .cmsg__avatar { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 0 0 2px var(--white), 0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent); }
body.campus .cmsg__avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.campus .cmsg__initials { color: #fff; font-weight: 800; font-size: .85rem; }
body.campus .cmsg__panel > a.btn, body.campus .cmsg__panel > .btn { margin-top: auto; align-self: flex-start; }
body.campus .cmsg__feature { display: flex; flex-direction: column; }
@media (max-width: 900px) { body.campus .cmsg { grid-template-columns: 1fr; } }
@media (max-width: 420px) { body.campus .cmsg__speakers { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: dark) {
  body.campus .cmsg__panel { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); box-shadow: none; }
  body.campus .cmsg__spk { border-color: rgba(255,255,255,.12); }
  body.campus .cmsg__avatar { box-shadow: 0 0 0 2px #0b1a26, 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); }
}

/* Hero: Sunday services card (one row per service) */
.cp-svc { margin: 22px 0 0; max-width: 420px; padding: 14px 14px 6px; border-radius: 20px; background: rgba(10,30,45,.45); border: 1px solid rgba(255,255,255,.16); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.cp-svc__day { margin: 0 0 10px 4px; font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.cp-svc__row { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; padding: 10px 14px; border-left: 3px solid var(--accent-2, #1bb5b5); border-radius: 12px; background: rgba(255,255,255,.06); }
.cp-svc__time { font-size: .9rem; font-weight: 700; color: var(--accent-2, #1bb5b5); }
.cp-svc__what { font-size: 1.05rem; font-weight: 600; color: #fff; line-height: 1.3; }
@media (max-width: 600px) { .cp-svc { max-width: none; } }
