

body,
html {
	background-color: var(--bg-page);
	width: 100%;
	overflow-x: hidden;
	margin: 0;
	padding: 0;
}

.navbar .navbarLeft .mainPageLink img {
	display: block;
	width: 102px;
}

.navbar .navbarLeft .mainPageLink img:hover {
	background-color: var(--hover);
}

@media (pointer: fine) {
	.navbar .mainPageLink img {
		display: block;
	}
	.navbar .mainPageLink p {
		display: none;
	}
}

@media (pointer: coarse) {
	.navbar .mainPageLink img {
		display: none;
	}
	.navbar .mainPageLink p {
		display: block;
	}
}

header {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	overflow: hidden;
}

header img {
	width: 100%;
	max-height: 60vh;
	object-fit: cover;
	object-position: center;
}

.wpisy {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	font-size: 1rem;
	line-height: 1.6rem;
	color: var(--text-main);
	max-width: 80%;
	margin: 2rem auto;
}

.wpisy section {
	background-color: var(--bg-post);
	padding: 2rem;
	border-radius: 1rem;
	margin-bottom: 2rem;
	box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

.wpisy section:hover {
	transform: translateY(-0.2rem);
	box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.wpisy h1,
.wpisy h2,
.wpisy h3 {
	position: relative;
	font-weight: 700;
	margin-top: 1.5rem;
	margin-bottom: 1rem;
	padding-left: 1rem;
	color: var(--text-main);
}

.wpisy h1::before,
.wpisy h2::before,
.wpisy h3::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 0.4rem;
	height: 100%;
	background-color: var(--primary);
	border-radius: 0.2rem;
}

.wpisy h1 {
	font-size: 2rem;
}
.wpisy h2 {
	font-size: 1.75rem;
}
.wpisy h3 {
	font-size: 1.5rem;
}

.wpisy p {
	margin-bottom: 1rem;
	font-size: 1.1rem;
	color: var(--text-main);
}

.wpisy ul,
.wpisy ol {
	margin: 1rem 0;
	padding-left: 0.5rem;
}

.wpisy li {
	margin-bottom: 0.75rem;
	position: relative;
	padding-left: 2rem;
}

.wpisy ul li::before {
	position: absolute;
	left: 0;
	top: 0;
	font-size: 1.2rem;
}

.wpisy a {
	color: var(--link);
	text-decoration: none;
	border-bottom: 1px dotted var(--link);
}

.wpisy a:hover {
	text-decoration: underline;
	color: var(--link);
	background-color: var(--hover);
	text-decoration: none;
}

.wpisy table {
	width: 100%;
	border-collapse: collapse;
	margin: 1rem 0;
}

.wpisy th,
.wpisy td {
	border: 0.0625rem solid #ccc;
	padding: 0.5rem 0.75rem;
	text-align: left;
}

.wpisy th:first-child,
.wpisy td:first-child {
	width: 20%;
}

.wpisy th {
	background-color: #e0f7fa;
}

/* .wpisy img {
	max-height: 20rem;
	object-fit: cover;
} */

video, iframe, small{
	display: block;
	margin: 0 auto;
	width: 100%;
	max-width: 1000px;
}

.bigImg {
	width: 90%;
	display: block;
	margin: .5rem auto;
}

.medImg {
	width: 45%;
	display: block;
	margin: .5rem auto;
}

.medImgLeft {
	width: 45%;
	display: block;
	margin: .5rem auto;
	margin-left: 2rem;
}

.smallImg {
	width: 25%;
	display: block;
	margin: .5rem auto;
}

.smallImgLeft {
	width: 25%;
	display: block;
	margin: .5rem auto;
	margin-left: 2rem;
}

.wpisy .gallery,
.wpisy .galeria {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.wpisy .gallery img,
.wpisy .galeria img {
max-width: 30%;
        max-height: 20rem;
	object-fit: cover;
	border-radius: 0.75rem;
	box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
	cursor: pointer;
	margin: 1rem;
}

.wpisy .bigGallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
        cursor: pointer;
}

.wpisy .bigGallery img {
max-width: 45%;
height: auto;
}

.wpisy .highlight {
	background-color: var(--link);
	padding: 0.5rem 0.75rem;
	border-radius: 0.5rem;
	display: inline-block;
	margin-bottom: 1rem;
	font-weight: 600;
	box-shadow: 0 0.15rem 0.25rem rgba(0, 0, 0, 0.1);
}

/* Download */

.download {
	display: block;
	text-align: center;
  
	width: 90%;

	max-width: 700px;


	padding: 14px 18px;
	border-radius: 14px;

	margin: 1rem auto;
  
	font-size: 15px;
	font-weight: 600;
  
	color: var(--bg-post) !important;
	text-decoration: none;
  
	background: var(--link);
  }

  .download-small {
	display: inline-flex;
	align-items: center;
	gap: 10px;
  
	padding: 7px 9px;
	border-radius: 14px;
  
	font-size: 15px;
	font-weight: 600;
  
	color: var(--bg-post) !important;
	text-decoration: none;
  
	background: var(--link);
  }
  
  .download:hover {
	transform: translateY(-2px);
  }
  

  /* lista podstron */

  .subPageList {
	width: 80%;
	display: flex;
	margin: 0 auto;
	flex-wrap: wrap;
	justify-content: center;
  }

  .subPageListItem a {
	text-decoration: none;
  }

  .subPageListItem {
	background-color: var(--bg-post);
	width: fit-content;
	display: block;
	margin: 5px;
	border-radius: 5px;
	padding: 5px;
  }

  .subPageListItem div:first-child {
	display: block;
	height: 15vw;
	width: 15vw;
	overflow: hidden;
	padding: 5px;
  }
  
  .subPageListItem div:last-child {
	display: block;
	height: auto;
	width: 15vw;
	overflow: hidden;
	padding: 5px;

    display: flex;
    align-items: center;     /* vertical centering */
    justify-content: center; /* horizontal centering (optional) */
  }

  .subPageListItem img {
	margin: 0 auto;
	height: 100%;
  }

  .subPageListItem p {
	text-decoration: none;
	font-weight: bold;
	color: var(--text-main);
	margin: auto;
	text-align: center;
  }

/* Galeria */

.lightbox-overlay {
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background: rgba(0,0,0,0.85);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:1000;
    opacity: 0;
    animation: lbFadeIn 0.3s forwards;
}

.lightbox-overlay.hide {
    animation: lbFadeOut 0.3s forwards;
}

@keyframes lbFadeIn { from {opacity:0;} to {opacity:1;} }
@keyframes lbFadeOut { from {opacity:1;} to {opacity:0;} }

.lightbox-overlay img {
    max-width: 90%;
    max-height: 80%;
    border-radius:6px;
    box-shadow:0 5px 30px rgba(0,0,0,0.5);
    cursor: zoom-in;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    position: relative;
}

.lb-btn {
    position: absolute;
    font-size: 40px;
    color: white;
    background: rgba(0,0,0,0.3);
    border:none;
    padding:10px;
    border-radius:50%;
    cursor:pointer;
    user-select:none;
    top:50%;
    transform: translateY(-50%);
}

.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-close { top:20px; right:20px; transform:none; font-size:30px; }

.lb-btn:hover { background: rgba(255,255,255,0.3); }

  @media only screen and (max-width: 1100px) {
	.subPageListItem div:first-child {
		height: 20vw;
		width: 20vw;
	}

	.subPageListItem div:last-child {
		width: 20vw;
                height: auto;
	}
  }
  @media only screen and (max-width: 500px) {
	.subPageListItem div:first-child {
		height: 80vw;
		width: 80vw;
	}

	.subPageListItem div:last-child {
		width: 80vw;
                height: auto;
	}
  }
/* TABLET */
@media (max-width: 1024px) {
	.wpisy {
		max-width: 92%;
	}

	.wpisy section {
		padding: 1.5rem;
	}

	.bigImg {
		width: 100%;
	}

	.medImg,
	.medImgLeft {
		width: 70%;
		margin-left: auto;
	}

	.smallImg,
	.smallImgLeft {
		width: 40%;
		margin-left: auto;
	}

	.wpisy .gallery img,
	.wpisy .galeria img {
		max-width: 45%;
	}

	.wpisy .bigGallery img {
		max-width: 80%;
	}

	.subPageList {
		width: 90%;
	}

	.subPageListItem div:first-child {
		height: 20vw;
		width: 20vw;
	}

	.subPageListItem div:last-child {
		width: 20vw;
		height: auto;
	}
}

/* MOBILE */
@media (max-width: 600px) {
	.wpisy {
		max-width: 95%;
		font-size: 0.95rem;
	}

	.wpisy section {
		padding: 1.2rem;
	}

	.wpisy h1 { font-size: 1.6rem; }
	.wpisy h2 { font-size: 1.4rem; }
	.wpisy h3 { font-size:1.2rem; }

	.bigImg,
	.medImg,
	.medImgLeft,
	.smallImg,
	.smallImgLeft {
		width: 100%;
		margin-left: auto;
	}

	.wpisy .gallery img,
	.wpisy .galeria img {
		max-width: 100%;
		margin: 0.5rem 0;
	}

	.wpisy .bigGallery img {
		max-width: 100%;
	}

	.subPageList {
		width: 95%;
	}

	.subPageListItem div:first-child {
		height: 70vw;
		width: 70vw;
	}

	.subPageListItem div:last-child {
		width: 70vw;
		height: auto;
	}
}

/* DESKTOP */
@media (min-width: 1101px) {
	.subPageListItem div:first-child {
		height: 15vw;
		width: 15vw;
	}

	.subPageListItem div:last-child {
		width: 15vw;
		height: auto;
	}
}
