@font-face {
	font-family: GoogleSansDisplay;
	src: url(font/GoogleSansDisplay-Regular.ttf) format("truetype");
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
body.noscroll {
	overflow: hidden;
}

body {
	font-family: GoogleSansDisplay, sans-serif;
	color: #000000;
}
a {
	color: #000000;
	text-decoration: none;
	transition: color 0.2s;
}
a:hover {
	color: #555;
	text-decoration: underline;
}

figcaption {
	text-align: right;
    margin-right: 5px;
    font-size: 0.7rem;
    color: #000000;
}

/* hlavička */
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 2rem;
	background: #000000;
	color: #fff;
}
header h1 {
	font-size: 1.5rem;

}
header h1 a {
	color: #fff;
}

header h1 a:hover {
	color: #fff;
}
header .btn {
	background: #fff;
	color: #000000;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
}
header .btn:hover {
	background: #555;
}

/* vyhledávání */
form.search {
	padding: 1rem 2rem;
}
.search-wrap {
	position: relative;
	text-align: center;
	max-width: 600px;
	margin: 0 auto;
}

.search-wrap input[type="text"] {
	width: 100%;
	padding: 0.6rem 2.4rem 0.6rem 2.4rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1rem;
}

.search_icon1 {
	position: absolute;
	left: 0.8rem;
	top: 50%;
	transform: translateY(-50%);
	color: #555;
	font-size: 1rem;
	pointer-events: none;
}

.search_icon2 {
	position: absolute;
	right: 0.8rem;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: none;
	color: #666;
	font-size: 1.1rem;
	cursor: pointer;
	padding: 0;
	line-height: 1;
}
.search_icon2 button {
	border: none !important;
	cursor: pointer;
}

.web-title {
	font-size: 0.8rem;
	font-weight: bold;

}

.news {
	color: #ff0000;
	font-style: italic;
}

/* blog / karty */
.blog {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	padding: 0 2rem;
}
.card {
	background: #fff;
	border-radius: 15px;
	overflow: hidden;
	width: 350px;
	position: relative;
	transition: transform 0.2s, box-shadow 0.2s;
	border: 1px solid black;
}
.card:hover {
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.card img {
	width: 100%;
	height: 260px;
	object-fit: cover;
	cursor: pointer;
}
.card-body {
	padding: 0.7rem;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	height: 155px;
}
.card-body h3 {
	margin: 0.2rem 0 0.4rem;
	color: #000000;
	cursor: pointer;
}

/* datum v rámečku */
.card-body p, .meta {
    font-size: 0.7rem;
    color: #000000;
}

.card-body p {
    margin-bottom: 0.5rem;
}

.cats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	margin-top: auto;
}

.box .cats {
	margin-top: 10px;
}

.box h2 {
	margin-bottom: 10px;
}
.tag {
	background: #000000;
	padding: 0.3rem 0.7rem;
	border-radius: 4px;
	font-size: 0.8rem;
	color: #fff;
	transition: background 0.2s;
}
.tag:hover {
	background: #555;
	color: #fff;
}


/* admin ikony */
.admin-menu {
	position: absolute;
	top: 6px;
	right: 6px;
	display: flex;
	gap: 0.3rem;
}
.admin-menu .edit, .admin-menu .delete {
    background: #8a58ef;
    width: 50px;
    height: 50px;
    justify-content: center;
    cursor: pointer;
	border: none;
    color: #ffffff;
	font-size: 20px;
	opacity: 0.8;
}
.admin-menu .delete {
	background: #f32222;
}

.admin-menu button:hover {
	border: #333 solid 2px;
}

/* modály */
@keyframes pop {
	0% {
		opacity: 0;
		transform: scale(0.9) translateY(-10%);
	}
	100% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}
#viewer,
#postModal {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.7);
	z-index: 100;
	align-items: flex-start;
	justify-content: center;
}
#viewer .box {
	max-height: 90vh; 
	overflow-y: auto;           
	overscroll-behavior-y: contain; 
	background: #fff;
	border-radius: 6px;
	padding: 1rem;
	margin-top: 5vh;
	width: 600px;
	max-width: 90%;
	height: 85%;
	animation: pop 0.28s ease-out;
	display: flex;
	flex-direction: column;
  }

#postModal .modal-box {
	background: #fff;
	border-radius: 6px;
	padding: 1rem;
	margin-top: 5vh;
	width: 600px;
	max-width: 90%;
	height: 85%;
	animation: pop 0.28s ease-out;
	display: flex;
	flex-direction: column;
}
#viewer img {
	width: 100%;
	height: auto;
	max-height: 60vh;
}
#viewer .text {
	flex: 1 1 auto;
	padding-right: 0.5rem;
	margin-top: 0.8rem;
	scroll-behavior: smooth;
	line-height: 1.6;
	font-size: 0.95rem;
}

/* načítání dalších */
#loadMore {
	margin: 1.5rem auto;
	display: block;
	padding: 0.7rem 1.4rem;
	background: #000000;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s;
}
#loadMore:hover {
	background: #555;
}

#viewer .box {
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
  }
.close-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
  }
/* patička */
footer {
	background: #000000;
	color: #fff;
	text-align: center;
	padding: 2rem 1rem;
	margin-top: 3rem;
}
footer a {
	color: #fff;
}
footer a:hover {
	color: #ff0000;
}

footer p a[href^="mailto"] {
	color: #fff;
}
footer p a[href^="mailto"]:hover {
	color: #ff0000;
}
footer .cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 1rem;
}
footer .cloud a {
	background: rgba(255, 255, 255, 0.15);
	padding: 0.3rem 0.7rem;
	border-radius: 4px;
	font-size: 0.8rem;
	color: #fff;
	transition: background 0.2s;
}
footer .cloud a:hover {
	background: #555;
}

/* modál */
#postModal .modal-box label {
	display: block;
	margin-top: 0.7rem;
	font-size: 0.9rem;
	color: #000000;
}

input[type="text"],
input[type="datetime-local"],
input[type="file"],
.form-box, 
textarea {
	width: 100%;
	padding: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 4px;
	margin-top: 0.3rem;
	font-size: 0.95rem;
}
#postModal .modal-box input:focus,
#postModal .modal-box textarea:focus {
	border-color: #000000;
	outline: none;
}
#postModal .actions {
	display: flex;
	gap: 0.6rem;
	margin-top: 1rem;
}
#postModal .actions button {
	flex: 1;
	padding: 0.6rem;
	border: none;
	border-radius: 4px;
	font-size: 0.95rem;
	cursor: pointer;
	transition: background 0.2s;
}
#postModal .actions button[type="submit"] {
	background: #000000;
	color: #fff;
}
#postModal .actions button[type="submit"]:hover {
	background: #555;
}
#postModal .actions #cancelPost {
	background: #ccc;
}
#postModal .actions #cancelPost:hover {
	background: #555;
}
#postModal .close-btn {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	background: transparent;
	border: none;
	font-size: 1.5rem;
	color: #000000;
	cursor: pointer;
}
#prevImg {
	display: none;
	max-width: 25%;
	margin-top: 0.5rem;
	border: 1px solid #ccc;
	border-radius: 4px;
}
#catSug {
	position: absolute;
	background: #fff;
	border: 1px solid #ccc;
	list-style: none;
	z-index: 200;
}
#catSug li {
	padding: 0.3rem 0.5rem;
	cursor: pointer;
}
#catSug li:hover {
	background: #555;
}
.web {    
	float: right;
	}

/* mobilní */
@media (max-width: 700px) {
	.card {
		width: 90%;
	}
	.card img {
		height: auto;
	}
	.blog {
		padding: 0 1rem;
	}
	#viewer .box,
	#postModal .modal-box {
		width: 90%;
	}
}

@media (max-width: 450px) {
	header {
		flex-direction: column;
		gap: 0.8rem;
	}

	.box {
		width: 90%;
	}
	form.search {
		padding: 1rem;
	}
	.search-wrap input[type="text"] {
		font-size: 1.1rem;
	}
	.card-body h3 {
		font-size: 1.1rem;
	}
	footer .cloud a {
		font-size: 0.9rem;
	}
}