/*
  ----------------------------------------------------------------------------
  © 2025 Mehdi Dimyadi
  Roozegaar Projects Collection
  All rights reserved.

  Author: Mehdi Dimyadi
  GitHub: https://github.com/MEHDIMYADI

  Description:
  This file is part of the Roozegaar Projects, including web, JSON,
  CSS, and JavaScript files. You may use, modify, and distribute this code
  in accordance with the project license.

  ----------------------------------------------------------------------------
*/
html {
	scroll-behavior: smooth;
}
#progress-bar {
	position: fixed;
	top: 0;
	left: 0;
	height: 3px;
	width: 0%;
	background-color: var(--primary-color, #3b82f6);
	z-index: 9999;
	transition: width 0.3s ease, opacity 0.4s ease;
}
:root {
	--primary-color: #4a6cf7;
	--secondary-color: #6a7c92;
	--bg-color: #ffffff;
	--text-color: #333333;
	--header-bg: #f8f9fa;
	--footer-bg: #2d3748;
	--footer-text: #e2e8f0;
	--card-bg: #ffffff;
	--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	--transition: all 0.3s ease;
	--ribbon-bg: linear-gradient(180deg, #4a6cf7, #3352cc);
  --ribbon-text: #ffffff;
}
[data-theme="dark"] {
	--primary-color: #5d78ff;
	--secondary-color: #a0aec0;
	--bg-color: #1a202c;
	--text-color: #e2e8f0;
	--header-bg: #2d3748;
	--footer-bg: #1a202c;
	--footer-text: #cbd5e0;
	--card-bg: #2d3748;
	--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
	  --ribbon-bg: linear-gradient(180deg, #5d78ff, #364b99);
  --ribbon-text: #e2e8f0;
}
.ver-text {
	display: inline-block;
	min-width: 30px;
	text-align: center;
	animation: blink 1s infinite;
}
@keyframes blink {
	50% {
		opacity: 0.4;
	}
}
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	transition: var(--transition);
}
body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	background-color: var(--bg-color);
	color: var(--text-color);
	line-height: 1.6;
	padding-top: 70px;
}
[lang="fa"] body {
	font-family: 'Vazir', Tahoma, Arial, sans-serif;
}
.container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}
header {
	background-color: var(--header-bg);
	padding: 1rem 0;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	position: fixed;
	top: 0;
	width: 100%;
	z-index: 1000;
	border-radius: 0;
}
header.scrolled {
  background-color: rgba(248, 249, 250, 0.8);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 0.1rem 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease, backdrop-filter 0.3s ease;
  border-radius: 0 0 1rem 1rem;
}
[data-theme="dark"] header.scrolled {
  background-color: rgba(45, 55, 72, 0.8);
}
.header-content {
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.logo {
	font-size: 1.8rem;
	font-weight: 700;
	color: var(--primary-color);
	text-decoration: none;
}
.nav-links {
	display: flex;
	list-style: none;
}
.nav-links li {
	margin-left: 1.5rem;
}
.nav-links a {
	text-decoration: none;
	color: var(--text-color);
	font-weight: 500;
	padding: 0.5rem 0;
	position: relative;
}
.nav-links a:hover {
	color: var(--primary-color);
}
.nav-links a::after {
	content: '';
	position: absolute;
	bottom: 0;
	right: 0;
	width: 0;
	height: 2px;
	background-color: var(--primary-color);
	transition: width 0.3s ease;
}
.nav-links a:hover::after {
	width: 100%;
}
.header-controls {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.theme-toggle, .lang-toggle {
	background: none;
	border: none;
	color: var(--text-color);
	cursor: pointer;
	font-size: 1.2rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.theme-toggle:hover, .lang-toggle:hover {
 animation: wiggle 0.4s ease;
}
[lang="en"] .lang-toggle {
	font-family: 'Vazir', Tahoma, Arial, sans-serif;
}
.mobile-menu-btn {
	display: none;
	background: none;
	border: none;
	color: var(--text-color);
	font-size: 1.5rem;
	cursor: pointer;
}
.intro {
	padding: 5rem 0;
	text-align: center;
	background: linear-gradient(135deg, #6c5ce7, #a29bfe, #74b9ff, #6c5ce7);
	color: white;
	border-radius: 0 0 30px 30px;
	margin-bottom: 3rem;
}
[data-theme="dark"] .intro {
  background: linear-gradient(135deg, #4b3ecf, #5c54d4, #4d8ac9, #4b3ecf);
}
.intro h1 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}
.intro p {
	font-size: 1.2rem;
	max-width: 700px;
	margin: 0 auto 2rem;
}
.cta-button {
	display: inline-block;
	background-color: white;
	color: var(--primary-color);
	padding: 0.8rem 2rem;
	border-radius: 50px;
	text-decoration: none;
	font-weight: 600;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.cta-button:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.section-title {
	text-align: center;
	margin-bottom: 3rem;
	font-size: 2rem;
	color: var(--primary-color);
}
.projects-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
	margin-bottom: 4rem;
}
.project-card {
	display: flex;
	flex-direction: column;
	background-color: var(--card-bg);
	border-radius: 15px;
	position: relative;
	overflow: hidden;
	box-shadow: var(--card-shadow);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
	transform: translateY(-10px);
	transform: translateY(-10px);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}
.project-card .ribbon {
  opacity: 0;
  transform: translateY(-10px) perspective(300px) rotateX(10deg);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.project-card:hover .ribbon {
  opacity: 1;
  transform: translateY(0) perspective(300px) rotateX(0);
  pointer-events: auto;
}
.project-image {
	width: 100%;
	height: 200px;
	object-fit: cover;
	cursor: pointer;
}
.project-content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	padding: 1.5rem;
}
.project-title {
	font-size: 1.4rem;
	margin-bottom: 0.5rem;
	color: var(--primary-color);
}
.project-description {
	color: var(--secondary-color);
	margin-bottom: 1rem;
	height: auto;
	overflow: hidden;
}
.project-features {
	list-style: none;
	margin-bottom: 1.5rem;
	flex-grow: 0;
}
.project-features li {
	padding: 0.3rem 0;
	position: relative;
	padding-right: 1.5rem;
}
.project-features li::before {
	content: '✓';
	position: absolute;
	right: 0;
	color: var(--primary-color);
	font-weight: bold;
}
.download-info {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
}
.project-version {
	flex: 1;
	font-size: 0.9rem;
	color: var(--secondary-color);
}
.download-btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: var(--primary-color);
	color: white;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	text-decoration: none;
	transition: transform 0.2s ease;
}
.download-btn:hover {
	transform: scale(1.05);
}
.download-btn i {
	margin: 0;
	font-size: 1rem;
}
.ribbon {
  position: absolute;
  top: -2px;
  background: var(--ribbon-bg);
  color: var(--ribbon-text);
  padding: 10px 12px;
  font-weight: bold;
  font-size: 0.9rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transform: perspective(300px) rotateX(10deg);
  z-index: 3;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  transition: var(--transition);
}
.ribbon::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(0,0,0,0.15);
  border-radius: 0 0 6px 6px;
  filter: blur(1px);
}
:dir(ltr) .ribbon {
  right: 10px;
}
:dir(rtl) .ribbon {
  left: 10px;
}
:dir(rtl) .ribbon span {
  display: inline-block;
  transform: rotate(180deg);
}
.features {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin-bottom: 4rem;
}
.feature-card {
	background-color: var(--card-bg);
	padding: 2rem;
	border-radius: 15px;
	box-shadow: var(--card-shadow);
	text-align: center;
}
.feature-icon {
	font-size: 3rem;
	color: var(--primary-color);
	margin-bottom: 1rem;
}
.feature-title {
	font-size: 1.4rem;
	margin-bottom: 1rem;
}
.feature-description {
	color: var(--secondary-color);
}
.modal {
	display: none;
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background-color: rgba(0, 0, 0, 0.8);
	z-index: 2000;
	justify-content: center;
	align-items: center;
	padding: 1rem;
}
.modal-content {
	max-width: 90%;
	max-height: 90%;
	position: relative;
}
.modal-image {
	width: 100%;
	height: auto;
	border-radius: 10px;
}
.close-modal {
	position: absolute;
	top: -40px;
	left: 0;
	color: white;
	font-size: 2rem;
	background: none;
	border: none;
	cursor: pointer;
}
footer {
	background: linear-gradient(135deg, #4a4f77, #5a5fb3, #3d6dbd, #4a4f77);
	color: var(--footer-text);
	padding: 3rem 0 1.5rem;
	border-radius: 30px 30px 0 0;
}
[data-theme="dark"] footer {
  background: linear-gradient(135deg, #2c2c44, #3a3a67, #1a1a2e, #2c2c44);
}
.footer-content {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}
.footer-section h3 {
	color: white;
	margin-bottom: 1.5rem;
	font-size: 1.3rem;
}
.footer-links {
	list-style: none;
}
.footer-links li {
	margin-bottom: 0.8rem;
}
.footer-links a {
	color: var(--footer-text);
	text-decoration: none;
}
.footer-links a:hover {
	color: white;
	text-decoration: underline;
}
.social-links {
	display: flex;
	gap: 1rem;
	margin-top: 1rem;
}
.social-links a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	color: white;
	text-decoration: none;
}
.social-links a:hover {
	background-color: var(--primary-color);
}
.footer-bottom {
	text-align: center;
	padding-top: 1.5rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-link {
	color: var(--footer-text);
	text-decoration: none;
	font-weight: normal;
	font-size: 0.85rem;
	transition: var(--transition);
}
.footer-link:hover {
	color: white;
	text-decoration: underline;
}
.noscript-container {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  padding: 20px;
  box-sizing: border-box;
}
.noscript-box {
  background: #f8d7da;
  color: #721c24;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  max-width: 550px;
  width: 100%;
  text-align: center;
  user-select: none;
}
.noscript-box::before {
  content: "⚠️";
  font-size: 32px;
  display: block;
  margin-bottom: 15px;
}
.noscript-box p {
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.4;
}
.noscript-box strong {
  font-size: 18px;
}
.noscript-box hr {
  border: none;
  border-top: 1.5px solid #721c24;
  margin: 20px 0;
  opacity: 0.4;
}
.noscript-message[dir="rtl"] {
    font-family: 'Vazir', Tahoma, Arial, sans-serif;
}
@media (max-width: 768px) {
	.header-content {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}
	.logo {
		flex: none;
		cursor: pointer;
	}
	.controls-wrapper {
		display: flex;
		gap: 1rem;
	}
	.nav-links {
		display: none;
		position: absolute;
		top: 100%;
		width: auto;
		background-color: var(--header-bg);
		/* flex-direction: column; */
		padding: 1rem 0 1rem 1rem;
		right: 10px;
		left: 10px;
		margin-top: 10px;
		box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
		border-radius: 12px;
	}
	.nav-links.active {
		display: flex;
	}
	.nav-links li {
		margin: 0;
		text-align: center;
	}
	.nav-links a {
		display: block;
	}
	.mobile-menu-btn {
		display: block;
		order: 1;
	}
	.intro h1 {
		font-size: 2rem;
	}
	.intro p {
		font-size: 1rem;
	}
}
[lang="en"] {
	direction: ltr;
	text-align: left;
}
[lang="en"] .nav-links li {
	margin-right: 1.5rem;
	margin-left: 0;
}
[lang="en"] .nav-links a::after {
	right: auto;
	left: 0;
}
[lang="en"] .project-features li {
	padding-right: 0;
	padding-left: 1.5rem;
}
[lang="en"] .project-features li::before {
	right: auto;
	left: 0;
}
[lang="en"] .close-modal {
	left: auto;
	right: 0;
}

[lang="fa"] {
    direction: rtl;
    text-align: right;
	font-feature-settings: "ss01" on;
    font-variant-numeric: normal;
    unicode-bidi: embed;
}
[lang="fa"] .nav-links li {
    margin-left: 0;
    margin-right: 1.5rem;
}
[lang="fa"] .nav-links a::after {
    left: auto;
    right: 0;
}
[lang="fa"] .project-features li {
    padding-left: 0;
    padding-right: 1.5rem;
}
[lang="fa"] .project-features li::before {
    left: auto;
    right: 0;
}
[lang="fa"] .close-modal {
    right: auto;
    left: 0;
}
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(10deg); }
  75% { transform: rotate(-10deg); }
}
