/* =====================================================================
   HEADER — Premium Al Rahma Theme
   Dark Topbar · Light Navbar · Smart Sticky · Off-canvas Mobile
   ===================================================================== */

/* ----- CSS Custom Properties ----- */
:root {
	--header-dark:       #02435b;
	--header-dark-deep:  #01344a;
	--header-white:      #ffffff;
	--header-light:      #f8f9fa;
	--header-primary:    #ff2714;
	--header-text:       rgba(255, 255, 255, 0.85);
	--header-text-muted: rgba(255, 255, 255, 0.6);
	--header-border:     rgba(255, 255, 255, 0.1);
	--header-nav-text:   #02435b;
	--header-transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =====================================================================
   TOPBAR — Desktop
   ===================================================================== */
.alrahma-topbar {
	background-color: var(--header-dark);
	color: var(--header-text);
	font-size: 0.85rem;
	line-height: 1;
	position: relative;
	z-index: 1040;
}

.alrahma-topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 42px;
}

/* Social icons */
.alrahma-topbar-social {
	display: flex;
	align-items: center;
	gap: 4px;
}

.alrahma-topbar-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: var(--header-text);
	background: rgba(255, 255, 255, 0.08);
	font-size: 0.8rem;
	transition: background 0.3s ease, color 0.3s ease;
	text-decoration: none;
}

.alrahma-topbar-social a:hover {
	background: var(--header-primary);
	color: #fff;
}

/* Contact items */
.alrahma-topbar-contact {
	display: flex;
	align-items: center;
	gap: 20px;
}

.alrahma-topbar-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--header-text);
	text-decoration: none;
	transition: color 0.3s ease;
	white-space: nowrap;
}

a.alrahma-topbar-item:hover {
	color: #fff;
}

.alrahma-topbar-item i {
	color: var(--header-primary);
	font-size: 0.8rem;
}

/* Separator line below topbar */
.alrahma-topbar::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* =====================================================================
   TOPBAR — Mobile (slim strip)
   ===================================================================== */
.alrahma-topbar-mobile {
	background-color: var(--header-dark);
	padding: 6px 0;
	position: relative;
	z-index: 1040;
}

.alrahma-topbar-mobile-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
}

.alrahma-topbar-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 14px;
	border-radius: 30px;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	background: rgba(255, 255, 255, 0.1);
	transition: background 0.3s ease;
	white-space: nowrap;
}

.alrahma-topbar-pill:hover,
.alrahma-topbar-pill:focus {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.alrahma-topbar-pill--wa {
	background: rgba(37, 211, 102, 0.2);
}

.alrahma-topbar-pill--wa:hover {
	background: rgba(37, 211, 102, 0.35);
}

.alrahma-topbar-pill i {
	font-size: 0.9rem;
}

/* =====================================================================
   NAVBAR — Header Wrapper
   ===================================================================== */
.alrahma-header {
	position: sticky;
	top: 0;
	z-index: 1030;
	transition: transform var(--header-transition), box-shadow 0.3s ease;
	will-change: transform;
}

/* Hidden state — smart sticky */
.alrahma-header.is-hidden {
	transform: translateY(-100%);
}

/* Scrolled state — compact + shadow */
.alrahma-header.is-scrolled .alrahma-navbar {
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.alrahma-header.is-scrolled .alrahma-navbar-logo {
	height: 75px;
}

.alrahma-header.is-scrolled .alrahma-navbar-inner {
	min-height: 60px;
}

/* Navbar container */
.alrahma-navbar {
	background-color: var(--header-white);
	transition: box-shadow 0.3s ease;
}

.alrahma-navbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 80px;
	transition: min-height var(--header-transition);
}

/* =====================================================================
   LOGO
   ===================================================================== */
.alrahma-navbar-brand {
	display: flex;
	align-items: center;
	text-decoration: none;
	flex-shrink: 0;
}

.alrahma-navbar-logo {
	height: 75px;
	width: auto;
	object-fit: contain;
	transition: height var(--header-transition);
}

/* =====================================================================
   DESKTOP MENU
   ===================================================================== */
.alrahma-navbar-menu {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Reset wp_nav_menu list */
.alrahma-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* Nav links */
.alrahma-nav-list .nav-link {
	position: relative;
	padding: 8px 16px;
	color: var(--header-nav-text) !important;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.3s ease;
	border-radius: 6px;
}

.alrahma-nav-list .nav-link::after {
	content: '';
	position: absolute;
	bottom: 2px;
	left: 50%;
	width: 0;
	height: 2px;
	background: var(--header-primary);
	transition: width 0.3s ease, left 0.3s ease;
	border-radius: 1px;
}

.alrahma-nav-list .nav-link:hover,
.alrahma-nav-list .nav-link.active {
	color: var(--header-primary) !important;
}

.alrahma-nav-list .nav-link:hover::after,
.alrahma-nav-list .nav-link.active::after {
	width: 60%;
	left: 20%;
}

/* Dropdown override */
.alrahma-nav-list .dropdown-toggle::after {
	border: none;
	content: "\f107";
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	vertical-align: middle;
	margin-inline-start: 6px;
	font-size: 0.75rem;
	transition: transform 0.3s ease;
}

.alrahma-nav-list .dropdown-toggle[aria-expanded="true"]::after {
	transform: rotate(180deg);
}

/* Desktop dropdown menu */
@media (min-width: 992px) {
	.alrahma-nav-list .dropdown-menu {
		display: block;
		border: none;
		border-radius: 10px;
		box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
		padding: 10px 0;
		margin-top: 8px;
		opacity: 0;
		visibility: hidden;
		transform: translateY(10px);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
		background: #fff;
	}

	.alrahma-nav-list .dropdown:hover > .dropdown-menu {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.alrahma-nav-list .dropdown-item {
		padding: 8px 20px;
		font-size: 0.95rem;
		color: var(--header-nav-text);
		transition: background 0.2s ease, color 0.2s ease;
	}

	.alrahma-nav-list .dropdown-item:hover {
		background: rgba(255, 39, 20, 0.06);
		color: var(--header-primary);
	}
}

/* =====================================================================
   CTA BUTTON
   ===================================================================== */
.alrahma-nav-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 24px;
	background: var(--header-primary);
	color: #fff !important;
	font-size: 0.95rem;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
	box-shadow: 0 4px 15px rgba(255, 39, 20, 0.25);
	margin-inline-start: 16px;
}

.alrahma-nav-cta:hover {
	background: #e02010;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(255, 39, 20, 0.35);
	color: #fff !important;
}

.alrahma-nav-cta i {
	font-size: 1.1rem;
}

/* =====================================================================
   HAMBURGER TOGGLE (mobile)
   ===================================================================== */
.alrahma-hamburger {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 36px;
	height: 36px;
	padding: 6px;
	background: none;
	border: 2px solid var(--header-nav-text);
	border-radius: 6px;
	cursor: pointer;
	transition: border-color 0.3s ease;
}

.alrahma-hamburger:hover,
.alrahma-hamburger:focus {
	border-color: var(--header-primary);
	outline: none;
}

.alrahma-hamburger-line {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--header-nav-text);
	border-radius: 1px;
	transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}

.alrahma-hamburger:hover .alrahma-hamburger-line {
	background: var(--header-primary);
}

/* =====================================================================
   OFF-CANVAS MENU
   ===================================================================== */
.alrahma-offcanvas {
	width: 300px !important;
	background-color: var(--header-dark) !important;
	border-left: none !important;
	color: #fff;
}

[dir="rtl"] .alrahma-offcanvas {
	border-right: none !important;
}

.alrahma-offcanvas-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px;
	border-bottom: 1px solid var(--header-border);
}

.alrahma-offcanvas-brand img {
	height: 50px;
	width: auto;
	object-fit: contain;
}

.alrahma-offcanvas-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: rgba(255, 255, 255, 0.08);
	border: none;
	border-radius: 50%;
	color: #fff;
	font-size: 1rem;
	cursor: pointer;
	transition: background 0.3s ease, transform 0.3s ease;
}

.alrahma-offcanvas-close:hover {
	background: var(--header-primary);
	transform: rotate(90deg);
}

/* Off-canvas navigation */
.alrahma-offcanvas-body {
	padding: 20px;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.alrahma-offcanvas-nav {
	list-style: none;
	margin: 0;
	padding: 0;
}

.alrahma-offcanvas-nav .nav-item {
	border-bottom: 1px solid var(--header-border);
}

.alrahma-offcanvas-nav .nav-link {
	display: block;
	padding: 14px 0;
	color: rgba(255, 255, 255, 0.85) !important;
	font-size: 1rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.3s ease, padding-inline-start 0.3s ease;
}

.alrahma-offcanvas-nav .nav-link:hover,
.alrahma-offcanvas-nav .nav-link.active {
	color: var(--header-primary) !important;
	padding-inline-start: 8px;
}

/* Off-canvas dropdown */
.alrahma-offcanvas-nav .dropdown-menu {
	background: transparent;
	border: none;
	padding: 0 0 0 16px;
	position: static !important;
	transform: none !important;
}

[dir="rtl"] .alrahma-offcanvas-nav .dropdown-menu {
	padding: 0 16px 0 0;
}

.alrahma-offcanvas-nav .dropdown-item {
	color: var(--header-text-muted) !important;
	padding: 10px 0;
	font-size: 0.9rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	background: transparent !important;
}

.alrahma-offcanvas-nav .dropdown-item:hover {
	color: var(--header-primary) !important;
}

.alrahma-offcanvas-nav .dropdown-toggle::after {
	border: none;
	content: "\f107";
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	float: left;
	font-size: 0.75rem;
	color: var(--header-text-muted);
}

[dir="rtl"] .alrahma-offcanvas-nav .dropdown-toggle::after {
	float: left;
}

/* Off-canvas CTA */
.alrahma-offcanvas-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 20px;
	padding: 12px;
	background: var(--header-primary);
	color: #fff !important;
	font-weight: 700;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.3s ease;
}

.alrahma-offcanvas-cta:hover {
	background: #e02010;
	color: #fff !important;
}

/* Off-canvas contact */
.alrahma-offcanvas-contact {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid var(--header-border);
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.alrahma-offcanvas-contact a {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--header-text) !important;
	text-decoration: none;
	font-size: 0.9rem;
	transition: color 0.3s ease;
}

.alrahma-offcanvas-contact a:hover {
	color: #fff !important;
}

.alrahma-offcanvas-contact i {
	color: var(--header-primary);
	width: 18px;
	text-align: center;
}

/* Off-canvas social */
.alrahma-offcanvas-social {
	display: flex;
	gap: 8px;
	margin-top: auto;
	padding-top: 20px;
}

.alrahma-offcanvas-social a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: var(--header-text) !important;
	font-size: 0.85rem;
	text-decoration: none;
	transition: background 0.3s ease, color 0.3s ease;
}

.alrahma-offcanvas-social a:hover {
	background: var(--header-primary);
	color: #fff !important;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* Tablet */
@media (max-width: 991.98px) {
	.alrahma-navbar-inner {
		min-height: 64px;
	}

	.alrahma-navbar-logo {
		height: 75px;
	}

	.alrahma-header.is-scrolled .alrahma-navbar-logo {
		height: 65px;
	}

	.alrahma-header.is-scrolled .alrahma-navbar-inner {
		min-height: 52px;
	}
}

/* Small mobile */
@media (max-width: 575.98px) {
	.alrahma-topbar-mobile-inner {
		gap: 8px;
	}

	.alrahma-topbar-pill {
		padding: 4px 10px;
		font-size: 0.75rem;
	}

	.alrahma-navbar-logo {
		height: 75px;
	}

	.alrahma-hamburger {
		width: 32px;
		height: 32px;
		padding: 5px;
	}

	.alrahma-offcanvas {
		width: 270px !important;
	}
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
	.alrahma-header,
	.alrahma-navbar,
	.alrahma-navbar-logo,
	.alrahma-navbar-inner,
	.alrahma-nav-list .nav-link::after,
	.alrahma-nav-list .dropdown-menu,
	.alrahma-topbar-social a,
	.alrahma-hamburger-line,
	.alrahma-offcanvas-close {
		transition-duration: 0.01ms !important;
	}
}

/* =====================================================================
   PRINT
   ===================================================================== */
@media print {
	.alrahma-topbar,
	.alrahma-topbar-mobile,
	.alrahma-nav-cta,
	.alrahma-hamburger,
	.alrahma-offcanvas {
		display: none !important;
	}

	.alrahma-header {
		position: static;
		box-shadow: none;
	}

	.alrahma-navbar {
		background: #fff;
		box-shadow: none;
	}

	.alrahma-nav-list .nav-link {
		color: #000 !important;
	}
}
