/**
 * Main Theme Stylesheet
 * Theme: Jawharat Al Sahil | TecVeq
 * Author: TecVeq (https://tecveq.com/)
 */

/* ==========================================================================
   1. CSS Custom Properties / Design Tokens (Brand Book)
   ========================================================================== */
:root {
	/* Brand Foundation & Surfaces */
	--brand-navy: #003B73;
	--brand-navy-dark: #062B52;
	--brand-blue: #0066D6;
	--brand-cta: #147EF5;
	--brand-cyan: #00B8FF;

	/* Neutrals & Surfaces */
	--bg-light: #F3F8FC;
	--off-white: #F3F8FC;
	--white: #FFFFFF;
	--border-card: #DCE7F0;
	--steel: #DCE7F0;
	--text-dark: #102A43;
	--text-body: #52677D;
	--text-secondary: #52677D;

	/* Functional Status */
	--success: #16803C;
	--warning: #A15C00;
	--error: #D32F2F;

	/* Typography Stacks (Performance-optimized system fallbacks) */
	--font-heading: "Barlow Condensed", "Arial Narrow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--font-body: "Source Sans 3", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

	/* Structural Geometry (Brand Book: Sharp & Clean) */
	--radius-card: 8px;
	--radius-btn: 6px;
	--radius-input: 5px;
	--radius-sm: 4px;

	/* Subtle Elevation */
	--shadow-subtle: 0 8px 24px rgba(6, 26, 58, 0.08);
	--shadow-card: 0 4px 16px rgba(6, 26, 58, 0.06);

	/* Layout Widths */
	--content-width: 760px;
	--container-width: 1200px;
	--wide-width: 1400px;

	/* Transitions */
	--transition-fast: 0.15s ease;
	--transition-base: 0.25s ease;
}

/* ==========================================================================
   2. Box Sizing & Reset
   ========================================================================== */
*, *::before, *::after {
	box-sizing: border-box;
}

html {
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	background-color: var(--off-white);
	color: var(--text-dark);
}

body {
	margin: 0;
	padding: 0;
	background-color: var(--off-white);
	color: var(--text-dark);
	font-family: var(--font-body);
	font-size: 1.0625rem; /* ~17px */
	font-weight: 400;
	line-height: 1.65;
	overflow-x: hidden;
}

/* ==========================================================================
   3. Accessibility & Focus States (WCAG 2.2 AA)
   ========================================================================== */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--brand-navy);
	border-radius: var(--radius-sm);
	box-shadow: 0 0 2px 2px rgba(0, 102, 204, 0.6);
	clip: auto !important;
	clip-path: none;
	color: var(--white);
	display: block;
	font-size: 0.875rem;
	font-weight: 700;
	height: auto;
	left: 10px;
	line-height: normal;
	padding: 15px 24px;
	text-decoration: none;
	top: 10px;
	width: auto;
	z-index: 100000;
}

:focus-visible {
	outline: 2px solid var(--brand-blue);
	outline-offset: 2px;
}

/* ==========================================================================
   4. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title,
.widget-title,
.comments-title {
	font-family: var(--font-heading);
	color: var(--text-dark);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	margin-top: 0;
	margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2.25rem, 4.5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.75rem); font-weight: 700; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.875rem); font-weight: 600; }
h4 { font-size: 1.35rem; font-weight: 600; }
h5 { font-size: 1.15rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
	margin-top: 0;
	margin-bottom: 1.25rem;
	color: var(--text-secondary);
}

a {
	color: var(--brand-blue);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color var(--transition-fast);
}

a:hover, a:focus {
	color: var(--brand-electric);
}

b, strong {
	font-weight: 600;
	color: var(--text-dark);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
	border-radius: var(--radius-card);
}

/* ==========================================================================
   5. Buttons & Form Controls
   ========================================================================== */
button,
.btn,
.wp-block-button__link,
input[type="submit"],
input[type="reset"],
input[type="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 600;
	padding: 10px 22px;
	border-radius: var(--radius-btn);
	border: 1px solid transparent;
	background-color: var(--brand-blue);
	color: var(--white);
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
	line-height: 1.5;
}

button:hover,
.btn:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
	background-color: #004F9E;
	color: var(--white);
	text-decoration: none;
}

.btn-secondary {
	background-color: transparent;
	border-color: var(--brand-electric);
	color: var(--brand-electric);
}

.btn-secondary:hover {
	background-color: var(--brand-electric);
	color: var(--white);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--steel);
	border-radius: var(--radius-input);
	background-color: var(--white);
	color: var(--text-dark);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.5;
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--brand-blue);
	outline: 2px solid rgba(0, 102, 204, 0.2);
	outline-offset: 1px;
}

/* ==========================================================================
   6. Layout Framework
   ========================================================================== */
.container {
	width: 100%;
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.site-content {
	flex: 1 0 auto;
	padding-top: 40px;
	padding-bottom: 60px;
}

.home .site-content,
.page-template-elementor_header_footer .site-content,
.page-template-elementor_canvas .site-content,
.elementor-page .site-content {
	padding-top: 0;
	padding-bottom: 0;
}

.site-main-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

@media (min-width: 992px) {
	.site-main-grid {
		grid-template-columns: 1fr 340px;
	}
}

.no-sidebar .site-main-grid {
	grid-template-columns: 1fr;
}

/* ==========================================================================
   7. Header & Navigation (Brand Book: Solid Deep Navy)
   ========================================================================== */
.site-header {
	background-color: var(--brand-navy);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding: 16px 0;
	position: relative;
	z-index: 1000;
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
}

.site-branding {
	display: flex;
	align-items: center;
}

.site-identity .site-title {
	font-size: 1.75rem;
	margin: 0;
	line-height: 1.1;
}

.site-identity .site-title a {
	color: var(--white);
	text-decoration: none;
}

.site-identity .site-title a:hover {
	color: var(--brand-cyan);
}

.site-description {
	color: var(--steel);
	font-size: 0.875rem;
	margin: 4px 0 0 0;
	line-height: 1.2;
}

.custom-logo-link img {
	max-height: 60px;
	width: auto;
	border-radius: 0;
}

/* Primary Navigation */
.main-navigation {
	display: flex;
	align-items: center;
}

.primary-menu-list {
	display: none;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 24px;
}

@media (min-width: 860px) {
	.primary-menu-list {
		display: flex;
		align-items: center;
	}
}

.primary-menu-list li {
	position: relative;
}

.primary-menu-list a {
	color: var(--white);
	font-family: var(--font-body);
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
	padding: 8px 4px;
	display: inline-block;
	transition: color var(--transition-fast);
}

.primary-menu-list a:hover,
.primary-menu-list a:focus,
.primary-menu-list .current-menu-item > a {
	color: var(--brand-cyan);
}

/* Dropdown Menu */
.primary-menu-list .sub-menu {
	list-style: none;
	margin: 0;
	padding: 10px 0;
	position: absolute;
	top: 100%;
	left: 0;
	background-color: var(--brand-navy-2);
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--radius-card);
	min-width: 220px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
	display: none;
	z-index: 100;
}

.primary-menu-list .sub-menu a {
	padding: 8px 18px;
	display: block;
	font-size: 0.9375rem;
	color: var(--steel);
}

.primary-menu-list .sub-menu a:hover,
.primary-menu-list .sub-menu a:focus {
	color: var(--brand-cyan);
	background-color: rgba(255, 255, 255, 0.04);
}

.primary-menu-list li:hover > .sub-menu,
.primary-menu-list li.is-open > .sub-menu {
	display: block;
}

.dropdown-toggle {
	background: transparent;
	border: none;
	color: var(--steel);
	padding: 6px;
	cursor: pointer;
	margin-left: 2px;
	display: inline-flex;
	align-items: center;
}

.dropdown-toggle:hover {
	color: var(--brand-cyan);
	background: transparent;
}

/* Mobile Navigation Toggle */
.menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--radius-btn);
	color: var(--white);
	padding: 8px 14px;
	cursor: pointer;
}

.menu-toggle:hover {
	background-color: rgba(255, 255, 255, 0.08);
	color: var(--white);
}

@media (min-width: 860px) {
	.menu-toggle {
		display: none;
	}
}

.hamburger-box {
	width: 20px;
	height: 14px;
	display: inline-block;
	position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
	width: 20px;
	height: 2px;
	background-color: var(--white);
	border-radius: 2px;
	position: absolute;
	transition: transform var(--transition-fast), top var(--transition-fast);
}

.hamburger-inner {
	top: 6px;
}

.hamburger-inner::before {
	content: '';
	top: -6px;
}

.hamburger-inner::after {
	content: '';
	top: 6px;
}

/* Site Header Action Button */
.site-header-actions {
	display: none;
}

@media (min-width: 860px) {
	.site-header-actions {
		display: flex;
		align-items: center;
	}
}

.jas-btn-header {
	background-color: var(--brand-cta, #147EF5);
	color: var(--white, #FFFFFF) !important;
	border: 1px solid var(--brand-cta, #147EF5);
	padding: 8px 18px;
	font-size: 0.9375rem;
	font-weight: 700;
	border-radius: var(--radius-btn, 6px);
	text-decoration: none;
	box-shadow: 0 2px 10px rgba(20, 126, 245, 0.35);
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.jas-btn-header:hover {
	background-color: var(--brand-blue, #0066D6);
	border-color: var(--brand-blue, #0066D6);
	color: var(--white, #FFFFFF) !important;
	transform: translateY(-1px);
	text-decoration: none;
}

.menu-toggle[aria-expanded="true"] .hamburger-inner {
	background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger-inner::before {
	top: 0;
	transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .hamburger-inner::after {
	top: 0;
	transform: rotate(-45deg);
}

/* Mobile Menu Open State */
@media (max-width: 859px) {
	.main-navigation.is-active .primary-menu-list {
		display: flex;
		flex-direction: column;
		width: 100%;
		padding-top: 16px;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}

	.main-navigation.is-active {
		width: 100%;
	}

	.primary-menu-list .sub-menu {
		position: static;
		box-shadow: none;
		border: none;
		background-color: rgba(0, 0, 0, 0.2);
		padding-left: 15px;
	}
}

/* ==========================================================================
   8. Post Cards & Listings (Brand Book: 8px Radius, Clean Borders)
   ========================================================================== */
.posts-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 30px;
}

@media (min-width: 640px) {
	.posts-grid {
		grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	}
}

.entry-card {
	background-color: var(--white);
	border: 1px solid var(--steel);
	border-radius: var(--radius-card);
	overflow: hidden;
	box-shadow: var(--shadow-card);
	display: flex;
	flex-direction: column;
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.entry-card:hover {
	border-color: var(--brand-electric);
	box-shadow: var(--shadow-subtle);
}

.post-thumbnail img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 0;
}

.entry-card-body {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.entry-card .entry-title {
	font-size: 1.45rem;
	margin-bottom: 8px;
}

.entry-card .entry-title a {
	color: var(--text-dark);
	text-decoration: none;
}

.entry-card .entry-title a:hover {
	color: var(--brand-blue);
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--text-secondary);
	margin-bottom: 14px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.entry-meta a {
	color: var(--text-secondary);
	text-decoration: none;
}

.entry-meta a:hover {
	color: var(--brand-blue);
}

.entry-summary {
	margin-bottom: 20px;
	flex: 1;
}

.read-more-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	color: var(--brand-blue);
	text-decoration: none;
	font-size: 0.9375rem;
}

.read-more-link:hover {
	color: var(--brand-electric);
	text-decoration: underline;
}

/* ==========================================================================
   9. Single Post & Page Templates
   ========================================================================== */
.single-entry,
.page-entry {
	background-color: var(--white);
	border: 1px solid var(--steel);
	border-radius: var(--radius-card);
	padding: 32px;
	box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
	.single-entry,
	.page-entry {
		padding: 44px;
	}
}

.single-entry-header,
.page-entry-header {
	margin-bottom: 24px;
	border-bottom: 1px solid var(--steel);
	padding-bottom: 16px;
}

.single-entry-title,
.page-entry-title {
	font-size: clamp(2rem, 3.5vw, 2.75rem);
}

.entry-content {
	line-height: 1.75;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	margin-top: 1.8rem;
	margin-bottom: 0.8rem;
}

.single-entry-footer {
	margin-top: 32px;
	padding-top: 20px;
	border-top: 1px solid var(--steel);
	font-size: 0.9375rem;
	color: var(--text-secondary);
}

.post-navigation {
	margin: 40px 0;
	padding: 20px 0;
	border-top: 1px solid var(--steel);
	border-bottom: 1px solid var(--steel);
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 20px;
}

.post-navigation .nav-subtitle {
	font-size: 0.8125rem;
	color: var(--text-secondary);
	display: block;
	text-transform: uppercase;
	font-weight: 600;
}

.post-navigation .nav-title {
	font-weight: 600;
	color: var(--brand-blue);
}

/* ==========================================================================
   10. Pagination
   ========================================================================== */
.pagination,
.posts-pagination {
	margin-top: 40px;
	display: flex;
	justify-content: center;
}

.pagination .nav-links {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.pagination a,
.pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 14px;
	border-radius: var(--radius-btn);
	border: 1px solid var(--steel);
	background-color: var(--white);
	color: var(--text-dark);
	text-decoration: none;
	font-weight: 600;
}

.pagination a:hover,
.pagination span.current {
	background-color: var(--brand-blue);
	border-color: var(--brand-blue);
	color: var(--white);
}

/* ==========================================================================
   11. Sidebar & Widgets
   ========================================================================== */
.main-sidebar {
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.widget {
	background-color: var(--white);
	border: 1px solid var(--steel);
	border-radius: var(--radius-card);
	padding: 24px;
	box-shadow: var(--shadow-card);
}

.widget-title {
	font-size: 1.25rem;
	border-bottom: 2px solid var(--brand-blue);
	padding-bottom: 8px;
	margin-bottom: 16px;
}

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

.widget li {
	padding: 8px 0;
	border-bottom: 1px solid rgba(220, 232, 242, 0.6);
}

.widget li:last-child {
	border-bottom: none;
}

.widget a {
	color: var(--text-dark);
	text-decoration: none;
}

.widget a:hover {
	color: var(--brand-blue);
}

/* ==========================================================================
   12. Comments
   ========================================================================== */
.comments-area {
	margin-top: 40px;
	background-color: var(--white);
	border: 1px solid var(--steel);
	border-radius: var(--radius-card);
	padding: 32px;
	box-shadow: var(--shadow-card);
}

.comments-title {
	font-size: 1.5rem;
	margin-bottom: 24px;
}

.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 32px 0;
}

.comment-list .comment {
	padding: 20px 0;
	border-bottom: 1px solid var(--steel);
}

.comment-body {
	display: flex;
	gap: 16px;
}

.comment-author .avatar {
	border-radius: 50%;
	border: 2px solid var(--steel);
}

.comment-meta {
	font-size: 0.875rem;
	color: var(--text-secondary);
	margin-bottom: 8px;
}

.comment-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ==========================================================================
   13. Footer (Brand Book: Deep Navy Foundation)
   ========================================================================== */
.site-footer {
	background-color: var(--brand-navy);
	color: var(--steel);
	margin-top: auto;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-widgets-area {
	padding: 48px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-widgets-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 32px;
}

.footer-widget-title {
	color: var(--white);
	font-size: 1.25rem;
	margin-bottom: 16px;
	border-bottom: 2px solid var(--brand-blue);
	padding-bottom: 8px;
	display: inline-block;
}

.site-footer a {
	color: var(--steel);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--brand-cyan);
}

.site-footer-bottom {
	padding: 24px 0;
	background-color: rgba(0, 0, 0, 0.2);
}

.footer-bottom-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}

.footer-menu-list {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0;
	gap: 20px;
	flex-wrap: wrap;
}

.copyright-text {
	margin: 0;
	font-size: 0.875rem;
	color: var(--steel);
}

/* ==========================================================================
   14. Error 404 Page
   ========================================================================== */
.error-404 {
	text-align: center;
	padding: 60px 20px;
	background-color: var(--white);
	border: 1px solid var(--steel);
	border-radius: var(--radius-card);
	max-width: 680px;
	margin: 0 auto;
}

.error-code {
	font-family: var(--font-heading);
	font-size: clamp(5rem, 12vw, 8rem);
	font-weight: 700;
	color: var(--brand-navy);
	line-height: 1;
	display: block;
}

.error-search-box {
	max-width: 420px;
	margin: 24px auto;
}

.error-actions {
	margin-top: 24px;
}

/* ==========================================================================
   15. Motion Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}
