/*--- UTILITY CLASSES ---*/

.m__icon {
	fill: currentColor;
	display: inline-block;
	height: 1em;
	position: relative;
	stroke: currentColor;
	vertical-align: text-top;
	width: 1em;
}

.m__icon-eye {
	top: 1px;
}

.m__post-date {
	display: inline-block;
}

.m__post-date + .m__post-views {
	margin-left: 12px;
}

.m__post-views {
	display: inline-block;
}

.m__post-date .m__icon, .m__post-views .m__icon {
	margin-right: 4px;
}

/*--- BLOG LIST (index) ---*/

.m__blog-list-item {}

.m__blog-list-item + .m__blog-list-item {
	margin-top: 60px;
}

.m__blog-list-item--body {}

.m__blog-list-item--body--with-image {
	display: flex;
	flex-direction: row;
	gap: 32px;
	justify-content: flex-start;
}

.m__blog-list-item--image {
	aspect-ratio: 1/1;
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: relative;
}

.m__blog-list-item--image img {
	display: block;
	height: 100%;
	margin: 0;
	object-fit: cover;
	padding: 0;
	width: 100%;
}

.m__blog-list-item--link {}

.m__blog-list-item--content {}

@media (max-width: 767.98px) {
	.m__blog-list-item--body--with-image {
		align-items: stretch;
		flex-direction: column;
	}

	.m__blog-list-item--image {
		aspect-ratio: 3/2;
	}
}

@media (min-width: 768px) {
	.m__blog-list-item--body--with-image {
		align-items: center;
		flex-direction: row;
	}

	.m__blog-list-item--image {
		aspect-ratio: 1 / 1;
	}
}

/*--- BLOG POST (SINGLE) ---*/

.m__blog-post {}

.m__blog-post--body {}

.m__blog-post--body--with-image {
}

.m__blog-post--image {
	aspect-ratio: 1/1;
	border-radius: 8px;
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: relative;
}

.m__blog-post--image img {
	display: block;
	height: 100%;
	margin: 0;
	object-fit: cover;
	padding: 0;
	width: 100%;
}

@media (max-width: 767.98px) {
	.m__blog-post--body--with-image {
		align-items: stretch;
		display: flex;
		flex-direction: column;
		gap: 32px;
		justify-content: flex-start;
	}

	.m__blog-post--image {
		aspect-ratio: 3/2;
		margin-left: auto;
		margin-right: auto;
		max-width: 80%;
	}
}

@media (min-width: 768px) {
	.m__blog-post--body--with-image {
	}

	.m__blog-post--image {
		aspect-ratio: 1 / 1;
		float: right;
		margin-bottom: 30px;
		margin-left: 30px;
		max-width: 33%;
		order: 2;
	}
}




/*--- VIDEO PLAYER ---*/

/* Fix for WordPress figure margins */
.wp-block-video {
	margin: 0;
	padding: 0;
}

.m__video--player-container {
	position: relative;
	width: 100%;
	background: #000;
	border-radius: 4px;
	overflow: hidden;
	margin: 2rem 0;
	line-height: 0;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

.m__video--player-container video {
	width: 100%;
	height: auto;
	display: block;
}

.m__video--shield {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: calc(100% - 50px); /* Keeps controls clickable but covers video */
	z-index: 5;
	cursor: pointer;
	background: rgba(0,0,0,0); /* Invisible but present */
}

/* Big Center Play Button for Mobile/Desktop */
.m__video--big-play {
	align-items: center;
	background: rgba(0, 0, 0, 0.6);
	border-radius: 50%;
	border: 2px solid rgba(255,255,255,0.2);
	cursor: pointer;
	display: flex;
	height: 80px;
	justify-content: center;
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	transition: opacity 0.3s ease, transform 0.2s ease;
	width: 80px;
	z-index: 6;
}

.m__video--big-play svg {
	fill: #fff;
	height: 40px;
	width: 40px;
	margin-left: 5px; /* Optical center fix */
}

.m__video--big-play svg path:nth-of-type(1) { display: block; }
.m__video--big-play svg path:nth-of-type(2) { display: none; }


/* Hide big button and controls when playing, unless hovered */
.m__video--player-container.m__video--is-playing .m__video--big-play {
	background: transparent;
	border-color: transparent;
	opacity: 0;
	pointer-events: none;
}

.m__video--player-container.m__video--is-playing .m__video--big-play svg path:nth-of-type(1) { display: none; }
.m__video--player-container.m__video--is-playing .m__video--big-play svg path:nth-of-type(2) { display: block; }

.m__video--player-container.m__video--is-playing:hover .m__video--big-play {
	opacity: 1;
	pointer-events: all;
}

.m__video--controls {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0,0,0,0.9) 80%);
	padding: 10px 15px 15px 15px;
	opacity: 1; /* Visible by default on mobile/idle */
	transition: opacity 0.3s ease-in-out;
	z-index: 10;
	line-height: 1.4;
}

.m__video--player-container.m__video--is-playing .m__video--controls {
	opacity: 0;
}

.m__video--player-container.m__video--is-playing:hover .m__video--controls {
	opacity: 1;
}

/* Progress logic */
.m__video--progress-container {
	position: relative;
	width: 100%;
	height: 4px;
	background: rgba(255,255,255,0.2);
	margin-bottom: 10px;
}

.m__video--progress-bar-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	background: #ff0000;
	width: 0;
	z-index: 1;
}

.m__video--seek-bar {
	position: absolute;
	top: -5px;
	left: 0;
	width: 100%;
	height: 14px;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
	margin: 0;
}

.m__video--control-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.m__video--left-controls, .m__video--right-controls {
	display: flex;
	align-items: center;
	gap: 15px;
}

.m__video--ctrl-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	width: 24px;
	height: 24px;
	fill: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
}

.m__video--ctrl-btn svg {
	display: block; /* Remove line-height variance */
	fill: #fff; /* Safari sometimes ignores inheritance on fill */
	height: 24px;
	width: 24px; /* Force explicit size */
}

.m__video--time-display {
	color: #fff;
	font-size: 12px;
	font-family: monospace;
}

.m__video--volume-container {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Hide volume on mobile - iOS handles volume via hardware buttons only */
@media (pointer: coarse) {
	.m__video--volume-container {
		display: none;
	}
}

.m__video--volume-slider {
	width: 50px;
	cursor: pointer;
	accent-color: #fff;
}
