/* --- استایل پایه هدر --- */
header.main-header {
	background: var(--primary-header-and-footer-background);
	display: flex;
	justify-content: center;
	align-items: center;
	height: 80px;
	color: var(--primary-header-and-footer-text);
	position: fixed;
	width: 100%;
	top: 0;
	left: 0;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.main-header-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 90%;
	max-width: 1400px;
	padding: 0 20px;
}

.right-header-container {
	display: flex;
	align-items: center;
}

.logo_container {
	display: flex;
	align-items: center;

}

.logo-image {

	display: flex;
	align-items: center;
	gap: 8px;
	height: 42px;
}

.logo-image .logo-type {
	font-weight: 600;
	color: var(--primary-header-and-footer-logo);
}

.link_container {
	font-family: var(--font);
	display: flex;
	align-items: center;
	list-style-type: none;
	margin: 0 32px 0 0;
	padding: 0;
	gap: 32px;
}

.link {
	padding: 28px 0;
	/* برای ایجاد ناحیه کلیک بزرگ */
	color: var(--text-light);
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: color 0.2s;
}

.link:hover,
.is-active-feature-dropdown {
	color: var(--text-dark);
	cursor: pointer;
}

.nav-arrow {
	width: 18px;
	height: 18px;
	fill: currentColor;
	transition: transform 0.2s;
}


.nav-item--has-dropdown {
	position: relative;
}

.dropdown-menu {
	position: absolute;
	top: 100%;
	right: 300%;
	background-color: white;
	border-radius: 16px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	transform: translate(50%, 10px);
	transition: all 0.3s ease;
	pointer-events: none;
}

.dropdown-menu__grid {
	display: grid;
	gap: 8px;
}

.dropdown-menu__item {
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
	padding: 12px;
	border-radius: 12px;
	transition: background-color 0.2s;
}

.dropdown-menu__item:hover {
	background-color: var(--primary-second-button);

}

.dropdown-menu__item:hover .dropdown-menu__text strong,
.dropdown-menu__item:hover .icon--orange {

	color: var(--primary-cta);
}


.dropdown-menu__icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-shrink: 0;
}

.icon--orange {
	background-color: var(--primary-second-button);
	color: var(--primary-dark-text);
}



.dropdown-menu__text {
	display: flex;
	flex-direction: column;
}

.dropdown-menu__text strong {
	font-size: 15px;
	font-weight: 600;
	color: var(--primary-gray-text);
}

.feature-dropdown {
	width: 750px;
}

.feature-dropdown .dropdown-menu__grid {
	grid-template-columns: 1fr 1fr 1fr;
}


/* --- استایل بخش اکانت --- */
.left-header-container {
	display: flex;
	justify-content: end;
}

.account-content {
	display: flex;
	align-items: center;
	position: relative;
	gap: 12px;
}

.account-item {
	padding: 12px 16px;
	color: var(--text-dark);
	font-weight: 600;
	font-size: 18px;
	text-decoration: none;
	border-radius: 8px;
	border: 1px solid transparent;
	white-space: nowrap;
}

.signup-btn {
	background-color: var(--primary-cta);
	color: var(--primary-header-and-footer-logo);
	border-color: var(--primary-cta);
}

.signup-btn:hover {
	background-color: var(--primary-header-and-footer-logo);
	color: var(--primary-dark-text);
	border-color: var(--primary-header-and-footer-logo);
}


.hamburger-button {
	display: none;
	flex-direction: column;
	justify-content: space-around;
	width: 30px;
	height: 24px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	z-index: 10;
	margin-left: 15px;

}

.hamburger-line {
	width: 100%;
	height: 3px;
	background-color: var(--primary-header-and-footer-logo);
	border-radius: 10px;
	transition: all 0.3s linear;
	position: relative;
	transform-origin: 1px;
}


header.is-open .hamburger-button .hamburger-line:nth-child(1) {
	transform: rotate(45deg);
}

header.is-open .hamburger-button .hamburger-line:nth-child(2) {
	opacity: 0;
	transform: translateX(-20px);
}

header.is-open .hamburger-button .hamburger-line:nth-child(3) {
	transform: rotate(-45deg);
}


.account-icon {
  width: 38px;
  height: 38px;
  cursor: pointer;
 
  border-radius: 8px;
}

.account-icon:hover .account-content {
  background: #000;

}

.account-content:hover .account-menu {
  display: flex;
}

.account-menu {
  width: 200px;
	background-color: white;
	border-radius: 16px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  position: absolute;
  bottom: -129px;
  left: 0;
  display: none;
  flex-direction: column;

  overflow: hidden;
}

.account-menu .account-name {
  width: calc(100% - 40px);
  padding: 20px;
  color: var(--primary-text-color);
  font-family: var(--font);
  font-weight: bold;
  font-size: 16px;
  text-decoration: none;
}
.account-menu .account-logout {
  width: calc(100% - 40px);
  padding: 20px;
  color: red;
  font-family: var(--font);
  font-weight: 300;
  font-size: 14px;
  text-decoration: none;
}
.account-menu .account-logout:hover {
  color: white;
  background-color: red;
}



@media (min-width: 992px) {
	.nav-item--has-dropdown:hover>.link .nav-arrow {
		transform: rotate(180deg);
	}

	.nav-item--has-dropdown:hover>.dropdown-menu {
		opacity: 1;
		visibility: visible;
		transform: translate(50%, 0);
		pointer-events: auto;
	}
}


@media (max-width: 991px) {
	.hamburger-button {
		display: flex;
	}

	.link_container {
		display: none;

	}


	header.is-open .link_container {
		display: flex;
		position: fixed;
		top: 80px;
		right: -32px;
		width: 400px;
		max-width: 80%;
		background-color: white;
		color: var(--primary-gray-text);
		flex-direction: column;
		align-items: stretch;
		padding: 20px 20px 20px 20px;
		box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
		box-sizing: border-box;
		transform: translateX(100%);
		animation: slideIn 0.4s forwards ease;
		height: calc(100vh - 80px);
		overflow-y: auto;
	}


	header:not(.is-open) .link_container {
		animation: slideOut 0.4s forwards ease;
	}

	@keyframes slideIn {
		from {
			transform: translateX(100%);
		}

		to {
			transform: translateX(0);
		}
	}

	@keyframes slideOut {
		from {
			transform: translateX(0);
		}

		to {
			transform: translateX(100%);
		}
	}



	.left-header-container .account-item:not(.signup-btn) {
		display: none;

	}



	.link_container .nav-item {
		width: 100%;
	}

	.link {
		width: 100%;
		justify-content: space-between;
		padding: 15px 0;

	}


	.dropdown-menu {
		position: static;
		width: auto;
		box-shadow: none;
		padding: 16px 0 0 16px;
		opacity: 1;
		visibility: visible;
		transform: none;
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.4s ease-in-out;
		margin-top: 10px;
	}

	.nav-item--has-dropdown.is-open>.dropdown-menu {
		max-height: 2000px;
	}

	.feature-dropdown .dropdown-menu__grid {
		grid-template-columns: 1fr;
	}

	.nav-item--has-dropdown.is-open>.link .nav-arrow {
		transform: rotate(180deg);
	}
}