/* Piyamin Header — Figma node 4880:26270 (top bar 37px, main bar 75px, content 1178px) */
.phd {
	--phd-accent: #0da9eb;
	--phd-top: #00a4ea;
	--phd-text: #67767c;
	position: relative; z-index: 100;
	font-family: "DB AdmanRounded X", sans-serif;
	line-height: 1.3;
}
.phd *, .phd *::before, .phd *::after { box-sizing: border-box; }
.phd ul { list-style: none; margin: 0; padding: 0; }
.phd a { text-decoration: none; }
.phd .phd-wrap { max-width: 1210px; margin: 0 auto; padding: 0 16px; }

/* top bar */
.phd .phd-top { background: var(--phd-top); color: #fff; font-size: 16px; }
.phd .phd-top-row { display: flex; align-items: center; justify-content: space-between; height: 37px; gap: 16px; }
.phd .phd-top a { color: #fff; }
.phd .phd-top a:hover, .phd .phd-top a:focus-visible { color: #fff; text-decoration: underline; }
.phd .phd-top-right { display: flex; align-items: center; gap: 22px; }
.phd .phd-inline { display: flex; align-items: center; gap: 0 6px; }
.phd .phd-top .phd-inline > li > a { white-space: pre; }
.phd .phd-lang { display: flex; align-items: center; gap: 6px; }

/* main bar */
.phd .phd-main { background: #fff; box-shadow: 0 0 5px rgba(0, 0, 0, .22); }
.phd .phd-main-row { display: flex; align-items: center; height: 75px; gap: 0 22px; }
.phd .phd-nav { flex: none; }
.phd .phd-nav .phd-inline { gap: 0 22px; }
.phd .phd-nav a { color: var(--phd-text); font-size: 20px; white-space: nowrap; }
.phd .phd-nav a:hover, .phd .phd-nav a:focus-visible,
.phd .phd-nav .current-menu-item > a, .phd .phd-nav .current-menu-ancestor > a { color: var(--phd-accent); }
.phd .phd-logo { flex: none; display: block; width: 160px; margin: 0 7px; }
.phd .phd-logo img { display: block; width: 100%; height: auto; }
.phd .phd-account { flex: none; margin-left: auto; display: flex; align-items: center; }
.phd .phd-login {
	display: inline-flex; align-items: center; justify-content: center; min-width: 99px; height: 35px; padding: 0 12px;
	border: 1px solid var(--phd-accent); border-radius: 6px; color: var(--phd-accent); font-size: 17px; white-space: nowrap;
	transition: background .2s, color .2s;
}
.phd .phd-login:hover, .phd .phd-login:focus-visible { background: var(--phd-accent); color: #fff; }

/* dropdown submenus (main + language) */
.phd .phd-dropdown > li { position: relative; }
.phd .phd-dropdown > .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 0 3px 7px;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.phd .phd-dropdown .sub-menu {
	position: absolute; top: 100%; left: -12px; z-index: 10; min-width: 220px; padding: 8px 0;
	background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.phd .phd-dropdown > li:hover > .sub-menu, .phd .phd-dropdown > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.phd .phd-dropdown .sub-menu a { display: block; padding: 8px 18px; color: var(--phd-text); font-size: 17px; white-space: nowrap; }
.phd .phd-dropdown .sub-menu a:hover, .phd .phd-dropdown .sub-menu a:focus-visible { background: #f1f9fd; color: var(--phd-accent); text-decoration: none; }
.phd .phd-nav .phd-dropdown > li { padding: 24px 0; } /* hover bridge down to the submenu */

/* account: login button vs profile (decided before paint by html.pm-auth) */
.phd .phd-profile { position: relative; display: none; }
html.pm-auth .phd .phd-login { display: none; }
html.pm-auth .phd .phd-profile { display: block; }
.phd .phd-profile-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--phd-accent); cursor: pointer; }
.phd .phd-profile-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; padding: 8px 0; background: #fff; border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.phd .phd-list a { display: block; padding: 8px 18px; color: var(--phd-text); font-size: 17px; }
.phd .phd-list a:hover, .phd .phd-list a:focus-visible { background: #f1f9fd; color: var(--phd-accent); }

/* mobile drawer */
.phd .phd-burger { display: none; flex: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; padding: 8px; border: 0; background: transparent; cursor: pointer; }
.phd .phd-burger span { display: block; height: 2px; border-radius: 2px; background: #8a979c; }
.phd .phd-drawer { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .35); }
.phd .phd-drawer[hidden] { display: none; }
.phd .phd-drawer-panel { position: absolute; inset: 0 auto 0 0; width: min(320px, 86vw); overflow-y: auto; padding: 56px 0 24px; background: #fff; box-shadow: 4px 0 24px rgba(0, 0, 0, .15); animation: phd-in .2s ease-out; }
@keyframes phd-in { from { transform: translateX(-100%); } }
.phd .phd-close { position: absolute; top: 8px; right: 10px; width: 40px; height: 40px; border: 0; background: transparent; color: #67767c; font-size: 30px; line-height: 1; cursor: pointer; }
.phd .phd-tree a { font-size: 19px; color: #30393f; }
.phd .phd-tree .sub-menu a { padding-left: 34px; font-size: 17px; color: var(--phd-text); }
.phd .phd-tree .current-menu-item > a { color: var(--phd-accent); }
.phd .phd-minor { margin-top: 10px; padding-top: 10px; border-top: 1px solid #e6eef2; }
.phd .phd-minor a { font-size: 16px; white-space: pre; }
.phd .phd-drawer-actions { display: flex; gap: 10px; padding: 18px; }
.phd .phd-drawer-actions a { flex: 1; }
.phd .phd-register { display: inline-flex; align-items: center; justify-content: center; height: 35px; border-radius: 6px; background: var(--phd-accent); color: #fff; font-size: 17px; }
html.pm-auth .phd .phd-drawer-actions { display: none; }

/* ---------- smaller desktops: shrink to keep one row ---------- */
@media (max-width: 1239px) {
	.phd .phd-main-row, .phd .phd-nav .phd-inline { gap: 0 14px; }
	.phd .phd-nav a { font-size: 17px; }
	.phd .phd-logo { width: 130px; margin: 0; }
}
@media (max-width: 1079px) {
	.phd .phd-main-row, .phd .phd-nav .phd-inline { gap: 0 10px; }
	.phd .phd-nav a { font-size: 15px; }
	.phd .phd-logo { width: 110px; }
	.phd .phd-login { min-width: 0; font-size: 15px; }
}

/* ---------- tablet & mobile: burger | logo | account ---------- */
@media (max-width: 991px) {
	.phd .phd-top { display: none; }
	.phd .phd-nav { display: none; }
	.phd .phd-burger { display: flex; }
	.phd .phd-main-row { height: 64px; justify-content: space-between; }
	.phd .phd-logo { position: absolute; left: 50%; transform: translateX(-50%); width: 110px; }
	.phd .phd-main-row { position: relative; }
	.phd .phd-account { margin-left: 0; }
	.phd .phd-account .phd-login { height: 32px; padding: 0 10px; font-size: 15px; }
}
@media (max-width: 380px) {
	.phd .phd-logo { width: 92px; }
	.phd .phd-account .phd-login { padding: 0 8px; font-size: 14px; }
}

/* theme (hello-elementor reset) paints <button> pink on hover/focus — keep ours neutral */
.phd button.phd-burger, .phd button.phd-close, .phd button.phd-profile-btn { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.phd button.phd-close { color: #67767c !important; }
.phd button.phd-profile-btn { color: var(--phd-accent) !important; }
.phd button:focus-visible { outline: 2px solid var(--phd-accent); outline-offset: 2px; }
@media (min-width: 992px) and (max-width: 1139px) {
	.phd .phd-main-row, .phd .phd-nav .phd-inline { gap: 0 10px; }
	.phd .phd-nav a { font-size: 15px; }
	.phd .phd-logo { width: 110px; }
}

/* centre [menu][logo][menu] between the edge and the login button (no lopsided gap on mid widths) */
@media (min-width: 992px) { .phd .phd-nav-left { margin-left: auto; } }
@media (min-width: 992px) and (max-width: 1139px) {
	.phd .phd-dropdown > .menu-item-has-children > a::after { width: 5px; height: 5px; margin-left: 4px; }
}
/* WP admin bar (logged-in only) wraps on mid widths and covers the top bar — keep it to one row */
@media (min-width: 783px) and (max-width: 1199px) {
	#wpadminbar #wp-admin-bar-my-account > .ab-item { font-size: 0; }
	#wpadminbar #wp-admin-bar-my-account > .ab-item img { font-size: 13px; }
	#wpadminbar .ab-top-menu > li > .ab-item > .ab-label { display: none; }
}
