/**
 * Custom theme layer.
 * Loaded after GeneratePress core CSS — safe to edit/extend freely.
 * Goal: clean, professional, mobile-compact layout.
 *
 * @package GeneratePress
 */

/* ---------------------------------------------------------------
 * 0. Base
 * ------------------------------------------------------------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img,
iframe,
video,
embed,
object {
	max-width: 100%;
	height: auto;
}

/* ---------------------------------------------------------------
 * 1. Below-header injection zone
 * Keeps any pasted ad/script/embed fully contained so it can never
 * stretch the header, overflow the viewport, or shift the layout.
 * ------------------------------------------------------------- */
.below-header-inject {
	width: 100%;
	max-width: 100%;
	overflow: hidden;
	background: #fafafa;
}

.below-header-inject:empty,
.below-header-inject .inside-below-header-inject:empty {
	display: none;
}

.below-header-inject .inside-below-header-inject {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0;
	text-align: center;
}

.below-header-inject .inside-below-header-inject > * {
	max-width: 100%;
}

.below-header-inject iframe,
.below-header-inject ins,
.below-header-inject img {
	max-width: 100% !important;
	width: auto;
	height: auto;
}

/* ---------------------------------------------------------------
 * 2. Header — compact, professional, no more tall stacked mobile bar
 * ------------------------------------------------------------- */
.site-header {
	background: #fff;
}

.inside-header {
	padding-top: 14px;
	padding-bottom: 14px;
}

.main-title {
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
}

.site-description {
	font-size: 0.85rem;
	color: #767676;
}

/* Compact, professional menu button — replaces GP's default
   full-width, 60px-tall, text-heavy toggle bar. */
button.menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-grow: 0;
	width: 42px;
	height: 42px;
	padding: 0;
	margin: 0;
	line-height: 1;
	background-color: #f5f5f5;
	border: 1px solid #e4e4e4;
	border-radius: 8px;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

button.menu-toggle:hover,
button.menu-toggle:active,
button.menu-toggle:focus {
	background-color: #ececec;
	border-color: #d8d8d8;
}

.menu-toggle .gp-icon {
	width: 18px;
	height: 18px;
}

/* Hide the "Menu" text label visually — icon-only reads cleaner and
   compact, but keep it available to screen readers. */
.menu-toggle .mobile-menu {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 768px) {
	.inside-header {
		padding-top: 10px;
		padding-bottom: 10px;
		flex-direction: row;
		flex-wrap: nowrap;
		text-align: left;
		justify-content: space-between;
		align-items: center;
	}

	.site-branding-container {
		flex-shrink: 1;
		min-width: 0;
	}

	.main-title {
		font-size: 1.1rem;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.site-description {
		display: none;
	}

	.site-header .header-widget {
		margin: 0 0 0 8px;
	}

	button.menu-toggle {
		width: 38px;
		height: 38px;
	}
}

/* Contain the mobile flyout menu so it looks like a clean dropdown
   panel, not a raw stacked list. */
@media (max-width: 768px) {
	.main-navigation.toggled .main-nav {
		background: #fff;
		border-top: 1px solid #ececec;
		box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
	}
}

/* ---------------------------------------------------------------
 * 3. Index / archive loop — clean compact cards
 * ------------------------------------------------------------- */
.content-grid {
	display: block;
}

.content-grid article {
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 8px;
	margin-bottom: 20px;
	padding: 0;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.content-grid article:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
	transform: translateY(-1px);
}

.content-grid article .inside-article {
	padding: 18px 20px 20px;
}

.content-grid .entry-title {
	font-size: 1.2rem;
	line-height: 1.35;
	margin-bottom: 6px;
}

.content-grid .entry-meta {
	font-size: 0.8rem;
	color: #767676;
	margin-bottom: 10px;
}

.content-grid .entry-summary,
.content-grid .entry-content {
	font-size: 0.95rem;
	line-height: 1.6;
	color: #333;
}

@media (max-width: 768px) {
	.content-grid article .inside-article {
		padding: 14px 16px 16px;
	}

	.content-grid .entry-title {
		font-size: 1.05rem;
	}
}

/* ---------------------------------------------------------------
 * 4. Single post page — readable, professional typography
 * ------------------------------------------------------------- */
.single-post-wrap .inside-article {
	max-width: 760px;
	margin: 0 auto;
	padding: 24px 20px 40px;
}

.single-post-wrap .entry-header {
	max-width: 760px;
	margin: 0 auto;
	padding: 28px 20px 12px;
	text-align: left;
}

.single-post-wrap .entry-title {
	font-size: 1.9rem;
	line-height: 1.25;
	font-weight: 700;
	margin-bottom: 10px;
}

.single-post-wrap .entry-meta {
	font-size: 0.82rem;
	color: #767676;
}

.single-post-wrap .entry-content {
	font-size: 1.05rem;
	line-height: 1.75;
	color: #2a2a2a;
}

.single-post-wrap .entry-content p {
	margin-bottom: 1.2em;
}

.single-post-wrap .entry-content img {
	border-radius: 6px;
	margin: 1.2em 0;
}

.single-post-wrap .entry-content h2,
.single-post-wrap .entry-content h3 {
	margin-top: 1.6em;
	margin-bottom: 0.6em;
}

@media (max-width: 768px) {
	.single-post-wrap .entry-header,
	.single-post-wrap .inside-article {
		padding-left: 16px;
		padding-right: 16px;
	}

	.single-post-wrap .entry-title {
		font-size: 1.4rem;
	}

	.single-post-wrap .entry-content {
		font-size: 1rem;
		line-height: 1.65;
	}
}
