/* =====================================================================
   Resources & Insights page stylesheet
   ===================================================================== */

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero-resources {
  background: linear-gradient(120deg, #e3f0ff 0%, #c9e6ff 100%);
  padding: 2.8rem 0 2.2rem;
  text-align: center;
}
.hero-resources h1 {
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  color: #0b3a7a;
  letter-spacing: -0.01em;
}
.hero-resources p {
  font-size: 1.15rem;
  color: #444;
}

/* ── Container helper ────────────────────────────────────────────── */
.res-container {
  max-width: 1260px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 18px;
  padding-right: 18px;
}

/* ── KPI strip ───────────────────────────────────────────────────── */
.kpi-strip-wrap {
  margin-top: -2rem;
  margin-bottom: 1.8rem;
  position: relative;
  z-index: 2;
}
.kpi-strip { margin: 0; }
.kpi-card  {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 14px #0b3a7a13;
  border: none;
  transition: box-shadow 0.22s, transform 0.22s;
}
.kpi-card:hover {
  box-shadow: 0 8px 28px #0b3a7a22;
  transform: translateY(-2px);
}
.kpi-box   { padding: 1.1rem 0.6rem; text-align: center; }
.kpi-count { font-size: 2rem; font-weight: 800; color: #2e7bff; line-height: 1.1; }
.kpi-label { font-size: 0.95rem; color: #555; margin-top: 0.15rem; font-weight: 500; }

/* ── Sticky toolbar ──────────────────────────────────────────────── */
.sticky-toolbar {
  position: sticky;
  top: 62px;
  z-index: 30;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 0.85rem 0 0.55rem;
  margin-bottom: 0.5rem;
}
.res-search-input {
  border: 1.5px solid #d0ddef;
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.95rem;
  min-width: 220px;
  max-width: 340px;
  flex: 1 1 auto;
  outline: none;
  transition: border-color 0.2s;
}
.res-search-input:focus { border-color: #2e7bff; }
.res-sort-dropdown { flex: 0 0 auto; }
.res-publish-btn   { flex: 0 0 auto; }

/* ── Login hint ──────────────────────────────────────────────────── */
.res-login-hint {
  font-size: 0.88rem;
  color: #888;
  padding: 0.25rem 0 0.4rem;
}
.res-login-hint a { color: #2e7bff; }

/* ── Tabs ────────────────────────────────────────────────────────── */
.resource-tabs .tab   { font-weight: 600; font-size: 0.95rem; padding: 0.55rem 1.1rem; }
.resource-tabs .tab--selected { color: #2e7bff !important; border-top: 3px solid #2e7bff !important; }

/* ── Resource grid ───────────────────────────────────────────────── */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
@media (max-width: 1100px) { .resource-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .resource-grid { grid-template-columns: 1fr; gap: 14px; } }

.resource-card-col {
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

/* ── Resource card ───────────────────────────────────────────────── */
.resource-card {
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 2px 14px #0b3a7a0d;
  border: 1.5px solid #e8edf6;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.22s, transform 0.22s;
}
.resource-card:hover {
  box-shadow: 0 10px 32px #0b3a7a20;
  transform: translateY(-3px);
}
.resource-img-wrap { position: relative; }
.resource-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #e3f0ff;
  display: block;
}
.resource-pill {
  position: absolute;
  top: 11px;
  left: 11px;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px #0003;
}
.resource-date    { color: #999; font-size: 0.88rem; margin-bottom: 0.3rem; }
.resource-title   {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0b3a7a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.resource-excerpt {
  font-size: 0.95rem;
  color: #555;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.55;
  flex-grow: 1;
  margin-bottom: 1rem;
}
.resource-read-btn {
  align-self: flex-start;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
}

/* ── Empty state ─────────────────────────────────────────────────── */
.res-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: #aaa;
}
.res-empty-state p { font-size: 1.05rem; }

/* ── Read-More modal ─────────────────────────────────────────────── */
.rm-modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0b3a7a;
  line-height: 1.3;
}
.rm-meta   { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.rm-featured-img-wrap { }
.rm-featured-img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.rm-body      { font-size: 1rem; color: #333; line-height: 1.75; }
.rm-paragraph { margin-bottom: 1rem; }
.rm-attachment { }

/* ── Publish form modal (size/spacing polish) ─────────────────────── */
#resource-modal .modal-header { background: #f0f6ff; border-bottom: 1.5px solid #d0ddef; }
#resource-modal .modal-footer { background: #fafbff; border-top: 1.5px solid #e8edf6; }
#resource-modal label { font-weight: 600; font-size: 0.92rem; color: #0b3a7a; margin-bottom: 0.3rem; }
#resource-modal .DateInput { width: 100% !important; }

/* ── Image upload zone ───────────────────────────────────────────── */
.res-img-label { font-size: 0.88rem; color: #555; margin-bottom: 0.25rem; }
.res-upload-zone {
  border: 2px dashed #b0c8f0;
  border-radius: 10px;
  background: #f4f8ff;
  padding: 1.4rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.res-upload-zone:hover {
  border-color: #2e7bff;
  background: #eaf2ff;
}
.res-upload-thumb {
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  border: 1.5px solid #d0ddef;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* ── Toast override ──────────────────────────────────────────────── */
#publish-toast { box-shadow: 0 6px 24px #0003; border-radius: 10px; }
