/*
Theme Name: WPTG AI
Theme URI: https://azure-antelope-138862.hostingersite.com/
Author: Top4 / White Pearl Technology Group
Author URI: https://azure-antelope-138862.hostingersite.com/
Description: Custom theme for White Pearl Technology Group (WPTG AI) — a faithful conversion of the WPTG static template into a WordPress theme. Dark Nordic design, DM Sans / JetBrains Mono.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wptg-ai
*/

/*
 * The bulk of the visual styling lives inline in each page part (parts/*.html),
 * carried over verbatim from the original template so pages render pixel-faithfully.
 * This stylesheet only holds theme-level glue and admin-bar fixes.
 */

/* Language switcher — click to open (.is-open toggled by theme.js). */
.header__lang {
	position: relative;
	display: inline-block;
	font-family: inherit;
}

/* Button styling */
.header__lang-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	padding: 8px 12px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	transition: background-color 0.2s ease;
}

.header__lang-toggle:hover {
	background-color: #070c1e;
}

/* Chevron animation */
.header__lang-toggle .chevron {
	width: 12px;
	height: 12px;
	transition: transform 0.3s ease;
}

/* Rotate chevron when the menu is open */
.header__lang.is-open .chevron {
	transform: rotate(180deg);
}

/* Dropdown Menu */
.header__lang-menu {
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 4px;
	background: white;
	border: 1px solid #eee;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	min-width: 80px;

	/* Hidden by default */
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.2s ease;
	z-index: 100;
}

/* Show menu when container has .is-open class */
.header__lang.is-open .header__lang-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* Menu Items */
.header__lang-opt {
	display: block;
	padding: 8px 16px;
	color: #333;
	text-decoration: none;
	font-size: 14px;
	transition: background-color 0.2s ease;
}

.header__lang-opt:hover,
.header__lang-opt:focus {
	background-color: #f5f5f5;
	outline: none;
}

/* Styling for the currently selected language */
.header__lang-opt.is-current {
	font-weight: bold;
	color: #000;
	background-color: #f9f9f9;
}

/* ============ Search overlay ============ */
.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	padding: 17vh 24px 24px;
	background:
		radial-gradient(1200px 600px at 50% -10%, rgba(61, 168, 224, 0.14), transparent 60%),
		rgba(6, 18, 34, 0.90);
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}
.search-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.search-overlay__close {
	position: absolute;
	top: 26px;
	right: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	color: rgba(255, 255, 255, 0.7);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 50%;
	cursor: pointer;
	transition: color 0.2s, background 0.2s, transform 0.2s;
}
.search-overlay__close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
	transform: rotate(90deg);
}

.search-overlay__inner {
	width: min(760px, 100%);
	transform: translateY(-18px) scale(0.98);
	opacity: 0;
	transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.4s ease;
}
.search-overlay.is-open .search-overlay__inner {
	transform: none;
	opacity: 1;
}

.search-overlay__eyebrow {
	display: block;
	margin-bottom: 18px;
	color: var(--accent, #3DA8E0);
	font-family: var(--font-mono, 'JetBrains Mono', monospace);
	font-size: 12px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.search-form__row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 6px 18px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.14);
	transition: border-color 0.25s ease;
}
.search-form__row:focus-within {
	border-bottom-color: var(--accent, #3DA8E0);
}
.search-form__icon {
	flex: none;
	color: rgba(255, 255, 255, 0.45);
	transition: color 0.25s ease;
}
.search-form__row:focus-within .search-form__icon {
	color: var(--accent, #3DA8E0);
}
.search-form__input {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: none;
	outline: none;
	color: #fff;
	font-family: inherit;
	font-size: clamp(24px, 5vw, 40px);
	font-weight: 300;
	letter-spacing: -0.01em;
}
.search-form__input::placeholder {
	color: rgba(255, 255, 255, 0.28);
}
/* Hide the native search clear/decoration for a cleaner look. */
.search-form__input::-webkit-search-decoration,
.search-form__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}
.search-form__submit {
	flex: none;
	background: var(--accent, #3DA8E0);
	color: #041018;
	border: none;
	border-radius: 8px;
	padding: 12px 22px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.2s ease;
}
.search-form__submit:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}
.search-form__hint {
	margin-top: 18px;
	color: rgba(255, 255, 255, 0.4);
	font-size: 13px;
}
.search-form__hint kbd {
	display: inline-block;
	padding: 1px 7px;
	margin: 0 2px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 5px;
	font-family: var(--font-mono, 'JetBrains Mono', monospace);
	font-size: 11px;
	color: rgba(255, 255, 255, 0.7);
}
body.search-open {
	overflow: hidden;
}

/* ============ Search results page ============ */
/* Scoped to <main> — WordPress also puts a "search-results" class on <body>. */
main.search-results {
	padding: 96px 0 110px;
	color: var(--ink-2, #C7D3E6);
}
.search-results__title {
	margin: 14px 0 40px;
	color: var(--ink, #fff);
	font-size: clamp(26px, 4vw, 40px);
	font-weight: 600;
	letter-spacing: -0.01em;
}
.search-results__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--line, rgba(255, 255, 255, 0.10));
}
.search-results__item a {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 22px 4px;
	border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.10));
	text-decoration: none;
	transition: padding-left 0.2s ease, background 0.2s ease;
}
.search-results__item a:hover {
	padding-left: 14px;
	background: rgba(255, 255, 255, 0.02);
}
.search-results__name {
	color: var(--ink, #fff);
	font-size: 19px;
	font-weight: 600;
}
.search-results__item a:hover .search-results__name {
	color: var(--accent, #3DA8E0);
}
.search-results__url {
	color: var(--ink-4, #5B6F8E);
	font-family: var(--font-mono, 'JetBrains Mono', monospace);
	font-size: 12px;
}
.search-results__empty {
	color: var(--ink-3, #8FA0BC);
	font-size: 16px;
}
.search-results__empty a {
	color: var(--accent, #3DA8E0);
}

@media (max-width: 640px) {
	.search-form__submit {
		display: none;
	}
	.search-overlay {
		padding-top: 14vh;
	}
}

/* ============ Responsive header (mobile nav) ============ */
/* Selectors are prefixed with `.header` to outrank the per-page inline styles,
   which load after this file. Below 1024px the desktop nav collapses into a
   hamburger-triggered panel. */
@media (max-width: 1024px) {
	.header .header__mobile-toggle {
		display: flex;
	}
	.header .header__nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0;
		padding: 10px 22px 22px;
		background: rgba(10, 20, 45, 0.98);
		-webkit-backdrop-filter: blur(22px);
		backdrop-filter: blur(22px);
		border-top: 1px solid var(--color-border-lt, rgba(255, 255, 255, 0.12));
		border-bottom: 1px solid var(--color-border-lt, rgba(255, 255, 255, 0.12));
		box-shadow: 0 24px 44px rgba(0, 0, 0, 0.45);
		max-height: 0;
		overflow: hidden;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-8px);
		transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, max-height 0.3s ease;
		z-index: 90;
	}
	.header .header__nav.is-open {
		max-height: calc(100vh - 120px);
		overflow-y: auto;
		opacity: 1;
		visibility: visible;
		transform: none;
	}
	.header .header__nav-link,
	.header .header__nav-tab {
		width: 100%;
		padding: 15px 2px;
		font-size: 16px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.07);
	}
	.header .header__nav-link::after {
		display: none;
	}
	.header .header__nav-item {
		width: 100%;
	}
	.header .header__nav-item > .header__nav-link {
		width: 100%;
		justify-content: space-between;
	}
	/* AI Service submenu: shown inline & expanded inside the mobile panel. */
	.header .nav-dropdown {
		position: static;
		transform: none;
		min-width: 0;
		margin: 0;
		padding: 0 0 6px 14px;
		background: transparent;
		border: none;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}
	.header .nav-dropdown::before {
		display: none;
	}
	.header .nav-dropdown__item {
		padding: 12px 2px;
		font-size: 14.5px;
	}
}

/* Keep the fixed navbar clear of the WordPress admin bar when logged in. */
body.admin-bar .util {
/* 	margin-top: 32px; */
}
@media screen and (max-width: 782px) {
	body.admin-bar .util {
/* 		margin-top: 46px; */
	}
}
