/******************************************  
 CUSTOM STYLESHEET
*******************************************/

/*
* You can place your custom CSS statements in this file, after this message.
* It is better to write everything custom here
* because this file won't be replaced during updates.
* 
* Simply copy an existing style from style.css to this file, 
* and modify it to your liking.
*/

/* Layout stabilization */
#content {
	display: flex;
	align-items: stretch;
	background: #fff;
}

#main {
	float: none;
	width: calc(100% - 300px);
	min-width: 0;
	border-right: 1px solid #e6e6e6;
}

#sidebar {
	float: none;
	width: 300px;
	margin: 0;
	border-left: 0;
	border-radius: 0;
	background: #f2f8e3;
	box-sizing: border-box;
	padding-top: 30px;
}

#sidebar .widget {
	padding-left: 18px;
	padding-right: 18px;
}

/* Navigation clarity */
#secondnav {
	padding-left: 16px;
	padding-right: 16px;
}

#secondnav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

#secondnav li {
	float: none;
	margin: 0;
	padding: 4px 10px;
	font-size: 12px;
}

#secondnav li a {
	font-size: 12px;
	white-space: nowrap;
}

.widget_petes_navigation > ul > li > a {
	font-weight: bold;
}

.widget_petes_navigation li.current-cat > a,
.widget_petes_navigation li.current-post > a {
	color: #1f2b00;
	text-decoration: underline;
}

.widget_petes_navigation ul ul {
	margin-left: 14px;
}

/* Professional responsive behavior */
@media (max-width: 1100px) {
	.wrap {
		width: min(1060px, 100%);
	}
}

@media (max-width: 980px) {
	#content {
		display: block;
	}

	#main,
	#sidebar {
		width: 100%;
		border: 0;
	}

	#sidebar {
		background: #f4f9e8;
		padding-top: 16px;
	}

	#main .post-content,
	#comments {
		padding-left: 18px;
		padding-right: 18px;
	}
}

@media (max-width: 640px) {
	#logo {
		float: none;
		margin: 0 auto 8px;
		text-align: center;
	}

	#secondnav {
		padding: 10px 12px;
	}

	#secondnav li {
		padding: 6px 10px;
	}

	.post h2.title a,
	.post h1.title a {
		font-size: 18px;
		letter-spacing: 0;
	}
}

/* Lightweight image lightbox */
#petes-lightbox.petes-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 2147483000;
	background: rgba(0, 0, 0, 0.9);
	display: none !important;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.petes-lightbox-image {
	max-width: 96vw;
	max-height: 88vh;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
	border-radius: 4px;
}

.petes-lightbox-close {
	position: absolute;
	top: 10px;
	right: 16px;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 42px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.petes-lightbox-prev,
.petes-lightbox-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.35);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.35);
	width: 42px;
	height: 42px;
	border-radius: 999px;
	font-size: 26px;
	line-height: 38px;
	text-align: center;
	cursor: pointer;
}

.petes-lightbox-prev { left: 16px; }
.petes-lightbox-next { right: 16px; }

.petes-lightbox-open {
	overflow: hidden;
}

#petes-lightbox[aria-hidden="false"] {
	display: flex !important;
}

.petes-lightbox-counter {
	position: absolute;
	bottom: 14px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 13px;
	background: rgba(0, 0, 0, 0.45);
	padding: 4px 10px;
	border-radius: 10px;
}

.petes-lightbox-link,
.petes-lightbox-link img {
	cursor: zoom-in;
}

/* Responsive image quality and layout */
.entry img,
.post-content img,
.gallery img,
#main img {
	max-width: 100%;
	height: auto !important;
	display: block;
}

.entry .alignleft,
.entry .alignright,
.entry .aligncenter {
	max-width: 100%;
}

.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.entry .gallery .gallery-item {
	margin: 0;
}

.entry .gallery .gallery-item img {
	width: auto;
	max-width: 100%;
	height: auto;
}

@media (max-width: 768px) {
	.alignleft,
	.alignright,
	.entry .alignleft,
	.entry .alignright {
		float: none !important;
		margin: 8px auto !important;
	}

	.entry img {
		margin-left: auto;
		margin-right: auto;
	}
}

/* Responsive embedded videos */
.petes-video {
	position: relative;
	padding-top: 56.25%;
	height: 0;
	overflow: hidden;
	margin: 12px 0 16px;
	background: #000;
	border-radius: 6px;
}

.petes-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}
