/*
 * Events listing + single event — Novel Place child theme.
 * Structure modelled on the Charter Senior Living events pages, skinned with
 * the Novel Place palette and type (Gotham Book + Gabriola).
 */

:root {
  --npx-navy: #384363;
  --npx-ink: #1c2232;
  --npx-pale: #bdd3d7;
  --npx-tint: #eef4f5;      /* card / panel fill — pale blue at ~25% */
  --npx-line: #dde6e8;
  --npx-cream: #e9e5de;
  --npx-taupe: #ab9686;
  --npx-text: #2b3245;
  --npx-white: #fff;
  --npx-sans: "Gotham Book", "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --npx-script: Gabriola, Georgia, serif;
  --npx-max: 1140px;
}

.npx-events,
.npx-event {
  font-family: var(--npx-sans);
  color: var(--npx-text);
  font-size: 16px;
  line-height: 1.7;
}

.npx-events p,
.npx-event p { margin: 0 0 1em; }

.npx-wrap {
  max-width: var(--npx-max);
  margin: 0 auto;
  padding: 0 20px;
}

.npx-wrap--narrow { max-width: 940px; }

.npx-heading {
  font-family: var(--npx-sans);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--npx-navy);
  margin: 0 0 16px;
}

/* ---- Buttons ------------------------------------------------------------ */

.npx-btn {
  display: inline-block;
  padding: 12px 24px;
  background: var(--npx-navy);
  color: var(--npx-white) !important;
  font-family: var(--npx-sans);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 2px solid var(--npx-navy);
  transition: background-color .2s, border-color .2s, color .2s;
}

.npx-btn:hover,
.npx-btn:focus-visible {
  background: var(--npx-taupe);
  border-color: var(--npx-taupe);
}

.npx-btn--outline {
  background: transparent;
  border-color: var(--npx-white);
}

.npx-btn--outline:hover,
.npx-btn--outline:focus-visible {
  background: var(--npx-white);
  border-color: var(--npx-white);
  color: var(--npx-navy) !important;
}

.npx-btn:focus-visible,
.npx-card a:focus-visible,
.npx-back a:focus-visible {
  outline: 2px solid var(--npx-taupe);
  outline-offset: 3px;
}

/* ---- Page banner + heading (matches the site's other pages) ----------- */

.npx-banner {
  width: 100%;
  height: 498px;
  overflow: hidden;
  background: var(--npx-pale);
}

.npx-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.npx-pagehead {
  padding: 29px 0 40px;
  background: #fafafa;
  text-align: center;
}

.npx-pagehead__title {
  margin: 0;
  font-family: "Carolyna W00 Regular", var(--npx-script);
  font-size: 92px;
  line-height: 1;
  font-weight: 400;
  color: var(--npx-ink);
}

.npx-events .npx-pagehead__intro {
  max-width: 1088px;
  margin: 18px auto 0;
  font-family: var(--npx-sans);
  font-size: 26px;
  line-height: 1.2;
  color: var(--npx-taupe);
}

/* ---- Intro + listing ---------------------------------------------------- */

.npx-upcoming { padding-top: 56px; padding-bottom: 72px; }

.npx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  margin-top: 24px;
}

.npx-grid--1 { grid-template-columns: minmax(0, 1fr); }
.npx-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.npx-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Home page section (cream background): white cards, no top gap. */
.npx-events--embed { font-family: var(--npx-sans); color: var(--npx-text); font-size: 16px; line-height: 1.7; }
.npx-events--embed .npx-grid { margin-top: 0; }
.npx-events--embed .npx-card { background: var(--npx-white); border-color: transparent; }
.npx-events--embed .npx-grid--2 { max-width: 940px; margin-left: auto; margin-right: auto; }

.npx-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 20px 32px;
  background: var(--npx-tint);
  border: 1px solid var(--npx-line);
  text-align: center;
}

.npx-card__media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  overflow: hidden;
  background: var(--npx-pale);
}

.npx-card__media img,
.npx-card__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.npx-card:hover .npx-card__media img { transform: scale(1.04); }

.npx-card__title {
  margin: 0 0 6px;
  font-family: var(--npx-sans);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 400;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.npx-card__title a {
  color: var(--npx-navy);
  text-decoration: none;
}

.npx-card__title a:hover { color: var(--npx-taupe); }

.npx-events .npx-card__location {
  margin: 0 0 6px;
  font-family: var(--npx-script);
  font-size: 21px;
  line-height: 1.3;
  font-style: italic;
  color: var(--npx-text);
}

.npx-events .npx-card__when {
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 700;
  color: var(--npx-ink);
}

.npx-sep { margin: 0 4px; }

.npx-events .npx-card__excerpt {
  flex: 1 1 auto;
  margin: 0 0 26px;
  font-size: 15px;
  line-height: 1.6;
}

.npx-empty {
  padding: 32px;
  background: var(--npx-tint);
  border: 1px solid var(--npx-line);
}

/* ---- CTA band ----------------------------------------------------------- */

.npx-cta {
  margin-bottom: 72px;
  padding: 48px 32px 52px;
  background: var(--npx-navy);
  color: var(--npx-white);
  text-align: center;
}

.npx-cta__title {
  margin: 0 0 12px;
  font-family: var(--npx-sans);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--npx-white);
}

.npx-cta p {
  max-width: 760px;
  margin: 0 auto 26px;
}

/* ---- Single event ------------------------------------------------------- */

.npx-event { padding: 0 0 80px; }
.npx-event__wrap { padding-top: 32px; }

.npx-back {
  margin-bottom: 20px !important;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.npx-back a { color: var(--npx-navy); text-decoration: none; }
.npx-back a:hover { color: var(--npx-taupe); }

.npx-event__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 56px;
  align-items: start;
}

.npx-event__title {
  margin: 0 0 24px;
  font-family: var(--npx-sans);
  font-size: 36px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--npx-navy);
}

.npx-event__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 48px;
  padding: 20px 0;
  border-top: 1px solid var(--npx-line);
  border-bottom: 1px solid var(--npx-line);
}

.npx-event .npx-event__meta p { margin: 0; }

.npx-event .npx-event__label {
  font-weight: 700;
  color: var(--npx-ink);
}

.npx-event__time { font-style: italic; }

.npx-event__body { margin-top: 28px; }
.npx-event__body a { color: var(--npx-navy); }

/* RSVP column */
.npx-rsvp {
  position: sticky;
  top: 24px;
  scroll-margin-top: 120px;
}

.npx-rsvp__panel {
  padding: 28px 26px 32px;
  background: var(--npx-tint);
  border-top: 4px solid var(--npx-navy);
}

.npx-rsvp__title {
  margin: 0 0 4px;
  font-family: var(--npx-sans);
  font-size: 34px;
  line-height: 1.2;
  font-weight: 400;
  color: var(--npx-navy);
}

.npx-event .npx-rsvp__note { margin: 0 0 16px; font-size: 15px; }

/* Map strip under both columns */
.npx-event__map { margin-top: 56px; }

.npx-event__map iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
}

/* The plugin's .np-form skin assumes a full-width form; tighten it for the panel. */
.npx-rsvp__panel.np-form .gform_wrapper { max-width: none; }

.npx-rsvp__panel.np-form .gform_wrapper.gravity-theme input[type="text"],
.npx-rsvp__panel.np-form .gform_wrapper.gravity-theme input[type="email"],
.npx-rsvp__panel.np-form .gform_wrapper.gravity-theme input[type="tel"],
.npx-rsvp__panel.np-form .gform_wrapper.gravity-theme select {
  width: 100%;
  box-sizing: border-box;
  height: 44px;
  border: 1px solid var(--npx-line);
  font-size: 15px;
}

.npx-rsvp__panel.np-form .gform_wrapper.gravity-theme .gform_footer {
  justify-content: stretch;
  padding-top: 16px;
}

.npx-rsvp__panel.np-form .gform_wrapper.gravity-theme .gform_button {
  min-width: 0;
  width: 100%;
  height: auto;
  padding: 14px 32px;
  border-radius: 0;
  font-family: var(--npx-sans);
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.npx-rsvp__panel.np-form .gform_wrapper.gravity-theme .gform_button:hover {
  background: var(--npx-taupe);
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 1024px) {
  .npx-grid,
  .npx-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .npx-banner { height: 380px; }
  .npx-pagehead__title { font-size: 72px; }
  .npx-event__layout { grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 36px; }
}

@media (max-width: 767px) {
  .npx-grid,
  .npx-grid--2,
  .npx-grid--4 { grid-template-columns: minmax(0, 1fr); gap: 24px; }

  .npx-banner { height: 240px; }
  .npx-pagehead { padding: 20px 0 28px; }
  .npx-pagehead__title { font-size: 52px; }
  .npx-events .npx-pagehead__intro { font-size: 20px; }

  .npx-wrap { padding: 0 16px; }
  .npx-upcoming { padding-top: 40px; }
  .npx-heading { font-size: 22px; }
  .npx-cta { padding: 36px 20px 40px; margin-bottom: 48px; }
  .npx-cta__title { font-size: 22px; }

  .npx-event { padding-bottom: 56px; }
  .npx-event__wrap { padding-top: 24px; }
  .npx-event__title { font-size: 28px; }
  .npx-event__layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .npx-rsvp { position: static; }
  .npx-event__map { margin-top: 40px; }
  .npx-event__map iframe { height: 280px; }
}

@media (prefers-reduced-motion: reduce) {
  .npx-card__media img,
  .npx-btn { transition: none; }
}
