/*
Theme Name: Phoenicia V6
Author: Phoenicia Team
Description: A high-performance, fully customizable theme with advanced color systems.
Version: 1.0.2
*/

*, *::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-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;
	justify-content: center;
	min-height: 200px;
	text-align: center;
}

/* --- 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: linear-gradient(135deg, var(--ph-primary, #7c3aed), var(--ph-nav-active, #5b21b6));
	color: #fff;
	padding-block: 5rem;
	text-align: center;
}

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

.ph-hero-sub {
	font-size: 1.15rem;
	max-width: 640px;
	margin: 0 auto 1.75rem;
	opacity: .9;
}

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

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

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

/* --- 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 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);
}

/* --- 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: 3rem;
}

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

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

.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-quick-contact a {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	font-size: 1.4rem;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
	color: #fff;
}

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

.ph-quick-contact .btn-ph {
	background: var(--ph-primary, #7c3aed);
}

/* --- 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: #111827;
	--ph-nav-bg: #1f2937;
	--ph-nav-text: #f3f4f6;
	--ph-nav-hover: #a78bfa;
	--ph-nav-active: #c4b5fd;
}

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

/* --- 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 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.ph-grid-2,
	.ph-grid-3,
	.ph-footer-grid {
		grid-template-columns: 1fr;
	}

	.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;
	}
}
