/* ==========================================================================
   Authorix AI – Kategorisida CSS
   Lägg till längst ner i: /wp-content/themes/salient-child/style.css
   ========================================================================== */

/* ── RESET & TOKENS ── */
*,*::before,*::after { box-sizing: border-box; }

:root {
  --bg:      #07080d;
  --surface: #0e1018;
  --card:    #13151e;
  --border:  #1e2233;
  --text:    #f0f2ff;
  --muted:   #8b92b0;
  --dim:     #4a5070;
  --accent:  #4f7fff;
  --accent2: #3dffa0;
  --purple:  #c97bff;
  --orange:  #ffb44f;
  --mono:    'IBM Plex Mono', monospace;
  --sans:    'Inter', system-ui, sans-serif;
}

@property --angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin-border { to { --angle: 360deg; } }
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.8); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ── BODY ── */
body.ax-category-archive {
  margin: 0;
  background: var(--bg) !important;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Dölj Salient-chrome */
body.ax-category-archive #header-outer,
body.ax-category-archive #header-space,
body.ax-category-archive .nectar-sticky-header,
body.ax-category-archive .page-header-no-bg,
body.ax-category-archive #slide-out-widget-area { display: none !important; }

body.ax-category-archive,
body.ax-category-archive #ajax-content-wrap { padding-top: 0 !important; margin-top: 0 !important; }

/* Brusoverlay */
body.ax-category-archive::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .4;
}

/* ── TOPBAR ── */
.ax-topbar {
  position: sticky;
  top: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 60px;
  background: rgba(7,8,13,.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.ax-topbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  font-family: var(--mono);
}
.ax-topbar-logo img  { border-radius: 8px; }
.ax-topbar-logo span { color: var(--accent); }

.ax-topbar-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 0 24px rgba(79,127,255,.35);
}
.ax-topbar-cta::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle),#3dffa0,#4f7fff,#c97bff,#3dffa0);
  z-index: -1;
  animation: spin-border 3s linear infinite;
  opacity: .7;
}
.ax-topbar-cta::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 6px;
  background: var(--accent);
  z-index: -1;
}
.ax-topbar-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 36px rgba(79,127,255,.5); }

/* ── HERO ── */
.ax-hero {
  position: relative;
  width: 100%;
  min-height: 380px;
  max-height: 480px;
  overflow: hidden;
  z-index: 1;
}
.ax-hero img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.ax-hero-empty {
  width: 100%;
  min-height: 380px;
  max-height: 480px;
  background:
    radial-gradient(circle at top left,  rgba(79,127,255,.25), transparent 32%),
    radial-gradient(circle at top right, rgba(201,123,255,.18), transparent 28%),
    linear-gradient(180deg, #121728 0%, #07080d 100%);
}
.ax-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7,8,13,.08) 20%, rgba(7,8,13,.55) 70%, rgba(7,8,13,1) 100%);
}
.ax-cat-hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 24px 40px 34px;
  max-width: 1200px;
  margin: 0 auto;
}
.ax-cat-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(79,127,255,.1);
  border: 1px solid rgba(79,127,255,.25);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .08em;
  text-transform: uppercase;
  font-family: var(--mono);
  margin-bottom: 12px;
}
.ax-cat-hero-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent2);
  animation: pulse 2s infinite;
}
.ax-cat-hero-h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 800;
  color: var(--text) !important;
  line-height: 1.08;
  max-width: 14ch;
}
.ax-cat-hero-desc {
  margin: 0;
  max-width: 62ch;
  font-size: 16px;
  color: rgba(240,242,255,.82);
  line-height: 1.65;
}

/* ── MAIN ── */
.ax-main {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 40px 72px;
}
.ax-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.ax-section-label {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dim);
  font-family: var(--mono);
  display: flex;
  align-items: center;
  gap: 10px;
}
.ax-section-label::after {
  content: '';
  width: 72px;
  height: 1px;
  background: var(--border);
}
.ax-count {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--mono);
}

/* ── SLIDER-KNAPPAR ── */
.ax-slider-controls { display: flex; align-items: center; gap: 10px; }
.ax-slider-arrow {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  transition: transform .15s, background .15s, opacity .15s, box-shadow .15s;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08) inset;
}
.ax-slider-arrow:hover  { transform: translateY(-1px); background: rgba(79,127,255,.18); }
.ax-slider-arrow:disabled { opacity: .35; cursor: not-allowed; transform: none; }

/* ── SLIDER ── */
.ax-posts-slider-wrap { position: relative; }
.ax-posts-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(320px, 520px);
  gap: 22px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 2px 18px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
  user-select: none;
}
.ax-posts-slider::-webkit-scrollbar { display: none; }
.ax-posts-slider.is-dragging { cursor: grabbing; scroll-snap-type: none; }

/* ── ARTIKEL-KORT ── */
.ax-post-card {
  position: relative;
  min-height: 560px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
  scroll-snap-align: start;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: fadeUp .4s ease both;
  box-shadow: 0 20px 80px rgba(0,0,0,.28);
}
.ax-post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79,127,255,.35);
  box-shadow: 0 28px 90px rgba(0,0,0,.36);
}
.ax-post-card-link { display: block; width: 100%; height: 100%; color: inherit; text-decoration: none; }

.ax-post-card-media { position: absolute; inset: 0; }
.ax-post-card-media img,
.ax-post-card-placeholder { width: 100%; height: 100%; display: block; object-fit: cover; }
.ax-post-card-placeholder {
  background:
    radial-gradient(circle at top left,  rgba(79,127,255,.22), transparent 30%),
    radial-gradient(circle at top right, rgba(201,123,255,.16), transparent 24%),
    linear-gradient(180deg, #1a2135 0%, #0e1018 100%);
}
.ax-post-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7,8,13,.08) 12%, rgba(7,8,13,.42) 55%, rgba(7,8,13,.96) 100%);
}
.ax-post-card-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  padding: 26px;
}
.ax-post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: rgba(240,242,255,.64);
  font-family: var(--mono);
}
.ax-post-card-title {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.8vw, 38px);
  line-height: 1.1;
  color: #fff;
  text-wrap: balance;
}
.ax-post-card-excerpt {
  margin: 0;
  max-width: 42ch;
  font-size: 15px;
  color: rgba(240,242,255,.82);
  line-height: 1.65;
}
.ax-post-card-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.ax-post-cat-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(79,127,255,.08);
  border: 1px solid rgba(79,127,255,.2);
  color: var(--accent);
  font-family: var(--mono);
}

/* ── INGA INLÄGG ── */
.ax-no-posts {
  padding: 36px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--dim);
  font-size: 14px;
  background: rgba(255,255,255,.02);
}

/* ── PAGINERING ── */
.ax-pagination { display: flex; justify-content: center; margin-top: 26px; }
.ax-pagination .page-numbers { list-style: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0; }
.ax-pagination .page-numbers a,
.ax-pagination .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  background: var(--card);
  font-family: var(--mono);
  transition: .15s;
}
.ax-pagination .page-numbers a:hover { border-color: rgba(79,127,255,.35); color: var(--accent); }
.ax-pagination .page-numbers .current {
  background: rgba(79,127,255,.1);
  border-color: rgba(79,127,255,.4);
  color: var(--accent);
}

/* ── SIDFOT ── */
.ax-site-footer {
  text-align: center;
  padding: 36px 24px;
  font-size: 12px;
  color: var(--dim);
  border-top: 1px solid var(--border);
  margin-top: 56px;
  position: relative;
  z-index: 1;
}
.ax-site-footer a { color: var(--accent); text-decoration: none; }

/* ── RESPONSIVT ── */
@media (max-width: 900px) {
  .ax-posts-slider { grid-auto-columns: minmax(280px, 86vw); }
}
@media (max-width: 680px) {
  .ax-topbar          { padding: 0 20px; }
  .ax-cat-hero-text   { padding: 18px 20px 24px; }
  .ax-main            { padding: 20px 16px 56px; }
  .ax-hero,
  .ax-hero img,
  .ax-hero-empty      { min-height: 320px; max-height: 420px; }
  .ax-post-card       { min-height: 460px; }
  .ax-post-card-body  { padding: 20px; }
  .ax-post-card-title { font-size: 28px; }
  .ax-post-card-excerpt { font-size: 14px; }
  .ax-section-head    { align-items: flex-start; flex-direction: column; }
}
