/* ===== CHURCH RESOURCES PAGE ===== */

/* Trust bar */
.cr-trust-bar {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.cr-trust-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: center;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}
.cr-trust-item {
  font-size: .9rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.cr-check { color: var(--brand); font-weight: 700; }

/* Resource grid */
.cr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 8px;
}

/* Card */
.cr-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(178,58,115,.07);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.cr-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* Badge pills */
.cr-badge-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 12px;
  border-radius: 999px;
  z-index: 2;
}
.cr-popular { background: var(--brand); color: #fff; }
.cr-new { background: #a5d6a7; color: #1b5e20; }
.cr-social { background: var(--accent); color: #5a3a12; }

/* Thumbs */
.cr-thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cr-thumb-worship  { background: linear-gradient(135deg, #1a1a2e, #0f3460); }
.cr-thumb-bulletin { background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.cr-thumb-social   { background: linear-gradient(135deg, #9c27b0, var(--brand)); }
.cr-thumb-sermon   { background: linear-gradient(135deg, #37474f, #607d8b); }
.cr-thumb-holiday  { background: linear-gradient(135deg, #bf360c, #e64a19); }
.cr-thumb-custom   { background: linear-gradient(135deg, var(--rose-gold), var(--accent)); }
.cr-icon { font-size: 2.8rem; }

/* Card body */
.cr-card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.cr-card-body h3 {
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 8px;
}
.cr-card-body p {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.6;
  margin: 0 0 14px;
  flex: 1;
}
.cr-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cr-meta li { font-size: .8rem; color: var(--muted); }
.cr-meta li::before { content: "• "; color: var(--brand); }

.cr-btn { width: 100%; text-align: center; }

/* Newsletter form inside band */
.cr-newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 440px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.cr-newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 14px 20px;
  border-radius: 999px;
  border: none;
  font-size: .95rem;
  outline: none;
  font-family: inherit;
}

/* Modal overlay */
.cr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74,34,54,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

/* Modal box */
.cr-modal-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  position: relative;
  text-align: center;
  box-shadow: 0 24px 64px rgba(74,34,54,.3);
}
.cr-success-box { border-top: 5px solid var(--brand); }

.cr-close {
  position: absolute;
  top: 14px; right: 18px;
  background: none; border: none;
  font-size: 1.6rem; cursor: pointer;
  color: var(--muted); line-height: 1;
}
.cr-close:hover { color: var(--ink); }

.cr-modal-icon { font-size: 2.4rem; margin-bottom: 10px; }

.cr-modal-box h2 {
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 8px;
}
.cr-modal-box p { color: var(--muted); margin-bottom: 22px; line-height: 1.6; }

#cr-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#cr-form input[type="text"],
#cr-form input[type="email"] {
  padding: 13px 18px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: .95rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
  width: 100%;
  box-sizing: border-box;
  color: var(--ink);
}
#cr-form input:focus { border-color: var(--brand); }

.cr-modal-note { font-size: .8rem; color: var(--muted); margin-top: 12px; margin-bottom: 0; }

/* Responsive */
@media (max-width: 640px) {
  .cr-grid { grid-template-columns: 1fr; }
  .cr-modal-box { padding: 30px 22px; }
  .cr-newsletter-form { flex-direction: column; align-items: stretch; }
}
