/* =========================================================
   EDITABLE HOMEPAGE CARDS
   ========================================================= */

[hidden] {
  display: none !important;
}

.home-pastor-shell {
  padding: 10px 0 0;
}

.home-pastor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 20%, rgba(224, 58, 47, 0.22), transparent 20rem),
    linear-gradient(135deg, var(--navy-dark), var(--navy));
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.home-pastor-toolbar > div {
  display: grid;
  min-width: 0;
}

.home-pastor-toolbar span,
.home-editor-heading span {
  color: #ffc9b1;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.home-pastor-toolbar strong {
  margin-top: 2px;
  font-size: 1rem;
}

.home-pastor-toolbar small {
  margin-top: 3px;
  color: #cad6e3;
}

.home-editor {
  margin-top: 16px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 5px solid var(--red);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.home-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.home-editor-heading span {
  color: var(--red);
}

.home-editor-heading h2 {
  margin: 4px 0 0;
  color: var(--navy);
}

.home-editor-heading p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.84rem;
}

.home-close-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--navy);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  font-size: 1.4rem;
}

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

.home-full-field {
  grid-column: 1 / -1;
}

.home-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.home-cancel-button {
  min-height: 48px;
  padding: 0 18px;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 850;
}

.home-status {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  color: #17643d;
  background: #e7f7ee;
  border: 1px solid #bce1ca;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 800;
}

.home-status.error {
  color: #b4232d;
  background: #fff0f1;
  border-color: #efc4c8;
}

.home-section-heading {
  display: flex;
  max-width: none;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.home-section-heading > div {
  max-width: 720px;
}

.home-heading-add {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 900;
}

.content-card.home-editable-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  border-top: 5px solid var(--navy);
}

.home-live-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 4px 8px;
  color: #17643d;
  background: #e7f7ee;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 900;
  vertical-align: middle;
}

.home-card-link {
  display: inline-flex;
  width: fit-content;
  min-height: 40px;
  align-items: center;
  margin-top: 18px;
  padding: 0 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 9px;
  font-size: 0.77rem;
  font-weight: 900;
  text-decoration: none;
}

.home-card-actions {
  display: grid;
  grid-template-columns: minmax(90px, 0.8fr) minmax(160px, 1.2fr);
  gap: 9px;
  margin-top: auto;
  padding-top: 18px;
}

.home-card-actions button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 900;
}

.home-edit-button {
  color: var(--navy);
  background: var(--surface-soft);
  border: 1px solid #cfd7e0;
}

.home-remove-button {
  color: #fff;
  background: linear-gradient(135deg, #bd2530, var(--red));
  border: 1px solid #bd2530;
}

.home-empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 170px;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed #cfd7e0;
  border-radius: 18px;
}

.home-toast {
  position: fixed;
  z-index: 4000;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 13px 16px;
  color: #fff;
  background: var(--navy-dark);
  border-radius: 11px;
  box-shadow: var(--shadow);
  font-size: 0.82rem;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.18s ease;
}

.home-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.home-toast.error {
  background: #b4232d;
}

@media (max-width: 680px) {
  .home-pastor-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .home-pastor-toolbar .button {
    width: 100%;
  }

  .home-editor {
    padding: 22px 16px;
  }

  .home-form-grid {
    grid-template-columns: 1fr;
  }

  .home-full-field {
    grid-column: auto;
  }

  .home-form-actions {
    display: grid;
  }

  .home-form-actions .button,
  .home-cancel-button {
    width: 100%;
  }

  .home-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-heading-add {
    width: 100%;
  }

  .home-card-actions {
    grid-template-columns: 1fr;
  }
}


/* Royal blue homepage buttons. */
.home-heading-add,
.home-card-link {
  color: #fff;
  background: linear-gradient(
    135deg,
    #4169e1,
    #27408b
  );
  border-color: transparent;
}

.home-heading-add:hover,
.home-card-link:hover {
  filter: brightness(1.08);
}


/* Complete royal blue homepage buttons. */
.home-heading-add,
.home-card-link {
  color: #fff;
  background: linear-gradient(
    135deg,
    #4169e1,
    #27408b
  );
  border-color: transparent;
  box-shadow: 0 9px 20px rgba(65, 105, 225, 0.2);
}

.home-heading-add:hover,
.home-card-link:hover {
  filter: brightness(1.08);
}

/* Remove buttons intentionally remain red. */
