/* ========================================
   PODSTAWOWE STYLE
   ======================================== */

body {
  font-family: Calibri, sans-serif;
  font-size: 22px;
  max-width: 650px;
  margin: 0 auto;
  padding: 2rem;
  line-height: 1.35;
  color: #111;
  background: #fff;
}

p {
  text-align: justify;
  margin-bottom: 1.5rem;
}

/* ========================================
   NAGŁÓWKI
   ======================================== */

h1, h2, h4 {
  font-weight: 700;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 32px;
  color: #333;
}

h4 {
  font-size: 2.5em;
  line-height: 1.2;
}

/* ========================================
   LINKI W TREŚCI - NIEBIESKIE (zgodnie ze wzorcem)
   ======================================== */

a {
  color: #0073aa;
  text-decoration: none;
  border-bottom: 1px solid #0073aa;
}

a:hover {
  color: #005177;
  border-bottom-color: #005177;
}

/* ========================================
   LINKI W NAGŁÓWKACH - CZARNE
   ======================================== */

h1 a, h2 a, h3 a, h4 a,
.site-header a,
.site-nav a,
.site-footer a,
.pager a {
  color: #000;
  border-bottom: none;
}

h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover,
.site-header a:hover,
.site-nav a:hover,
.site-footer a:hover,
.pager a:hover {
  color: #000;
  border-bottom: none;
}

/* ========================================
   PAGINACJA (przyciski nowsze/starsze)
   ======================================== */

.pager {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: space-between;
}

.pager li {
  display: inline;
}

.pager a {
  color: #000;
  text-decoration: none;
  border-bottom: none;
}

.pager a:hover {
  color: #000;
  border-bottom: none;
}

/* ========================================
   NAWIGACJA MIĘDZY WPISAMI (poprzedni/następny)
   ======================================== */

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.post-nav-prev {
  text-align: left;
}

.post-nav-next {
  text-align: right;
}

/* Linki w nawigacji między wpisami - NIEBIESKIE (zgodnie ze wzorcem) */
.post-nav a {
  color: #0073aa;
  text-decoration: none;
  border-bottom: 1px solid #0073aa;
}

.post-nav a:hover {
  color: #005177;
  border-bottom-color: #005177;
}


/* ========================================
   STAŁY CZARNY PASEK MENU NA GÓRZE
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #000;
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;             /* <- DODAJ */
    justify-content: center;    /* <- DODAJ */
}

.site-nav {
    max-width: 650px;
    width: 100%;               /* <- DODAJ */
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    box-sizing: border-box;    /* <- DODAJ */
}

.site-nav a {
    color: #fff !important;
    border-bottom: none !important;
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    padding: 4px 0;
}

.site-nav a:hover {
    color: #ccc !important;
    border-bottom: none !important;
}

/* Odsunięcie całej treści od góry (pod stałe menu) */
body {
    padding-top: 70px;
}

/* ========================================
   RESPONSYWNOŚĆ (telefony)
   ======================================== */

* {
    max-width: 100%;
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Stały scrollbar - menu nie skacze */
html {
    overflow-y: scroll;
}


/* Zapobiega poziomemu przewijaniu na małych ekranach */
html, body {
    overflow-x: hidden;
}

.site-title {
    max-width: 100%;
    word-wrap: break-word;
    padding: 0 1rem;
    box-sizing: border-box;
}


/* Dopasowanie do małych ekranów */
@media (max-width: 700px) {
    body {
        padding: 1rem;
        padding-top: 70px;
    }

	.site-nav {
		gap: 0.8rem;
		padding: 0 1rem;
	}

    .site-nav a {
        font-size: 0.85rem;
        padding: 4px 6px;
        white-space: nowrap;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    /* NOWE: Tytuł na stronie głównej */
    /* .site-title {
		font-size: 1.8rem;
		max-width: 100%;
		overflow: hidden;
		word-wrap: break-word;
	}*/
	
	.site-title {
		font-size: 1.4rem;
		max-width: 100%;
		word-wrap: break-word;
		padding: 0 1rem;
	}

    .post-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .post-nav-prev,
    .post-nav-next {
        text-align: center;
    }
	
	.site-title {
		font-size: 1.4rem;
		max-width: 100%;
		word-wrap: break-word;
		padding: 0 1rem;
		box-sizing: border-box;
	}
}

/* ========================================
   WYSZUKIWARKA
   ======================================== */

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 400px;  /* Szerokość całego pola z lupką */
  width: 100%;
  border: 2px solid #ddd;
  border-radius: 8px;
  background: #f9f9f9;
  padding: 0 12px;
  transition: border-color 0.2s;
}

.search-wrapper:focus-within {
  border-color: #0073aa;
  background: #fff;
}

.search-icon {
  font-size: 1.2rem;
  color: #888;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  padding: 12px 0;
  font-size: 1.1rem;
  background: transparent;
  outline: none;
  font-family: inherit;
  min-width: 0;
}


/* ========================================
   PAGINACJA LICZBOWA (1 2 3 ›) — strona główna
   ======================================== */

.pagination {
  list-style: none;
  padding: 0;
  margin: 2.5rem 0 1rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.pagination li {
  margin: 0;
  display: inline-block;
}

.pagination a,
.pagination span {
  display: inline-block;
  min-width: 2.4rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-decoration: none;
  color: #0073aa;
  font-size: 0.95rem;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}

.pagination a:hover {
  background: #f0f7fb;
  border-color: #0073aa;
}

.pagination .active a,
.pagination .active span {
  background: #0073aa;
  color: #fff;
  border-color: #0073aa;
  font-weight: 700;
}

/* Wersja mobilna */
@media (max-width: 700px) {
  .pagination {
    gap: 0.3rem;
  }
  
  .pagination a,
  .pagination span {
    min-width: 2rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
  }
}

/* ========================================
   STOPKA Z AUTOREM
   ======================================== */

.site-footer {
  /*text-align: center;*/
  padding-top: 2rem;
  border-top: 1px solid #eee;
  margin-top: 2rem;
}

.footer-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.footer-author-text {
  text-align: center;
}

.footer-title {
  font-size: 30px;
  font-weight: 700;
  color: #111;
  margin: 0 0 0.3rem 0;
}

.footer-subtitle {
  font-size: 22px;
  color: #111;
  font-style: italic;
  margin: 0;
}

.footer-author-img {
  width: 100px;
  height: auto;
}

.footer-text {
  /*text-align: center;*/
  font-size: 22px;
  color: #111;
  margin: 1.5rem 0 1rem 0;
}

.footer-copyright {
  text-align: center;
  font-size: 22px;
  color: #767676;
  margin: 0;
}

@media (min-width: 480px) {
  .footer-author {
    flex-direction: row;
    justify-content: flex-start; 
    gap: 2rem;
    text-align: left;
  }
  
  .footer-author-text {
    text-align: left;
  }
  
  .footer-author-img {
    width: 120px;
  }
}


/* ========================================
   OBRAZKI Z PODPISAMI (figure + figcaption)
   ======================================== */

figure {
    margin: 2rem 0;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

figcaption {
    font-size: 0.85em;
    font-style: italic;
    color: #111;
    margin-top: 0.5rem;
    text-align: center;
    line-height: 1.3;
}

/* ========================================
   TEKST LINKU Z PREVIEW CZARNY 
   ======================================== */

.post-preview-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.post-preview-link h2,
.post-preview-link p,
.post-preview-link time {
  color: inherit;          /* dziedziczy po body (czarny) */
  text-decoration: none;
}

/* żeby hover nic nie zmieniał, jeśli nie chcesz efektu */
.post-preview-link:hover {
  text-decoration: none;
  color: inherit;
}
