/**
 * Kategori keşif — yatay accordion (Eğitimler + Simülasyonlar, SEBS koyu tema)
 */
body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-haccordion-wrap {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-haccordion {
  display: flex !important;
  flex-direction: row;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: clamp(300px, 40vh, 380px);
  padding: 0;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow-x: auto;
  overflow-y: hidden;
  isolation: isolate;
  scrollbar-width: thin;
  scrollbar-color: rgba(124, 58, 237, 0.45) transparent;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-haccordion::-webkit-scrollbar {
  height: 5px;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-haccordion::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.45);
  border-radius: 999px;
}

/* Yükleme: JS dönüşümü bitene kadar eski metin + yarım layout görünmesin */
body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore):not([data-sebs-hacc-ready="1"]) .sebs-cat-haccordion-wrap {
  visibility: hidden;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore)[data-sebs-hacc-ready="1"] .sebs-cat-haccordion-wrap {
  visibility: visible;
}

/* —— Kartlar —— */
body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 3.85rem;
  width: 3.85rem;
  min-width: 3.85rem;
  max-width: 3.85rem;
  height: 100%;
  border-radius: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%);
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  contain: layout style paint;
  z-index: 1;
  transition:
    flex 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    z-index 0s step-end 0.45s;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item:not(.is-open):hover {
  z-index: 2;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(124, 58, 237, 0.06) 100%);
  border-color: rgba(124, 58, 237, 0.28);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item.is-open {
  flex: 1 1 28rem;
  width: auto;
  min-width: min(22rem, 68vw);
  max-width: min(36rem, 82vw);
  z-index: 10;
  transition:
    flex 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    min-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    z-index 0s step-start;
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow:
    0 20px 40px -18px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(124, 58, 237, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 50% at 0% 100%, rgba(6, 182, 212, 0.08), transparent 50%),
    linear-gradient(165deg, rgba(20, 20, 42, 0.98) 0%, rgba(8, 8, 22, 0.99) 100%);
}

/* Kapalı şerit içeriği */
body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-strip {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 0;
  width: 100%;
  padding: 1rem 0.4rem 1rem;
  box-sizing: border-box;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item.is-open .sebs-cat-hacc-strip {
  display: none;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-num {
  display: block;
  font-family: var(--sh-font, Inter, system-ui, sans-serif);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(161, 161, 170, 0.5);
  pointer-events: none;
  flex-shrink: 0;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item.is-open .sebs-cat-hacc-num {
  display: none;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-badge {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 3;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item.is-open .sebs-cat-hacc-badge {
  display: inline-flex;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-collapsed {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  flex: 1;
  min-height: 0;
  width: 100%;
  pointer-events: none;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-collapsed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(165, 180, 252, 0.55);
  flex-shrink: 0;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-collapsed-icon svg {
  width: 0.85rem;
  height: 0.85rem;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-collapsed-label {
  display: block;
  max-width: 100%;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(161, 161, 170, 0.72);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item:not(.is-open):hover .sebs-cat-hacc-num {
  color: rgba(161, 161, 170, 0.85);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item:not(.is-open):hover .sebs-cat-hacc-collapsed-label {
  color: rgba(228, 228, 231, 0.88);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item:not(.is-open):hover .sebs-cat-hacc-collapsed-icon {
  color: rgba(196, 181, 253, 0.85);
  border-color: rgba(124, 58, 237, 0.25);
  background: rgba(124, 58, 237, 0.12);
}

/* Açık panel */
body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-body {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  min-width: 0;
  padding: 2.65rem 1.15rem 1rem;
  box-sizing: border-box;
  overflow: hidden;
  z-index: 2;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item.is-open .sebs-cat-hacc-body {
  display: flex;
  pointer-events: auto;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-sr-btn {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-premium {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-headline {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-headline-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #c4b5fd;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-headline-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-headline-text {
  min-width: 0;
  flex: 1;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-headline-text h3 {
  margin: 0 0 0.3rem;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  color: var(--app-color-heading, #fafafa);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-summary {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--app-color-muted, #71717a);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--app-color-body, #a1a1aa);
  max-width: 40ch;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-actions {
  margin-top: auto;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.9), rgba(37, 99, 235, 0.85));
  border: 1px solid rgba(167, 139, 250, 0.4);
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none !important;
  box-shadow: 0 4px 14px -4px rgba(124, 58, 237, 0.5);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-link:hover {
  transform: translateY(-1px);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-footline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-top: 0.5rem;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-footline-rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(103, 232, 249, 0.4), transparent);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-footline em {
  font-style: normal;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #67e8f9;
}

/* Açık panelde üst numara */
body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item.is-open::before {
  content: attr(data-sebs-index);
  position: absolute;
  top: 1rem;
  left: 1.15rem;
  z-index: 4;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #67e8f9;
  pointer-events: none;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) #modules-explore-heading,
body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) #simulations-explore-heading {
  color: var(--app-color-heading) !important;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .text-slate-600 {
  color: var(--app-color-body) !important;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .text-slate-900:is(#modules-explore-heading, #simulations-explore-heading) {
  color: var(--app-color-heading) !important;
}

/* Simülasyon — örnek ekran kutusu (açık panel içi) */
body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-example {
  margin: 0;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-example .sim-inline-example {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  border: 1px solid rgba(124, 58, 237, 0.22);
  background: rgba(124, 58, 237, 0.08);
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-example .sim-inline-example strong {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c4b5fd;
}

body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-example .sim-inline-example span {
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--app-color-body, #a1a1aa);
}

@media (max-width: 48rem) {
  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-haccordion {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item,
  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item.is-open {
    flex: none;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    min-height: 3.5rem;
  }

  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item.is-open {
    min-height: 15rem;
  }

  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-collapsed-label {
    writing-mode: horizontal-tb;
    transform: none;
  }

  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-desc {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-item,
  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-body,
  body.sebs-app-page :is(#modulesCategoriesExplore, #simulationsCategoriesExplore) .sebs-cat-hacc-strip {
    transition: none !important;
  }
}
