/*
 Theme Name: GeneratePress Child
 Template: generatepress
 Version: 1.0
*/

/* =====================================================
   BASE RESET
   ===================================================== */
body {
	margin: 0;
	padding: 0;
}

/* =====================================================
   MOBILE: HIDE DEFAULT GP LOGO
   ===================================================== */
@media (max-width: 768px) {
	.site-header .site-logo,
	.site-header .header-image,
	.site-header .is-logo-image {
		display: none !important;
	}
}

/* =====================================================
   CUSTOM MOBILE HEADER
   ===================================================== */
.gp-mobile-header {
	display: none;
}

@media (max-width: 768px) {
	.gp-mobile-header {
		display: block;
		background: #ffffff;
		border-bottom: 1px solid #e5e7eb;
		position: sticky;
		top: 0;
		z-index: 9999;
	}

	.gp-mobile-header-inner {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 12px 16px;
	}

	.gp-mobile-logo img {
		max-height: 36px;
		width: auto;
	}

	.gp-mobile-menu-hint {
		font-size: 16px;
		font-weight: 600;
		cursor: pointer;
	}

	.menu-toggle {
		opacity: 0;
		pointer-events: none;
		height: 0;
	}
}

/* =====================================================
   TUTORIAL LAYOUT (DESKTOP)
   ===================================================== */
.tutorial-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 32px;
	align-items: flex-start;
	width: 100%;
}

/* =====================================================
   SIDEBAR (DESKTOP)
   ===================================================== */
.tutorial-sidebar {
	width: 280px;
	flex-shrink: 0;
	position: sticky;
	top: 100px;
	font-size: 14px;
	max-height: calc(100vh - 120px);
	overflow-y: auto;
}

/* =====================================================
   SIDEBAR TITLE
   ===================================================== */
.tutorial-title {
	font-weight: 600;
	margin-bottom: 16px;
	font-size: 15px;
}

/* =====================================================
   MODULE BLOCK
   ===================================================== */
.tutorial-module {
	margin-bottom: 14px;
}

/* =====================================================
   MODULE HEADER
   ===================================================== */
.module-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
}

.module-link {
	flex: 1;
	min-width: 0;
	font-weight: 600;
	text-decoration: none;
	color: inherit;
}

.module-link:hover {
	text-decoration: underline;
}

/* =====================================================
   MODULE TOGGLE (SECONDARY / LIGHT)
   ===================================================== */
.module-toggle {
	flex-shrink: 0;
	background: transparent;
	color: #16a34a;
	border: 2px solid #16a34a;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	border-radius: 3px;
}

.module-toggle:hover {
	background: rgba(22, 163, 74, 0.08);
}

/* =====================================================
   CHAPTER LIST
   ===================================================== */
.module-chapters {
	list-style: none;
	padding-left: 14px;
	margin: 6px 0 0 0;
}

.module-chapters li {
	margin-bottom: 6px;
}

.module-chapters a {
	text-decoration: none;
	color: inherit;
	font-size: 14px;
}

/* =====================================================
   ACTIVE CHAPTER
   ===================================================== */
.module-chapters li.current a {
	font-weight: 600;
	color: #16a34a;
	border-left: 3px solid #16a34a;
	padding-left: 6px;
}

/* =====================================================
   COLLAPSE BEHAVIOR
   ===================================================== */
.module-chapters.collapsed {
	display: none;
}

.module-chapters.expanded {
	display: block;
}

/* =====================================================
   CONTENT AREA
   ===================================================== */
.tutorial-content {
	min-width: 0;
	width: 100%;
}

/* =====================================================
   BREADCRUMBS ROW (ANCHOR-STABLE)
   ===================================================== */
.tutorial-breadcrumbs-row {
	position: relative;        /* anchor for + button */
	min-height: 26px;         /* lock height */
	line-height: 26px;        /* prevent reflow */
	padding-left: 36px;       /* space for + button */
	font-size: 14px;
	margin-bottom: 12px;
	color: #555;
}

/* breadcrumb spans isolated */
.tutorial-breadcrumbs-row span[itemprop="itemListElement"] {
	white-space: nowrap;
}

/* =====================================================
   MOBILE MAIN TOGGLE (PRIMARY / DARK)
   ===================================================== */
@media (max-width: 900px) {
	.tutorial-mobile-toggle {
		position: absolute;
		left: 0;
		top: 0;

		width: 26px;
		height: 26px;
		display: inline-flex;
		align-items: center;
		justify-content: center;

		font-size: 16px;
		font-weight: 700;
		line-height: 1;

		background: #16a34a;
		color: #ffffff;
		border-radius: 4px;
		cursor: pointer;
		z-index: 10;
	}
}

/* =====================================================
   MOBILE VIEW (SIDEBAR â€” NO REFLOW VERSION)
   ===================================================== */
@media (max-width: 900px) {

	.tutorial-layout {
		display: block;
	}

	/* sidebar stays in DOM â†’ no layout shift */
	.tutorial-sidebar {
		max-height: 0;
		overflow: hidden;
		visibility: hidden;
		padding: 12px 16px;
		margin-bottom: 12px;
		background: #ffffff;
		border-left: 4px solid #16a34a;
		transition: max-height 0.25s ease;
	}

	body.show-tutorial-sidebar .tutorial-sidebar {
		max-height: 100vh;
		visibility: visible;
	}

	.tutorial-content {
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* =====================================================
   FOOTER CLEANUP
   ===================================================== */
.site-info {
	display: none !important;
}
