/**
 * Primary navigation – mobile slide menu (shared across headers)
 *
 * @package PetiFoodBlog
 */

/* Hamburger toggle (mobile only) */
.petifood-menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: none;
	border-radius: 0.75rem;
	background: transparent;
	color: #4b5563;
	cursor: pointer;
	flex-shrink: 0;
	transition: color 0.2s, background 0.2s;
}

.petifood-menu-toggle:hover,
.petifood-menu-toggle:focus-visible {
	color: var(--petti-primary, #6ee619);
	background: rgba(110, 230, 25, 0.1);
	outline: none;
}

.petifood-menu-toggle-icon {
	width: 1.5rem;
	height: 1.5rem;
}

.petti-home.dark .petifood-menu-toggle,
.single-post-wrap.dark-mode .petifood-menu-toggle {
	color: #d1d5db;
}

@media (min-width: 768px) {
	.petifood-menu-toggle {
		display: none;
	}
}

/* Current menu item (WordPress classes) */
.petti-nav .current-menu-item > a,
.petti-nav .current_page_item > a,
.single-post-nav .current-menu-item > a,
.single-post-nav .current_page_item > a,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
	color: var(--petti-primary, var(--primary, #6ee619));
}

/* Mobile slide panel (appended to body via JS to escape header stacking context) */
.petifood-mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 999999;
	visibility: hidden;
	pointer-events: none;
}

.petifood-mobile-nav.is-open {
	visibility: visible;
	pointer-events: auto;
}

.petifood-mobile-nav-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: rgba(15, 23, 42, 0.55);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.petifood-mobile-nav.is-open .petifood-mobile-nav-overlay {
	opacity: 1;
}

.petifood-mobile-nav-panel {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	width: min(320px, 88vw);
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #fff;
	box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.petifood-mobile-nav.is-open .petifood-mobile-nav-panel {
	transform: translateX(0);
}

.petti-home.dark .petifood-mobile-nav-panel,
.single-post-wrap.dark-mode .petifood-mobile-nav-panel {
	background: #182111;
	box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
}

.petifood-mobile-nav-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #f3f4f6;
}

.petti-home.dark .petifood-mobile-nav-header,
.single-post-wrap.dark-mode .petifood-mobile-nav-header {
	border-color: #1f2937;
}

.petifood-mobile-nav-title {
	font-size: 1rem;
	font-weight: 700;
	color: #111827;
}

.petti-home.dark .petifood-mobile-nav-title,
.single-post-wrap.dark-mode .petifood-mobile-nav-title {
	color: #f3f4f6;
}

.petifood-mobile-nav-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: none;
	border-radius: 0.5rem;
	background: transparent;
	color: #4b5563;
	cursor: pointer;
	transition: color 0.2s, background 0.2s;
}

.petifood-mobile-nav-close:hover,
.petifood-mobile-nav-close:focus-visible {
	color: var(--petti-primary, #6ee619);
	background: rgba(110, 230, 25, 0.1);
	outline: none;
}

.petti-home.dark .petifood-mobile-nav-close,
.single-post-wrap.dark-mode .petifood-mobile-nav-close {
	color: #d1d5db;
}

.petifood-mobile-nav-close-icon {
	width: 1.25rem;
	height: 1.25rem;
}

.petifood-mobile-nav-inner {
	flex: 1;
	overflow-y: auto;
	padding: 0.75rem 0;
}

.petifood-mobile-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.petifood-mobile-nav-list > li {
	margin: 0;
	border-bottom: 1px solid #f3f4f6;
}

.petti-home.dark .petifood-mobile-nav-list > li,
.single-post-wrap.dark-mode .petifood-mobile-nav-list > li {
	border-color: #1f2937;
}

.petifood-mobile-nav-list > li:last-child {
	border-bottom: none;
}

.petifood-mobile-nav-list a {
	display: block;
	padding: 0.875rem 1.25rem;
	font-size: 0.9375rem;
	font-weight: 500;
	color: #374151;
	text-decoration: none;
	transition: color 0.2s, background 0.2s;
}

.petti-home.dark .petifood-mobile-nav-list a,
.single-post-wrap.dark-mode .petifood-mobile-nav-list a {
	color: #e5e7eb;
}

.petifood-mobile-nav-list a:hover,
.petifood-mobile-nav-list .current-menu-item > a,
.petifood-mobile-nav-list .current_page_item > a {
	color: var(--petti-primary, #6ee619);
	background: rgba(110, 230, 25, 0.08);
}

.petifood-mobile-nav-list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0 0 0.5rem;
	background: rgba(0, 0, 0, 0.02);
}

.petti-home.dark .petifood-mobile-nav-list .sub-menu,
.single-post-wrap.dark-mode .petifood-mobile-nav-list .sub-menu {
	background: rgba(255, 255, 255, 0.03);
}

.petifood-mobile-nav-list .sub-menu a {
	padding-right: 2rem;
	font-size: 0.875rem;
	font-weight: 400;
}

body.petifood-nav-open {
	overflow: hidden;
}

body.petifood-nav-open .petti-header,
body.petifood-nav-open .single-post-header,
body.petifood-nav-open .site-header {
	z-index: 999998;
}

/* Default header layout adjustments */
.site-header .header-inner {
	position: relative;
}

.site-header .header-nav-wrap {
	flex: 1;
	display: none;
}

@media (min-width: 768px) {
	.site-header .header-nav-wrap {
		display: block;
	}
}

@media (max-width: 767px) {
	.site-header .header-nav-wrap {
		display: none;
	}
}
