/**
 * Front-end styles for the RASA custom blocks.
 *
 * Colours are driven by the design-system variables defined in the theme's
 * rasa-design.css (--leaf, --leaf-hover, --glow-*, --foreground, --border …).
 * Those variables are re-pointed per page by the body theme class
 * (.rasa-theme-ngs / -dd / -qsar / -kb), so every block below automatically
 * takes the correct accent colour without any per-page CSS.
 */

/* ---------------------------------------------------------------- Hero */
.rasa-block-hero .rasa-pagehero__art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}

/* --------------------------------------------------------- Card grid */
.rasa-card-grid__intro {
  max-width: 760px;
  color: var(--foreground-70, rgba(15, 23, 42, 0.7));
}

.rasa-card-grid__link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

/* ------------------------------------------------------------ Metrics */
.rasa-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.rasa-metric {
  border: 1px solid var(--border, rgba(0, 0, 0, 0.07));
  border-radius: 14px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.72);
}

.rasa-metric__value {
  display: block;
  font-family: var(--font-display, 'Plus Jakarta Sans', sans-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  color: var(--leaf, #2563eb);
}

.rasa-metric__label {
  display: block;
  margin-top: 0.5rem;
  font-weight: 700;
}

/* ---------------------------------------------------- Showcase tabs */
.rasa-svc-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 2rem;
  width: 100%;
}

.rasa-svc-showcase__nav {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.rasa-svc-showcase__nav::-webkit-scrollbar {
  display: none;
}

.rasa-svc-showcase__btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--leaf-soft, rgba(37, 99, 235, 0.1));
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--foreground, #0f172a);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.rasa-svc-showcase__btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(200px circle at var(--mouse-x, 0px) var(--mouse-y, 0px), var(--glow-color, rgba(37, 99, 235, 0.15)), transparent 45%);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.rasa-svc-showcase__btn:hover::before {
  opacity: 1;
}

.rasa-svc-showcase__btn:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--glow-border, rgba(37, 99, 235, 0.4));
  box-shadow: 0 12px 40px var(--glow-shadow, rgba(37, 99, 235, 0.08));
}

.rasa-svc-showcase__btn.is-active {
  background: #ffffff;
  border-color: var(--leaf, #2563eb);
  color: var(--leaf, #2563eb);
  box-shadow: 0 6px 20px var(--glow-shadow, rgba(37, 99, 235, 0.08));
}

.rasa-svc-showcase__content {
  position: relative;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--leaf-soft, rgba(37, 99, 235, 0.12));
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.02);
}

.rasa-showcase-panel {
  display: none;
}

.rasa-showcase-panel.is-active {
  display: block;
  animation: rasaShowcaseFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.rasa-showcase-panel[hidden] {
  display: none !important;
}

@keyframes rasaShowcaseFadeUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.rasa-showcase-panel h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.rasa-showcase-panel > p {
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--foreground-70, rgba(15, 23, 42, 0.7));
  margin: 0 0 1.5rem;
}

.rasa-checklist {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.rasa-checklist li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--foreground, #0f172a);
}

.rasa-checklist li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--leaf, #2563eb);
  font-weight: 700;
}

.rasa-tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.rasa-tool {
  font-size: 0.8rem;
  font-weight: 600;
  background: #ffffff;
  color: var(--foreground, #0f172a);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.07));
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.rasa-tool:hover {
  border-color: var(--leaf, #2563eb);
  color: var(--leaf, #2563eb);
  background: var(--leaf-tint, rgba(37, 99, 235, 0.04));
}

@media (min-width: 993px) {
  .rasa-svc-showcase {
    grid-template-columns: 460px 1fr;
    gap: 2.5rem;
  }

  .rasa-svc-showcase__nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: visible;
  }

  .rasa-svc-showcase__content {
    padding: 2.5rem 3rem;
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .rasa-checklist {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- FAQ */
.rasa-faq__list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.rasa-faq__item {
  border: 1px solid var(--border, rgba(0, 0, 0, 0.07));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.rasa-faq__item.is-open {
  border-color: var(--glow-border, rgba(37, 99, 235, 0.3));
  box-shadow: 0 8px 24px var(--glow-shadow, rgba(37, 99, 235, 0.06));
}

.rasa-faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  color: var(--foreground, #0f172a);
}

.rasa-faq__q::after {
  content: '+';
  font-size: 1.4rem;
  line-height: 1;
  color: var(--leaf, #2563eb);
  transition: transform 0.3s ease;
}

.rasa-faq__item.is-open .rasa-faq__q::after {
  transform: rotate(45deg);
}

.rasa-faq__a {
  padding: 0 1.35rem 1.25rem;
  color: var(--foreground-70, rgba(15, 23, 42, 0.7));
  line-height: 1.6;
}

.rasa-faq__a[hidden] {
  display: none;
}

.rasa-faq__a p {
  margin: 0 0 0.75rem;
}

/* ---------------------------------------------------------------- CTA */
.rasa-help-cta {
  text-align: center;
  max-width: 820px;
  margin: 3rem auto;
  padding: 3rem 2.5rem;
  border-radius: 24px;
  background: var(--leaf-tint, rgba(37, 99, 235, 0.04));
  border: 1px solid var(--leaf-soft, rgba(37, 99, 235, 0.1));
}

.rasa-help-cta .rasa-eyebrow {
  justify-content: center;
}

.rasa-help-cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  margin: 0.75rem 0 1rem;
}

.rasa-help-cta p {
  color: var(--foreground-70, rgba(15, 23, 42, 0.7));
  max-width: 620px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}

/* ------------------------------------------------------ Button ghosts */
.rasa-btn--ghost {
  background: transparent;
  border: 1px solid var(--leaf, #2563eb);
  color: var(--leaf, #2563eb);
}

.rasa-btn--ghost:hover {
  background: var(--leaf, #2563eb);
  color: #ffffff;
}

/* ------------------------------------------------------ Resource list */
.rasa-resource-list {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

.rasa-resource-list--grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.rasa-resource-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border, rgba(0, 0, 0, 0.07));
  border-radius: 16px;
  padding: 1.5rem;
}

.rasa-resource-card__thumb img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.rasa-resource-card__meta {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--leaf, #2563eb);
}

.rasa-resource-card__title {
  margin: 0;
  font-size: 1.2rem;
}

.rasa-resource-card__title a {
  color: inherit;
  text-decoration: none;
}

.rasa-resource-card .rasa-btn {
  align-self: flex-start;
  margin-top: auto;
}

/* --------------------------------------------------- Reveal fallback */
.rasa-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.rasa-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
