:root {
	--aftab-yellow: #f6c800;
	--aftab-yellow-dark: #d9ae00;
	--aftab-charcoal: #1d252c;
	--aftab-text: #28323a;
	--aftab-muted: #6e7981;
	--aftab-border: #e7ebee;
	--aftab-surface: #f6f8f9;
	--aftab-white: #ffffff;
	--aftab-radius-sm: 10px;
	--aftab-radius-md: 18px;
	--aftab-radius-lg: 30px;
	--aftab-container: 1540px;
	--aftab-header-height: 84px;
	--aftab-transition: 0.25s ease;
}

/* --------------------------------------------------------------------------
   Site header
   -------------------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--aftab-white);
	border-bottom: 1px solid var(--aftab-border);
	transition: background-color var(--aftab-transition), border-color var(--aftab-transition), box-shadow var(--aftab-transition);
}

.site-header.is-scrolled {
	background-color: rgba(255, 255, 255, 0.98);
	border-bottom-color: rgba(40, 50, 58, 0.08);
	box-shadow: 0 10px 30px rgba(29, 37, 44, 0.08);
}

.admin-bar .site-header {
	top: 32px;
}

.site-header h1,
.site-header h2,
.site-header p {
	margin: 0;
	padding: 0;
}

.site-header__container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	max-width: var(--aftab-container);
	min-height: var(--aftab-header-height);
	margin-inline: auto;
	padding: 0.75rem 1.25rem;
}

.site-header__logo {
	flex-shrink: 0;
}

.site-header__logo-heading {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.site-header__logo-link,
.site-header .custom-logo-link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	color: var(--aftab-charcoal);
}

.site-header__logo-link:focus-visible,
.site-header .custom-logo-link:focus-visible,
.site-header__nav a:focus-visible,
.site-header__contact-phone:focus-visible,
.button:focus-visible,
.site-header__toggle:focus-visible {
	outline: 2px solid var(--aftab-yellow-dark);
	outline-offset: 3px;
}

.site-header__header-image,
.site-header .custom-logo {
	display: block;
	width: auto;
	max-height: 52px;
	height: auto;
}

.site-header__site-name {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--aftab-charcoal);
	white-space: nowrap;
}

.site-header__nav {
	flex: 1 1 auto;
	display: flex;
	justify-content: center;
	min-width: 0;
}

.site-header__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.25rem 1.75rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-header__menu > .menu-item {
	position: relative;
	margin: 0;
}

.site-header__menu > .menu-item > a {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.5rem 0;
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--aftab-text);
	text-decoration: none;
	transition: color var(--aftab-transition);
}

.site-header__menu > .menu-item > a:hover,
.site-header__menu > .menu-item.current-menu-item > a,
.site-header__menu > .menu-item.current-menu-ancestor > a {
	color: var(--aftab-charcoal);
}

.site-header__menu > .menu-item.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 0.45rem;
	height: 0.45rem;
	border-inline-end: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg);
	margin-top: -0.15rem;
	opacity: 0.7;
}

.site-header__menu .sub-menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	min-width: 210px;
	margin: 0;
	padding: 0.5rem;
	list-style: none;
	background: var(--aftab-white);
	border: 1px solid var(--aftab-border);
	border-radius: var(--aftab-radius-sm);
	box-shadow: 0 10px 30px rgba(29, 37, 44, 0.08);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity var(--aftab-transition), visibility var(--aftab-transition);
}

.site-header__menu > .menu-item:hover > .sub-menu,
.site-header__menu > .menu-item:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.site-header__menu .sub-menu a {
	display: block;
	padding: 0.65rem 0.85rem;
	border-radius: calc(var(--aftab-radius-sm) - 2px);
	font-size: 0.9rem;
	color: var(--aftab-text);
	text-decoration: none;
	transition: background-color var(--aftab-transition), color var(--aftab-transition);
}

.site-header__menu .sub-menu a:hover {
	background-color: var(--aftab-surface);
	color: var(--aftab-charcoal);
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-shrink: 0;
}

.site-header__contact {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.15rem;
}

.site-header__contact-label {
	font-size: 0.78rem;
	color: var(--aftab-muted);
	white-space: nowrap;
}

.site-header__contact-phone {
	font-size: 1rem;
	font-weight: 700;
	color: var(--aftab-charcoal);
	text-decoration: none;
	direction: ltr;
	unicode-bidi: embed;
	white-space: nowrap;
}

.site-header__contact-phone:hover {
	color: var(--aftab-text);
}

.site-header__toggle {
	display: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 48px;
	padding: 0.75rem 1.35rem;
	border: 1px solid transparent;
	border-radius: var(--aftab-radius-md);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--aftab-transition), border-color var(--aftab-transition), color var(--aftab-transition), transform var(--aftab-transition);
}

.button--primary {
	background-color: var(--aftab-yellow);
	color: var(--aftab-charcoal);
}

.button--primary:hover {
	background-color: var(--aftab-yellow-dark);
	color: var(--aftab-charcoal);
	transform: translateY(-2px);
}

.button--secondary {
	background-color: var(--aftab-white);
	border-color: var(--aftab-border);
	color: var(--aftab-charcoal);
}

.button--secondary:hover {
	background-color: var(--aftab-surface);
	border-color: var(--aftab-charcoal);
	color: var(--aftab-charcoal);
	transform: translateY(-2px);
}

/* Override the legacy main a.button declarations, which use !important. */
main a.button.button--primary,
main a.button.button--secondary {
	display: inline-flex;
	padding: 0.75rem 1.35rem;
	border: 1px solid transparent;
	border-radius: var(--aftab-radius-md);
}

main a.button.button--primary {
	background-color: var(--aftab-yellow) !important;
	color: var(--aftab-charcoal) !important;
}

main a.button.button--primary:hover,
main a.button.button--primary:focus-visible {
	background-color: var(--aftab-yellow-dark) !important;
	color: var(--aftab-charcoal) !important;
}

main a.button.button--secondary {
	background-color: var(--aftab-white) !important;
	border-color: rgba(29, 37, 44, 0.32);
	color: var(--aftab-charcoal) !important;
}

main a.button.button--secondary:hover,
main a.button.button--secondary:focus-visible {
	background-color: var(--aftab-surface) !important;
	border-color: var(--aftab-charcoal);
	color: var(--aftab-charcoal) !important;
}

.site-header__cta {
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Mobile navigation
   -------------------------------------------------------------------------- */

.mobile-nav__toggle {
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 1px solid var(--aftab-border);
	border-radius: var(--aftab-radius-sm);
	background: var(--aftab-white);
	color: var(--aftab-charcoal);
	cursor: pointer;
}

.mobile-nav__toggle-line {
	display: block;
	width: 20px;
	height: 2px;
	background-color: currentColor;
	border-radius: 999px;
	transition: transform var(--aftab-transition), opacity var(--aftab-transition);
}

.is-mobile-nav-open {
	overflow: hidden;
}

.is-mobile-nav-open .mobile-nav__toggle-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.is-mobile-nav-open .mobile-nav__toggle-line:nth-child(2) {
	opacity: 0;
}

.is-mobile-nav-open .mobile-nav__toggle-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav__overlay {
	display: none;
}

/* --------------------------------------------------------------------------
   Home hero
   -------------------------------------------------------------------------- */

.home-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	min-height: 720px;
	background-color: #0c1b2a;
	background-image: url("../images/home/home-hero-energy.png");
	background-size: cover;
	background-position: center right;
	background-repeat: no-repeat;
	color: #f4f7fa;
}

.home-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		to right,
		rgba(6, 16, 28, 0.72) 0%,
		rgba(6, 16, 28, 0.48) 28%,
		rgba(6, 16, 28, 0.16) 48%,
		rgba(6, 16, 28, 0) 64%
	);
}

.home-hero__container {
	position: relative;
	z-index: 2;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: center;
	max-width: var(--aftab-container);
	min-height: 720px;
	margin-inline: auto;
	padding: clamp(4rem, 7vw, 6.25rem) 1.25rem;
	box-sizing: border-box;
}

.home-hero__content {
	position: relative;
	z-index: 2;
	width: min(100%, 580px);
	max-width: 580px;
	margin-left: 0;
	margin-right: auto;
	box-sizing: border-box;
}

.home-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	margin: 0 0 1rem;
	padding: 0.45rem 0.9rem;
	border-radius: 999px;
	background-color: rgba(246, 200, 0, 0.2);
	color: #fff8dc;
	font-size: 0.9rem;
	font-weight: 600;
}

.home-hero__title {
	margin: 0 0 1.25rem;
	font-size: clamp(2.5rem, 5vw, 4.7rem);
	font-weight: 800;
	line-height: 1.15;
	color: #ffffff;
}

.home-hero .home-hero__title {
	padding-bottom: 0;
}

.home-hero__title-highlight {
	position: relative;
	z-index: 0;
	display: inline;
	padding-inline: 0.08em;
	color: #ffd84a;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.home-hero__title-highlight::after {
	content: "";
	position: absolute;
	z-index: -1;
	inset-inline: 0;
	bottom: 0.08em;
	height: 30%;
	border-radius: 0.18em;
	background: rgba(246, 200, 0, 0.28);
	transform: rotate(-1deg);
}

.home-hero__description {
	margin: 0 0 2rem;
	max-width: 34rem;
	font-size: clamp(1.05rem, 1.6vw, 1.15rem);
	line-height: 1.9;
	color: rgba(244, 247, 250, 0.88);
}

.home-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem;
	margin-bottom: 2rem;
}

.home-hero__button {
	box-sizing: border-box;
	min-width: min(190px, 100%);
	min-height: 54px;
	max-width: 100%;
	padding-inline: 1.6rem;
	box-shadow: 0 8px 18px rgba(7, 16, 28, 0.18);
}

.home-hero__button-icon {
	flex-shrink: 0;
	transition: transform var(--aftab-transition);
}

.home-hero__button:hover .home-hero__button-icon {
	transform: translateX(-3px);
}

.home-hero__features {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-hero__feature {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding-inline: 1rem;
}

.home-hero__feature:first-child {
	padding-inline-start: 0;
}

.home-hero__feature + .home-hero__feature {
	border-inline-start: 1px solid rgba(255, 255, 255, 0.22);
}

.home-hero__feature-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: transparent;
	color: #ffd84a;
	flex-shrink: 0;
}

.home-hero__feature-text {
	font-size: 0.92rem;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.92);
}

/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
	:root {
		--aftab-header-height: 76px;
	}

	.site-header__container {
		gap: 1rem;
	}

	.site-header__contact,
	.site-header__cta {
		display: none;
	}

	.site-header__toggle {
		display: inline-flex;
	}

	.site-header__nav {
		position: fixed;
		inset: 0;
		top: var(--aftab-header-height);
		display: block;
		flex: none;
		padding: 1rem 1.25rem 2rem;
		background: rgba(29, 37, 44, 0.35);
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
		transition: opacity var(--aftab-transition), visibility var(--aftab-transition);
	}

	.admin-bar .site-header__nav {
		top: calc(var(--aftab-header-height) + 32px);
	}

	.is-mobile-nav-open .site-header__nav {
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
	}

	.site-header__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		max-height: calc(100vh - var(--aftab-header-height) - 2rem);
		overflow-y: auto;
		padding: 0.75rem;
		border-radius: var(--aftab-radius-md);
		background: var(--aftab-white);
	}

	.site-header__menu > .menu-item > a {
		width: 100%;
		padding: 0.9rem 0.75rem;
	}

	.site-header__menu .sub-menu {
		position: static;
		transform: none;
		min-width: 0;
		margin-top: 0.25rem;
		padding: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		pointer-events: auto;
		background: transparent;
	}

	.site-header__menu .sub-menu a {
		padding-inline-start: 1.5rem;
	}

	.home-hero {
		min-height: 650px;
	}

	.home-hero__container {
		grid-template-columns: minmax(0, 1fr);
		min-height: 650px;
		padding-top: 3rem;
		padding-bottom: 3.5rem;
	}

	.home-hero__content {
		width: min(100%, 560px);
		max-width: 560px;
	}
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}

	.admin-bar .site-header__nav {
		top: calc(var(--aftab-header-height) + 46px);
	}
}

@media (max-width: 767px) {
	.site-header__container {
		padding-inline: 1rem;
	}

	.site-header__header-image,
	.site-header .custom-logo {
		max-height: 42px;
	}

	.site-header__site-name {
		font-size: 1.05rem;
	}

	.home-hero {
		min-height: 720px;
		background-position: 63% center;
	}

	.home-hero::before {
		background: linear-gradient(
			to right,
			rgba(6, 16, 28, 0.88) 0%,
			rgba(6, 16, 28, 0.7) 34%,
			rgba(6, 16, 28, 0.32) 58%,
			rgba(6, 16, 28, 0.06) 78%,
			transparent 100%
		);
	}

	.home-hero__container {
		gap: 2rem;
		min-height: 720px;
		padding-top: 2.25rem;
		padding-bottom: 2.75rem;
	}

	.home-hero__content {
		width: 100%;
		max-width: 100%;
	}

	.home-hero__title {
		font-size: clamp(2rem, 9vw, 2.6rem);
	}

	.home-hero__description {
		font-size: 1.05rem;
		line-height: 1.85;
	}

	.home-hero__actions {
		flex-direction: column;
	}

	.home-hero__button {
		width: 100%;
		min-width: 0;
	}

	.home-hero__features {
		gap: 0.65rem;
	}

	.home-hero__feature {
		width: 100%;
		padding-inline: 0;
	}

	.home-hero__feature + .home-hero__feature {
		border-inline-start: 0;
	}

}

@media (max-width: 400px) {
	.home-hero {
		min-height: 680px;
	}

	.home-hero__container {
		min-height: 680px;
		padding-top: 1.75rem;
		padding-bottom: 2.25rem;
	}
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@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;
	}

}

/* =========================================================
   Solutions menu widget
   WordPress Appearance > Menus output
========================================================= */

.homepage-about {
    position: relative;
    width: 100%;
    padding: 52px 24px 70px;
    direction: rtl;
    background: #ffffff;
    overflow: hidden;
}

.homepage-about::before {
    content: "راهکارها برای هر فضایی";
    display: block;
    width: min(100%, 1280px);
    margin: 0 auto 30px;
    color: #071d37;
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    line-height: 1.5;
    text-align: center;
}

.homepage-about > .home-widget {
    width: min(100%, 1280px);
    margin-inline: auto;
}

/*
 * نام کلاس container توسط وردپرس از نام منو ساخته می‌شود،
 * بنابراین به جای نام فارسی و متغیر آن، همه divهای مستقیم را هدف می‌گیریم.
 */
.homepage-about .home-widget > div {
    width: 100%;
}

/* خود UL فهرست وردپرس */
.homepage-about ul.menu {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* هر دسته */
.homepage-about ul.menu > li.menu-item {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 150px;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: relative;
    list-style: none !important;
}

/* حذف bullet پیش‌فرض */
.homepage-about ul.menu > li.menu-item::before,
.homepage-about ul.menu > li.menu-item::after,
.homepage-about ul.menu > li.menu-item::marker {
    content: none !important;
    display: none !important;
}

/* لینک کارت */
.homepage-about ul.menu > li.menu-item > a {
    position: relative;
    display: flex !important;
    width: 100% !important;
    height: 100%;
    min-height: 150px;
    padding: 18px 12px 16px !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid #e7ebee;
    border-radius: 18px;
    background: #ffffff;
    box-shadow:
        0 8px 24px rgba(7, 29, 55, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    color: #071d37 !important;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.6;
    text-align: center;
    text-decoration: none !important;
    overflow: hidden;
    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        background-color 220ms ease;
}

.homepage-about ul.menu > li.menu-item > a::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: #f6c800;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 220ms ease;
}

/* تصویر آیکن */
.homepage-about ul.menu > li.menu-item > a > img {
    display: block !important;
    width: 82px !important;
    height: 82px !important;
    max-width: 82px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: contain;
    object-position: center;
    transition: transform 220ms ease;
}

/* عنوان آیتم */
.homepage-about ul.menu > li.menu-item > a > span {
    display: block;
    width: 100%;
    color: #071d37;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.7;
    text-align: center;
}

/* Hover */
.homepage-about ul.menu > li.menu-item > a:hover {
    transform: translateY(-6px);
    border-color: rgba(246, 200, 0, 0.65);
    background: #fffdf6;
    box-shadow:
        0 18px 42px rgba(7, 29, 55, 0.12),
        0 5px 16px rgba(246, 200, 0, 0.08);
}

.homepage-about ul.menu > li.menu-item > a:hover::before {
    transform: scaleX(1);
}

.homepage-about ul.menu > li.menu-item > a:hover > img {
    transform: translateY(-3px) scale(1.05);
}

/* آیتم فعال */
.homepage-about ul.menu > li.current-menu-item > a,
.homepage-about ul.menu > li.current-menu-parent > a {
    border-color: #f6c800;
    background: #fffdf3;
}

/* جلوگیری از استایل‌های منوی هدر و مگامنو */
.homepage-about ul.menu,
.homepage-about ul.menu li,
.homepage-about ul.menu li a {
    position: relative;
    visibility: visible !important;
    opacity: 1 !important;
    transform-origin: center;
}

.homepage-about ul.menu ul.sub-menu {
    display: none !important;
}

/* لپ‌تاپ */
@media (max-width: 1250px) {
    .homepage-about ul.menu {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* تبلت */
@media (max-width: 850px) {
    .homepage-about {
        padding: 44px 18px 56px;
    }

    .homepage-about ul.menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .homepage-about ul.menu > li.menu-item,
    .homepage-about ul.menu > li.menu-item > a {
        min-height: 145px;
    }
}

/* موبایل */
@media (max-width: 520px) {
    .homepage-about {
        padding: 38px 14px 48px;
    }

    .homepage-about::before {
        margin-bottom: 22px;
        text-align: right;
    }

    .homepage-about ul.menu {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .homepage-about ul.menu > li.menu-item,
    .homepage-about ul.menu > li.menu-item > a {
        min-height: 0;
    }

    .homepage-about ul.menu > li.menu-item > a {
        padding: 14px 16px !important;
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
        border-radius: 16px;
        text-align: right;
    }

    .homepage-about ul.menu > li.menu-item > a > img {
        width: 70px !important;
        height: 70px !important;
        max-width: 70px !important;
        margin: 0 !important;
        flex: 0 0 70px;
    }

    .homepage-about ul.menu > li.menu-item > a > span {
        font-size: 15px;
        text-align: right;
    }
}
