/*
 * ALMAZA-001.4 — shared components on the approved identity, applied to the theme's real classes
 * (no static markup). Loaded last (inc/custom.php), uses css/almaza-tokens.css.
 *
 * 1. Typography   H1 = Rakkas (one per page), H2–H6 = Cairo 600/700. theme-bootstrap4.css forces
 *                 "a, h1…h6 { Almarai !important }", so headings need !important here too.
 * 2. Focus        navy ring on light backgrounds, gold on navy/blue ones.
 * 3. Buttons      12px radius, Almarai 700; primary = action blue; WhatsApp = navy text on green.
 * 4. Forms        visible field borders (#7C8DA6), labels, error colours; contact submit button.
 * 5. FAQ, notes, cards, chips.
 * 6. Page-type badge (.alm-type) for light backgrounds; the dark landing hero uses .alm-hero__kicker.
 */

/* 1. Typography ------------------------------------------------------------ */
/* #page wraps every page (header.php), so these beat the old class rules that set Rakkas / Almarai with
   !important (section titles, footer headings, article cards). */
#page h1 {
	font-family: var(--alm-f-display, "Rakkas", serif) !important;
	font-weight: 400 !important;
}

#page h2,
#page h3 {
	font-family: var(--alm-f-heading, "Cairo", sans-serif) !important;
	font-weight: 700 !important;
}

/* theme-bootstrap4.css: "#single-wrapper .recent-articles h2 { Rakkas !important }" on old articles. */
#single-wrapper .recent-articles h2,
#single-wrapper .recent-articles h3 {
	font-family: var(--alm-f-heading, "Cairo", sans-serif) !important;
}

#page h4,
#page h5,
#page h6 {
	font-family: var(--alm-f-heading, "Cairo", sans-serif) !important;
	font-weight: 600 !important;
}

/* 2. Focus ----------------------------------------------------------------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--alm-c-focus, #034296);
	outline-offset: 3px;
}

:where(.alm-hero, .alm-sec--dark, .alm-final, #wrapper-footer, .header-social) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline-color: var(--alm-c-focus-on-dark, #ffc94d);
}

.alm-faq.is-js h3:focus-visible {
	outline: 3px solid var(--alm-c-focus, #034296);
	outline-offset: 2px;
}

/* 3. Buttons --------------------------------------------------------------- */
.alm-btn,
.primary-btn.hero-btn-call,
.primary-btn.hero-btn-whatsapp,
.btn.service-card-cta,
.btn-primary.trust-proof-cta,
.defaultBtn.lift-cta,
.article-read-more,
.services-mini-call,
.services-mini-whatsapp,
.articles-mini-call,
.articles-mini-whatsapp,
.gallery-cta-call,
.gallery-cta-whatsapp,
.faq-whatsapp-btn,
.almaza-quote-form-shell .aqf-submit-btn {
	border-radius: var(--alm-r-btn, 12px) !important;
	font-family: var(--alm-f-body, "Almarai", sans-serif);
	font-weight: 700;
}

/* Primary (landing): solid action blue instead of the gradient */
.alm-lp .alm-btn--primary {
	background: var(--alm-c-action, #206dbf);
	color: #fff;
}

.alm-lp .alm-btn--primary:hover {
	background: var(--alm-c-action-700, #15549e);
}

/* WhatsApp everywhere: navy text on green (8.19:1). White on green is 1.98:1. */
.alm-lp .alm-btn--wa,
.home-banner .row .hero-cta-wrap a.hero-btn-whatsapp,
.primary-btn.hero-btn-whatsapp,
.services-mini-whatsapp,
.articles-mini-whatsapp,
.home-gallery.almaza-gallery-section .gallery-cta-whatsapp,
.supportPage.almaza-faq-section .faq-whatsapp-btn,
.mainNav .nav-btns .header-whatsapp-link {
	background-color: var(--alm-c-wa, #25d366) !important;
	color: var(--alm-c-navy, #0a1f44) !important;
}

.alm-lp .alm-btn--wa:hover,
.home-banner .row .hero-cta-wrap a.hero-btn-whatsapp:hover,
.primary-btn.hero-btn-whatsapp:hover,
.services-mini-whatsapp:hover,
.articles-mini-whatsapp:hover,
.home-gallery.almaza-gallery-section .gallery-cta-whatsapp:hover,
.supportPage.almaza-faq-section .faq-whatsapp-btn:hover,
.mainNav .nav-btns .header-whatsapp-link:hover {
	background-color: var(--alm-c-wa-hover, #22c25e) !important;
	color: var(--alm-c-navy, #0a1f44) !important;
}

/* Small tinted WhatsApp links (About page): dark green text on light green (5:1+). */
.almaza-mini-whatsapp {
	background-color: var(--alm-c-wa-50, #e5f9eb) !important;
	color: var(--alm-c-wa-700, #157347) !important;
}

/* Disabled */
.alm-btn[disabled],
.alm-btn[aria-disabled="true"],
.almaza-quote-form-shell .aqf-submit-btn[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

/* 4. Forms ----------------------------------------------------------------- */
.alm-field label,
.almaza-quote-form-shell label {
	font-weight: 700;
	color: var(--alm-c-text-strong, #172132);
}

.alm-field input,
.alm-field select,
.alm-field textarea,
.almaza-quote-form-shell input[type="text"],
.almaza-quote-form-shell input[type="tel"],
.almaza-quote-form-shell input[type="email"],
.almaza-quote-form-shell select,
.almaza-quote-form-shell textarea {
	border: 1.5px solid var(--alm-c-field-border, #7c8da6);
	border-radius: var(--alm-r-sm, 10px);
	background: var(--alm-c-surface, #fff);
	color: var(--alm-c-text-strong, #172132);
	min-height: 48px;
	font-size: 16px; /* no zoom on iOS */
}

.alm-field input:focus,
.alm-field select:focus,
.alm-field textarea:focus,
.almaza-quote-form-shell input:focus,
.almaza-quote-form-shell select:focus,
.almaza-quote-form-shell textarea:focus {
	outline: none;
	border-color: var(--alm-c-action, #206dbf);
	box-shadow: 0 0 0 3px rgba(32, 109, 191, 0.25);
}

.alm-quote__msg.is-error,
.almaza-form-response.is-error,
.almaza-form-response.error {
	background: #fdecea;
	color: var(--alm-c-danger, #b42318);
}

.alm-quote__msg.is-ok {
	background: var(--alm-c-wa-50, #e5f9eb);
	color: var(--alm-c-wa-700, #157347);
}

/* Contact page submit: the markup uses .aqf-submit-btn, the old CSS styled .aqf-submit (never matched). */
.almaza-quote-form-shell .aqf-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: var(--alm-btn-h-touch, 52px);
	padding: 10px 20px;
	border: 0;
	background: var(--alm-c-action, #206dbf);
	color: #fff;
	font-size: 1rem;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.almaza-quote-form-shell .aqf-submit-btn:hover {
	background: var(--alm-c-action-700, #15549e);
}

/* 5. FAQ, notes, cards, chips ---------------------------------------------- */
.alm-faq h3 {
	border: 1px solid var(--alm-c-border, #dce5f1);
	background: var(--alm-c-surface, #fff);
	border-radius: 14px;
}

.alm-faq.is-js h3.is-open,
.alm-faq.is-js h3.is-open + p {
	background: var(--alm-c-primary-50, #e9f1fd);
	border-color: transparent;
}

.almaza-contact-faq .almaza-faq-question {
	border-radius: 14px;
}

/* Tip box → warning style of the identity (dark brown on light gold, 7:1). */
.alm-note {
	background: var(--alm-c-warn-bg, #fff4d4);
	border: 0;
	border-inline-start: 3px solid var(--alm-c-gold-700, #996300);
	border-radius: var(--alm-r-btn, 12px);
	color: var(--alm-c-warn-text, #754900);
}

.alm-note::before {
	color: var(--alm-c-gold-700, #996300);
}

.alm-cards li,
.alm-tile {
	border-radius: var(--alm-r-md, 16px);
	border-color: var(--alm-c-border, #dce5f1);
	box-shadow: var(--alm-shadow-card, 0 8px 24px rgba(10, 31, 68, 0.08));
}

.alm-links a {
	font-weight: 700;
	color: var(--alm-c-primary, #034296);
}

/* 6. Page-type badge ------------------------------------------------------- */
.alm-type {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 12px 4px 10px;
	border-radius: var(--alm-r-pill, 999px);
	font-family: var(--alm-f-body, "Almarai", sans-serif);
	font-size: var(--alm-fs-tiny, 0.8125rem);
	font-weight: 700;
	line-height: 1.5;
	background: var(--alm-c-primary-50, #e9f1fd);
	color: var(--alm-c-primary, #034296);
}

.alm-type svg,
.alm-hero__kicker svg {
	width: 16px;
	height: 16px;
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.alm-hero__kicker svg {
	color: var(--alm-c-gold, #ffc94d);
}

.alm-type--city { background: #fff; box-shadow: inset 0 0 0 1.5px var(--alm-c-primary, #034296); }
.alm-type--service, .alm-type--service_area { background: var(--alm-c-action, #206dbf); color: #fff; }
.alm-type--prices { background: var(--alm-c-gold, #ffc94d); color: var(--alm-c-navy, #0a1f44); }
.alm-type--guide { background: var(--alm-c-surface-2, #e4eaf3); color: var(--alm-c-text-strong, #172132); }
.alm-type--compare { background: var(--alm-c-action-50, #eaf3fd); color: var(--alm-c-action-700, #15549e); box-shadow: inset 0 0 0 1.5px var(--alm-c-action, #206dbf); }

/* 7. ALMAZA-001.5 — first screen per page type (landing template: .alm-lp--{type}) ---------- */

/* City hub: a map texture of pins over the navy hero */
.alm-lp--city .alm-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	pointer-events: none;
	opacity: 0.35;
	background:
		radial-gradient(circle at 18% 30%, var(--alm-c-sky, #5aa9ff) 0 3px, transparent 4px),
		radial-gradient(circle at 46% 18%, var(--alm-c-sky, #5aa9ff) 0 3px, transparent 4px),
		radial-gradient(circle at 72% 40%, var(--alm-c-sky, #5aa9ff) 0 3px, transparent 4px),
		radial-gradient(circle at 30% 62%, var(--alm-c-sky, #5aa9ff) 0 3px, transparent 4px),
		repeating-linear-gradient(135deg, transparent 0 22px, rgba(255, 255, 255, 0.05) 22px 23px);
}

.alm-lp--city .alm-hero__kicker--type {
	background: transparent;
	border: 1.5px solid rgba(255, 255, 255, 0.55);
}

/* Service: a bluer hero (action colour) */
.alm-lp--service .alm-hero,
.alm-lp--service_area .alm-hero {
	background: radial-gradient(120% 90% at 85% 0%, #3b86d6 0%, var(--alm-c-action, #206dbf) 40%, var(--alm-c-primary, #034296) 100%);
}

/* Prices: gold top line and gold badge (no numbers, explains factors) */
.alm-lp--prices .alm-hero {
	border-top: 6px solid var(--alm-c-gold, #ffc94d);
}

.alm-lp--prices .alm-hero__kicker--type {
	background: var(--alm-c-gold, #ffc94d);
	border-color: var(--alm-c-gold, #ffc94d);
	color: var(--alm-c-navy, #0a1f44);
}

.alm-lp--prices .alm-hero__kicker--type svg {
	color: var(--alm-c-navy, #0a1f44);
}

/* Guide (informational): a light, reading-first hero */
.alm-lp--guide .alm-hero {
	background: var(--alm-c-surface, #fff);
	color: var(--alm-c-text, #2b3445);
	border-bottom: 1px solid var(--alm-c-border, #dce5f1);
}

.alm-lp--guide .alm-hero::before,
.alm-lp--guide .alm-hero__glow {
	display: none;
}

.alm-lp--guide .alm-hero__title {
	color: var(--alm-c-primary, #034296);
	text-shadow: none;
}

.alm-lp--guide .alm-hero__lead,
.alm-lp--guide .alm-hero__sub,
.alm-lp--guide .alm-crumbs ol {
	color: var(--alm-c-muted, #526075);
}

.alm-lp--guide .alm-crumbs a,
.alm-lp.alm-lp--guide .alm-hero__quote {
	color: var(--alm-c-primary, #034296);
}

.alm-lp--guide .alm-hero__kicker {
	background: var(--alm-c-surface-2, #e4eaf3);
	border-color: transparent;
	color: var(--alm-c-text-strong, #172132);
}

.alm-lp--guide .alm-hero__kicker svg {
	color: var(--alm-c-primary, #034296);
}

.alm-lp--guide .alm-btn--light {
	background: var(--alm-c-surface, #fff);
	border-color: var(--alm-c-primary, #034296);
	color: var(--alm-c-primary, #034296);
}

.alm-lp--guide .alm-hero__media img {
	border-color: var(--alm-c-border, #dce5f1);
	box-shadow: var(--alm-shadow-card, 0 8px 24px rgba(10, 31, 68, 0.08));
	transform: none;
}

.alm-lp--guide .alm-hero :where(a, button, summary):focus-visible {
	outline-color: var(--alm-c-focus, #034296);
}

/* Old articles and area categories: badge + tree breadcrumbs in the banner. Its background image
   (imgs/service-back.jpg) does not exist (404), which left white text on a pale band; use the brand navy. */
.mainBanner {
	flex-wrap: wrap;
	row-gap: 10px;
	background: radial-gradient(120% 90% at 85% 0%, #1b5fb5 0%, var(--alm-c-primary, #034296) 45%, var(--alm-c-navy, #0a1f44) 100%) !important;
}

.mainBanner > nav {
	min-width: 0;
}

.mainBanner ul li[aria-current] {
	color: #fff;
	font-size: 18px;
}

.alm-type--banner {
	margin-inline-start: 6px;
	box-shadow: none;
}

@media (max-width: 768px) {
	.mainBanner ul li[aria-current] {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.alm-lp .alm-btn--wa { animation: none; }
}
