/* Futkar Resource Library — Learning Center */

.rl-section {
  position: relative;
  overflow: hidden;
}

.rl-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(242, 122, 33, 0.08), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(242, 122, 33, 0.05), transparent 50%);
  pointer-events: none;
}

.dark .rl-section::before {
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, rgba(242, 122, 33, 0.1), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 20%, rgba(255, 255, 255, 0.03), transparent 50%);
}

.rl-category-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .rl-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .rl-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}

/* Seventh card spans nicely on desktop */
@media (min-width: 1024px) {
  .rl-category-grid .rl-category-card:last-child:nth-child(7) {
    grid-column: 2 / 3;
  }
}

.rl-category-card {
  position: relative;
  display: block;
  border-radius: 1.5rem;
  border: 1px solid #E8E2DA;
  background: #fff;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease;
  box-shadow: 0 10px 30px -18px rgba(40, 28, 18, 0.28);
  min-height: 15.5rem;
}

.dark .rl-category-card {
  background: #1f1f1f;
  border-color: #404040;
  box-shadow: 0 14px 36px -18px rgba(0, 0, 0, 0.55);
}

.rl-category-card:hover {
  transform: translateY(-6px);
  border-color: #F27A21;
  box-shadow: 0 22px 44px -18px rgba(242, 122, 33, 0.35);
}

.rl-category-card:focus-visible {
  outline: 2px solid #F27A21;
  outline-offset: 3px;
}

.rl-category-card__glow {
  position: absolute;
  inset: 0;
  opacity: 0.9;
  transition: opacity 220ms ease;
}

.dark .rl-category-card__glow {
  opacity: 0.35;
}

.rl-category-card:hover .rl-category-card__glow {
  opacity: 1;
}

.rl-category-card__body {
  position: relative;
  z-index: 1;
  padding: 1.5rem 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rl-category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  color: #fff;
  box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.35);
}

/* Theme backgrounds live in CSS (not Tailwind utilities from JS — those get purged) */
.rl-theme-icon--orange { background: linear-gradient(135deg, #f97316, #d97706); }
.rl-theme-icon--emerald { background: linear-gradient(135deg, #10b981, #0d9488); }
.rl-theme-icon--rose { background: linear-gradient(135deg, #f43f5e, #db2777); }
.rl-theme-icon--sky { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.rl-theme-icon--violet { background: linear-gradient(135deg, #8b5cf6, #9333ea); }
.rl-theme-icon--amber { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.rl-theme-icon--slate { background: linear-gradient(135deg, #475569, #1e293b); }

.rl-theme-soft--orange { background: linear-gradient(135deg, #fff7ed, #fffbeb); }
.rl-theme-soft--emerald { background: linear-gradient(135deg, #ecfdf5, #f0fdfa); }
.rl-theme-soft--rose { background: linear-gradient(135deg, #fff1f2, #fdf2f8); }
.rl-theme-soft--sky { background: linear-gradient(135deg, #f0f9ff, #eff6ff); }
.rl-theme-soft--violet { background: linear-gradient(135deg, #f5f3ff, #faf5ff); }
.rl-theme-soft--amber { background: linear-gradient(135deg, #fffbeb, #fff7ed); }
.rl-theme-soft--slate { background: linear-gradient(135deg, #f8fafc, #f4f4f5); }

.rl-count-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #8F3500;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(242, 122, 33, 0.25);
  backdrop-filter: blur(6px);
}

.dark .rl-count-badge {
  color: #FDE8D2;
  background: rgba(38, 38, 38, 0.85);
  border-color: rgba(242, 122, 33, 0.35);
}

.rl-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #E06A12;
  margin-bottom: 0.5rem;
}

.dark .rl-badge {
  color: #F5A05A;
}

.rl-category-title {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1A1A1A;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.dark .rl-category-title {
  color: #fff;
}

.rl-category-desc {
  font-size: 0.925rem;
  line-height: 1.55;
  color: #5c564f;
  margin-bottom: 1.25rem;
  flex: 1;
}

.dark .rl-category-desc {
  color: #b5aea5;
}

.rl-explore {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #E06A12;
  margin-top: auto;
}

.dark .rl-explore {
  color: #F5A05A;
}

/* Category page resources */
.rl-resource-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rl-resource-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 1.1rem;
  border: 1px solid #E8E2DA;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.dark .rl-resource-card {
  background: #1f1f1f;
  border-color: #404040;
}

.rl-resource-card:hover {
  transform: translateX(4px);
  border-color: #F27A21;
  box-shadow: 0 14px 28px -18px rgba(242, 122, 33, 0.4);
}

.rl-resource-num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 800;
  color: #E06A12;
  background: #FFF5EB;
}

.dark .rl-resource-num {
  color: #F5A05A;
  background: rgba(242, 122, 33, 0.15);
}

.rl-resource-title {
  font-family: 'Plus Jakarta Sans', Inter, system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #1A1A1A;
  margin-bottom: 0.15rem;
}

.dark .rl-resource-title {
  color: #fff;
}

.rl-resource-blurb {
  font-size: 0.85rem;
  color: #8A837C;
}

.dark .rl-resource-blurb {
  color: #A8A097;
}

.rl-resource-arrow {
  flex-shrink: 0;
  color: #C4BBB0;
  transition: color 180ms ease, transform 180ms ease;
}

.rl-resource-card:hover .rl-resource-arrow {
  color: #F27A21;
  transform: translateX(3px);
}

.rl-siblings {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.rl-sibling {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #5c564f;
  background: #FBF7F2;
  border: 1px solid #E8E2DA;
  text-decoration: none;
  transition: all 150ms ease;
}

.dark .rl-sibling {
  color: #d4cdc3;
  background: #262626;
  border-color: #404040;
}

.rl-sibling:hover {
  border-color: #F27A21;
  color: #E06A12;
}

.rl-sibling.is-active {
  background: #F27A21;
  border-color: #F27A21;
  color: #fff;
}

.dark .rl-sibling.is-active {
  color: #1A1A1A;
}

.rl-hub-cta {
  border-radius: 1.5rem;
  border: 1px solid rgba(242, 122, 33, 0.25);
  background: linear-gradient(135deg, #FFF5EB 0%, #FBF7F2 55%, #fff 100%);
  padding: 1.5rem;
}

.dark .rl-hub-cta {
  background: linear-gradient(135deg, rgba(242, 122, 33, 0.12) 0%, #1f1f1f 60%);
  border-color: #404040;
}
