/* ================================
   پورتفولیو - استایل‌های CSS
================================ */

/* ================================
   متغیرها و تنظیمات پایه
================================ */
:root {
  --bg-primary: #052226;
  --bg-secondary: #041c20;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --accent-primary: #0C969C;
  --accent-secondary: #0C7075;
  --accent-gradient: linear-gradient(135deg, #065e63  0%, #01a9b1e0  100%);
  --border-color: #2a2a2a;
  --border-light: #333333;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 200, 180, 0.2);
  --shadow-lg: 0 8px 40px rgba(0, 200, 195, 0.30);
  --shadow-glow: 0 0 30px rgba(0, 210, 220, 0.58);
  --transition: all 0.3s ease;
  --transition-slow: all 0.5s ease;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
}

/* تم روشن */
[data-theme="light"] {
  --bg-primary: #f0f0f0;
  --bg-secondary: #f8f9fa;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #888888;
  --border-color: #e0e0e0;
  --border-light: #f0f0f0;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
}

/* تنظیمات پایه */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
i.bi{
  margin-top: 5px;
}
html {
  scroll-behavior: smooth;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/vazirmatn/Vazirmatn-Bold.ttf') format('truetype');
  font-weight: 100 900; /* چون variable هست */
  font-style: normal;
  font-display: swap;
}
body {
  font-family: 'Vazirmatn', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* اسکرول بار سفارشی */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* ================================
   ناوبار
================================ */
.navbar {
  background: rgba(15, 15, 15, 0.75);
  backdrop-filter: blur(15px);
  padding: 15px 0;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.9);
}

.navbar.scrolled {
  padding: 10px 0;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
}

.brand-text {
  color: var(--text-primary);
}

.brand-dot {
  color: var(--accent-primary);
  font-size: 2rem;
}

.navbar-nav .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 10px 15px;
  position: relative;
  transition: var(--transition);
  text-decoration: none;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 50%;
  width: 0;
  height: 2px;
  background: var(--accent-gradient);
  transition: var(--transition);
  transform: translateX(50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
}

.navbar-toggler {
  border: none;
  padding: 5px;
  background: transparent;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

[data-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-collapse {
  transition: all 0.3s ease;
}

.btn-theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 45px;
  height: 40px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
}

.btn-theme-toggle i {
  font-size: 1.2rem;
}

.btn-theme-toggle:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* ================================
   بخش قهرمان (Hero)
================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-shapes .shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.shape-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-primary);
  top: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite;
}

.shape-2 {
  width: 300px;
  height: 300px;
  background: var(--accent-secondary);
  bottom: -50px;
  left: -50px;
  animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
  width: 200px;
  height: 200px;
  background: var(--accent-primary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pulse 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-30px) rotate(10deg); }
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1.2rem;
  color: var(--accent-primary);
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-name {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 10px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-title {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  min-height: 40px;
  animation: fadeInUp 0.8s ease 0.4s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.typed-text {
  color: var(--accent-primary);
}

.cursor {
  animation: blink 1s infinite;
  color: var(--accent-primary);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  max-width: 500px;
  animation: fadeInUp 0.8s ease 0.6s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s ease 0.8s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
  flex-wrap: wrap;
}

.btn-primary-custom {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary-custom:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
  color: white;
}

.btn-primary-custom i {
  font-size: 1.1rem;
  transition: var(--transition);
}

.btn-primary-custom:hover i {
  transform: translateX(-5px);
}

.btn-outline-custom {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 13px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-outline-custom:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.hero-stats {
  display: flex;
  gap: 40px;
  animation: fadeInUp 0.8s ease 1s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* تصویر قهرمان */
.hero-image-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  animation: fadeInRight 1s ease 0.5s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-image {
  position: relative;
  width: 450px;
  height: 450px;
}

.image-placeholder {
  width: 300px;
  height: 300px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 50px auto 0;
  border: 3px solid var(--border-color);
  position: relative;
  z-index: 2;
}

.image-placeholder i {
  font-size: 8rem;
  color: var(--accent-primary);
}

.image-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 460px;
  height: 460px;
  border: 2px dashed var(--accent-primary);
  border-radius: 50%;
  animation: rotate 20s linear infinite;
  opacity: 0.5;
}

@keyframes rotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.floating-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

.float-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.float-icon i {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.float-icon:nth-child(1) {
  top: 5px;
  right: 20px;
  animation: floatIcon 3s ease-in-out infinite;
}

.float-icon:nth-child(2) {
  top: 50%;
  left: -20px;
  transform: translateY(-50%);
  animation: floatIcon 4s ease-in-out infinite 0.5s;
}

.float-icon:nth-child(3) {
  bottom: 0;
  right: 30px;
  animation: floatIcon 3.5s ease-in-out infinite 1s;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-secondary);
  font-size: 2rem;
  animation: bounce 2s infinite;
  text-decoration: none;
}

.scroll-down i {
  font-size: 2rem;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ================================
   بخش‌های عمومی
================================ */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  margin-bottom: 60px;
}

.section-subtitle {
  display: inline-block;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 10px;
  position: relative;
  padding: 5px 20px;
  background: #7677962e;
  border-radius: 20px;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.section-line {
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  margin: 0 auto;
  border-radius: 2px;
}

/* ================================
   بخش درباره من
================================ */
.about-section {
  background: var(--bg-secondary);
}

.about-image-wrapper {
  position: relative;
  padding: 20px;
}

.about-image {
  position: relative;
}

.image-box {
  width: 100%;
  height: 350px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-color);
}

.image-box i {
  font-size: 5rem;
  color: var(--accent-primary);
}

.experience-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent-gradient);
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.exp-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: white;
}

.exp-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.about-content h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: 15px;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-top: 25px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.feature-item i {
  font-size: 1.2rem;
  color: var(--accent-primary);
}

/* ================================
   بخش مهارت‌ها
================================ */
.skills-section {
  background: var(--bg-primary);
}

.skill-category {
  background: var(--bg-card);
  padding: 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
  transition: var(--transition);
  height: 100%;
}

.skill-category:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.skill-category-title {
  font-size: 1.3rem;
  margin-bottom: 25px;
  color: var(--text-primary);
  text-align: center;
}

.skill-item {
  margin-bottom: 20px;
  direction: ltr;
}

.skill-item:last-child {
  margin-bottom: 0;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.skill-name {
  font-weight: 500;
  color: var(--text-primary);
}

.skill-percent {
  color: var(--accent-primary);
  font-weight: 600;
}

.skill-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 4px;
  width: 0;
  transition: width 1.5s ease;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 50px;
}

.tech-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 12px 25px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: var(--transition);
}

.tech-item i {
  font-size: 1.2rem;
  color: var(--accent-primary);
}

.tech-item:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

/* ================================
   بخش پروژه‌ها
================================ */
.portfolio-section {
  background: var(--bg-secondary);
}

.portfolio-filter {
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 25px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
}

.portfolio-grid {
  display: flex;
  row-gap: 20px;
}

.portfolio-item {
  display: block;
}

.portfolio-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.portfolio-image {
  height: 200px;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-card:hover .portfolio-image img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.9), rgba(139, 92, 246, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-card:hover .image-overlay {
  opacity: 1;
}

.image-overlay i {
  font-size: 3rem;
  color: white;
}

.portfolio-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.portfolio-category {
  display: inline-block;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 15px;
  align-self: flex-start;
}

.portfolio-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.portfolio-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 15px;
  flex: 1;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.portfolio-tech span {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
}

.portfolio-links {
  display: flex;
  gap: 10px;
}

.portfolio-link {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.portfolio-link i {
  font-size: 1.2rem;
}

.portfolio-link:hover {
  background: var(--accent-primary);
  color: white;
}

/* ================================
   بخش خدمات
================================ */
.services-section {
  background: var(--bg-primary);
}

.service-card {
  background: var(--bg-card);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
  transition: var(--transition);
  height: 100%;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.service-icon i {
  font-size: 2rem;
  color: white;
}

.service-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.service-description {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-features li {
  color: var(--text-muted);
  padding: 8px 0;
  padding-right: 25px;
  position: relative;
  font-size: 0.9rem;
}

.service-features li::before {
  content: '\2713';
  position: absolute;
  right: 0;
  color: var(--accent-primary);
}

/* ================================
   بخش تماس
================================ */
.contact-section {
  background: var(--bg-secondary);
}

.contact-info-wrapper h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.contact-info-wrapper > p {
  color: var(--text-secondary);
  margin-bottom: 30px;
}

.contact-methods {
  margin-bottom: 30px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
}

.method-icon {
  width: 55px;
  height: 55px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.method-icon i {
  font-size: 1.3rem;
  color: var(--accent-primary);
}

.method-details {
  display: flex;
  flex-direction: column;
}

.method-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.method-value {
  font-weight: 500;
  color: var(--text-primary);
}

.social-links-large {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.social-link-large {
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
  text-decoration: none;
}

.social-link-large i {
  font-size: 1.3rem;
}

.social-link-large:hover {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  transform: translateY(-5px);
}

/* فرم تماس */
.form-group {
  margin-bottom: 20px;
  position: relative;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.form-group .form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 12px 15px;
  border-radius: var(--radius-md);
  font-family: inherit;
  transition: var(--transition);
  width: 100%;
}

.form-group .form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group .form-control::placeholder {
  color: var(--text-muted);
}

.form-group i {
  position: absolute;
  left: 15px;
  top: 38px;
  color: var(--text-muted);
  font-size: 1.1rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  width: 100%;
  justify-content: center;
}

/* ================================
   فوتر
================================ */
.footer {
  background: var(--bg-card);
  padding: 20px 0 0;
  border-top: 1px solid var(--border-color);
}

.footer-title {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.footer-text {
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
  text-decoration: none;
}

.social-link i {
  font-size: 1.2rem;
}

.social-link:hover {
  background: var(--accent-gradient);
  color: white;
  transform: translateY(-3px);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--accent-primary);
  padding-right: 5px;
}

.contact-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.contact-info i {
  color: var(--accent-primary);
  font-size: 1.1rem;
  min-width: 20px;
}

.footer-bottom {
  text-align: center;
  padding: 5px 0;
  margin-top: 0px;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  color: var(--text-muted);
  margin: 0;
}

/* ================================
   رسپانسیو کامل
================================ */

/* Tablet (768px - 992px) */
@media (max-width: 992px) {
  .hero-name {
    font-size: 2.5rem;
  }

  .hero-image-wrapper {
    margin-top: 50px;
  }

  .hero-image {
    width: 250px;
    height: 250px;
    margin: 0 auto;
  }

  .image-placeholder {
    width: 220px;
    height: 220px;
  }

  .image-placeholder i {
    font-size: 5rem;
  }

  .image-ring {
    width: 260px;
    height: 260px;
  }

  .about-image-wrapper {
    margin-bottom: 40px;
  }

  .section-title {
    font-size: 2rem;
  }

  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* Mobile Landscape (576px - 768px) */
@media (max-width: 768px) {
  .hero-section {
    padding: 100px 0 60px;
  }

  .hero-name {
    font-size: 2rem;
  }

  .hero-title {
    font-size: 1.2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-buttons .btn-primary-custom,
  .hero-buttons .btn-outline-custom {
    justify-content: center;
  }

  .hero-stats {
    gap: 25px;
    justify-content: center;
  }

  .section-title {
    font-size: 1.8rem;
  }

  section {
    padding: 60px 0;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .about-content h3 {
    font-size: 1.5rem;
  }

  .skill-category {
    padding: 20px;
  }

  .service-card {
    padding: 30px 20px;
  }

  .contact-method {
    gap: 15px;
  }

  .method-icon {
    width: 45px;
    height: 45px;
  }

  .footer {
    padding: 50px 0 0;
    text-align: center;
  }

  .footer .social-links {
    justify-content: center;
  }

  .footer .contact-info p {
    justify-content: center;
  }

  .footer-links {
    text-align: center;
  }
}

/* Mobile Portrait (小于 576px) */
@media (max-width: 576px) {
  .hero-name {
    font-size: 1.8rem;
  }

  .hero-greeting {
    font-size: 1rem;
  }

  .hero-title {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-subtitle {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .portfolio-filter {
    gap: 8px;
  }

  .filter-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
  }

  .portfolio-grid {
    gap: 20px;
  }

  .portfolio-content {
    padding: 20px;
  }

  .portfolio-title {
    font-size: 1.1rem;
  }

  .tech-stack {
    gap: 10px;
  }

  .tech-item {
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .tech-item i {
    font-size: 1rem;
  }

  .service-card {
    padding: 25px 20px;
  }

  .service-icon {
    width: 55px;
    height: 55px;
  }

  .service-icon i {
    font-size: 1.5rem;
  }

  .service-title {
    font-size: 1.1rem;
  }

  .contact-info-wrapper h3 {
    font-size: 1.5rem;
  }

  .form-group i {
    top: 36px;
  }

  .btn-primary-custom,
  .btn-outline-custom {
    padding: 12px 24px;
  }
}

/* Extra Small Devices */
@media (max-width: 400px) {
  .hero-name {
    font-size: 1.5rem;
  }

  .hero-stats {
    gap: 15px;
  }

  .stat-number {
    font-size: 1.3rem;
  }

  .portfolio-filter {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    width: 100%;
    max-width: 200px;
  }

  .social-links-large {
    justify-content: center;
  }

  .contact-method {
    flex-direction: column;
    text-align: center;
  }

  .method-icon {
    margin: 0 auto;
  }
}

/* Large Screens (1200px+) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  .hero-name {
    font-size: 4rem;
  }
}

/* 2K Screens */
@media (min-width: 1920px) {
  .container {
    max-width: 1400px;
  }

  .hero-name {
    font-size: 5rem;
  }

  .hero-description {
    font-size: 1.2rem;
  }

  section {
    padding: 120px 0;
  }
}

/* ارتفاع کم (برای موبایل‌های افقی) */
@media (max-height: 600px) and (orientation: landscape) {
  .hero-section {
    min-height: auto;
    padding: 100px 0 50px;
  }

  .hero-stats {
    margin-bottom: 20px;
  }

  .scroll-down {
    display: none;
  }
}
/* در انتهای فایل site.css اضافه کنید */

/* دکمه اسکرول به بالا */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--accent-gradient);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.scroll-to-top i {
  font-size: 1.2rem;
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }
}
.form-group {
  position: relative;
}

.form-control.with-icon {
  padding-right: 40px; /* چون RTL هست */
}

/* آیکون */
.form-icon {
  position: absolute;
  right: 12px;
  top: 38px; /* تنظیم نسبت به label */
  color: #999;
  font-size: 16px;
  pointer-events: none;
}

/* حالت focus */
.form-control:focus + .form-icon {
  color: #6366f1;
}



.short-text {
  display: -webkit-box;
  -webkit-line-clamp: 2; /* تعداد خطوط */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-gallery{
  width:100%;
}

.main-image-wrapper{
  position:relative;
  max-width:1000px;
  margin:auto;
  border-radius:24px;
  overflow:hidden;
}

.main-image{
  width:100%;
  height:600px;
  object-fit:cover;
  border-radius:24px;
  cursor:pointer;
  transition:.3s;
}


.main-image:hover{
  transform:scale(1.01);
}

.thumbnail-container{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.thumbnail{
  width:110px;
  height:80px;
  object-fit:cover;
  border-radius:12px;
  cursor:pointer;
  border:3px solid transparent;
  transition:.2s;
}

.thumbnail:hover{
  transform:translateY(-3px);
}

.active-thumb{
  border-color:#029da4;
}
.project-info{
  max-width:1200px;
  margin:auto;
}
.project-description{
  max-width:1100px;
  width:100%;
  margin:auto;
  font-size:1.08rem;
  line-height:2.2;
}
.gallery-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(15,15,15,.46);
  color: #fff;
  font-size: 1.4rem;
  box-shadow:
          0 10px 25px rgba(0,0,0,.35),
          0 4px 10px rgba(0,0,0,.2);
  transition: all .3s ease;
}

.gallery-nav::after{
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  transition: all .3s ease;
}

.gallery-nav:hover{
  background: #ffffff94;
  color: #111;

  transform: translateY(-50%) scale(1.08);

  box-shadow:
          0 15px 35px rgba(0,0,0,.4),
          0 0 0 6px rgba(255,255,255,.15);
}

.gallery-nav i{
  transition: transform .25s ease;
}

.gallery-nav.prev:hover i{
  transform: translateX(3px);
}

.gallery-nav.next:hover i{
  transform: translateX(-3px);
}

.gallery-nav:active{
  transform: translateY(-50%) scale(.95);
}

.gallery-nav.prev{
  right: 22px;
}

.gallery-nav.next{
  left: 22px;
}

/* موبایل */
@media(max-width:768px){

  .gallery-nav{
    width: 50px;
    height: 50px;
    font-size: 1.1rem;
  }

  .gallery-nav.prev{
    right: 10px;
  }

  .gallery-nav.next{
    left: 10px;
  }
}

.lightbox{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.92);
  display:none;
  justify-content:center;
  align-items:center;
  z-index:9999;
}

.lightbox img{
  max-width:92%;
  max-height:92%;
  border-radius:20px;
}
@media(max-width:768px){

  .main-image{
    height:350px;
  }

  .thumbnail{
    width:80px;
    height:60px;
  }

}
/* دکمه اسکرول به بالا */


/* استایل خطاهای فرم */
.form-control.is-invalid {
  border-color: var(--danger, #dc3545);
  background-color: rgba(220, 53, 69, 0.05);
}

.error-message {
  animation: fadeInUp 0.3s ease;
}

.custom-notification {
  animation: slideDown 0.5s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

@keyframes slideDown {
  from {
    transform: translate(-50%, -100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
