/* Resource Category V1 page composition. Public modules own cards, feed and pagination. */
.resource-category-v1-page { min-width: 0; }

.resource-category-v1 {
  min-width: 0;
  overflow: clip;
  color: var(--ui-color-text, #334155);
  background: var(--ui-color-page, #fff);
}

.resource-category-v1 *,
.resource-category-v1 *::before,
.resource-category-v1 *::after { box-sizing: border-box; }

.resource-category-v1__breadcrumb-bar {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid var(--ui-color-border-subtle, #e2e8f0);
  background: color-mix(in srgb, var(--ui-color-surface, #fff) 92%, transparent);
  backdrop-filter: blur(12px);
}

.resource-category-v1__breadcrumb-bar .ui-breadcrumbs { margin: 0; }

.resource-category-v1__hero {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: var(--resource-category-hero-min-height, 420px);
  overflow: hidden;
  color: var(--ui-color-text, #334155);
  background: var(--resource-category-hero-background-start, #f8fafc);
}

.resource-category-v1__hero-image-layer {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: flex;
  overflow: hidden;
  opacity: .9;
  pointer-events: none;
}

.resource-category-v1__hero-image {
  display: block;
  width: 100%;
  height: auto;
  align-self: stretch;
  object-fit: cover;
  object-position: var(--resource-category-hero-image-position, 76% center);
}

.resource-category-v1__hero[data-hero-image-position="auto"] { --resource-category-hero-image-position: 76% center; }
.resource-category-v1__hero[data-hero-image-position="left"] { --resource-category-hero-image-position: left center; }
.resource-category-v1__hero[data-hero-image-position="center"] { --resource-category-hero-image-position: center; }
.resource-category-v1__hero[data-hero-image-position="right"] { --resource-category-hero-image-position: right center; }

.resource-category-v1__hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--resource-category-hero-accent, #7c3aed) 19%, transparent), transparent 36%),
    linear-gradient(118deg, color-mix(in srgb, var(--resource-category-hero-background-start, #f8fafc) 97%, transparent), color-mix(in srgb, var(--resource-category-hero-background-end, #ede9fe) 90%, transparent));
  opacity: var(--resource-category-hero-overlay-strength, .9);
}

.resource-category-v1__hero[data-section-background="white"]::after { background: #fff; }
.resource-category-v1__hero[data-section-background="surface"]::after { background: var(--ui-color-surface-muted, #f8fafc); }
.resource-category-v1__hero[data-section-background="accent-soft"]::after {
  background: color-mix(in srgb, var(--resource-category-hero-accent, #7c3aed) 10%, var(--ui-color-surface, #fff));
}
.resource-category-v1__hero[data-section-background="brand-gradient"]::after,
.resource-category-v1__hero[data-section-background="custom"][data-section-background-fill="gradient"]::after {
  background: linear-gradient(
    var(--resource-category-hero-background-angle, 115deg),
    var(--resource-category-hero-background-start, #0f172a),
    var(--resource-category-hero-background-end, #312e81)
  );
}
.resource-category-v1__hero[data-section-background="custom"][data-section-background-fill="solid"]::after {
  background: var(--resource-category-hero-background-start, #fff);
}

.resource-category-v1__hero[data-foreground="light"] {
  --resource-category-hero-title-inherit: var(--ui-color-on-accent, #fff);
  --resource-category-hero-description-inherit: rgba(255, 255, 255, .78);
  color: #e2e8f0;
}

.resource-category-v1__hero-inner {
  display: grid;
  min-height: var(--resource-category-hero-min-height, 420px);
  align-items: center;
  justify-content: start;
  grid-template-columns: minmax(0, 740px);
  padding-block: clamp(56px, 7vw, 82px);
}

.resource-category-v1__hero-copy {
  min-width: 0;
  max-width: 740px;
  text-align: left;
}

.resource-category-v1__hero[data-title-align="center"] .resource-category-v1__hero-inner { justify-content: center; }
.resource-category-v1__hero[data-title-align="right"] .resource-category-v1__hero-inner { justify-content: end; }
.resource-category-v1__hero[data-title-align="center"] .resource-category-v1__hero-copy { text-align: center; }
.resource-category-v1__hero[data-title-align="right"] .resource-category-v1__hero-copy { text-align: right; }

.resource-category-v1__hero .resource-category-v1__hero-eyebrow {
  --ui-eyebrow-resolved-color: var(--resource-category-hero-eyebrow-color, var(--resource-category-hero-accent));
  --page-module-eyebrow-size: var(--resource-category-hero-eyebrow-size, 12px);
}

.resource-category-v1__hero h1 {
  max-width: 800px;
  margin: 14px 0 18px;
  color: var(--resource-category-hero-title-color, var(--resource-category-hero-title-inherit, var(--ui-color-text-strong, #0f172a)));
  font-size: min(var(--resource-category-hero-title-size, 50px), clamp(38px, 5vw, 58px));
  font-weight: var(--resource-category-hero-title-weight, 700);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.resource-category-v1__hero-lead {
  margin: 0;
  color: var(--resource-category-hero-title-color, var(--resource-category-hero-title-inherit, var(--ui-color-text-strong, #0f172a)));
  font-size: 20px;
  font-weight: 600;
  line-height: 1.55;
}

.resource-category-v1__hero-description {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--resource-category-hero-description-color, var(--resource-category-hero-description-inherit, var(--ui-color-text-muted, #64748b)));
  font-size: var(--resource-category-hero-description-size, 16px);
  line-height: 1.75;
}

.resource-category-v1__hero[data-title-align="center"] .resource-category-v1__hero-description {
  margin-inline: auto;
  margin-top: 18px;
}
.resource-category-v1__hero[data-title-align="right"] .resource-category-v1__hero-description { margin: 18px 0 0 auto; }

.resource-category-v1__hero-actions {
  --ui-color-accent: var(--resource-category-hero-action-color, var(--theme-accent, #7c3aed));
  --ui-color-accent-deep: color-mix(in srgb, var(--resource-category-hero-action-color, var(--theme-accent, #7c3aed)) 78%, #0f172a);
  --ui-color-accent-soft: color-mix(in srgb, var(--resource-category-hero-action-color, var(--theme-accent, #7c3aed)) 12%, transparent);
  --ui-action-radius: var(--resource-category-hero-action-radius, var(--ui-radius-sm));
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.resource-category-v1__hero[data-title-align="center"] .resource-category-v1__hero-actions { justify-content: center; }
.resource-category-v1__hero[data-title-align="right"] .resource-category-v1__hero-actions { justify-content: flex-end; }

/* Other Resource Categories follows the approved Resource Root text-navigation
 * order for the public Default and Numbered variants. Public Cards continues
 * to own the card structure, surface, interaction and responsive layout. */
.resource-category-v1 .page-module--cards.is-variant-default[data-module-key="categories"] .page-module-tags {
  order: 3;
  margin-top: 16px;
  margin-bottom: 0;
}

.resource-category-v1 .page-module--cards.is-variant-default[data-module-key="categories"] .page-module-link--primary {
  order: 4;
  margin-top: 18px;
}

.resource-category-v1 .page-module--cards.is-variant-numbered[data-module-key="categories"] .page-module-tags {
  order: 3;
  margin-top: 16px;
  margin-bottom: 0;
}

.resource-category-v1 .page-module--cards.is-variant-numbered[data-module-key="categories"] .page-module-link--primary {
  order: 4;
  margin-top: 18px;
}

.resource-category-v1 > .page-module {
  --page-module-section-padding: clamp(68px, 6.8vw, 96px);
}

/* Resource Category maps the public "inherit" Section Background to the
 * shared ambient wash. Explicit white, surface, accent-soft and custom
 * selections remain owned by the public Section Background contract. */
.resource-category-v1 > .page-module:not(#resource-category-cta) {
  --page-module-page-background: var(--ui-section-bg-ambient-wash);
}

.resource-category-v1 > #resource-category-latest {
  --ui-section-ambient-x: 88%;
  --ui-section-ambient-y: 10%;
}

.resource-category-v1 > #resource-category-categories {
  --ui-section-ambient-x: 12%;
  --ui-section-ambient-y: 12%;
}

@media (max-width: 767px) {
  .resource-category-v1__hero,
  .resource-category-v1__hero-inner { min-height: var(--resource-category-hero-min-height, 420px); }
  .resource-category-v1__hero[data-hero-image-position="auto"] { --resource-category-hero-image-position: 68% center; }
  .resource-category-v1__hero-inner { padding-block: 44px 50px; }
  .resource-category-v1__hero[data-mobile-title-align="left"] .resource-category-v1__hero-inner { justify-content: start; }
  .resource-category-v1__hero[data-mobile-title-align="left"] .resource-category-v1__hero-copy { text-align: left; }
  .resource-category-v1__hero[data-mobile-title-align="left"] .resource-category-v1__hero-description { margin: 18px 0 0; }
  .resource-category-v1__hero[data-mobile-title-align="left"] .resource-category-v1__hero-actions { justify-content: flex-start; }
  .resource-category-v1__hero[data-mobile-title-align="center"] .resource-category-v1__hero-inner { justify-content: center; }
  .resource-category-v1__hero[data-mobile-title-align="center"] .resource-category-v1__hero-copy { text-align: center; }
  .resource-category-v1__hero[data-mobile-title-align="center"] .resource-category-v1__hero-description { margin-inline: auto; margin-top: 18px; }
  .resource-category-v1__hero[data-mobile-title-align="center"] .resource-category-v1__hero-actions { justify-content: center; }
  
  .resource-category-v1__hero-actions { align-items: stretch; flex-direction: column; }
  .resource-category-v1__hero-actions > a { width: 100%; }
}

@media (max-width: 420px) {
  
}

/* Mobile H1 scale: preserve smaller editor values; desktop/tablet stay unchanged. */
@media (max-width: 767px) {
  .resource-category-v1__hero h1 {
    font-size: min(var(--resource-category-hero-title-size, 50px), 26px);
    line-height: 1.4;
  }
}

@media (max-width: 360px) {
  .resource-category-v1__hero h1 {
    font-size: min(var(--resource-category-hero-title-size, 50px), 24px);
  }
}
