/* ═══════════════════════════════════════
   STORIED FLAVOURS — Audio Memories
   ═══════════════════════════════════════ */

/* ── Page background image ── */
.audio-mem-page {
  position: relative;
  min-height: 100vh;
  margin: calc(-1 * var(--space-8));
  padding: var(--space-8);
}

.audio-mem-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/audio-page-bg-iii.png') center / cover no-repeat;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.audio-mem-page > * {
  position: relative;
  z-index: 1;
}

.audio-mem-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.audio-mem-header h1 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-1);
}

.audio-mem-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.audio-mem-toolbar .search-box { flex: 1; min-width: 240px; }

.audio-mem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-5);
}

/* ── Card ── */
.audio-mem-card {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.audio-mem-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/audio-card-bg-iii.png') center / cover no-repeat;
  opacity: 1;
  pointer-events: none;
}

/* Dark scrim over image so text is always readable */
.audio-mem-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.55) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.audio-mem-card > * {
  position: relative;
  z-index: 1;
}

.audio-mem-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 20px rgba(200, 90, 31, 0.22), 0 0 0 1.5px rgba(200, 90, 31, 0.18);
}

.audio-mem-card-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.audio-mem-card-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}

.audio-mem-card-meta {
  flex: 1;
  min-width: 0;
}

.audio-mem-card-title {
  font-size: var(--font-size-base);
  font-weight: 800;
  margin: 0;
  line-height: 1.4;
  color: #F7934C;
  text-shadow:
    0 0 8px rgba(0,0,0,0.9),
    0 1px 3px rgba(0,0,0,0.8);
  display: block;
}

/* Badge pill override — warm gradient on dark card */
.audio-mem-card .badge {
  background: linear-gradient(135deg, #FFC15E, #F7B05B);
  color: #5C415D;
  border: none;
  font-weight: 700;
}

.audio-mem-card-author {
  font-size: var(--font-size-xs);
  color: #F7B05B;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.audio-mem-card-date {
  font-size: var(--font-size-xs);
  color: #F7934C;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.audio-mem-card-header .delete-audio-btn {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  padding: var(--space-1) var(--space-2);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.audio-mem-card:hover .delete-audio-btn {
  opacity: 1;
}

.audio-mem-card-desc {
  font-size: var(--font-size-sm);
  color: #F7B05B;
  line-height: 1.5;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

/* Author name and View link legibility against the dark card image */
.audio-mem-card-meta > div > span {
  color: #F7B05B;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.audio-mem-card .btn-ghost.btn-sm {
  font-weight: 600;
  color: #F7B05B;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.audio-mem-card-header .delete-audio-btn {
  color: rgba(255,255,255,0.7);
}

.audio-mem-card audio {
  border-radius: var(--radius-md);
}

.audio-mem-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 768px) {
  .audio-mem-header {
    flex-direction: column;
  }

  .audio-mem-grid {
    grid-template-columns: 1fr;
  }
}
