/* === OGÓLNE === */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', Arial, sans-serif;
  background-color: #0d0d0f;
  color: #ddd;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === HEADER === */
header {
  background: #18181b;
  color: #ffd966;
  text-align: center;
  padding: 20px;
  border-bottom: 2px solid #2b2b2e;
}

header h1 {
  margin: 0;
  font-size: 2rem;
}

header a {
  color: #ffd966;
  text-decoration: none;
}

header a:hover {
  text-decoration: underline;
}

/* === NAWIGACJA === */
nav {
  margin-top: 10px;
}

nav a {
  color: #ffd966;
  text-decoration: none;
  margin: 0 8px;
  font-weight: bold;
}

nav a:hover {
  color: #ffbb33;
}

/* === WYSZUKIWARKA === */
.search {
  margin-top: 12px;
}

.search input[type="text"] {
  padding: 8px 10px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #202024;
  color: #eee;
  width: 240px;
  max-width: 80%;
}

.search button {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: #ffd966;
  color: #111;
  font-weight: bold;
  cursor: pointer;
}

.search button:hover {
  background: #ffbb33;
}

/* === MAIN === */
main {
  flex: 1;
  max-width: 1200px;
  margin: 25px auto;
  padding: 0 20px 80px;
  width: 100%;
  overflow-wrap: break-word;
}

/* === POST === */
a.post-link {
  text-decoration: none;
  color: inherit;
}

.post {
  background: #1b1b1e;
  border: 1px solid #2c2c30;
  border-radius: 10px;
  padding: 35px;
  margin-bottom: 30px;
  transition: 0.25s;
  overflow: hidden;
}

.post:hover {
  border-color: #ffd966;
  background: #222228;
  transform: translateY(-2px);
}

.post h2, .post h3 {
  color: #ffd966;
  margin-top: 0;
}

.post p {
  color: #ccc;
}

.category {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 10px;
}

/* === TREŚĆ POSTA === */
.content {
  background: #1a1a1c;
  border: 1px solid #2d2d30;
  border-radius: 8px;
  padding: 20px;
  color: #ccc;
  overflow: hidden;
}

/* === OBRAZKI, RAMKI I PODPISY === */
.content img,
.post img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px auto 10px auto;
  border: 2px solid #2d2d30;
  background-color: #0e0e10;
  object-fit: contain;
  box-shadow: 0 0 10px #0008;
}

.content img:hover,
.post img:hover {
  transform: scale(1.02);
  transition: 0.2s ease;
  box-shadow: 0 0 15px #ffd96666;
}

/* === AUTOMATYCZNY PODPIS POD OBRAZKIEM === */
.content img + p,
.post img + p {
  text-align: center;
  background: #1f1f23;
  color: #bbb;
  font-size: 0.95rem;
  border-radius: 6px;
  padding: 6px 10px;
  width: fit-content;
  margin: 5px auto 20px auto;
  border: 1px solid #2e2e32;
}

/* === IFRAME / MULTIMEDIA === */
.content iframe,
.post iframe {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 10px;
  margin-top: 10px;
}

/* === KATEGORIE === */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.category-item {
  padding: 12px 18px;
  background: #1f1f24;
  border: 1px solid #333;
  border-radius: 8px;
  color: #ffd966;
  text-decoration: none;
  transition: 0.2s;
}

.category-item:hover {
  background: #ffd966;
  color: #111;
  transform: translateY(-2px);
}

.back {
  display: inline-block;
  margin-top: 20px;
  color: #ffd966;
  text-decoration: none;
}

.back:hover {
  text-decoration: underline;
}

/* === STOPKA === */
footer {
  background: #18181b;
  color: #aaa;
  text-align: center;
  padding: 15px;
  font-size: 0.9rem;
  border-top: 2px solid #2b2b2e;
  margin-top: auto;
  position: relative;
  bottom: 0;
  width: 100%;
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 900px) {
  main { max-width: 95%; }
  .post { padding: 22px; }
  header h1 { font-size: 1.6rem; }
  .search input[type="text"] { width: 160px; }
}

@media (max-width: 600px) {
  .content img + p {
    width: 100%;
    border-radius: 0;
  }
}
