/* ─────────────────────────────────────────────
   usecase.css — Kompact AI Usecases Listing Page Styles
   Matching exact new Figma card layout with top accent line.
───────────────────────────────────────────── */

/* Strict Mobile Overflow Prevention */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* Page Container — aligns perfectly with sitewide .page-margins */
.usecase-page-container {
  width: calc(100% - calc(var(--px, 64px) * 2));
  max-width: var(--max-w, 1376px);
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

/* ── HERO SECTION ── */
.usecase-hero-section {
  position: relative;
  padding: 130px 48px 40px 48px;
  background: var(--bg-hero, #150F0F);
  overflow: hidden;
  box-sizing: border-box;
}

.usecase-hero-glow {
  position: absolute;
  top: 40%;
  left: 15%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(167, 60, 38, 0.18) 0%, transparent 70%);
  filter: blur(85px);
  pointer-events: none;
  z-index: 0;
}

.usecase-pill {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  letter-spacing: 0.8px;
  color: var(--text-white, #ffffff);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
}

.usecase-pill .chip-dot {
  background: var(--secondary, #FB1650);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.usecase-hero-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-white, #ffffff);
  margin: 20px 0 0 0;
  letter-spacing: -0.5px;
  max-width: 900px;
}

.usecase-hero-subtitle {
  position: relative;
  z-index: 1;
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  margin: 16px 0 0 0;
  max-width: 820px;
}

/* Category Filter Tabs */
.filter-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 36px;
  margin-top: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
  overflow-x: auto;
}

.filter-tab {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 0 12px 0;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.filter-tab:hover {
  color: #ffffff;
}

.filter-tab.active {
  color: #FFCE1B;
  font-weight: 600;
}

.filter-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #FFCE1B;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(255, 206, 27, 0.5);
}

/* ── MAIN USECASE GRID SECTION ── */
.usecase-grid-section {
  position: relative;
  width: 100%;
  padding: 48px 48px 80px 48px;
  background: var(--bg-hero, #150F0F);
  box-sizing: border-box;
}

/* 3-Column Grid Container with Spacing */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  width: 100%;
  box-sizing: border-box;
}

/* New Card Design matching user screenshot */
.usecase-card {
  position: relative;
  background: #141012;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 32px 28px 26px 28px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 290px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.usecase-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 206, 27, 0.03);
}

/* Top Accent Line Highlight */
.card-top-accent {
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 3px;
  background: var(--accent-color, #FFCE1B);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 12px var(--accent-color, #FFCE1B);
}

/* Category Label */
.card-category {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-color, #FFCE1B);
  margin-bottom: 16px;
  margin-top: 4px;
}

/* Card Title */
.card-title {
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: 1.18rem;
  font-weight: 600;
  line-height: 1.35;
  color: #ffffff;
  margin: 0 0 14px 0;
  letter-spacing: -0.2px;
}

/* Card Excerpt */
.card-excerpt {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
  margin: 0 0 24px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card Footer */
.card-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 206, 27, 0.35);
  color: #FFCE1B;
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-author-text {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.card-read-link {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  color: #FFCE1B;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: transform 0.2s ease;
}

.usecase-card:hover .card-read-link {
  transform: translateX(3px);
}

/* View All Articles Wrap */
.view-all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 54px;
  margin-bottom: 20px;
  width: 100%;
}

.btn-view-all {
  background: #141012;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 12px 32px;
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-head, 'Sora', sans-serif);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-view-all:hover,
.btn-view-all.showing-all-active {
  border-color: #FFCE1B;
  color: #FFCE1B;
  background: rgba(255, 206, 27, 0.08);
  box-shadow: 0 4px 18px rgba(255, 206, 27, 0.15);
}

/* Pagination Bar */
.usecase-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  margin-bottom: 20px;
  width: 100%;
}

.pagination-info {
  font-family: var(--font-body, 'DM Sans', sans-serif);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  text-align: center;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  background: #141012;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(.disabled) {
  border-color: #FFCE1B;
  color: #FFCE1B;
  background: rgba(255, 206, 27, 0.08);
  transform: translateY(-1px);
}

.pagination-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-num {
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #141012;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-num:hover:not(.active) {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.pagination-num.active {
  background: #FFCE1B;
  border-color: #FFCE1B;
  color: #000000;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(255, 206, 27, 0.25);
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .usecase-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .usecase-hero-section, .usecase-grid-section {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 767px) {
  .usecase-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .usecase-hero-section {
    padding-top: 100px;
    padding-left: 16px;
    padding-right: 16px;
  }
  .usecase-grid-section {
    padding-left: 16px;
    padding-right: 16px;
  }
  .filter-tabs {
    gap: 20px;
  }
}
