/* AlQaem Site Extensions — news + language switcher */

/* ---------- Language switcher ---------- */
.aqx-lang-item { list-style: none; }
.aqx-lang {
	display: inline-flex; align-items: center; gap: 6px;
	font-weight: 600; font-size: .9rem; line-height: 1;
	padding: 8px 12px; border-radius: 100px;
	border: 1.5px solid var(--aq-primary, #008a9b);
	color: var(--aq-primary, #008a9b) !important; text-decoration: none;
	transition: background .2s ease, color .2s ease;
}
.aqx-lang svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.aqx-lang:hover, .aqx-lang:focus-visible { background: var(--aq-primary, #008a9b); color: #fff !important; }
.aqx-lang[lang="ar"] span { font-family: 'Cairo', system-ui, sans-serif; font-size: .95rem; }
.aq-nav__mobile-links .aqx-lang { color: #fff !important; border-color: rgba(255,255,255,.5); margin-top: 8px; }

/* ---------- News section ---------- */
.aq-news { background: var(--aq-white, #fff); }
.aqn-slider { position: relative; }
.aqn-track {
	display: grid; grid-auto-flow: column;
	grid-auto-columns: calc((100% - 2 * 24px) / 3);
	gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
	scroll-behavior: smooth; overscroll-behavior-x: contain;
	padding: 4px 4px 12px; scrollbar-width: none; -ms-overflow-style: none;
}
.aqn-track::-webkit-scrollbar { display: none; }
.aqn-track:focus-visible { outline: 2px solid var(--aq-primary, #008a9b); outline-offset: 4px; border-radius: 12px; }
.aqn-slide { scroll-snap-align: start; min-width: 0; display: flex; }
.aqn-slider[data-count="1"] .aqn-track { grid-auto-columns: minmax(0, 560px); justify-content: center; }
.aqn-slider[data-count="2"] .aqn-track { grid-auto-columns: calc((100% - 24px) / 2); }

@media (max-width: 1024px) { .aqn-track { grid-auto-columns: calc((100% - 24px) / 2); } }
@media (max-width: 640px)  { .aqn-track, .aqn-slider[data-count="2"] .aqn-track { grid-auto-columns: 86%; gap: 16px; } }

/* Card (shared by slider, grid, related) */
.aqn-card {
	display: flex; width: 100%;
	background: #fff; border: 1px solid var(--aq-gray-200, #e2e8ed);
	border-radius: var(--aq-radius-md, 14px); overflow: hidden;
	box-shadow: var(--aq-shadow-sm, 0 2px 8px rgba(13,126,138,.10));
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.aqn-card:hover { transform: translateY(-4px); box-shadow: var(--aq-shadow-md, 0 8px 24px rgba(13,126,138,.16)); border-color: var(--aq-accent-lt, #b2ebf2); }
.aqn-card__link { display: flex; flex-direction: column; width: 100%; color: inherit !important; text-decoration: none !important; }
.aqn-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--aq-primary-lt, #e8eff0); }
.aqn-img, .aqn-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.aqn-card:hover .aqn-card__media img { transform: scale(1.04); }
.aqn-img--ph { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--aq-primary-lt, #e8eff0), #fff); }
.aqn-img--ph img { width: 72px !important; height: 72px !important; object-fit: contain; opacity: .55; }
.aqn-card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.aqn-card__date { font-size: .8rem; font-weight: 600; color: var(--aq-primary, #008a9b); letter-spacing: .02em; }
.aqn-card__title { font-family: var(--aq-font-display, inherit); font-size: 1.15rem !important; line-height: 1.4 !important; font-weight: 700; color: var(--aq-navy, #015364); margin: 0 !important;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.aqn-card__excerpt { font-size: .925rem; line-height: 1.65; color: var(--aq-text-muted, #6b7f93); margin: 0 !important;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.aqn-card__more { margin-top: auto; padding-top: 6px; font-weight: 700; font-size: .9rem; color: var(--aq-primary, #008a9b); display: inline-flex; gap: 6px; align-items: center; }
.aqn-arrow { display: inline-block; transition: transform .2s ease; }
.aqn-card:hover .aqn-arrow { transform: translateX(4px); }

/* Controls */
.aqn-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
.aqn-btn {
	width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
	border: 1.5px solid var(--aq-gray-200, #e2e8ed); background: #fff; color: var(--aq-navy, #015364); cursor: pointer; padding: 0;
	transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}
.aqn-btn svg { width: 22px; height: 22px; fill: currentColor; }
.aqn-btn:hover:not([disabled]) { background: var(--aq-primary, #008a9b); color: #fff; border-color: var(--aq-primary, #008a9b); }
.aqn-btn[disabled] { opacity: .35; cursor: default; }
.aqn-dots { display: flex; gap: 8px; }
.aqn-dot { width: 9px; height: 9px; border-radius: 100px; border: 0; padding: 0; background: var(--aq-gray-200, #e2e8ed); cursor: pointer; transition: width .25s ease, background .25s ease; }
.aqn-dot[aria-selected="true"] { width: 26px; background: var(--aq-primary, #008a9b); }
.aqn-slider.is-static .aqn-controls { display: none; }

/* ---------- News listing page ---------- */
.aqn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
@media (max-width: 1024px) { .aqn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .aqn-grid { grid-template-columns: 1fr; } }
.aqn-empty { text-align: center; color: var(--aq-text-muted, #6b7f93); padding: 40px 0; }
.aqn-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; flex-wrap: wrap; }
.aqn-pagination .page-numbers { min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--aq-gray-200, #e2e8ed); color: var(--aq-navy, #015364); text-decoration: none; font-weight: 600; }
.aqn-pagination .page-numbers.current, .aqn-pagination a.page-numbers:hover { background: var(--aq-primary, #008a9b); color: #fff; border-color: var(--aq-primary, #008a9b); }

/* News page header (page content wrapper) */
.aqn-page-hero { background: linear-gradient(135deg, var(--aq-navy, #015364), var(--aq-primary, #008a9b)); color: #fff; padding: 72px 0 64px; text-align: center; }
.aqn-page-hero h1 { color: #fff; font-family: var(--aq-font-display, inherit); font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 10px; }
.aqn-page-hero p { color: rgba(255,255,255,.85); max-width: 640px; margin: 0 auto; font-size: 1.05rem; }
.aqn-page-hero .aq-eyebrow { background: rgba(255,255,255,.14); color: #fff; }
.aqn-page-body { padding: 64px 0 88px; }

/* ---------- Single article ---------- */
body.aqn-article .site-content { padding: 0 !important; }
body.aqn-article .content-area { width: 100% !important; float: none !important; }
body.aqn-article .inside-article {
	max-width: 860px; margin: 48px auto 80px !important; padding: 0 24px !important; background: transparent !important;
}
body.aqn-article .entry-header { margin-bottom: 18px; }
body.aqn-article .entry-title { font-family: var(--aq-font-display, inherit); color: var(--aq-navy, #015364); font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.3; font-weight: 800; }
body.aqn-article .entry-meta { color: var(--aq-text-muted, #6b7f93); font-size: .9rem; }
body.aqn-article .entry-meta .byline, body.aqn-article footer.entry-meta { display: none; }
body.aqn-article .featured-image, body.aqn-article .post-image { margin: 0 0 28px !important; }
body.aqn-article .featured-image img, body.aqn-article .post-image img { width: 100%; border-radius: var(--aq-radius-md, 14px); box-shadow: var(--aq-shadow-md, 0 8px 24px rgba(13,126,138,.16)); }
body.aqn-article .entry-content { font-size: 1.075rem; line-height: 1.85; color: var(--aq-text, #1e2d3d); }
body.aqn-article .entry-content h2, body.aqn-article .entry-content h3 { color: var(--aq-navy, #015364); margin-top: 1.6em; }
body.aqn-article .entry-content img { border-radius: 10px; }
.aqn-back { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--aq-primary, #008a9b) !important; text-decoration: none; margin-bottom: 18px; }
.aqn-back:hover .aqn-arrow { transform: translateX(-4px); }
.aqn-related { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--aq-gray-200, #e2e8ed); }
.aqn-related__title { font-family: var(--aq-font-display, inherit); color: var(--aq-navy, #015364); font-size: 1.5rem !important; margin-bottom: 22px !important; }
.aqn-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .aqn-grid--3 { grid-template-columns: 1fr; } }
.aqn-related .aqn-card__title { font-size: 1rem !important; }
.aqn-related .aqn-card__excerpt { display: none; }

@media (prefers-reduced-motion: reduce) {
	.aqn-track { scroll-behavior: auto; }
	.aqn-card, .aqn-card__media img, .aqn-arrow { transition: none; }
}

/* Article order: back link, title + date, image, text */
body.aqn-article .inside-article { display: flex; flex-direction: column; }
body.aqn-article .inside-article > .aqn-back { order: 0; }
body.aqn-article .inside-article > .entry-header { order: 1; }
body.aqn-article .inside-article > .featured-image { order: 2; }
body.aqn-article .inside-article > .entry-content { order: 3; }
body.aqn-article .inside-article > .entry-meta { order: 4; }
body.aqn-article .featured-image img { aspect-ratio: 16 / 9; object-fit: cover; max-height: 520px; }

/* Article lists + gallery */
body.aqn-article .entry-content ul, body.aqn-article .entry-content ol { list-style: disc; padding-inline-start: 1.4em; margin: 0 0 1.4em; }
body.aqn-article .entry-content ol { list-style: decimal; }
body.aqn-article .entry-content li { margin-bottom: .45em; }
body.aqn-article .entry-content li::marker { color: var(--aq-primary, #008a9b); }
body.aqn-article .entry-content p { margin-bottom: 1.2em; }
body.aqn-article .wp-block-gallery { margin-top: 28px; gap: 12px; }
body.aqn-article .wp-block-gallery .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; border-radius: 10px; }
html[dir="rtl"] body.aqn-article .entry-content :is(p, li) { unicode-bidi: plaintext; }

/* gallery two-up */
body.aqn-article .wp-block-gallery.has-nested-images { display: flex; flex-wrap: wrap; }
body.aqn-article .wp-block-gallery.has-nested-images figure.wp-block-image { width: calc(50% - 6px) !important; flex: 0 0 calc(50% - 6px) !important; margin: 0 !important; }
@media (max-width: 560px) { body.aqn-article .wp-block-gallery.has-nested-images figure.wp-block-image { width: 100% !important; flex-basis: 100% !important; } }

/* ---------- Hero: brand text + news slider (split layout) ---------- */
.aq-hero > .aq-container:has(.aqh-news) {
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
	gap: clamp(32px, 5vw, 72px);
	align-items: center;
	width: 100%;
	padding-top: 56px;
	padding-bottom: 56px;
}
.aq-hero > .aq-container:has(.aqh-news) .aq-hero__content { max-width: 640px; }
.aq-hero > .aq-container:has(.aqh-news) h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }

.aqh-news {
	position: relative; z-index: 2;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 20px;
	padding: 14px;
	backdrop-filter: blur(14px) saturate(1.2);
	-webkit-backdrop-filter: blur(14px) saturate(1.2);
	box-shadow: 0 24px 60px rgba(0, 20, 35, .45);
	color: #fff;
	max-width: 540px;
	justify-self: end;
	width: 100%;
	animation: aqh-in .8s ease .15s both;
}
@keyframes aqh-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.aqh-head { display: flex; align-items: center; gap: 10px; padding: 4px 6px 12px; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.aqh-label { color: #fff; }
.aqh-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--aq-accent-lt, #b2ebf2); box-shadow: 0 0 0 0 rgba(178, 235, 242, .7); animation: aqh-pulse 2s infinite; }
@keyframes aqh-pulse { 70% { box-shadow: 0 0 0 9px rgba(178, 235, 242, 0); } 100% { box-shadow: 0 0 0 0 rgba(178, 235, 242, 0); } }
.aqh-all { margin-inline-start: auto; color: rgba(255,255,255,.8) !important; text-decoration: none; letter-spacing: .04em; text-transform: none; font-weight: 600; font-size: .85rem; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 1px; }
.aqh-all:hover { color: #fff !important; border-color: #fff; }

.aqh-viewport { position: relative; display: grid; }
.aqh-slide {
	grid-area: 1 / 1; display: flex; flex-direction: column;
	color: #fff !important; text-decoration: none !important;
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity .6s ease, transform .6s ease, visibility 0s linear .6s;
}
.aqh-slide.is-active { opacity: 1; visibility: visible; transform: none; transition: opacity .6s ease, transform .6s ease, visibility 0s; }

.aqh-media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.06); }
.aqh-img { width: 100% !important; height: 100% !important; object-fit: cover; object-position: center 35%; display: block; transform: scale(1.08); transition: transform 7s ease-out; }
.aqh-slide.is-active .aqh-img { transform: scale(1); }
.aqh-img--ph { display: block; background: linear-gradient(135deg, var(--aq-primary, #008a9b), var(--aq-navy, #015364)); }
.aqh-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(1, 34, 45, 0) 55%, rgba(1, 34, 45, .55)); pointer-events: none; }
.aqh-date {
	position: absolute; z-index: 1; inset-inline-start: 12px; bottom: 12px;
	background: rgba(255,255,255,.95); color: var(--aq-navy, #015364);
	font-size: .78rem; font-weight: 700; padding: 5px 11px; border-radius: 100px;
}

.aqh-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 6px 6px; }
.aqh-title {
	font-family: var(--aq-font-display, inherit); font-weight: 700; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.45;
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.45em * 3);
}
.aqh-more { font-size: .9rem; font-weight: 700; color: var(--aq-accent-lt, #b2ebf2); display: inline-flex; gap: 6px; align-items: center; }
.aqh-slide:hover .aqh-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.aqh-slide:hover .aqn-arrow { transform: translateX(4px); }
.aqh-slide:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 14px; }

.aqh-foot { display: flex; align-items: center; gap: 12px; padding: 12px 6px 4px; border-top: 1px solid rgba(255,255,255,.12); margin-top: 10px; }
.aqh-count { font-size: .85rem; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; min-width: 58px; }
.aqh-count b { color: #fff; font-weight: 800; }
.aqh-progress { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; }
.aqh-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--aq-accent-lt, #b2ebf2), #fff); transform-origin: 0 50%; }
.aqh-news.is-running .aqh-progress span { animation: aqh-bar var(--aqh-delay, 6500ms) linear forwards; }
.aqh-news.is-paused .aqh-progress span { animation-play-state: paused; }
@keyframes aqh-bar { from { width: 0; } to { width: 100%; } }
.aqh-btn {
	width: 38px; height: 38px; border-radius: 50%; padding: 0; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
	background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25); color: #fff;
	transition: background .2s ease, color .2s ease;
}
.aqh-btn svg { width: 20px; height: 20px; fill: currentColor; }
.aqh-btn:hover, .aqh-btn:focus-visible { background: #fff; color: var(--aq-navy, #015364); }

/* RTL */
html[dir="rtl"] .aqh-head { letter-spacing: 0; text-transform: none; font-size: .9rem; }
html[dir="rtl"] .aqh-btn svg { transform: scaleX(-1); }
html[dir="rtl"] .aqh-progress span { background: linear-gradient(270deg, var(--aq-accent-lt, #b2ebf2), #fff); }
html[dir="rtl"] .aqh-slide:hover .aqn-arrow { transform: scaleX(-1) translateX(4px); }

/* Tablet / mobile: stack, news below the brand text */
@media (max-width: 960px) {
	.aq-hero > .aq-container:has(.aqh-news) { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
	.aqh-news { justify-self: stretch; max-width: 640px; }
}
@media (max-width: 560px) {
	.aqh-news { padding: 10px; border-radius: 16px; }
	.aqh-title { font-size: 1.02rem; }
}

@media (prefers-reduced-motion: reduce) {
	.aqh-news, .aqh-slide, .aqh-img, .aqh-pulse { animation: none !important; transition: none !important; }
	.aqh-img { transform: none; }
}

/* Header logo: trimmed file, larger display */
.aq-header .aq-nav__inner { height: 88px; }
.aq-header .aq-nav__logo-img { height: 70px; width: auto; max-width: 220px; object-fit: contain; }
@media (max-width: 960px) {
	.aq-header .aq-nav__inner { height: 74px; }
	.aq-header .aq-nav__logo-img { height: 58px; max-width: 170px; }
}

/* ---------- News page v2: full-width hero + magazine grid ---------- */
body.page .entry-content:has(.aqn-page-hero) { margin: 0 !important; }
body.page .inside-article:has(.aqn-page-hero) { padding: 0 !important; margin: 0 !important; background: transparent !important; }
body.page .site-content:has(.aqn-page-hero) { padding: 0 !important; display: block; }
body.page .site-content:has(.aqn-page-hero) .content-area { width: 100% !important; float: none !important; }

.aqn-page-hero {
	position: relative; overflow: hidden; isolation: isolate;
	padding: clamp(72px, 9vw, 120px) 0 clamp(64px, 8vw, 104px);
	background: var(--aq-navy, #015364);
	text-align: center;
}
.aqn-page-hero::before {
	content: ''; position: absolute; inset: 0; z-index: -2;
	background: url('/wp-content/uploads/2026/02/showroom.jpg') center 40% / cover no-repeat;
	filter: brightness(.45) saturate(.9); transform: scale(1.04);
}
.aqn-page-hero::after {
	content: ''; position: absolute; inset: 0; z-index: -1;
	background: linear-gradient(115deg, rgba(1, 34, 52, .94) 0%, rgba(1, 83, 100, .78) 55%, rgba(0, 138, 155, .55) 100%);
}
.aqn-page-hero .aq-container { position: relative; }
.aqn-page-hero .aq-container::after {
	content: ''; display: block; width: 72px; height: 4px; border-radius: 4px; margin: 26px auto 0;
	background: linear-gradient(90deg, var(--aq-accent-lt, #b2ebf2), var(--aq-primary, #008a9b));
}
.aqn-page-hero h1 { color: #fff; font-family: var(--aq-font-display, inherit); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.15; margin: 6px 0 14px; }
.aqn-page-hero p { color: rgba(255,255,255,.82); max-width: 620px; margin: 0 auto; font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.7; }
.aqn-page-hero .aq-eyebrow { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); }

.aqn-page-body { background: var(--aq-off-white, #f7f9fb); padding: clamp(48px, 6vw, 80px) 0 clamp(64px, 8vw, 104px); }
.aqn-page-body .aq-container { max-width: var(--aq-max-width, 1240px); }

/* Magazine grid: first (latest) story is a wide featured card */
.aqn-grid--magazine > .aqn-card:first-child { grid-column: 1 / -1; }
.aqn-grid--magazine > .aqn-card:first-child .aqn-card__link { flex-direction: row; }
.aqn-grid--magazine > .aqn-card:first-child .aqn-card__media { flex: 0 0 56%; aspect-ratio: auto; min-height: 340px; }
.aqn-grid--magazine > .aqn-card:first-child .aqn-card__body { padding: clamp(24px, 3.5vw, 44px); justify-content: center; gap: 14px; }
.aqn-grid--magazine > .aqn-card:first-child .aqn-card__title { font-size: clamp(1.35rem, 2.2vw, 1.85rem) !important; -webkit-line-clamp: 4; }
.aqn-grid--magazine > .aqn-card:first-child .aqn-card__excerpt { font-size: 1rem; -webkit-line-clamp: 4; }
.aqn-grid--magazine > .aqn-card:first-child .aqn-card__more {
	align-self: flex-start; background: var(--aq-primary, #008a9b); color: #fff; padding: 11px 20px; border-radius: 10px; margin-top: 8px;
}
.aqn-grid--magazine > .aqn-card:first-child:hover .aqn-card__more { background: var(--aq-navy, #015364); }
.aqn-page-body .aqn-card { border-color: transparent; box-shadow: 0 6px 24px rgba(1, 83, 100, .08); }
.aqn-page-body .aqn-card:hover { box-shadow: 0 16px 40px rgba(1, 83, 100, .14); }

@media (max-width: 860px) {
	.aqn-grid--magazine > .aqn-card:first-child .aqn-card__link { flex-direction: column; }
	.aqn-grid--magazine > .aqn-card:first-child .aqn-card__media { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
}

/* magazine fill: remaining stories share the full row width */
.aqn-grid--magazine { display: flex; flex-wrap: wrap; gap: 26px; }
.aqn-grid--magazine > .aqn-card { flex: 1 1 calc((100% - 52px) / 3); min-width: min(100%, 300px); }
.aqn-grid--magazine > .aqn-card:first-child { flex-basis: 100%; }
.aqn-grid--magazine > .aqn-card:not(:first-child) .aqn-card__title { font-size: 1.2rem !important; }
@media (max-width: 640px) { .aqn-grid--magazine > .aqn-card { flex-basis: 100%; } }
