/* Filter bar */
.story-filterbar {
  background: var(--cream);
  border-bottom: 1px solid var(--sand-mid);
  padding: 1.6rem 6vw;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.4rem;
  white-space: nowrap;
}

.filter-btn {
  font-family: var(--ff-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--indigo);
  background: var(--white);
  border: 1.5px solid var(--sand-mid);
  border-radius: 3px;
  padding: 0.5rem 1rem;
  min-height: 44px;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.filter-btn:hover {
  border-color: var(--gold);
}
.filter-btn.active {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--indigo-dark);
  font-weight: 600;
}

/* Story cards */
.stories-section {
  background: var(--cream);
  padding: 0 6vw 4rem;
}

#stories-grid,
.stories-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  width: 100% !important;
  margin-top: 2.6rem;
}

@media (max-width: 1024px) {
  #stories-grid,
  .stories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 600px) {
  #stories-grid,
  .stories-grid {
    grid-template-columns: 1fr !important;
  }
}

.story-card {
  background: var(--white);
  border: 1px solid var(--sand-mid);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.story-card:hover {
  box-shadow: 0 4px 20px rgba(27, 45, 94, 0.1);
  transform: translateY(-3px);
}

.story-photo {
  position: relative;
  width: 100%;
  height: 240px;
  background:
    repeating-linear-gradient(
      60deg,
      rgba(201, 146, 42, 0.05) 0px,
      rgba(201, 146, 42, 0.05) 1px,
      transparent 1px,
      transparent 38px
    ),
    linear-gradient(145deg, var(--indigo) 0%, var(--indigo-mid) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Photo sits on top of the monogram; if it fails to load,
   onerror removes it and the monogram stays visible */
.story-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.story-monogram {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: rgba(201, 146, 42, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold-light);
}

.story-body {
  padding: 1.7rem 1.7rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.story-badge {
  align-self: flex-start;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--indigo-dark);
  padding: 0.32rem 0.8rem;
  border-radius: 20px;
}

.story-name {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--indigo-dark);
  line-height: 1.2;
}

.story-meta {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.story-headline {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--indigo);
  line-height: 1.4;
}

.story-text {
  font-size: 0.87rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
}

.story-quote {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 1.08rem;
  color: var(--text);
  line-height: 1.55;
  border-left: 3px solid var(--gold);
  padding: 0.3rem 0 0.3rem 1.1rem;
  margin: 0.3rem 0;
}

.story-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--sand-mid);
}
.story-tag {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: var(--sand);
  color: var(--indigo);
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* Share-your-story CTA banner */
.story-cta {
  background: var(--gold);
  border-radius: 4px;
  margin-top: 3rem;
  padding: 2.8rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.story-cta p {
  font-family: var(--ff-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--indigo-dark);
  line-height: 1.4;
  max-width: 640px;
}
.story-cta .btn-dark {
  display: inline-block;
  background: var(--indigo-dark);
  color: var(--sand);
  font-family: var(--ff-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 2rem;
  border: none;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease;
}
.story-cta .btn-dark:hover {
  background: var(--indigo);
  transform: translateY(-1px);
}

/* Stories empty state (no filter matches) */
.stories-empty {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1.5rem;
}
.stories-empty.show {
  display: block;
}
.stories-empty .empty-icon {
  font-size: 2.6rem;
  opacity: 0.45;
  display: block;
  margin-bottom: 1rem;
}
.stories-empty h3 {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--indigo-dark);
  margin-bottom: 0.5rem;
}
.stories-empty p {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
}

/* Homepage teaser */
.stories-teaser {
  background: var(--sand);
}
