:root {
  --accent: #1f4f7b;
  --accent-soft: #e4edf6;
  --accent-strong: #123552;
  --text-main: #1f2933;
  --text-muted: #6b7280;
  --border-soft: #e5e7eb;
  --bg-page: #f5f7fb;
  --bg-card: #ffffff;
  --radius-lg: 0.75rem;
  --shadow-soft: 0 8px 18px rgba(15, 23, 42, 0.06);
}

/* HEADER IMAGE */
.header-img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* GLOBAL */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
}

.index-page-wrapper {
  max-width: 100%;
}

/* PAGE WRAPPER FOR CONTENT BELOW IMAGE */
.page-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2.5rem;
}

/* HEADER (TEXT) */
header.category-header {
  text-align: center;
  margin-bottom: 2rem;
}

header.category-header h1 {
  font-size: 1.9rem;
  margin: 0 0 0.5rem;
  color: var(--accent-strong);
}

header.category-header p {
  margin: 0.25rem 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* ✅ UPDATED FILTER BAR */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;

  /* NEW softer toolbar look *//* Center the filter labels over their dropdowns */
.filter-group {
  text-align: center;
  flex: 1;
}

.filter-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  text-align: center;
}
  background: #eef3fb;                 /* light tinted background */
  border-radius: 0.6rem;
  padding: 0.9rem 1rem;
  border: 1px solid #d3ddf0;           /* lighter border */
  box-shadow: none;                    /* remove card shadow */

  margin-bottom: 1.75rem;
}



.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 230px;
}

.filter-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent-strong);
}

.filter-select {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #ffffff;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.filter-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(31, 79, 123, 0.18);
}

.filter-clear-wrapper {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.filter-clear-btn {
  background: transparent;
  border: none;
  color: var(--accent-strong);
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
}

.filter-clear-btn:hover {
  color: var(--accent);
  text-decoration: none;
}

.filter-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* DEVOTION LIST */
.devotion-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;   /* increased spacing to separate from filter bar */
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.devotion-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem 0.9rem;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  transition: transform 0.08s ease-out, box-shadow 0.08s ease-out,
    border-color 0.08s;
}

.devotion-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.11);
  border-color: var(--accent-soft);
}

/* DEVOTION CONTENT */
.devotion-title-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.devotion-title-row h2 {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 650;
}

.devotion-title-row a {
  text-decoration: none;
  color: var(--accent-strong);
}

.devotion-title-row a:hover {
  text-decoration: underline;
}

.devotion-subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  font-style: italic;
}

.devotion-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-top: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.key-verse-ref {
  font-weight: 600;
  color: var(--accent-strong);
}

.devotion-description {
  margin: 0.6rem 0 0.4rem;
  font-size: 0.9rem;
  color: var(--text-main);
}

/* CATEGORY PILLS */
.devotion-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0 0.25rem;
}

.devotion-category-pill {
  font-size: 0.8rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(31, 79, 123, 0.18);
  white-space: nowrap;
  cursor: pointer;
}

.devotion-category-pill:hover {
  background: #d8e5f5;
}

.series-header{
  margin-top:40px;
  margin-bottom:10px;
  font-size:1.3rem;
  font-weight:600;
  color:#2c3e50;
  cursor:pointer;
  user-select:none;
}

.series-header:hover{
  color:#1a5a96;
}

.series-content{
  margin-left:20px;
}

.series-collapsed{
  display:none;
}

.search-wrapper{
  margin-bottom:25px;
}

.search-input{
  width:100%;
  max-width:520px;
  padding:12px 14px;
  font-size:16px;

  border:1px solid #cfd6df;
  border-radius:6px;

  background:#f9fbfd;

  transition:border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(31,79,123,0.15);
  background:#ffffff;
}


/* SYSTEM MESSAGES */
.empty-state,
.loading-state,
.error-state {
  margin-top: 1.5rem;
  padding: 1rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
}

.loading-state {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.empty-state {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.error-state {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

/* MOBILE */
@media (max-width: 640px) {
  .page-wrapper {
    padding: 1.25rem 0.85rem 2.25rem;
  }

  header.category-header h1 {
    font-size: 1.6rem;
  }

  .filter-clear-wrapper {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .devotion-card {
    padding: 0.9rem 0.85rem;
  }
}
/* --------------------------------------------------
   FOOTER STYLING (Copied to match sitewide styling)
-------------------------------------------------- */
.navbar.bottom-nav {
  text-align: center;
  margin-top: 3rem;
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border-soft);
}

.navbar.bottom-nav .footer-links {
  margin-bottom: 0.35rem;
}

.navbar.bottom-nav a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 500;
}

.navbar.bottom-nav a:hover {
  text-decoration: underline;
}