/*
Theme Name: Phoenicia V6
Author: Phoenicia Team
Description: A high-performance, fully customizable theme with advanced color systems.
Version: 1.3.2
Requires at least: 6.0
Text Domain: phoenicia-v6
*/

*, *::before, *::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	line-height: 1.7;
	color: var(--ph-nav-text, #1f2937);
	background-color: var(--ph-bg, #ffffff);
	transition: background .3s, color .3s;
}

img {
	max-width: 100%;
	height: auto;
}

a {
	text-decoration: none;
	color: var(--ph-primary, #7c3aed);
}

.ph-container {
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 1rem;
}

/* --- Navbar --- */
.ph-navbar {
	width: 100%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.ph-navbar-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 68px;
	gap: 1rem;
}

.ph-logo a {
	font-size: 1.4rem;
	font-weight: 700;
	color: inherit;
}

.ph-logo img {
	max-width: var(--ph-logo-width, 180px);
	height: auto;
	display: block;
}

.ph-navbar {
	transition: background-color .3s, box-shadow .3s;
}

.ph-navbar.is-sticky {
	position: sticky;
	top: 0;
	z-index: 999;
}

.ph-navbar.is-scrolled {
	box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

.ph-nav-menu .ph-nav-ul {
	display: flex;
	gap: 1.2rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ph-nav-menu a {
	display: inline-block;
	padding: .5rem 0;
}

.ph-nav-actions {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.ph-nav-actions button {
	background: transparent;
	border: 1px solid var(--ph-nav-text, #1f2937);
	color: var(--ph-nav-text, #1f2937);
	border-radius: 6px;
	padding: .4rem .7rem;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
}

.ph-mobile-toggle {
	display: none;
}

/* --- Search panel --- */
.ph-search-panel {
	border-top: 1px solid rgba(0, 0, 0, .08);
	background: var(--ph-nav-bg, #fff);
	padding-block: 1rem;
}

.ph-search-panel .ph-search-form {
	margin: 0;
	max-width: 640px;
}

.ph-live-results {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	margin-top: .75rem;
	max-width: 640px;
}

.ph-live-results .ph-live-result {
	display: block;
	padding: .6rem .8rem;
	border-radius: 6px;
	background: rgba(0, 0, 0, .04);
	color: var(--ph-nav-text, #1f2937);
}

.ph-live-results .ph-live-result:hover {
	background: var(--ph-primary, #7c3aed);
	color: #fff;
}

.ph-live-results .ph-live-none {
	margin: .5rem 0 0;
	color: #6b7280;
	font-size: .9rem;
}

/* --- Buttons --- */
.ph-btn {
	display: inline-block;
	padding: .65rem 1.4rem;
	border-radius: 6px;
	font-weight: 600;
	cursor: pointer;
	transition: background .25s, color .25s, border-color .25s;
}

.ph-btn-primary {
	background: var(--ph-primary, #7c3aed);
	color: #fff;
	border: 1px solid var(--ph-primary, #7c3aed);
}

.ph-btn-primary:hover {
	background: var(--ph-nav-active, #5b21b6);
	color: #fff;
}

/* --- Main --- */
.ph-main {
	padding-block: 3rem;
	min-height: 60vh;
}

/* --- Articles --- */
.ph-article-title,
.ph-archive-title {
	font-size: 2rem;
	line-height: 1.25;
	color: var(--ph-nav-text, #1f2937);
	margin: 0 0 1rem;
}

.ph-article-meta {
	color: #6b7280;
	font-size: .9rem;
	margin-bottom: 1.5rem;
}

.ph-article-thumb {
	margin-bottom: 1.5rem;
	border-radius: 10px;
	overflow: hidden;
}

.ph-article-content {
	line-height: 1.9;
}

.ph-article-content h2,
.ph-article-content h3 {
	line-height: 1.3;
}

.ph-article-footer {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0, 0, 0, .08);
}

.ph-article-cats,
.ph-article-tags {
	margin: .25rem 0;
}

.ph-article-tags a,
.ph-article-cats a {
	background: rgba(0, 0, 0, .05);
	border-radius: 4px;
	padding: .15rem .55rem;
	margin-inline-end: .35rem;
	font-size: .85rem;
}

/* --- Post navigation --- */
.ph-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0, 0, 0, .08);
}

.ph-post-nav .nav-next {
	text-align: left;
}

/* --- Projects / Services hero --- */
.ph-project-hero,
.ph-service-figure {
	margin: 0 0 2rem;
	border-radius: 12px;
	overflow: hidden;
}

.ph-project-footer {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(0, 0, 0, .08);
}

/* --- Grid & Cards --- */
.ph-grid {
	display: grid;
	gap: 1.5rem;
}

.ph-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

.ph-grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

.ph-card {
	background: var(--ph-bg, #fff);
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 12px;
	overflow: hidden;
	transition: transform .25s, box-shadow .25s;
}

.ph-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
}

.ph-card-thumb {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.ph-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s;
}

.ph-card:hover .ph-card-thumb img {
	transform: scale(1.05);
}

.ph-card-body {
	padding: 1.2rem;
}

.ph-card-title {
	font-size: 1.15rem;
	margin: 0 0 .5rem;
}

.ph-card-excerpt {
	color: #6b7280;
	margin: 0 0 .75rem;
}

.ph-card-link {
	font-weight: 600;
}

.ph-card-service {
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.ph-card-service .ph-card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.ph-card-service .ph-card-link {
	margin-top: auto;
	padding-top: .5rem;
}

.ph-card-service .ph-card-link::after {
	content: "\2192";
	margin-inline-start: .35rem;
	transition: margin-inline-start .2s;
}

.ph-card-service .ph-card-link:hover::after {
	margin-inline-start: .65rem;
}

/* --- Archive header --- */
.ph-archive-header {
	margin-bottom: 2.5rem;
}

.ph-archive-desc {
	color: #6b7280;
}

/* --- List (posts / search) --- */
.ph-list-item {
	padding: 1.2rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.ph-list-item:last-child {
	border-bottom: 0;
}

.ph-list-title {
	font-size: 1.3rem;
	margin: 0 0 .4rem;
}

.ph-list-item time {
	color: #6b7280;
	font-size: .85rem;
}

.ph-list-excerpt {
	color: #4b5563;
}

/* --- Pagination --- */
.ph-pagination {
	margin-top: 2.5rem;
}

.ph-pagination .nav-links {
	display: flex;
	gap: .5rem;
	flex-wrap: wrap;
}

.ph-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 .5rem;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 6px;
	color: var(--ph-nav-text, #1f2937);
}

.ph-pagination .page-numbers.current {
	background: var(--ph-primary, #7c3aed);
	border-color: var(--ph-primary, #7c3aed);
	color: #fff;
}

/* --- 404 --- */
.ph-404 {
	text-align: center;
	padding-block: 5rem;
}

.ph-404-title {
	font-size: 5rem;
	margin: 0;
	color: var(--ph-primary, #7c3aed);
}

.ph-404-desc {
	color: #6b7280;
	margin-bottom: 1.5rem;
}

/* --- Search form --- */
.ph-search-form {
	display: flex;
	gap: .5rem;
	max-width: 480px;
	margin: 1.5rem auto 0;
}

.ph-search-input {
	flex: 1;
	padding: .6rem .9rem;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 6px;
	background: var(--ph-bg, #fff);
	color: var(--ph-nav-text, #1f2937);
}

/* --- Mega Menu (from Phoenicia V6 Core) --- */
.ph-nav-menu li {
	position: relative;
}

.ph-nav-menu .phv6-sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	background: var(--ph-nav-bg, #fff);
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 8px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, .12);
	padding: .6rem;
	min-width: 220px;
	list-style: none;
	z-index: 1000;
}

.ph-nav-menu li:hover > .phv6-sub-menu {
	display: block;
}

.ph-nav-menu .phv6-mega-menu-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	left: 0;
	background: var(--ph-nav-bg, #fff);
	border: 1px solid rgba(0, 0, 0, .08);
	border-radius: 10px;
	box-shadow: 0 15px 35px rgba(0, 0, 0, .15);
	padding: 1.5rem;
	z-index: 1000;
}

.ph-nav-menu li.mega-menu:hover > .phv6-mega-menu-dropdown {
	display: block;
}

.phv6-mega-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1.5rem;
}

/* --- Hero --- */
.ph-hero {
	background-color: var(--ph-hero-bg-color, var(--ph-primary, #7c3aed));
	color: var(--ph-hero-text, #fff);
	padding-block: 5rem;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.ph-hero-has-media .ph-hero-bg,
.ph-hero-has-media .ph-hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background-size: cover;
	background-position: center;
	z-index: 0;
}

.ph-hero-overlay {
	position: absolute;
	inset: 0;
	background: #111827;
	z-index: 1;
}

.ph-hero-content {
	position: relative;
	z-index: 2;
}

.ph-hero-title {
	font-size: var(--ph-hero-title-size, clamp(2rem, 5vw, 3.2rem));
	margin: 0 0 .75rem;
	line-height: 1.2;
	color: inherit;
}

.ph-hero-sub {
	font-size: var(--ph-hero-sub-size, 1.15rem);
	max-width: 640px;
	margin: 0 auto 1.75rem;
	opacity: .92;
	color: inherit;
}

.ph-hero-actions {
	display: flex;
	gap: .75rem;
	justify-content: center;
	flex-wrap: wrap;
}

.ph-btn-hero {
	background: var(--hb-bg, var(--ph-primary, #7c3aed));
	color: var(--hb-color, #fff);
	border: 1.5px solid var(--hb-bg, var(--ph-primary, #7c3aed));
	transition: background .25s, color .25s, border-color .25s, transform .25s;
}

.ph-btn-hero:hover {
	background: var(--hb-hover, var(--ph-btn-hover, #5b21b6));
	border-color: var(--hb-hover, var(--ph-btn-hover, #5b21b6));
	color: var(--hb-color, #fff);
	transform: translateY(-2px);
}

.ph-btn-hero-outline {
	background: var(--hb-bg, transparent);
	border-color: var(--hb-color, currentColor);
}

.ph-btn-hero-outline:hover {
	background: var(--hb-hover, #f3f4f6);
	border-color: var(--hb-hover, #f3f4f6);
	color: var(--hb-color, #111827);
}

.ph-btn-outline {
	background: transparent;
	color: #fff;
	border: 1.5px solid #fff;
}

.ph-btn-outline:hover {
	background: #fff;
	color: var(--ph-primary, #7c3aed);
}

.ph-btn-ghost {
	background: transparent;
	color: var(--ph-primary, #7c3aed);
	border: 1.5px solid var(--ph-primary, #7c3aed);
}

.ph-btn-ghost:hover {
	background: var(--ph-primary, #7c3aed);
	color: #fff;
}

/* --- Inner Pages Hero --- */
.ph-inner-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--ih-min-height, 320px);
	padding-block: 4rem;
	text-align: center;
	background-color: var(--ih-color1, #111827);
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.ph-inner-hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--ih-color1, #111827), var(--ih-color2, #7c3aed));
	opacity: var(--ih-overlay, .65);
	z-index: 1;
}

.ph-inner-hero-content {
	position: relative;
	z-index: 2;
	width: 100%;
}

.ph-inner-hero-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .75rem;
	color: var(--ih-eyebrow-color, #d4af37);
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	font-size: .85rem;
	margin: 0 0 .85rem;
}

.ph-inner-hero-eyebrow::before,
.ph-inner-hero-eyebrow::after {
	content: "";
	display: inline-block;
	width: 28px;
	height: 1.5px;
	background: currentColor;
	opacity: .7;
}

.ph-inner-hero-title {
	font-size: var(--ih-title-size, clamp(1.75rem, 4vw, 2.5rem));
	color: var(--ih-title-color, #fff);
	margin: 0 auto .75rem;
	max-width: 900px;
	line-height: 1.25;
}

.ph-inner-hero-gold {
	display: block;
	width: var(--ih-gold-width, 80px);
	height: 3px;
	border-radius: 2px;
	background: var(--ih-gold-color, #d4af37);
	margin: 0 auto 1.1rem;
}

.ph-inner-hero-lead {
	color: var(--ih-lead-color, #e5e7eb);
	max-width: 720px;
	margin: 0 auto 1.5rem;
	font-size: 1.05rem;
	opacity: .95;
}

.ph-inner-hero-meta {
	margin-bottom: 1.25rem;
}

.ph-inner-hero-meta .ph-badge {
	display: inline-flex;
	align-items: center;
	padding: .35rem .85rem;
	border-radius: 999px;
	font-size: .85rem;
	font-weight: 600;
	color: #fff;
	background: rgba(255, 255, 255, .15);
	border: 1px solid rgba(255, 255, 255, .35);
}

.ph-inner-hero-meta .ph-meta-item {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	color: var(--ih-lead-color, #e5e7eb);
	font-size: .9rem;
}

.ph-inner-hero-actions {
	display: flex;
	gap: .75rem;
	justify-content: center;
	flex-wrap: wrap;
}

.ph-inner-hero-actions .ph-btn-hero {
	padding: .7rem 1.6rem;
	font-size: .95rem;
}

/* --- Breadcrumbs --- */
.ph-breadcrumbs-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: .35rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
}

.ph-breadcrumbs-item {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	color: var(--ih-breadcrumb-color, #cbd5e1);
	font-size: .9rem;
}

.ph-breadcrumbs-item + .ph-breadcrumbs-item::before {
	content: var(--ih-breadcrumb-divider, "/");
	opacity: .6;
}

.ph-breadcrumbs-item a {
	color: var(--ih-breadcrumb-color, #cbd5e1);
	text-decoration: none;
	transition: color .2s;
}

.ph-breadcrumbs-item a:hover {
	color: var(--ih-breadcrumb-active, #fff);
}

.ph-breadcrumbs-item.is-current {
	color: var(--ih-breadcrumb-active, #fff);
}

/* --- Scroll Reveal (animations) --- */
html.js body.phv6-anim-on [data-phv6-reveal] {
	opacity: 0;
	transform: translateY(24px);
}

html.js body.phv6-anim-on [data-phv6-reveal].phv6-in-view {
	opacity: 1;
	transform: none;
	transition: opacity .6s ease, transform .6s ease;
}

html.js body.phv6-anim-on [data-phv6-reveal][data-phv6-delay="1"] { transition-delay: .1s; }
html.js body.phv6-anim-on [data-phv6-reveal][data-phv6-delay="2"] { transition-delay: .2s; }
html.js body.phv6-anim-on [data-phv6-reveal][data-phv6-delay="3"] { transition-delay: .3s; }
html.js body.phv6-anim-on [data-phv6-reveal][data-phv6-delay="4"] { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
	html.js body.phv6-anim-on [data-phv6-reveal] {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* --- Sections --- */
.ph-section {
	padding-block: 4rem;
}

.ph-section-alt {
	background: rgba(0, 0, 0, .03);
}

.ph-section-title {
	font-size: 1.75rem;
	text-align: center;
	margin: 0 0 .5rem;
}

.ph-section-sub {
	text-align: center;
	color: #6b7280;
	margin: 0 0 2rem;
}

/* --- CTA --- */
.ph-cta {
	background: linear-gradient(135deg, var(--ph-primary, #7c3aed), var(--ph-nav-active, #5b21b6));
	color: #fff;
	padding-block: 4rem;
	text-align: center;
}

.ph-cta-title {
	font-size: 1.6rem;
	margin: 0 0 1.25rem;
}

.ph-btn-light {
	background: #fff;
	color: var(--ph-primary, #7c3aed);
	border: 1px solid #fff;
}

.ph-btn-light:hover {
	background: transparent;
	color: #fff;
}

/* --- Layout (content + sidebar) --- */
.ph-layout {
	display: grid;
	grid-template-columns: 1fr 320px;
	gap: 2.5rem;
	align-items: start;
}

.ph-sidebar .ph-widget {
	margin-bottom: 2rem;
}

.ph-widget-title {
	font-size: 1.1rem;
	margin: 0 0 .75rem;
	padding-bottom: .5rem;
	border-bottom: 2px solid var(--ph-primary, #7c3aed);
}

.ph-sidebar ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ph-sidebar li {
	padding: .4rem 0;
	border-bottom: 1px solid rgba(0, 0, 0, .06);
}

/* --- Full Width layout (body.phv6-layout-full) --- */
body.phv6-layout-full .ph-main.ph-container {
	max-width: none;
	padding-inline: 2rem;
}

body.phv6-layout-full .ph-layout {
	display: block;
}

body.phv6-layout-full .ph-article-content {
	max-width: 100%;
}

/* --- Comments --- */
.ph-comments {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid rgba(0, 0, 0, .1);
}

.ph-comments-title {
	font-size: 1.3rem;
}

.ph-comment-list,
.ph-comment-list ol {
	list-style: none;
	padding: 0;
}

.ph-comment-list li {
	margin-bottom: 1.5rem;
}

.ph-comment-list .comment-body {
	background: rgba(0, 0, 0, .03);
	border-radius: 8px;
	padding: 1rem;
}

.ph-comments .comment-form label {
	display: block;
	margin-bottom: .25rem;
	font-weight: 600;
}

.ph-comments .comment-form input[type="text"],
.ph-comments .comment-form input[type="email"],
.ph-comments .comment-form input[type="url"],
.ph-comments .comment-form textarea {
	width: 100%;
	padding: .6rem .8rem;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 6px;
	background: var(--ph-bg, #fff);
	color: var(--ph-nav-text, #1f2937);
}

.ph-comments .comment-form .submit {
	background: var(--ph-primary, #7c3aed);
	color: #fff;
	border: 0;
	padding: .65rem 1.5rem;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 600;
}

/* --- Footer --- */
.ph-footer {
	background: #0f172a;
	color: #cbd5e1;
	margin-top: var(--phv6-footer-gap, 3rem);
}

/* Full-bleed homepage sections sit flush against the footer (no white gap). */
.phv6-front + .ph-footer,
.phv6-front + .phv6-cta-section + .ph-footer,
.phv6-front ~ .ph-footer {
	margin-top: 0 !important;
	--phv6-footer-gap: 0;
}
.phv6-cta-section + .ph-footer,
.phv6-map-section + .ph-footer,
.phv6-marquee-section + .ph-footer,
.phv6-services-section + .ph-footer,
.phv6-stats-section + .ph-footer,
.phv6-partners-section + .ph-footer,
.phv6-intro-section + .ph-footer,
.phv6-why-section + .ph-footer,
.phv6-projects-section + .ph-footer,
.phv6-hero-section + .ph-footer {
	margin-top: 0 !important;
}

.ph-footer-widgets {
	padding-block: 3.5rem;
}

.ph-footer-grid {
	display: grid;
	gap: 2rem;
}

.ph-footer-grid-1 {
	grid-template-columns: 1fr;
}

.ph-footer-grid-2 {
	grid-template-columns: repeat(2, 1fr);
}

.ph-footer-grid-3 {
	grid-template-columns: repeat(3, 1fr);
}

.ph-footer-grid-4 {
	grid-template-columns: repeat(4, 1fr);
}

.ph-footer-col .ph-widget-title {
	color: #fff;
	border-bottom-color: var(--ph-primary, #7c3aed);
}

.ph-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding-block: 1.25rem;
	text-align: center;
}

.ph-footer-copy {
	margin: 0;
	font-size: .9rem;
}

/* --- Quick contact --- */
.ph-quick-contact {
	position: fixed;
	bottom: 20px;
	right: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	z-index: 9999;
}

.ph-qc-left {
	right: auto;
	left: 20px;
}

.ph-qc-right {
	left: auto;
	right: 20px;
}

.ph-quick-contact a.ph-qc-btn {
	width: var(--qc-size, var(--ph-qc-size, 54px));
	height: var(--qc-size, var(--ph-qc-size, 54px));
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
	color: var(--ph-qc-icon, #fff);
	background-color: var(--ph-qc-bg, #7c3aed);
	transition: transform .25s;
}

.ph-quick-contact a.ph-qc-btn:hover {
	transform: scale(1.08);
}

.ph-quick-contact .ph-qc-wa {
	background-color: #25d366;
}

.ph-quick-contact .ph-qc-wa:hover {
	background-color: #1ebe5d;
}

.ph-quick-contact .ph-qc-phone {
	background-color: var(--ph-qc-bg, #7c3aed);
}

.ph-quick-contact svg {
	width: 55%;
	height: 55%;
}

/* --- Back to top --- */
.ph-back-to-top {
	position: fixed;
	bottom: 24px;
	left: 24px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--ph-primary, #7c3aed);
	color: #fff;
	font-size: 1.2rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9990;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
	transition: transform .25s, opacity .25s;
}

.ph-back-to-top:hover {
	transform: translateY(-3px);
}

body.phv6-qc-left .ph-back-to-top {
	left: auto;
	right: 24px;
}

/* --- Preloader --- */
#phv6-preloader {
	position: fixed;
	inset: 0;
	background: #fff;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .3s;
}

.phv6-preloader-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid rgba(124, 58, 237, .2);
	border-top-color: var(--ph-primary, #7c3aed);
	border-radius: 50%;
	animation: phv6-spin .8s linear infinite;
}

@keyframes phv6-spin {
	to {
		transform: rotate(360deg);
	}
}

/* --- Contact --- */
.ph-contact-wrap {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	margin-top: 2rem;
}

.ph-contact-line {
	margin: .5rem 0;
}

.ph-contact-form p {
	margin-bottom: 1rem;
}

.ph-contact-form label {
	display: block;
	margin-bottom: .25rem;
	font-weight: 600;
}

.ph-contact-form input[type="text"],
.ph-contact-form input[type="email"],
.ph-contact-form textarea {
	width: 100%;
	padding: .65rem .85rem;
	border: 1px solid rgba(0, 0, 0, .2);
	border-radius: 6px;
	background: var(--ph-bg, #fff);
	color: var(--ph-nav-text, #1f2937);
}

.ph-contact-success {
	background: #dcfce7;
	color: #166534;
	border: 1px solid #bbf7d0;
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1rem;
}

.ph-contact-errors {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: .75rem 1rem;
	margin-bottom: 1rem;
}

.ph-contact-errors p {
	margin: .25rem 0;
}

/* حقل فخ الروبوتات مخفي بصرياً */
.ph-hp {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	overflow: hidden;
}

/* --- Dark Mode --- */
body.dark-mode {
	--ph-bg: var(--ph-dm-bg, #0f172a);
	--ph-text: var(--ph-dm-text, #e2e8f0);
	--ph-nav-text: var(--ph-dm-text, #e2e8f0);
	--ph-heading: var(--ph-dm-heading, #f8fafc);
	--ph-link: var(--ph-dm-link, #a78bfa);
	--ph-nav-bg: var(--ph-dm-card, #1e293b);
	--ph-nav-bg-sc: var(--ph-dm-card, #1e293b);
	--ph-nav-bg-mob: var(--ph-dm-card, #1e293b);
	--ph-nav-bg-inner: var(--ph-dm-card, #1e293b);
	--ph-nav-color: var(--ph-dm-text, #e2e8f0);
	--ph-nav-color-hover: var(--ph-dm-link, #a78bfa);
	--ph-nav-color-active: var(--ph-dm-heading, #f8fafc);
	--ph-nav-icon-color: var(--ph-dm-text, #e2e8f0);
	--ph-nav-color-sc: var(--ph-dm-text, #e2e8f0);
	--ph-nav-color-sc-hover: var(--ph-dm-link, #a78bfa);
	--ph-nav-color-sc-active: var(--ph-dm-heading, #f8fafc);
	--ph-nav-icon-color-sc: var(--ph-dm-text, #e2e8f0);
	--ph-nav-color-mob: var(--ph-dm-text, #e2e8f0);
	--ph-nav-color-mob-hover: var(--ph-dm-link, #a78bfa);
	--ph-nav-color-inner: var(--ph-dm-text, #e2e8f0);
	--ph-nav-color-inner-hover: var(--ph-dm-link, #a78bfa);
	--ph-nav-color-inner-active: var(--ph-dm-heading, #f8fafc);
	--ph-card-bg: var(--ph-dm-card, #1e293b);
	--ph-card-border: var(--ph-dm-border, #334155);
	--ph-alt-bg: rgba(255, 255, 255, .03);
}

body.dark-mode .ph-article-title,
body.dark-mode .ph-archive-title {
	color: var(--ph-dm-heading, #f8fafc);
}

body.dark-mode .ph-card,
body.dark-mode .phv6-mega-menu-dropdown,
body.dark-mode .phv6-sub-menu {
	border-color: var(--ph-dm-border, rgba(255, 255, 255, .12));
}

body.dark-mode .ph-section-sub,
body.dark-mode .ph-article-meta,
body.dark-mode .ph-archive-desc,
body.dark-mode .ph-list-item time,
body.dark-mode .ph-list-excerpt,
body.dark-mode .ph-404-desc {
	color: var(--ph-dm-muted, #94a3b8);
}

body.dark-mode .ph-card-excerpt {
	color: var(--ph-dm-muted, #94a3b8);
}

/* --- Responsive --- */
@media (max-width: 992px) {
	.ph-grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}

	.ph-layout {
		grid-template-columns: 1fr;
	}

	.ph-contact-wrap {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.ph-footer-grid-4,
	.ph-footer-grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	body.phv6-layout-full .ph-main.ph-container {
		padding-inline: 1.25rem;
	}

	.ph-grid-2,
	.ph-grid-3,
	.ph-footer-grid-2,
	.ph-footer-grid-3,
	.ph-footer-grid-4 {
		grid-template-columns: 1fr;
	}

	.ph-back-to-top {
		left: 16px;
		bottom: 16px;
	}

	.ph-hero {
		padding-block: 3.5rem;
	}

	.ph-section,
	.ph-cta {
		padding-block: 3rem;
	}

	.ph-nav-menu .ph-nav-ul {
		display: none;
		flex-direction: column;
		position: absolute;
		top: 100%;
		right: 0;
		left: 0;
		background-color: var(--ph-nav-bg, #ffffff);
		padding: 1rem;
		gap: .8rem;
		box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
	}

	.ph-nav-menu .ph-nav-ul.is-active {
		display: flex;
	}

	.ph-mobile-toggle {
		display: inline-block;
	}

	.ph-nav-menu .phv6-mega-menu-dropdown,
	.ph-nav-menu .phv6-sub-menu {
		position: static;
		box-shadow: none;
		border: 0;
	}

	.phv6-mega-grid {
		grid-template-columns: 1fr;
	}
}

.phv6-social-link {
	display: inline-flex;
	align-items: center;
	opacity: .85;
	transition: opacity .2s;
	text-decoration: none;
}

.phv6-social-link:hover {
	opacity: 1;
}

.ph-nav-actions .phv6-social-link {
	margin-inline-end: .5rem;
}

.phv6-social-sep {
	display: inline-block;
	width: 1px;
	height: 18px;
	background: rgba(255,255,255,.25);
	vertical-align: middle;
	margin-inline: .5rem;
	flex-shrink: 0;
}

.ph-footer-social {
	text-align: center;
	padding-block: 1rem;
	border-bottom: 1px solid rgba(255,255,255,.1);
}

.ph-footer-social-inner {
	display: flex;
	justify-content: center;
	gap: 1rem;
}

.ph-footer-social .phv6-social-link {
	margin-inline-end: .75rem;
}

/* --- Project type filter bar --- */
.ph-projects-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .55rem;
	margin: 3rem auto;
	padding: 0 1rem;
	text-align: center;
	max-width: 100%;
}

.ph-projects-filter .ph-filter-chip {
	margin-bottom: .25rem;
}

.ph-filter-chip {
	display: inline-flex;
	align-items: center;
	padding: .45rem 1.15rem;
	border-radius: 999px;
	font-size: .9rem;
	font-weight: 600;
	color: var(--ph-nav-text, #1f2937);
	background: var(--ph-card-bg, #fff);
	border: 1px solid var(--ph-card-border, #e5e7eb);
	transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.ph-filter-chip:hover {
	border-color: var(--ph-primary, #7c3aed);
	color: var(--ph-primary, #7c3aed);
	transform: translateY(-1px);
}

.ph-filter-chip.is-active {
	background: var(--ph-primary, #7c3aed);
	border-color: var(--ph-primary, #7c3aed);
	color: #fff;
}

/* --- Project type badges on cards --- */
.ph-card-tags {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem;
	margin-bottom: .6rem;
}

.ph-card-tags .ph-badge {
	display: inline-flex;
	align-items: center;
	padding: .25rem .75rem;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 600;
	color: var(--ph-primary, #7c3aed);
	background: rgba(124, 58, 237, .08);
	border: 1px solid rgba(124, 58, 237, .25);
	transition: background .2s, color .2s;
}

.ph-card-tags .ph-badge:hover {
	background: var(--ph-primary, #7c3aed);
	color: #fff;
}

/* --- Centered project cards (archive + filter results) --- */
.ph-project-card {
	text-align: center;
}

.ph-project-card .ph-card-tags {
	justify-content: center;
}

.ph-project-card .ph-card-thumb img {
	display: block;
	margin-inline: auto;
}
