
/* Stories Explore page */

.stories-explore-page {
  width: 100%;
  max-width: 1000px;
  margin-inline: auto;
  padding: 28px 18px 48px;
  padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  color: var(--stories-text, #172033);
}

.stories-explore-header {
  margin-bottom: 32px;
}

.stories-explore-eyebrow {
  margin: 0 0 8px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stories-explore-title {
  margin: 0 0 12px;
  font-size: clamp(32px, 7vw, 46px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.stories-explore-description {
  max-width: 600px;
  margin: 0;
  color: var(--stories-muted, #64748b);
  font-size: 16px;
  line-height: 1.7;
}

.stories-explore-section-heading {
  margin-bottom: 18px;
}

.stories-explore-section-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 800;
  line-height: 1.3;
}

.stories-explore-section-heading p {
  margin: 0;
  color: var(--stories-muted, #64748b);
  font-size: 14px;
  line-height: 1.6;
}

.stories-explore-category-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.stories-explore-category-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 94px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 7px;
  padding: 18px 48px 18px 18px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  background: var(--stories-card-bg, #ffffff);
  color: var(--stories-text, #172033);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.stories-explore-category-card:hover,
.stories-explore-category-card:focus-visible {
  border-color: #93c5fd;
  background: #f8fbff;
}

.stories-explore-category-card:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

.stories-explore-category-name {
  font-size: 17px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.stories-explore-category-count {
  color: var(--stories-muted, #64748b);
  font-size: 13px;
}

.stories-explore-category-arrow {
  position: absolute;
  top: 50%;
  right: 18px;
  color: #2563eb;
  font-size: 22px;
  transform: translateY(-50%);
}

.stories-explore-empty {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  text-align: center;
}

.stories-explore-empty h3 {
  margin-top: 0;
}

.stories-explore-empty p {
  margin-bottom: 0;
  color: var(--stories-muted, #64748b);
  line-height: 1.7;
}

@media (min-width: 560px) {
  .stories-explore-page {
    padding: 36px 24px 60px;
    padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
  }

  .stories-explore-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 850px) {
  .stories-explore-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .stories-explore-category-card {
    transition: none;
  }
}


/* Popular topics */

.stories-explore-topics {
  margin-top: 38px;
}

.stories-explore-topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stories-explore-topic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: var(--stories-card-bg, #fff);
  color: var(--stories-text, #172033);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.stories-explore-topic span {
  color: var(--stories-muted, #64748b);
  font-size: 11px;
}

.stories-explore-topic:hover,
.stories-explore-topic:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
}


/* Discover stories */

.stories-explore-discover {
  margin-top: 42px;
}

.stories-explore-discover-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.stories-explore-discover-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e8edf3;
  border-radius: 16px;
  background: var(--stories-card-bg, #fff);
}

.stories-explore-discover-image-link {
  display: block;
  overflow: hidden;
  background: #f1f5f9;
}

.stories-explore-discover-image,
.stories-explore-discover-placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.stories-explore-discover-placeholder {
  background: linear-gradient(135deg, #eff6ff, #e2e8f0);
}

.stories-explore-discover-body {
  padding: 15px;
}

.stories-explore-discover-category {
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.stories-explore-discover-title {
  margin: 8px 0;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
}

.stories-explore-discover-title a {
  color: var(--stories-text, #172033);
  text-decoration: none;
}

.stories-explore-discover-title a:hover,
.stories-explore-discover-title a:focus-visible {
  color: #2563eb;
  text-decoration: underline;
}

.stories-explore-discover-excerpt {
  color: var(--stories-muted, #64748b);
  font-size: 14px;
  line-height: 1.65;
}

.stories-explore-discover-date {
  display: block;
  margin-top: 12px;
  color: var(--stories-muted, #64748b);
  font-size: 12px;
}

@media (min-width: 560px) {
  .stories-explore-discover-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .stories-explore-discover-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
