/* Site header, sticky bar, mobile bar, mobile drawer, and search overlay. */

/* Social icons (topbar & footer) */
.socials { display: flex; flex-wrap: wrap; align-items: center; }
.socials__link { display: inline-flex; padding: 2px; color: #000; font-size: 14px; line-height: 1; }
.socials__link:hover { color: var(--c-accent); }

/* Topbar & main banner */
.site-header { background: #fff; }
.topbar { height: 30px; }
.topbar .container { display: flex; justify-content: flex-end; align-items: center; height: 100%; }
.topbar .socials__link { margin-right: 20px; }
.header-main { padding-bottom: 8px; }
.site-banner { width: 100%; height: auto; }

/* Navigation shell */
.navigation-shell {
	position: sticky;
	top: 0;
	z-index: 900;
	background: #fff;
	border-top: 1px solid #f1f5f9;
	border-bottom: 2px solid #e2e8f0;
	transition: box-shadow 0.2s ease;
}
body.is-sticky .navigation-shell {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.navigation-inner {
	display: flex;
	align-items: center;
	min-height: 50px;
}
.navigation-brand {
	display: none;
	align-items: center;
	gap: 8px;
	flex: none;
	margin-right: 14px;
	color: var(--c-navy);
	font-family: var(--f-ui);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.navigation-brand img { width: 28px; height: 32px; }
body.is-sticky .navigation-brand { display: inline-flex; }

/* Main nav items */
.main-nav {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
}
.main-nav .menu,
.main-nav .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}
.main-nav > .menu {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-wrap: nowrap;
}
.main-nav .menu > li {
	position: relative;
}
.main-nav .menu > li > a {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	color: #1e293b;
	font-family: var(--f-ui);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 20px;
	text-decoration: none;
	border-radius: 5px;
	white-space: nowrap;
	transition: color 0.15s ease, background 0.15s ease;
}
.main-nav .menu > li:hover > a,
.main-nav .menu > li:focus-within > a {
	color: #166534;
	background: #f1f5f9;
}
.main-nav .menu > .current-menu-item > a,
.main-nav .menu > .current-menu-ancestor > a {
	color: #166534;
	font-weight: 700;
	background: #f0fdf4;
}

/* SVG chevrons on desktop */
.main-nav .menu-item-has-children > a::after {
	content: '';
	display: inline-block;
	width: 8px;
	height: 5px;
	margin-left: 6px;
	vertical-align: middle;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
	transition: transform 0.2s ease;
	opacity: 0.65;
}
.main-nav .menu > li.menu-item-has-children:hover > a::after,
.main-nav .menu > li.menu-item-has-children:focus-within > a::after {
	transform: rotate(180deg);
	opacity: 1;
}

/* Pendaftaran CTA button */
.main-nav .menu > li.menu-enrollment {
	margin-left: 6px;
}
.main-nav .menu > li.menu-enrollment > a {
	background: #166534;
	color: #ffffff !important;
	padding: 6px 14px;
	border-radius: 5px;
	font-weight: 700;
	font-size: 13px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
	transition: background 0.15s ease;
}
.main-nav .menu > li.menu-enrollment:hover > a,
.main-nav .menu > li.menu-enrollment:focus-within > a {
	background: #14532d;
	color: #ffffff !important;
}
.main-nav .menu > li.menu-enrollment > a::after {
	background-color: #ffffff;
	opacity: 0.9;
}

/* Search button */
.navigation-search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	margin-left: auto;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #334155;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}
.navigation-search:hover {
	background: #f1f5f9;
	color: var(--c-navy);
}
.navigation-search svg { width: 19px; height: 19px; }

/* Clean vertical dropdown menus */
.main-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 100;
	display: none;
	min-width: 200px;
	padding: 6px 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}
.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu {
	display: block;
}
.main-nav .sub-menu li {
	position: relative;
}
.main-nav .sub-menu a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 16px;
	color: #1e293b;
	font-family: var(--f-ui);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.12s ease, color 0.12s ease;
}
.main-nav .sub-menu a:hover,
.main-nav .sub-menu li:focus-within > a {
	background: #f8fafc;
	color: #166534;
	font-weight: 600;
}

/* Mega menu for Profil */
.main-nav .menu-mega { position: relative; }
.main-nav .menu-mega > .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	width: 680px;
	display: none;
	grid-template-columns: 200px 1.15fr 1.15fr;
	padding: 0;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-top: 3px solid #166534;
	border-radius: 0 0 10px 10px;
	box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.12), 0 0 1px rgba(0, 0, 0, 0.05);
	overflow: hidden;
}
.main-nav .menu-mega:hover > .sub-menu,
.main-nav .menu-mega:focus-within > .sub-menu {
	display: grid;
}
.main-nav .menu-mega > .sub-menu > #menu-item-5319 {
	background: #f8fafc;
	border-right: 1px solid #f1f5f9;
	padding: 22px 18px;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
}
.main-nav .menu-mega > .sub-menu > #menu-item-5319::before {
	content: 'TENTANG PONDOK\A Lembaga pendidikan Islam integral di Simo, Boyolali.';
	white-space: pre-wrap;
	font-family: var(--f-ui);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #166534;
	line-height: 1.6;
	margin-bottom: 12px;
}
.main-nav .menu-mega > .sub-menu > #menu-item-5319 > a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 10px 12px;
	font-weight: 700;
	font-size: 13px;
	color: #0f172a;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.15s, color 0.15s;
}
.main-nav .menu-mega > .sub-menu > #menu-item-5319 > a:hover {
	border-color: #166534;
	color: #166534;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8337 {
	padding: 18px 16px 20px;
	border-right: 1px solid #f1f5f9;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8337 > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #166534;
	padding: 0 6px 8px;
	border-bottom: 1px solid #e2e8f0;
	margin-bottom: 6px;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8337 > a::after {
	content: '→';
	-webkit-mask: none;
	mask: none;
	background: none;
	width: auto;
	height: auto;
	font-size: 14px;
	opacity: 0.7;
	transform: none !important;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8337 > .sub-menu {
	display: block !important;
	position: static;
	min-width: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8337 > .sub-menu a {
	display: block;
	padding: 6px 8px;
	font-size: 13px;
	font-weight: 500;
	color: #334155;
	border-radius: 4px;
	transition: background 0.12s, color 0.12s;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8337 > .sub-menu a:hover {
	background: #f1f5f9;
	color: #0f172a;
	font-weight: 600;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8316 {
	padding: 18px 16px 20px;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8316 > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: #166534;
	padding: 0 6px 8px;
	border-bottom: 1px solid #e2e8f0;
	margin-bottom: 6px;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8316 > a::after {
	content: '→';
	-webkit-mask: none;
	mask: none;
	background: none;
	width: auto;
	height: auto;
	font-size: 14px;
	opacity: 0.7;
	transform: none !important;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8316 > .sub-menu {
	display: block !important;
	position: static;
	min-width: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8316 > .sub-menu a {
	display: block;
	padding: 6px 8px;
	font-size: 13px;
	font-weight: 500;
	color: #334155;
	border-radius: 4px;
	line-height: 1.4;
	white-space: normal;
	transition: background 0.12s, color 0.12s;
}
.main-nav .menu-mega > .sub-menu > #menu-item-8316 > .sub-menu a:hover {
	background: #f1f5f9;
	color: #0f172a;
	font-weight: 600;
}
/* Nested flyout (second level) */
.main-nav .sub-menu .sub-menu {
	top: -6px;
	left: 100%;
	margin-left: 2px;
}
.main-nav .sub-menu .menu-item-has-children > a::after {
	width: 5px;
	height: 8px;
	margin-left: auto;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 10'%3E%3Cpath d='M1 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
	transition: none;
	transform: none;
}

/* Right alignment for dropdowns near edge */
.main-nav .menu > li:last-child > .sub-menu,
.main-nav .menu > li:nth-last-child(2) > .sub-menu {
	left: auto;
	right: 0;
}
.main-nav .menu > li:last-child .sub-menu .sub-menu,
.main-nav .menu > li:nth-last-child(2) .sub-menu .sub-menu {
	left: auto;
	right: 100%;
	margin-left: 0;
	margin-right: 2px;
}

/* Mobile bar (under 1100px) */
.mobile-bar {
	display: none;
	position: sticky;
	top: 0;
	z-index: 800;
	height: 56px;
	grid-template-columns: 44px minmax(0, 1fr) 44px;
	align-items: center;
	padding-inline: 8px;
	background: #fff;
	box-shadow: var(--shadow-row);
}
.mobile-bar__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 0;
	background: none;
	color: var(--c-navy);
	font-size: 24px;
	cursor: pointer;
}
.mobile-bar__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	white-space: nowrap;
	color: var(--c-navy);
	font: 700 16px var(--f-ui);
	text-decoration: none;
}
.mobile-bar__logo img { width: 28px; height: 32px; }

/* Native mobile drawer dialog */
.mobile-menu:not([open]),
.search-overlay:not([open]) {
	display: none;
}
.mobile-menu,
.search-overlay {
	border: 0;
	color: var(--c-navy);
	padding: 0;
}
.mobile-menu::backdrop,
.search-overlay::backdrop {
	background: rgba(16, 45, 37, 0.45);
}
.mobile-menu {
	position: fixed;
	inset: 0 auto 0 0;
	margin: 0;
	width: min(340px, 90vw);
	max-width: 90vw;
	height: 100dvh;
	max-height: 100dvh;
	background: #fff;
	overflow: auto;
}
.mobile-menu__panel {
	padding: 16px 18px 30px;
	font-family: var(--f-ui);
}
.mobile-menu__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 16px;
}
.mobile-menu__brand {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--c-navy);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: none;
}
.mobile-menu__brand img { width: 28px; height: 32px; }
.mobile-menu__close,
.search-overlay__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 0;
	background: none;
	color: #64748b;
	font-size: 20px;
	cursor: pointer;
}
.mobile-menu__admission {
	padding: 14px;
	background: #f0fdf4;
	border: 1px solid #dcfce7;
	border-radius: 6px;
	margin-block: 16px;
}
.mobile-menu__admission small {
	font-size: 9px;
	letter-spacing: 0.08em;
	color: #166534;
	font-weight: 700;
}
.mobile-menu__admission strong {
	display: block;
	font-size: 15px;
	color: #0f172a;
	margin: 4px 0 10px;
}
.mobile-menu__admission div { display: flex; gap: 8px; }
.mobile-menu__admission a {
	padding: 8px 12px;
	background: #166534;
	color: #fff !important;
	font-size: 12px;
	font-weight: 600;
	border-radius: 4px;
	text-decoration: none;
}

/* Mobile accordion links */
.mobile-menu .menu,
.mobile-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}
.mobile-menu li { position: relative; }
.mobile-menu .menu a {
	display: block;
	padding: 12px 44px 12px 0;
	border-bottom: 1px solid #f1f5f9;
	color: #1e293b;
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	text-decoration: none;
}
.mobile-menu .sub-menu {
	display: none;
	margin-left: 12px;
	padding-left: 10px;
	border-left: 2px solid #e2e8f0;
}
.mobile-menu li.is-open > .sub-menu { display: block; }
.mobile-menu .sub-menu a {
	font-size: 13px;
	font-weight: 400;
	color: #475569;
}
.submenu-toggle {
	position: absolute;
	right: 0;
	top: 2px;
	width: 40px;
	height: 40px;
	background: none;
	border: 0;
	color: #64748b;
	cursor: pointer;
}
.submenu-toggle::before { content: '+'; font-size: 20px; font-weight: 600; }
.submenu-toggle[aria-expanded="true"]::before { content: '−'; }
.mobile-menu .current-menu-item > a,
.mobile-menu .current-menu-ancestor > a {
	color: #166534;
	font-weight: 700;
}

/* Search overlay dialog */
body.menu-open,
body.search-open {
	overflow: hidden;
}
.search-overlay {
	width: min(600px, 92vw);
	max-width: 92vw;
	margin: 12vh auto;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.16);
}
.search-overlay__panel {
	position: relative;
	padding: 48px 24px 28px;
}
.search-overlay__close {
	position: absolute;
	right: 8px;
	top: 8px;
}
.search-form {
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 540px;
	margin: auto;
}
.search-form__input {
	flex: 1;
	min-width: 0;
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 5px;
	color: #0f172a;
	font: 15px var(--f-ui);
	background: #fff;
}
.search-form__submit {
	min-height: 40px;
	padding: 8px 16px;
	border: 0;
	border-radius: 5px;
	background: #166534;
	color: #fff;
	font: 700 13px var(--f-ui);
	cursor: pointer;
}
.search-form__input:focus-visible {
	outline: 2px solid #166534;
	outline-offset: 1px;
}

body.admin-bar .navigation-shell,
body.admin-bar .mobile-bar {
	top: 32px;
}

/* Breakpoint for mobile bar */
@media (max-width: 1099px) {
	.site-header, .navigation-shell { display: none; }
	.mobile-bar { display: grid; }
	body.admin-bar .mobile-bar { top: 32px; }
}
@media (max-width: 782px) {
	body.admin-bar .mobile-bar { top: 46px; }
}
@media (max-width: 600px) {
	body.admin-bar .mobile-bar { top: 0; }
}
@media (max-width: 350px) {
	.mobile-bar__logo { font-size: 14px; gap: 4px; }
	.mobile-menu__panel { padding-inline: 12px; }
	.mobile-menu__brand { font-size: 12px; }
}
