
/* Basic reset */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  color: #0f1e2d;
  background: #f9f7f2;
}
a { color: #1E3A5F; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.container { max-width: 1080px; margin: 0 auto; padding: 1.25rem; }

/* Header */
.header {
  background: linear-gradient(135deg, #1E3A5F 0%, #0F1E2D 100%);
  color: white;
  padding: 2.5rem 0 2rem;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.site-title { font-size: 2rem; margin: 0; letter-spacing: 0.3px; font-weight: 700; }
.tagline { opacity: 0.9; margin-top: 0.5rem; }

/* Controls */
.controls {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 0.75rem;
  margin-top: 1rem;
}
.search-box input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #d9d9d9;
  outline: none;
  transition: box-shadow 160ms ease;
}
.search-box input:focus { box-shadow: 0 0 0 4px rgba(30,58,95,0.12); }

.select-box select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #d9d9d9;
  background: white;
}

/* Pills */
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; }
.pill {
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: #EAEAEA;
  font-size: 0.85rem;
  border: 1px solid #ddd;
}
.pill.active { background: #D4AF37; color: #0f1e2d; border-color: #C19A2D; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
  margin: 1.25rem 0 2.5rem;
}
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }

.card {
  background: white;
  border: 1px solid #e9e9e9;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,0.08); }
.card-img {
  background: #dfe6ee;
  aspect-ratio: 16/9;
  width: 100%;
  object-fit: cover;
}
.card-body { padding: 0.9rem 1rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.card-title { font-weight: 700; font-size: 1rem; margin: 0; color: #1E3A5F; }
.card-meta { font-size: 0.85rem; color: #425466; }
.card-desc { font-size: 0.95rem; color: #203040; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  border-radius: 12px;
  background: #1E3A5F;
  color: white;
  font-weight: 600;
  border: none;
  margin-top: 0.25rem;
  cursor: pointer;
}
.btn.secondary { background: #A47E2B; color: #0f1e2d; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Footer */
.footer {
  padding: 2rem 0 3rem;
  border-top: 1px solid #e9e9e9;
  color: #425466;
  background: #fff;
  text-align: center;          /* centers footer text */
}

.footer .container p {
  margin: 0.5rem 0;
  line-height: 1.5;
}

.footer a {
  color: #1E3A5F;
  font-weight: 600;
}

.footer a:hover {
  color: #A47E2B;
}


/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.show { display: flex; }
.modal {
  background: white;
  border-radius: 16px;
  max-width: 860px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  border: 1px solid #e9e9e9;
}
.modal header { padding: 1rem 1.25rem; border-bottom: 1px solid #eee; display:flex; justify-content: space-between; align-items: center; }
.modal h3 { margin: 0; color: #1E3A5F; }
.modal .content { padding: 1rem 1.25rem 1.25rem; }
.modal .meta { color: #425466; margin-bottom: 0.75rem; }
.modal audio { width: 100%; margin: 0.75rem 0; }
.close-x { background: transparent; border: none; font-size: 1.5rem; cursor: pointer; }
