/*
Theme Name: OSBAN Nightcore
Author: OSBAN
Version: 1.1
*/

:root {
  --bg-main: #0b0d10;
  --bg-panel: #121520;
  --bg-card: #151a2b;
  --accent: #5ddcff;
  --accent-soft: rgba(93,220,255,0.25);
  --text-main: #e5e7eb;
  --text-muted: #9aa3b2;
}

* {
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background: #0b0d10;
}

.site-bg {
  min-height: 100vh;
  background:
    radial-gradient(circle at top center, #10152a 0%, #0b0d10 60%),
    linear-gradient(180deg, rgba(0,0,0,0.4), rgba(0,0,0,0));
}

a {
  text-decoration: none;
  color: inherit;
}

/* HEADER */
.site-header {
  display: flex;
  justify-content: center; /* CENTRERAR HELA HEADER-INNEHÅLLET */
  background: rgba(11,13,16,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 48px;

  max-width: 1200px;
  width: 100%;
  justify-content: center;

  margin: 0 auto;
  padding: 24px 0;
}

/* LOGO */
.logo a {
  font-size: 40px;               /* dubbelt så stor */
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--accent);
  text-shadow:
    0 0 12px var(--accent-soft),
    0 0 28px rgba(93,220,255,0.35);
}

/* MENU */
.main-nav .menu {
  display: flex;
  gap: 28px;
  list-style: none;              /* DÖDA PRICKARNA */
  margin: 0;
  padding: 0;
}

.main-nav .menu li {
  list-style: none;
}

.main-nav .menu a {
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.main-nav .menu a:hover {
  color: var(--accent);
}

/* SEARCH */
.search-box {
  max-width: 420px;
  margin: 48px auto 24px;
}

.search-box input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-panel);
  color: var(--text-main);
  outline: none;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* POSTS GRID */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  padding: 40px 48px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.post-card {
  background: linear-gradient(
    180deg,
    var(--bg-card),
    #0f1220
  );
  padding: 22px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden; /* <-- VIKTIG */
}

.card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 14px;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.45),
    0 0 22px var(--accent-soft);
}

.post-card h2 {
  font-size: 16px;
  margin: 0 0 10px;
  color: var(--accent);
}

.post-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* SINGLE POST */
.single h1 {
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent-soft);
}

.archive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 32px auto 24px;
  padding: 0 48px;
}

.archive-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-soft);
}

.archive-search {
  width: 320px;
}

.archive-search input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(
    180deg,
    var(--bg-card),
    #0f1220
  );
  color: var(--text-main);
  font-size: 14px;
}

.archive-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.back-link {
  display: inline-block;
  margin: 32px 0 32px 70px; /* ← 70px åt höger */
  color: var(--text-muted);
  font-size: 14px;
  letter-spacing: 1px;
}

.back-link:hover {
  color: var(--accent);
}

/* HERO SECTION */
.hero-section {
  padding: 60px 0;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

/* SLIDER */
.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 340px; /* ger mer hero-tyngd */
}

.hero-slide {
  display: none;
}

.hero-slide.active {
  display: block;
}

.hero-slider .card-image {
  height: 260px;       /* justera fritt: 240–320 */
}

.hero-slide h3 {
  font-size: 18px;
  margin-top: 14px;
  color: var(--accent);
}

/* MESSAGE */
.hero-message h2 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent-soft);
}

.hero-message p,
.hero-text p {
  margin: 0;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 420px;
}

/* =========================================================
   GUIDES (MINIMALA ÄNDRINGAR – BEHÅLL LOOKEN)
========================================================= */

/* ===== LAYOUT ===== */
.guides-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: start;
  gap: 40px;
  padding: 40px 48px;
}

/* ===== SIDEBAR ===== */
.guides-sidebar {
  position: sticky;
  top: 120px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding-right: 12px;
}

.guides-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guides-sidebar li {
  margin-bottom: 10px;
}

.guides-sidebar a {
  color: var(--text-muted);
}

.guides-sidebar a:hover {
  color: var(--accent);
}

/* ===== FILTER ===== */
.guides-filter {
  width: 100%;
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  background: var(--bg-panel);
  color: var(--text-main);
  outline: none;
}

.guides-filter:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* ===== KATEGORIER ===== */
.guide-cat-toggle {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.guide-cat-toggle:hover {
  color: var(--accent);
}

/* ===== UNDERKATEGORIER ===== */
.guide-subcats {
  display: none;
  margin-top: 8px;
}

.guide-subcats li {
  margin-bottom: 6px;
}

.guide-subcats a {
  font-size: 13px;
  color: var(--text-muted);
}

/* ===== INDENT PER NIVÅ ===== */
.guide-cat.level-1 { margin-left: 12px; }
.guide-cat.level-2 { margin-left: 24px; }
.guide-cat.level-3 { margin-left: 36px; }
.guide-cat.level-4 { margin-left: 48px; }

/* ===== AKTIV ===== */
.guide-cat.active > .guide-subcats {
  display: block;
}

.guide-cat.current > .guide-cat-toggle {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-soft);
  font-weight: 600;
}

/* ===== LÄNKAR I SIDEBAR ===== */
.guide-cat-link {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.guide-cat-link:hover {
  color: var(--accent);
}

.guide-cat.current > .guide-cat-link {
  color: var(--accent);
  font-weight: 600;
  text-shadow: 0 0 10px var(--accent-soft);
}

/* ===== CONTENT (FIX: bort med 350px-strypningen) ===== */
.guides-content {
  align-self: start;
  max-width: 1200px;   /* var 350px (för smalt) */
  margin: 0 auto;
  width: 100%;
}

.guides-content .guides-title {
  margin-bottom: 18px;
  font-size: 22px;
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent-soft);
}

/* ===== VIEW TOGGLE (Grid/List) ===== */
.view-toggle {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

.view-toggle button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--text-muted);
  opacity: 0.55;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.view-toggle button.active {
  opacity: 1;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent-soft);
}

/* ===== CARDS CONTAINER (VIKTIG: denna wrapper finns nu i page-guides.php) ===== */
.guides-content-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* exakt 3 per rad */
  gap: 28px;
}

/* Responsivt utan att ändra “känslan” */
@media (max-width: 350px) {
  .guides-content-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 700px) {
  .guides-layout {
    grid-template-columns: 1fr;
  }
  .guides-sidebar {
    position: relative;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }
  .guides-content-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== LIST VIEW ===== */
.guides-content-grid.view-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* FIX: list-vy – layout ska ligga på <a>, inte article */
.guides-content-grid.view-list .post-card > a {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
}

/* Bild vänster */
.guides-content-grid.view-list .card-image {
  height: 120px;
  margin-bottom: 0;
}

/* Text höger */
.guides-content-grid.view-list h2,
.guides-content-grid.view-list p {
  margin: 0;
}
/* FIX: tvinga all text till högerkolumnen i list-vy */
.guides-content-grid.view-list .post-card > a h2,
.guides-content-grid.view-list .post-card > a p {
  grid-column: 2;
}
/* =========================================================
   GUIDES – LIST VIEW (ENDAST TITLAR, INGA CARDS / BILDER)
========================================================= */

/* Gör list-vy till ren lista */
.guides-content-grid.view-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Döda card-utseendet helt i list-läge */
.guides-content-grid.view-list .post-card {
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}

/* Dölj bilder helt */
.guides-content-grid.view-list .card-image {
  visibility: hidden;
  height: 0;
  overflow: hidden;
}

/* Titeln blir list-item */
.guides-content-grid.view-list .post-card h2 {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  margin: 0;
  padding: 6px 0;
}

/* Dölj excerpt/text */
.guides-content-grid.view-list .post-card p {
  display: none;
}

/* Lätt hover så det känns klickbart */
.guides-content-grid.view-list .post-card a:hover h2 {
  text-shadow: 0 0 10px var(--accent-soft);
}
/* =========================================================
   HEADER – OSBAN SCAN LINE (FIXAD)
========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: hidden;
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 160px;              /* fast bredd = inga artefakter */
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent),
    transparent
  );
  box-shadow: 0 0 12px var(--accent-soft);
  transform: translateX(-150%);
  animation: osban-scan 4s ease-in-out infinite alternate;
  will-change: transform;
}


@keyframes osban-scan {
  0% {
    transform: translateX(-250%);
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(150%);
    opacity: 0.3;
  }
}

/* =========================================================
   CONTACT PAGE
========================================================= */

.contact-section {
  padding: 80px 48px;
}

.contact-inner {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;
  align-items: center;
  text-align: center;
}


/* LEFT */
.contact-info {
  text-align: center;
}
.contact-form-wrap {
  width: 100%;
}

.contact-info h2 {
  font-size: 26px;
  margin-bottom: 16px;
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent-soft);
}

.contact-info p {
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto;
}

.contact-note {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.8;
  text-align: center;
}


.contact-note {
  margin-top: 16px;
  font-size: 13px;
  opacity: 0.8;
}

/* RIGHT */
.contact-form-wrap {
  background: linear-gradient(180deg, var(--bg-card), #0f1220);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.contact-form textarea {
  resize: none;
}


.contact-form input,
.contact-form textarea {
  background: var(--bg-panel);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text-main);
  font-size: 14px;
  outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-muted);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.contact-form button {
  margin-top: 10px;
  padding: 12px;
  background: none;
  border: 1px solid var(--accent);
  border-radius: 10px;
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button:hover {
  background: var(--accent-soft);
  box-shadow: 0 0 16px var(--accent-soft);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .contact-inner {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   ABOUT OSBAN – CONTACT PAGE
========================================================= */

.about-osban {
  padding: 80px 48px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.about-osban-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about-osban h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent-soft);
}

.about-osban p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

/* =========================================================
   FILE CENTER
========================================================= */

.file-center {
  padding: 80px 48px;
}

.file-center-header {
  max-width: 900px;
  margin: 0 auto 48px;
  text-align: center;
}

.file-center-header h2 {
  font-size: 28px;
  color: var(--accent);
  text-shadow: 0 0 18px var(--accent-soft);
}

.file-center-header p {
  color: var(--text-muted);
  margin-top: 12px;
}

.file-list {
  max-width: 1200px;
  margin: 0 auto;
}

.file-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.file-main h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--accent);
}

.file-main p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.file-meta {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  align-items: center;
}

.file-actions {
  display: flex;
  gap: 14px;
}

.file-actions a {
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 12px;
  border-radius: 8px;
  transition: box-shadow 0.2s ease;
}

.file-actions a:hover {
  box-shadow: 0 0 12px var(--accent-soft);
}

/* Responsive */
@media (max-width: 800px) {
  .file-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .file-actions {
    justify-content: flex-start;
  }
}
#load-more {
  margin: 0 auto;
  padding: 48px 0 64px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--text-muted);
}


#load-more:hover {
  color: var(--accent);
}
.card-image video,
.card-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== FORCE CONTENT MEDIA VISIBILITY ===== */
/* FORCE CONTENT MEDIA – SAFE */
.single-post .entry-content img,
.single-post .entry-content figure,
.single-post .entry-content video,
.single-post .entry-content .wp-block-image {
  position: static;
  display: block;
  max-width: 100%;
  height: auto;
}

/* =========================================================
   COMMENTS – LOW PROFILE (OSBAN)
========================================================= */

.comments-area {
  max-width: 640px;
  margin: 40px auto 0;
}

/* lista */
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* kommentar – tunn */
.comment {
  padding: 10px 0 10px 14px;
  margin-bottom: 18px;
}

/* body – horisontell layout */
.comment-body {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  column-gap: 25px; /* var för snålt */
  align-items: center;
}


/* avatar */
.comment-author img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
}

/* meta + text */
.comment-meta,
.comment-content {
  grid-column: 2;
  padding-top: 2px;
}

.comment-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.comment-content p {
  margin: 2px 0 0;
  line-height: 1.4;
}

/* reply – till höger */
.reply {
  grid-column: 3;
  margin: 0;
}

.comment-reply-link {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  opacity: 0.6;
  white-space: nowrap;
}

.comment-reply-link:hover {
  opacity: 1;
  background: var(--accent-soft);
}

/* nested replies */
.comment .children {
  margin-top: 12px;
  margin-left: 42px;
  padding-left: 14px;
}


/* Form */
.comment-form {
  margin-top: 40px;
}

.comment-form textarea,
.comment-form input {
  width: 100%;
  resize: none;
  background: linear-gradient(180deg, var(--bg-card), #0f1220);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text-main);
}

.comment-form input[type="submit"] {
  margin-top: 16px;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
}

.comment-form input[type="submit"]:hover {
  background: var(--accent-soft);
  box-shadow: 0 0 16px var(--accent-soft);
}

/* HARD FIX – WP ADMIN BAR AVATAR */
#wpadminbar img,
#wpadminbar .avatar {
  position: static !important;
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  border-radius: 50% !important;
  display: inline-block !important;
}

/* =========================================================
   CONTACT PAGE – CENTER ALL TEXT (MATCH CONTACT INTRO)
========================================================= */

.contact-method,
.contact-reasons,
.contact-social {
  padding: 80px 48px;
}

.contact-method-inner,
.contact-reasons-inner,
.contact-social-inner {
  max-width: 700px;        /* samma känsla som contact-inner */
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;     /* <-- DETTA ÄR NYCKELN */
}

.contact-method-inner h2,
.contact-reasons-inner h2,
.contact-social-inner h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent-soft);
}

.contact-method-inner p,
.contact-reasons-inner p,
.contact-social-inner p {
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0 auto 16px;
}

.contact-reasons-inner ul {
  list-style: none;       /* bort med vänster-list-look */
  padding: 0;
  margin: 16px auto;
}

.contact-reasons-inner li {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.contact-email {
  margin: 20px 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
