/* ELMOVE-BUILD 2026-12-01T23:45 */
/* Strona: lumen.html (dawniej styles-4.css) — style unikalne (wspólne: tokens + motyw + components). */
/* =========================
   Reset & Global
   ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  color: var(--text); /* biały tekst globalnie */
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg); /* prawie czarne tło */
  position: relative;
  transition: background 0.5s ease;
}

body::before {
  content: "";
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('background.png') no-repeat center center;
  background-size: cover;
  opacity: 0.05; /* bardzo subtelny obraz */
  z-index: -1;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

header {
  position: relative;
  height: 300px;
  text-align: center;
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
  border-radius: 10px;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: url('header.png') no-repeat center center;
  background-size: cover;
  opacity: 0.1;
  z-index: -1;
}

header h1,
header p {
  position: relative;
  z-index: 1;
}

#main-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 20px 0 20px;
  flex: 1;
}

/* =========================
   Sidebar
   ========================= */
aside {
  flex: 0 0 25%;
  background: rgba(0, 0, 0, 0.85);
  border-radius: 10px;
  padding: 20px;
  color: var(--text);
  min-width: 200px;
  height: auto;
}

/* =========================
   Search Box
   ========================= */
.search-box {
  margin-bottom: 20px;
}

.search-box input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: none;
  outline: none;
  font-size: 1rem;
  background: var(--text);
  color: var(--surface);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.search-box input::placeholder {
  color: var(--muted);
  font-style: italic;
}

aside nav ul {
  list-style: none;
}

aside nav ul li {
  margin-bottom: 10px;
}

/* =========================
   Accordion / Submenu
   ========================= */
.accordion {
  background: var(--bg-2);
  color: var(--text);
  cursor: pointer;
  padding: 12px 14px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.3s, color 0.3s;
}

.accordion:hover {
  background: var(--accent);
  color: var(--bg-2);
}

.accordion.active {
  background: var(--accent);
  color: var(--bg-2);
  font-weight: bold;
}

.accordion::after {
  content: "▶";
  float: right;
  transition: transform 0.3s, color 0.3s;
  color: var(--text);
}

.accordion.active::after {
  transform: rotate(90deg);
  content: "▼";
  color: var(--bg-2);
}

.submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--accent);
  margin: 8px 0 12px;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  padding: 0;
}

.submenu li {
  margin: 5px 0;
}

.submenu li a.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  word-wrap: break-word;
  padding: 5px 0 5px 10px;
  text-decoration: none;
  color: var(--text);
  transition: color 0.3s, background 0.3s;
}

.submenu li a.sidebar-item:hover {
  color: var(--bg-2);
  background: var(--accent);
  border-radius: 4px;
}

.sidebar-item span {
  flex: 1;
  min-width: 0;
  padding-right: 10px;
}

.sidebar-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--accent);
}

/* =========================
   Aktualności (main)
   ========================= */
main {
  flex: 1;
  background: rgba(255,255,255,0.1); /* lekko przezroczyste, żeby złoty akcent działał */
  border-radius: 12px;
  padding: 20px 30px;
  display: flex;
  flex-direction: column;
  min-height: 700px;
  overflow: hidden;
}

.news-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.news-list article {
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 0.3, transparent); /* subtelny złoty podział */
}

.news-list h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--text);
}

.news-list p {
  color: var(--text-body);
}

main h2 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  color: var(--text);
}

/* =========================
   Pasek HOME
   ========================= */
.home-bar {
  display: flex;
  justify-content: space-between;
  width: 100%;
  height: 20px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 900;
  font-size: clamp(1.2rem, 4vw, 2rem);
  padding: 0 20px;
  line-height: 20px;
  text-align: center;
  transition: background 0.3s, color 0.3s;
}

.home-bar:hover {
  background: var(--accent);
  color: var(--bg-2);
}

.home-bar span {
  display: inline-block;
}

/* =========================
   Responsywność
   ========================= */
@media (max-width: 900px) {
  #main-container {
    flex-direction: column;
    gap: 20px;
  }

  aside {
    order: -1;
    width: 100%;
    background: rgba(0,0,0,0.9);
    border-radius: 0;
    padding: 15px;
  }

  aside nav ul li {
    margin-bottom: 5px;
  }

  main {
    order: 1;
    max-height: 60vh;
    overflow: hidden;
  }

  .news-list {
    overflow-y: auto;
    flex: 1;
  }

  .accordion {
    font-size: 1rem;
    padding: 10px 12px;
  }

  .sidebar-img {
    width: 30px;
    height: 30px;
  }
}

/* ==========================================================================
   SIDEBAR: przycisk + (dodaj) na całą szerokość
   (JS dokleja go jako osobne <li> na końcu listy)
   ========================================================================== */
#sidebar-list {
  display: flex;
  flex-wrap: wrap;
}
#sidebar-list > li {
  flex: 1 1 100%;
}
#sidebar-list > li:has(> #add-entry-btn) {
  flex: 1 1 100%;
  display: flex;
  margin-bottom: 0;
  margin-top: 0 !important; /* nadpisuje inline marginTop z JS */
}
#add-entry-btn {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#add-entry-btn {
  background: var(--accent) !important; /* zamiast inline #d4af37 */
  color: var(--bg) !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 1.4rem !important;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
#add-entry-btn:hover {
  background: var(--accent-bright) !important;
  transform: translateY(-1px);
}
