/* Blog Writer front-end styles by Antheon.
   Post layout, author byline, social sharing, image alignment, and
   mobile responsiveness. Tuned to the Optimum EP theme. */

/* =========================================================
   Post layout: featured photo, title block, separator, body
   ========================================================= */
.bw-article {
	--bw-accent: #33aad3;
	max-width: 860px;
	margin: 0 auto;
	padding: 6px 24px 8px;
	box-sizing: border-box;
}
/* The fixed-nav clearance is handled by an inline spacer in the template
   (.bw-nav-spacer), so it works even if a cached stylesheet is served. */

.bw-top-featured { margin: 0 0 28px; }
.bw-top-featured img,
.bw-feat-img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 18px;
}

.bw-post-head {
	text-align: center;
	max-width: 760px;
	margin: 0 auto;
}
.bw-post-title {
	font-family: 'Outfit', 'Inter', sans-serif;
	font-weight: 800;
	font-size: 38px;
	line-height: 1.15;
	color: #1a1a1a;
	margin: 0;
}
.bw-post-date {
	font-family: 'Inter', sans-serif;
	color: #717171;
	font-size: 15px;
	margin: 10px 0 0;
}

/* Category + author meta (light background under the photo). */
.bw-post-meta {
	display: flex;
	gap: 8px 16px;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
	margin-top: 10px;
	font-family: 'Inter', sans-serif;
}
.bw-pm-cat {
	color: var(--bw-accent, #33aad3);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: 12.5px;
	margin-right: 4px;
}
.bw-pm-by {
	color: #4a4a4a;
	font-size: 14px;
}

/* Separator between the title block and the content. */
.bw-sep {
	display: flex;
	align-items: center;
	max-width: 760px;
	margin: 26px auto 4px;
}
.bw-sep::before,
.bw-sep::after {
	content: "";
	flex: 1;
	height: 1px;
	background: #e3e7ea;
}
.bw-sep span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--bw-accent, #33aad3);
	margin: 0 14px;
}

/* Content column. */
.bw-post-content {
	max-width: 760px;
	margin: 0 auto;
	padding: 16px 0 26px;
	box-sizing: border-box;
}
.bw-comments-wrap {
	max-width: 760px;
	margin: 0 auto 50px;
	padding: 0 24px;
	box-sizing: border-box;
}

/* =========================================================
   Responsive media + safe wrapping (new and existing posts)
   ========================================================= */
.optimum-post-content img,
.optimum-post-content video,
.optimum-post-content iframe,
.bw-post-content img,
.bw-post-content video,
.bw-post-content iframe,
.single .entry-content img,
.single .entry-content video,
.single .entry-content iframe {
	max-width: 100%;
	height: auto;
}
.bw-post-content img,
.optimum-post-content img { display: block; }

.optimum-post-content iframe,
.bw-post-content iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
}

/* Wide elements stay inside the screen on mobile. */
.bw-post-content table,
.optimum-post-content table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
}
.bw-post-content pre,
.optimum-post-content pre {
	max-width: 100%;
	overflow-x: auto;
	white-space: pre-wrap;
}
.bw-post-content,
.optimum-post-content {
	overflow-wrap: break-word;
	word-wrap: break-word;
	word-break: break-word;
}
.bw-post-content > * { max-width: 100%; }

/* =========================================================
   Image alignment (matches the editor toolbar choices)
   ========================================================= */
.bw-post-content .aligncenter,
.bw-post-content img.aligncenter,
.optimum-post-content .aligncenter,
.optimum-post-content img.aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}
.bw-post-content .alignleft,
.optimum-post-content .alignleft {
	float: left;
	margin: .3em 1.4em 1em 0;
}
.bw-post-content .alignright,
.optimum-post-content .alignright {
	float: right;
	margin: .3em 0 1em 1.4em;
}
.bw-post-content .alignnone,
.optimum-post-content .alignnone { margin: .3em 0 1em; }
/* Center text-aligned paragraphs centre their inline images too. */
.bw-post-content p[style*="text-align: center"] img,
.bw-post-content p[style*="text-align:center"] img {
	margin-left: auto;
	margin-right: auto;
}
/* On phones, floated images go full width so they never crowd the text. */
@media screen and (max-width: 600px) {
	.bw-post-content .alignleft,
	.bw-post-content .alignright,
	.optimum-post-content .alignleft,
	.optimum-post-content .alignright {
		float: none;
		display: block;
		margin: 1em auto;
	}
}

/* =========================================================
   Author byline
   ========================================================= */
.bw-byline {
	--bw-accent: #33aad3;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 36px 0 8px;
	padding: 20px 22px;
	border: 1px solid #eaeaea;
	border-radius: 16px;
	background: #f5f7f9;
}
.bw-byline-avatar {
	flex: 0 0 auto;
	width: 66px;
	height: 66px;
	border-radius: 50%;
	overflow: hidden;
	background: #e8eef1;
	box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgba(51, 170, 211, .35);
}
.bw-byline-team .bw-byline-avatar { background: #0e1116; }
/* Keep the avatar a filled circle (overrides the blanket image rule above). */
.bw-post-content .bw-byline-avatar img,
.optimum-post-content .bw-byline-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.bw-byline-text { display: flex; flex-direction: column; line-height: 1.35; }
.bw-byline-label {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bw-accent);
	font-weight: 700;
}
.bw-byline-name {
	font-family: 'Outfit', 'Inter', sans-serif;
	font-size: 19px;
	font-weight: 700;
	color: #1a1a1a;
	margin-top: 2px;
}
.bw-byline-role {
	font-family: 'Inter', sans-serif;
	font-size: 13.5px;
	color: #717171;
	margin-top: 1px;
}

/* =========================================================
   Social share bar
   ========================================================= */
.bw-share {
	--bw-accent: #33aad3;
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	margin: 18px 0 8px;
	padding: 4px 0;
}
.bw-share-label {
	font-family: 'Inter', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #717171;
	margin-right: 4px;
}
.bw-share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.bw-share-btn {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	background: #555;
	transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
	padding: 0;
}
.bw-share-btn svg { width: 20px; height: 20px; fill: currentColor; }
.bw-share-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(0,0,0,.18); filter: brightness(1.05); }
.bw-share-btn:focus-visible { outline: 3px solid rgba(51,170,211,.5); outline-offset: 2px; }
.bw-sh-facebook  { background: #1877F2; }
.bw-sh-instagram { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 70%, #285AEB 100%); }
.bw-sh-tiktok    { background: #111111; }
.bw-sh-reddit    { background: #FF4500; }
.bw-sh-copy      { background: #5b6470; }
.bw-share-toast {
	font-family: 'Inter', sans-serif;
	font-size: 13px;
	color: #1a7a43;
	background: #e6f6ec;
	border-radius: 999px;
	padding: 5px 12px;
	opacity: 0;
	transition: opacity .25s ease;
}
.bw-share-toast.is-on { opacity: 1; }

/* =========================================================
   Small screens
   ========================================================= */
@media screen and (max-width: 600px) {
	.bw-article { padding-left: 18px; padding-right: 18px; }
	.bw-post-title { font-size: 28px; }
	.bw-byline { gap: 12px; padding: 16px; }
	.bw-byline-avatar { width: 56px; height: 56px; }
	.bw-byline-name { font-size: 17px; }
	.bw-share-btn { width: 38px; height: 38px; }
	.bw-share-btn svg { width: 18px; height: 18px; }
}
