/* ============================================================
   پیمان‌یار - فایل استایل کامل (نسخه بهینه‌شده)
   شامل: ریسپانسیو، دارک مود، اسلایدر، فرم‌ها، و همه بخش‌ها
   ============================================================ */

/* ===== متغیرها ===== */
:root {
  --primary-color: #4361ee;
  --secondary-color: #3a0ca3;
  --accent-color: #f72585;
  --employer-color: #4cc9f0;
  --contractor-color: #7209b7;
  --dark-color: #1a1a2e;
  --light-color: #f8f9fa;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --info-color: #17a2b8;
  --gradient-primary: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  --gradient-accent: linear-gradient(135deg, #f72585 0%, #b5179e 100%);
  --gradient-employer: linear-gradient(135deg, #4cc9f0 0%, #4895ef 100%);
  --gradient-contractor: linear-gradient(135deg, #7209b7 0%, #560bad 100%);
  --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 5px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
  --shadow-xl: 0 15px 35px rgba(0,0,0,0.2);
  --border-radius-sm: 8px;
  --border-radius-md: 15px;
  --border-radius-lg: 20px;
  --border-radius-xl: 30px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --container-padding: clamp(1rem, 4vw, 3rem);
  --font-size-base: clamp(0.9rem, 1vw + 0.5rem, 1.1rem);
}

/* ===== ریست ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
  background-color: var(--light-color);
  overflow-x: hidden;
  line-height: 1.6;
  color: var(--dark-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--font-size-base);
}

/* ===== بهبود CLS: تصاویر ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
img[width], img[height] {
  height: auto;
}
img:not([width]) {
  aspect-ratio: auto;
}

/* ===== فوکوس ===== */
:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}
:focus:not(:focus-visible) {
  outline: none;
}
:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 3px;
}

/* ===== اسکرول‌بار ===== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: var(--border-radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* ============================================================
   ===== ناوبری =====
   ============================================================ */

.navbar {
  background-color: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: 12px 0;
  transition: all var(--transition-normal);
  z-index: 1030;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  padding: 0;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  font-size: unset;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-logo-img {
  height: clamp(40px, 5vw, 50px);
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-brand:hover .navbar-logo-img {
  transform: scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.logo-title {
  font-size: clamp(1rem, 2vw, 1.3rem);
  font-weight: 800;
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: clamp(0.55rem, 0.8vw, 0.7rem);
  color: #6c757d;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.nav-link {
  font-weight: 500;
  color: var(--dark-color);
  margin: 0 4px;
  padding: 8px 14px !important;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-normal);
  position: relative;
  font-size: clamp(0.85rem, 1vw, 1rem);
}

.nav-link:hover,
.nav-link.active,
.nav-link:focus {
  background-color: rgba(67,97,238,0.1);
  color: var(--primary-color);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  right: 50%;
  transform: translateX(50%);
  width: 6px;
  height: 6px;
  background: var(--primary-color);
  border-radius: 50%;
}

/* ============================================================
   ===== دکمه‌ها =====
   ============================================================ */

.btn {
  font-weight: 600;
  border: none;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  font-size: clamp(0.85rem, 1vw, 1rem);
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255,255,255,0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1,1) translate(-50%);
  transform-origin: 50% 50%;
}
.btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

.btn-peymanyar {
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--border-radius-xl);
  padding: clamp(10px, 1.5vw, 12px) clamp(20px, 3vw, 30px);
  box-shadow: 0 5px 15px rgba(67,97,238,0.3);
}
.btn-peymanyar:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(67,97,238,0.4);
  color: white;
}

.btn-employer {
  background: var(--gradient-employer);
  color: white;
  border-radius: var(--border-radius-xl);
  padding: clamp(10px, 1.5vw, 12px) clamp(20px, 3vw, 30px);
  box-shadow: 0 5px 15px rgba(76,201,240,0.3);
}
.btn-employer:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(76,201,240,0.4);
  color: white;
}

.btn-contractor {
  background: var(--gradient-contractor);
  color: white;
  border-radius: var(--border-radius-xl);
  padding: clamp(10px, 1.5vw, 12px) clamp(20px, 3vw, 30px);
  box-shadow: 0 5px 15px rgba(114,9,183,0.3);
}
.btn-contractor:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(114,9,183,0.4);
  color: white;
}

.btn-outline-primary {
  border: 1.5px solid var(--primary-color);
  background: transparent;
  transition: all 0.3s ease;
  color: var(--primary-color);
}
.btn-outline-primary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-primary {
  transition: all 0.3s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(67,97,238,0.3);
}

.btn-gold {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  color: #1a1a2e;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255,215,0,0.3);
}

.btn-outline-light {
  background: transparent;
  border: 2px solid white;
  padding: 14px 32px;
  border-radius: 50px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
}
.btn-outline-light:hover {
  background: white;
  color: var(--primary-color);
  transform: translateY(-3px);
}

.btn-cta-gold {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  color: #1a1a2e;
  font-weight: 700;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  z-index: 2;
}
.btn-cta-gold:hover {
  transform: translateX(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn-back {
  background: none;
  border: none;
  color: var(--primary-color);
  font-weight: 500;
  padding: 10px 0;
  transition: all var(--transition-normal);
}
.btn-back:hover {
  color: var(--secondary-color);
  transform: translateX(-5px);
}

.btn-messages {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}
.btn-messages:hover {
  transform: scale(1.03);
  box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}
.btn-messages-secondary {
  background: var(--gradient-success);
}
.btn-messages-danger {
  background: var(--gradient-accent);
}

/* ============================================================
   ===== صفحات =====
   ============================================================ */

.page-section {
  display: none;
  min-height: 80vh;
  animation: fadeIn 0.5s ease;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.page-section.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.page-header {
  padding-top: clamp(80px, 15vh, 120px);
  margin-bottom: clamp(20px, 4vw, 40px);
}

.section-title {
  color: var(--dark-color);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 20px;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: clamp(50px, 8vw, 80px);
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-title-premium {
  font-size: clamp(2rem, 3.5vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 15px;
}

.section-tag {
  display: inline-block;
  background: rgba(67,97,238,0.1);
  color: var(--primary-color);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.section-desc {
  color: #6c757d;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
}

.section-header {
  margin-bottom: 60px;
}

/* ============================================================
   ===== کارت‌ها =====
   ============================================================ */

.card-peymanyar {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: clamp(16px, 2.5vw, 25px);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  height: 100%;
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}
.card-peymanyar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}
.card-peymanyar:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.hover-card {
  transition: all 0.3s ease;
  cursor: pointer;
}
.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

/* ============================================================
   ===== فرم‌ها =====
   ============================================================ */

.registration-page {
  min-height: 100vh;
  background-color: #f8f9fa;
}

.form-container {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: clamp(16px, 3vw, 30px);
  box-shadow: var(--shadow-lg);
  border-top: 4px solid;
  margin-bottom: 40px;
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e9ecef;
  animation: fadeIn 0.5s ease;
}
.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.form-section h5 {
  color: var(--dark-color);
  margin-bottom: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
}
.form-section h5 i {
  margin-left: 10px;
}

.required::after {
  content: " *";
  color: var(--danger-color);
  font-weight: bold;
}

.invalid-feedback {
  display: none;
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  animation: fadeIn 0.3s ease;
}
.was-validated .form-control:invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback {
  display: block;
}

.form-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== استپ‌ها ===== */
.progress {
  height: 8px;
  margin-bottom: 40px;
  border-radius: var(--border-radius-sm);
  background-color: #e9ecef;
  overflow: hidden;
}

.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  position: relative;
}
.step-indicator::before {
  content: '';
  position: absolute;
  top: 20px;
  right: 0;
  left: 0;
  height: 2px;
  background: #e9ecef;
  z-index: 1;
}

.step {
  width: clamp(35px, 5vw, 40px);
  height: clamp(35px, 5vw, 40px);
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  position: relative;
  z-index: 2;
  transition: all var(--transition-normal);
  cursor: default;
  font-size: clamp(0.8rem, 1vw, 1rem);
}
.step.active {
  background: var(--contractor-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(114,9,183,0.2);
}
.step.completed {
  background: var(--success-color);
  color: white;
}

/* ===== آپلود ===== */
.upload-box {
  border: 2px dashed #dee2e6;
  border-radius: var(--border-radius-md);
  padding: clamp(20px, 5vw, 40px) clamp(15px, 3vw, 20px);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}
.upload-box:hover,
.upload-box:focus-within {
  border-color: var(--primary-color);
  background-color: rgba(67,97,238,0.05);
}
.upload-box.dragover {
  border-color: var(--success-color);
  background-color: rgba(40,167,69,0.1);
}

/* ===== پروژه کارت ===== */
.project-card {
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-normal);
}
.project-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.multiselect-hint {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 5px;
  padding: 8px;
  background-color: #f8f9fa;
  border-radius: var(--border-radius-sm);
  border-right: 3px solid var(--primary-color);
}

.select-all-option {
  font-weight: bold;
  background-color: #e8f5e9 !important;
  position: sticky;
  top: 0;
  z-index: 1;
}

.summary-box {
  background: #f8f9fa;
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin-top: 20px;
  border-right: 4px solid var(--contractor-color);
  animation: fadeIn 0.5s ease;
}

.conditional-field {
  display: none;
  animation: fadeIn 0.3s ease;
}
.conditional-field.show {
  display: block;
}

.auto-save-status {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 15px;
  text-align: center;
  min-height: 1.5em;
  transition: all var(--transition-normal);
}
.auto-save-status.saving {
  color: var(--warning-color);
}
.auto-save-status.saved {
  color: var(--success-color);
}
.auto-save-status.error {
  color: var(--danger-color);
}

/* ============================================================
   ===== هدر Hero =====
   ============================================================ */

.hero-fullscreen {
    position: relative;
    min-height: 650px;
    height: auto;
    overflow: hidden;
}

.hero-slider-full {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 650px;
}
.hero-slider-full .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 650px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}
.hero-slider-full .slide.active {
    opacity: 1;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 10;
    display: flex;
    gap: 10px;
}
.slider-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-btn:hover {
    background: var(--primary-color);
    transform: scale(1.05);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}
.slider-dot.active {
    width: 30px;
    border-radius: 10px;
    background: var(--primary-color);
}

/* ===== محتوای هدر ===== */
.hero-content-overlay {
    position: relative;
    z-index: 5;
    min-height: 650px;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
}

.hero-text-wrapper {
    color: white;
}

.hero-badge {
    margin-bottom: 25px;
}

.badge-gold {
    background: rgba(255,215,0,0.15);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(255,215,0,0.3);
    color: #ffd700;
}
.badge-gold i {
    margin-left: 8px;
}

.hero-title-farsi {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 25px;
}

.title-line {
    display: block;
    opacity: 0.95;
}

.title-highlight {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: clamp(2.2rem, 5.5vw, 3.2rem);
}

.hero-description {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    line-height: 1.8;
    max-width: 550px;
    margin-bottom: 35px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* ===== آمار هدر ===== */
.hero-stats {
    display: flex;
    align-items: center;
    gap: clamp(15px, 4vw, 40px);
    flex-wrap: wrap;
    padding-top: 25px;
    border-top: 2px solid rgba(255,255,255,0.25);
}

.stat-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-block .stat-number {
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0,0,0,0.6);
    line-height: 1.1;
    letter-spacing: 2px;
}

.stat-block .stat-label {
    font-size: clamp(0.75rem, 1.2vw, 1.1rem);
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}
.stat-block .stat-label.gold {
    color: #ffd700 !important;
}

.stat-block .stat-unit {
    font-size: clamp(1rem, 2vw, 1.8rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.stat-block .stat-unit.gold {
    color: #ffd700 !important;
}

.stat-divider {
    width: 2px;
    height: clamp(30px, 5vh, 45px);
    background: rgba(255,255,255,0.2);
}

/* ============================================================
   ===== بخش ویژگی‌ها =====
   ============================================================ */

.features-section {
  padding: 80px 0;
  background: #f0f4ff;
}

.feature-premium-card {
  background: white;
  padding: 30px 20px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  height: 100%;
  border-bottom: 4px solid var(--primary-color);
}
.feature-premium-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* ============================================================
   ===== گالری پروژه‌ها =====
   ============================================================ */

.projects-gallery {
  padding: 80px 0;
  background: white;
}

.gallery-card {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
}
.gallery-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.gallery-img {
  position: relative;
  height: clamp(200px, 30vh, 280px);
  overflow: hidden;
}
.gallery-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-img img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  width: 100%;
  background: linear-gradient(0deg, rgba(0,0,0,0.9), transparent);
  padding: 25px;
  transition: all 0.4s ease;
}
.gallery-card:hover .gallery-overlay {
  bottom: 0;
}

.project-type {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 50px;
  font-size: 0.8rem;
  margin-bottom: 15px;
}

.project-details h4 {
  color: white;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 700;
  margin-bottom: 8px;
}
.project-details p {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.project-location {
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
}
.project-location i {
  margin-left: 5px;
}

/* ============================================================
   ===== نظرات =====
   ============================================================ */

.testimonials-premium {
  padding: 80px 0;
  background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.testimonial-premium-card {
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  position: relative;
}
.testimonial-premium-card.featured {
  transform: scale(1.02);
  border: 1px solid rgba(67,97,238,0.2);
  box-shadow: 0 20px 40px rgba(67,97,238,0.1);
}
.testimonial-premium-card:hover {
  transform: translateY(-5px);
}

.quote-icon i {
  font-size: 2.5rem;
  color: rgba(67,97,238,0.15);
  margin-bottom: 15px;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: #4a5568;
  margin-bottom: 25px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}
.author-avatar.gold {
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: white;
}

.author-details h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 3px;
}
.author-details span {
  font-size: 0.8rem;
  color: #6c757d;
}

/* ============================================================
   ===== CTA =====
   ============================================================ */

.cta-premium {
  padding: 60px 0 80px;
  background: white;
}

.cta-premium-wrapper {
  background: linear-gradient(135deg, rgba(67,97,238,0.92), rgba(58,12,163,0.92)), url('/images/Image8.jpg');
  background-size: cover;
  background-position: center;
  border-radius: clamp(20px, 3vw, 30px);
  padding: clamp(30px, 5vw, 50px) clamp(20px, 5vw, 60px);
  color: white;
  position: relative;
  overflow: hidden;
}
.cta-premium-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.cta-premium-wrapper::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 250px;
  height: 250px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}
.cta-premium-wrapper h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}
.cta-premium-wrapper p {
  opacity: 0.9;
  margin-bottom: 0;
  position: relative;
  z-index: 2;
}

/* ============================================================
   ===== بلاگ =====
   ============================================================ */

.blog-card {
  background: white;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  height: 100%;
  border: 1px solid rgba(0,0,0,0.05);
}
.blog-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.blog-image-placeholder {
  width: 100%;
  height: clamp(150px, 25vw, 200px);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: bold;
  position: relative;
  overflow: hidden;
}
.blog-image-placeholder::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(0deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: rotate(30deg);
  animation: shimmer 3s infinite;
}

.blog-card-content {
  padding: clamp(15px, 2vw, 20px);
}
.blog-card-title {
  font-size: clamp(0.95rem, 1.3vw, 1.3rem);
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--dark-color);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-excerpt {
  color: #6c757d;
  font-size: clamp(0.8rem, 1vw, 0.95rem);
  line-height: 1.6;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: clamp(40px, 6vh, 65px);
}
.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: clamp(0.7rem, 0.9vw, 0.85rem);
  color: #6c757d;
}
.blog-card-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================================
   ===== جستجو =====
   ============================================================ */

.advanced-search-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: clamp(16px, 2.5vw, 25px);
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
  border-top: 4px solid var(--primary-color);
}

.search-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ============================================================
   ===== فوتر =====
   ============================================================ */

.footer {
  background-color: var(--dark-color);
  color: white;
  padding: clamp(40px, 8vh, 80px) 0 clamp(20px, 4vh, 30px);
  margin-top: clamp(40px, 10vh, 100px);
  position: relative;
}
.footer::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}

.footer-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-logo-img {
  height: clamp(40px, 5vw, 60px);
  width: auto;
}

.footer-logo-text {
  display: flex;
  flex-direction: column;
}

.footer-logo-title {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-logo-subtitle {
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  color: rgba(255,255,255,0.8);
}
.footer-logo-slogan {
  font-size: clamp(0.6rem, 0.7vw, 0.7rem);
  color: rgba(255,255,255,0.5);
  margin-top: 5px;
}

.footer-title {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 700;
  margin-bottom: 25px;
  color: white;
  position: relative;
  padding-bottom: 10px;
}
.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
}
.footer-links li {
  margin-bottom: 12px;
}
.footer-links a {
  color: #b0bec5;
  text-decoration: none;
  transition: all var(--transition-normal);
  display: inline-block;
}
.footer-links a:hover {
  color: white;
  transform: translateX(-5px);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.social-link {
  width: clamp(36px, 5vw, 40px);
  height: clamp(36px, 5vw, 40px);
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  transition: all var(--transition-normal);
  text-decoration: none;
}
.social-link:hover {
  background: var(--primary-color);
  transform: translateY(-3px);
  color: white;
}

.copyright {
  text-align: center;
  padding-top: 30px;
  margin-top: 50px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: #b0bec5;
  font-size: clamp(0.75rem, 0.9vw, 0.9rem);
}

/* ============================================================
   ===== پیام‌ها =====
   ============================================================ */

.messaging-page {
  min-height: 70vh;
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-lg);
}

.messages-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255,255,255,0.9);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.messages-header h2 {
  color: #4a5568;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 10px;
}
.messages-header p {
  color: #718096;
  font-size: 1.1rem;
}

.messages-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.messages-card {
  background: rgba(255,255,255,0.95);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255,255,255,0.2);
}
.messages-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}
.messages-card h3 {
  color: #4a5568;
  margin-bottom: 15px;
  font-size: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 10px;
}
.messages-card p {
  color: #718096;
  margin-bottom: 20px;
  line-height: 1.6;
}

.messages-result-section {
  background: rgba(255,255,255,0.95);
  border-radius: 15px;
  padding: 30px;
  margin-top: 30px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.messages-result-section h2 {
  color: #4a5568;
  margin-bottom: 20px;
  font-size: 1.8rem;
}

#messagesResult {
  background: #f7fafc;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  min-height: 150px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: #4a5568;
}

.messages-loading {
  display: none;
  text-align: center;
  padding: 20px;
}
.messages-spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

/* ============================================================
   ===== منوی کاربری =====
   ============================================================ */

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  margin: 0 auto;
}

.user-avatar-small {
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.user-avatar-small:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(67,97,238,0.3);
}

.dropdown-menu {
  animation: fadeInDown 0.2s ease;
}

.dropdown-menu-end {
  left: 0 !important;
  right: auto !important;
}

.notification-bell {
  position: relative;
  cursor: pointer;
}

/* ============================================================
   ===== مودال =====
   ============================================================ */

.modal-content {
  border-radius: var(--border-radius-lg);
  border: none;
}
.modal-header {
  background: var(--gradient-primary);
  color: white;
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}
.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

/* ============================================================
   ===== توست =====
   ============================================================ */

.toast {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  min-width: 250px;
}

/* ============================================================
   ===== لاگ =====
   ============================================================ */

.log-entry {
  font-family: monospace;
  font-size: 0.9rem;
}
.log-container {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 15px;
}

/* ============================================================
   ===== بخش‌های ویژه =====
   ============================================================ */

/* پشتیبانی از بک‌گراند محو */
#features {
  position: relative;
}
#features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/images/Image12.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}
#features .container,
#features .row {
  position: relative;
  z-index: 1;
}

#search {
  position: relative;
}
#search::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('/images/Image3.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}
#search .container,
#search .advanced-search-card,
#search .search-results-grid {
  position: relative;
  z-index: 1;
}

/* استایل‌های جستجو */
#searchResults {
  width: 100% !important;
  max-width: 100% !important;
}
#searchResults .row {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-right: -12px !important;
  margin-left: -12px !important;
}
#searchResults [class*="col-"] {
  padding-right: 12px !important;
  padding-left: 12px !important;
}
#searchResults .card {
  transition: all 0.3s ease;
  cursor: pointer;
  border-radius: 16px !important;
  min-height: 220px;
}
#searchResults .card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

/* ============================================================
   ===== دستیار =====
   ============================================================ */

.assistant-container {
  position: fixed;
  bottom: clamp(15px, 3vh, 30px);
  left: clamp(15px, 3vw, 30px);
  z-index: 1050;
}

.assistant-toggle {
  width: clamp(56px, 8vw, 70px);
  height: clamp(56px, 8vw, 70px);
  border-radius: 50%;
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(1.5rem, 2.5vw, 1.8rem);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  position: relative;
}
.assistant-toggle:hover {
  transform: scale(1.1);
}
.assistant-toggle .notification-badge {
  position: absolute;
  top: -5px;
  left: -5px;
  background: var(--accent-color);
  color: white;
  border-radius: 50%;
  width: clamp(20px, 3vw, 24px);
  height: clamp(20px, 3vw, 24px);
  font-size: clamp(0.6rem, 0.8vw, 0.8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

.assistant-window {
  width: clamp(320px, 80vw, 400px);
  max-width: calc(100vw - 30px);
  height: clamp(400px, 60vh, 600px);
  max-height: 70vh;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.assistant-window.active {
  display: flex;
}

/* ============================================================
   ===== مدیریت وظایف =====
   ============================================================ */

.task-management-feature {
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  border-top: 1px solid rgba(67,97,238,0.08);
  border-bottom: 1px solid rgba(67,97,238,0.08);
}

#weightDistribution3D .d-flex {
  background: rgba(0,0,0,0.02);
  transition: all 0.3s ease;
}

/* ============================================================
   ===== انیمیشن‌ها =====
   ============================================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(247,37,133,0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(247,37,133,0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(247,37,133,0);
  }
}

@keyframes ripple {
  0% {
    transform: scale(0,0);
    opacity: 0.5;
  }
  100% {
    transform: scale(40,40);
    opacity: 0;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
.animate-float {
  animation: float 3s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(30deg);
  }
  100% {
    transform: translateX(100%) rotate(30deg);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================================================
   ===== فونت =====
   ============================================================ */

@font-face {
  font-family: 'Vazirmatn';
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
}

/* کلاس کمکی برای دسترسی‌پذیری */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================================
   ===== ریسپانسیو کامل =====
   ============================================================ */

/* ===== تبلت و موبایل بزرگ (تا 992px) ===== */
@media (max-width: 992px) {
  .hero-title-farsi {
    font-size: 2.8rem;
  }
  .title-highlight {
    font-size: 3rem;
  }
  .hero-stats {
    justify-content: center;
  }
  .stat-divider {
    display: none;
  }
  .cta-premium-wrapper {
    padding: 35px 25px;
    text-align: center;
  }
  .cta-premium-wrapper h3 {
    font-size: 1.4rem;
  }
  .features-section .row {
    row-gap: 20px;
  }
  .footer .row {
    row-gap: 30px;
  }
  #features::before,
  #search::before {
    background-attachment: scroll;
  }
}

/* ===== موبایل (تا 768px) ===== */
@media (max-width: 768px) {
  /* ===== جلوگیری از خروج از عرض صفحه ===== */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .page-section {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  #home {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .container, .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden !important;
  }

  /* ===== ناوبری ===== */
  .navbar-collapse {
    background: white;
    padding: 15px !important;
    border-radius: var(--border-radius-md);
    margin-top: 10px;
    box-shadow: var(--shadow-lg);
    max-height: 80vh;
    overflow-y: auto;
  }
  .navbar-collapse.collapsing {
    transition: height 0.25s ease;
  }
  
  .navbar-nav {
    background: white;
    padding: 5px 0;
    border-radius: var(--border-radius-md);
    margin-top: 5px;
  }
  .nav-link {
    margin: 3px 0;
    padding: 12px 16px !important;
    border-radius: 8px;
    width: 100%;
    text-align: right;
    font-size: 1rem;
  }
  .nav-link.active::after {
    bottom: -8px;
  }
  .navbar .container {
    padding: 0 10px;
  }
  .navbar-brand .logo-title {
    font-size: 1rem;
  }
  .navbar-logo-img {
    height: 35px;
  }
  .logo-subtitle {
    font-size: 0.5rem;
  }

  /* ===== دکمه‌های ورود/ثبت‌نام در موبایل ===== */
  #userMenuGuest .d-flex {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100%;
  }
  #userMenuGuest .d-flex .btn {
    width: 100% !important;
    justify-content: center;
    padding: 10px !important;
  }

  /* ===== منوی کاربری در موبایل ===== */
  #userMenuLoggedIn .d-flex {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  #userMenuLoggedIn .dropdown:first-child {
    order: 1;
  }
  #userMenuLoggedIn .dropdown:last-child {
    order: 2;
  }

  /* ===== هدر ===== */
  .hero-title-farsi {
    font-size: 1.8rem;
    text-align: center;
  }
  .title-highlight {
    font-size: 2rem;
  }
  .hero-description {
    font-size: 0.85rem;
    text-align: center;
    max-width: 100%;
  }
  .hero-badge {
    text-align: center;
  }
  .hero-fullscreen {
    min-height: 500px;
  }
  .hero-slider-full {
    min-height: 500px;
  }
  .hero-slider-full .slide {
    min-height: 500px;
  }
  .hero-content-overlay {
    min-height: 500px;
    padding: 80px 0 40px;
  }
  .hero-content-overlay .container {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  .hero-content-overlay .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }
  .hero-content-overlay .col-lg-7 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
  }
  .hero-text-wrapper {
    padding: 0 5px !important;
    width: 100% !important;
  }
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    padding: 0 5px !important;
  }
  .hero-buttons .btn-gold,
  .hero-buttons .btn-outline-light {
    width: 100%;
    justify-content: center;
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  /* ===== آمار ===== */
  .hero-stats {
    gap: 8px;
    justify-content: center;
    padding-top: 15px;
    width: 100% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
  }
  .stat-block {
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
  }
  .stat-block .stat-number {
    font-size: 2rem !important;
  }
  .stat-block .stat-label {
    font-size: 0.7rem !important;
  }
  .stat-block .stat-unit {
    font-size: 1rem !important;
  }
  .stat-divider {
    display: none;
  }

  /* ===== عنوان‌ها ===== */
  .section-title {
    font-size: 1.8rem;
  }
  .section-title::after {
    width: 50px;
  }
  .section-title-premium {
    font-size: 1.8rem;
  }
  .section-desc {
    font-size: 0.9rem;
  }

  /* ===== فرم‌ها ===== */
  .form-container {
    padding: 16px;
    margin: 0 -10px;
    border-radius: 0;
  }
  .form-navigation {
    flex-direction: column;
    gap: 10px;
  }
  .form-navigation .btn {
    width: 100%;
  }
  .step {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }
  .form-control,
  .form-select {
    font-size: 16px;
    min-height: 44px;
  }

  /* ===== بخش‌ها ===== */
  .gallery-img {
    height: 200px;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .testimonial-premium-card.featured {
    transform: scale(1);
  }

  /* ===== CTA ===== */
  .cta-premium-wrapper {
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
  }
  .cta-premium-wrapper h3 {
    font-size: 1.3rem;
  }
  .cta-premium-wrapper .btn-cta-gold {
    width: 100%;
    justify-content: center;
    margin-top: 15px;
  }

  /* ===== بلاگ ===== */
  .blog-image-placeholder {
    height: 150px;
  }

  /* ===== فوتر ===== */
  .footer {
    padding: 40px 0 20px;
    margin-top: 40px;
  }
  .footer .row {
    row-gap: 30px;
  }
  .footer-logo-wrapper {
    justify-content: center;
    text-align: center;
  }
  .footer-logo-text {
    align-items: center;
  }
  .social-links {
    justify-content: center;
  }

  /* ===== پروژه‌ها ===== */
  #projectsList .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  #projectsList .card-peymanyar {
    padding: 15px;
  }
  #projectsList .card-peymanyar h5 {
    font-size: 1rem;
  }

  /* ===== جستجو ===== */
  #searchResults .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  #searchResults .card {
    min-height: auto;
  }
  #searchResults .row-cols-1 .col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  /* ===== کارت‌ها ===== */
  .card-peymanyar {
    padding: 15px;
    margin: 0 -4px;
  }

  /* ===== صفحه‌ها ===== */
  .page-header {
    padding-top: 70px !important;
  }

  /* ===== پنل مدیریت ===== */
  #adminTabs .nav-link {
    font-size: 0.75rem;
    padding: 6px 10px;
  }
  #adminTabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 2px;
  }
  #adminTabs .nav-item {
    flex-shrink: 0;
  }

  /* ===== جدول‌ها ===== */
  .table-responsive {
    margin: 0 -12px;
    padding: 0 12px;
  }

  /* ===== منو ===== */
  .dropdown-menu-end {
    left: auto !important;
    right: 0 !important;
  }

  /* ===== مودال ===== */
  .modal-dialog {
    margin: 10px;
  }
  .modal-body {
    padding: 15px;
  }
  .modal-header h5 {
    font-size: 1rem;
  }

  /* ===== دکمه‌های مدیریت ===== */
  .d-flex.gap-2.flex-wrap .btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  /* ===== گانت چارت ===== */
  #ganttChart {
    overflow-x: auto;
  }
  #ganttChart .task-row {
    min-width: 500px;
  }

  /* ===== آپلود ===== */
  .upload-box {
    padding: 20px 15px;
  }
  .upload-box i {
    font-size: 2rem !important;
  }

  /* ===== انتخاب‌گرها ===== */
  .select2-container--bootstrap-5 .select2-selection {
    min-height: 44px !important;
  }
}

/* ===== موبایل خیلی کوچک (تا 576px) ===== */
@media (max-width: 576px) {
  /* ===== نوار بالا ===== */
  .navbar-brand .logo-title {
    font-size: 0.85rem;
  }
  .navbar-logo-img {
    height: 32px !important;
  }
  .logo-subtitle {
    font-size: 0.4rem !important;
  }

  /* ===== عنوان‌ها ===== */
  .section-title {
    font-size: 1.5rem;
  }
  .section-title::after {
    width: 40px;
  }
  .hero-title-farsi {
    font-size: 1.5rem;
  }
  .title-highlight {
    font-size: 1.7rem;
  }
  .hero-description {
    font-size: 0.8rem;
  }

  /* ===== آمار ===== */
  .hero-stats .stat-number {
    font-size: 1.8rem !important;
  }
  .hero-stats .stat-label {
    font-size: 0.6rem !important;
  }
  .hero-stats .stat-unit {
    font-size: 0.8rem !important;
  }
  .hero-stats .stat-block {
    padding: 3px 8px !important;
  }

  /* ===== دکمه‌ها ===== */
  .btn {
    font-size: 0.85rem;
  }
  .btn-peymanyar,
  .btn-employer,
  .btn-contractor {
    padding: 10px 16px;
    width: 100%;
    justify-content: center;
  }

  /* ===== بلاگ ===== */
  .blog-card-title {
    font-size: 0.95rem;
  }
  .blog-card-excerpt {
    font-size: 0.8rem;
    min-height: 40px;
  }

  /* ===== پنل مدیریت ===== */
  #adminTabs .nav-link {
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  /* ===== دکمه‌های مدیریت ===== */
  .d-flex.gap-2.flex-wrap .btn {
    font-size: 0.7rem;
    padding: 4px 10px;
  }

  /* ===== پروژه‌ها ===== */
  #projectsList .card-peymanyar {
    padding: 12px;
  }

  /* ===== منوی کاربری ===== */
  #userMenuGuest .d-flex {
    flex-direction: column;
    gap: 6px !important;
  }

  /* ===== فوتر ===== */
  .footer-logo-img {
    height: 35px !important;
  }
  .footer-logo-title {
    font-size: 1rem !important;
  }
}

/* ============================================================
   ===== ارتفاع صفحه =====
   ============================================================ */

@media (max-height: 800px) {
  .hero-title-farsi {
    font-size: 2.5rem;
  }
  .title-highlight {
    font-size: 2.7rem;
  }
  .hero-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
  }
  .hero-buttons {
    margin-bottom: 20px;
  }
  .hero-buttons .btn-gold,
  .hero-buttons .btn-outline-light {
    padding: 10px 24px;
    font-size: 0.9rem;
  }
  .hero-stats {
    gap: 15px;
  }
  .stat-block .stat-number {
    font-size: 1.5rem;
  }
  .stat-block .stat-label {
    font-size: 0.75rem;
  }
  .hero-fullscreen {
    min-height: 600px;
  }
  .hero-slider-full {
    min-height: 600px;
  }
  .hero-slider-full .slide {
    min-height: 600px;
  }
  .hero-content-overlay {
    min-height: 600px;
  }
}

@media (max-height: 650px) {
  .hero-title-farsi {
    font-size: 2rem;
  }
  .title-highlight {
    font-size: 2.2rem;
  }
  .hero-description {
    font-size: 0.8rem;
    margin-bottom: 15px;
  }
  .hero-buttons .btn-gold,
  .hero-buttons .btn-outline-light {
    padding: 8px 18px;
    font-size: 0.8rem;
  }
  .hero-buttons {
    margin-bottom: 15px;
  }
  .hero-stats {
    gap: 10px;
  }
  .stat-block .stat-number {
    font-size: 1.2rem;
  }
  .stat-block .stat-label {
    font-size: 0.65rem;
  }
  .hero-fullscreen {
    min-height: 500px;
  }
  .hero-slider-full {
    min-height: 500px;
  }
  .hero-slider-full .slide {
    min-height: 500px;
  }
  .hero-content-overlay {
    min-height: 500px;
    padding: 60px 0 30px;
  }
}

/* ============================================================
   ===== پشتیبانی از حرکت کاهش یافته =====
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .page-section {
    animation: none;
    transition: none;
  }
  .hero-slide {
    transition: none;
  }
}

/* ============================================================
   ===== حالت تاریک =====
   ============================================================ */

@media (prefers-color-scheme: dark) {
  :root {
    --dark-color: #f8f9fa;
    --light-color: #1a1a2e;
  }

  body {
    background-color: #121212;
    color: #e0e0e0;
  }

  .navbar {
    background-color: rgba(26, 26, 46, 0.95);
  }
  .navbar-light .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
  }
  .navbar-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(255,255,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
  }
  .navbar-collapse {
    background: #2d2d2d !important;
  }
  .navbar-nav {
    background: #2d2d2d !important;
  }
  .nav-link {
    color: #e0e0e0 !important;
  }
  .nav-link:hover,
  .nav-link.active {
    background-color: rgba(67, 97, 238, 0.2) !important;
    color: var(--primary-color) !important;
  }

  .card-peymanyar {
    background: #2d2d2d;
    border-color: #404040;
  }
  .card-peymanyar p {
    color: #d0d0d0 !important;
  }

  .form-container {
    background: #2d2d2d;
    color: #e0e0e0;
  }
  .form-control,
  .form-select {
    background-color: #404040;
    border-color: #555;
    color: #e0e0e0;
  }
  .form-control:focus,
  .form-select:focus {
    background-color: #404040;
    border-color: var(--primary-color);
    color: #e0e0e0;
  }

  .blog-card {
    background: #2d2d2d;
    border-color: #404040;
  }
  .blog-card-title {
    color: #e0e0e0;
  }
  .blog-card p {
    color: #d0d0d0 !important;
  }

  .feature-premium-card {
    background: #2d2d2d !important;
  }
  .feature-premium-card p {
    color: #a0a0a0 !important;
  }

  .messages-card,
  .messaging-page,
  .messages-result-section,
  .messages-header {
    background: #2d2d2d;
    color: #e0e0e0;
  }
  #messagesResult {
    background: #404040;
    color: #e0e0e0;
    border-color: #555;
  }

  .advanced-search-card {
    background: #2d2d2d;
    border-color: #404040;
  }

  .footer {
    background-color: #0d0d1a;
  }

  .modal-content {
    background: #2d2d2d;
    color: #e0e0e0;
  }

  .assistant-window {
    background: #2d2d2d;
  }
  .assistant-messages {
    background: #1a1a2e;
  }
  .message.assistant .message-bubble {
    background: #2d2d2d;
    color: #e0e0e0;
    border-color: #404040;
  }
  .message.user .message-bubble {
    background: var(--gradient-primary);
    color: white;
  }
  .assistant-input {
    background: #2d2d2d;
    border-color: #404040;
  }
  .assistant-input .form-control {
    background: #404040;
    border-color: #555;
    color: #e0e0e0;
  }

  .table {
    color: #e0e0e0;
  }
  .table-light {
    background: #3d3d3d;
    color: #e0e0e0;
  }
  .table-light th {
    color: #e0e0e0;
  }
  .bg-light {
    background: #3d3d3d !important;
  }
  .text-muted {
    color: #a0a0a0 !important;
  }
  .border {
    border-color: #404040 !important;
  }
  .border-bottom {
    border-bottom-color: #404040 !important;
  }
  .border-top {
    border-top-color: #404040 !important;
  }

  .alert-info {
    background: #1a3a4a;
    color: #b0d4e8;
    border-color: #2a5a6a;
  }
  .alert-warning {
    background: #4a3a1a;
    color: #e8d4b0;
    border-color: #6a5a2a;
  }
  .alert-success {
    background: #1a4a2a;
    color: #b0e8c4;
    border-color: #2a6a3a;
  }
  .alert-danger {
    background: #4a1a1a;
    color: #e8b0b0;
    border-color: #6a2a2a;
  }

  .services-premium {
    background: #1a1a2e;
  }
  .projects-gallery {
    background: #1a1a2e;
  }
  .testimonials-premium {
    background: linear-gradient(135deg, #1a1a2e, #0d0d1a);
  }
  .cta-premium {
    background: #1a1a2e;
  }

  .testimonial-premium-card {
    background: #2d2d2d;
  }
  .testimonial-premium-card.featured {
    border-color: rgba(67, 97, 238, 0.3);
  }
  .testimonial-text {
    color: #d0d0d0;
  }

  .task-management-feature {
    background: linear-gradient(135deg, #1a1a2e, #12121f) !important;
  }

  #weightDistribution3D .d-flex {
    background: rgba(255, 255, 255, 0.03) !important;
  }
  #weightDistribution3D .d-flex span[style*="color"] {
    color: #e0e0e0 !important;
  }

  .log-container {
    background: #1a1a2e;
  }

  .registration-page {
    background-color: #121212;
  }

  .step-indicator::before {
    background: #404040;
  }
  .step {
    background: #404040;
    color: #a0a0a0;
  }

  .upload-box {
    border-color: #555;
  }

  .summary-box {
    background: #404040;
  }

  .multiselect-hint {
    background: #404040;
  }
  .form-text {
    color: #a0a0a0 !important;
  }

  .project-card {
    border-color: #404040;
  }

  .messages-card h3 {
    color: #e0e0e0;
  }
  .messages-card p {
    color: #a0a0a0;
  }
}

/* ============================================================
   ===== رفع مشکلات موبایل - بهبود منو =====
   ============================================================ */

@media (max-width: 768px) {
  /* بستن خودکار منوی همبرگر بعد از کلیک */
  .navbar-collapse.show {
    max-height: 80vh;
    overflow-y: auto;
  }

  /* جلوگیری از بسته شدن ناگهانی منو */
  .navbar-collapse.collapsing {
    transition: height 0.25s ease;
  }

  /* فضای خالی زیر منو */
  .navbar {
    padding: 8px 0;
  }

  /* کانتینر اصلی - بدون افقی */
  .container, .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* صفحات - بدون overflow افقی */
  .page-section {
    overflow-x: hidden;
  }

  /* هدر موبایل */
  .page-header {
    padding-top: 70px !important;
  }
}

/* ============================================================
   ===== رفع مشکل خروج از عرض صفحه در موبایل - اضافی =====
   ============================================================ */

@media (max-width: 768px) {
  /* جلوگیری از خروج از عرض صفحه */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* تمام صفحات */
  .page-section {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* صفحه اصلی - مهمترین */
  #home {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* اسلایدر */
  .hero-fullscreen {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .hero-slider-full {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }
  
  .hero-slider-full .slide {
    width: 100% !important;
    max-width: 100% !important;
    background-size: cover !important;
    background-position: center !important;
  }
  
  /* محتوای روی اسلایدر */
  .hero-content-overlay {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: hidden !important;
  }
  
  .hero-content-overlay .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  
  .hero-text-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 5px !important;
  }
  
  /* ردیف bootstrap */
  .hero-content-overlay .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }
  
  .hero-content-overlay .col-lg-7 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
  }
  
  /* آمار */
  .hero-stats {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    justify-content: center !important;
  }
  
  /* دکمه‌ها */
  .hero-buttons {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 5px !important;
  }
  
  /* تمام container ها */
  .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden !important;
  }
  
  /* کانتینرهای داخل صفحه اصلی */
  #home .container {
    padding-left: 12px !important;
    padding-right: 12px !important;
    overflow-x: hidden !important;
  }
}

/* ============================================================
   ===== بهبود ظاهر مراحل =====
   ============================================================ */

.step-indicator .step {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: #e9ecef;
  color: #6c757d;
  transition: all 0.3s ease;
  cursor: default;
  position: relative;
}

.step-indicator .step.active {
  background: linear-gradient(135deg, #4361ee, #3a0ca3);
  color: white;
  box-shadow: 0 4px 15px rgba(67,97,238,0.3);
  transform: scale(1.1);
}

.step-indicator .step.done {
  background: #28a745;
  color: white;
}

/* خطوط بین مراحل */
.step-indicator .step-line {
  flex: 1;
  height: 3px;
  background: #e9ecef;
  max-width: 50px;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.step-indicator .step-line.done {
  background: #28a745;
}

/* کارت‌های فرم با سایه */
.form-card {
  background: white;
  border-radius: 16px;
  padding: 35px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

/* ============================================================
   ===== استایل مسیریابی (Breadcrumb) =====
   ============================================================ */

.breadcrumb {
  background: transparent;
  padding: 10px 0;
  margin-bottom: 0;
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.breadcrumb-item a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

.breadcrumb-item.active {
  color: #6c757d;
  font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #adb5bd;
  padding: 0 8px;
  font-size: 1.1rem;
  font-weight: 300;
}

/* حالت تاریک */
@media (prefers-color-scheme: dark) {
  .breadcrumb-item a {
    color: #4cc9f0;
  }
  .breadcrumb-item a:hover {
    color: #f72585;
  }
  .breadcrumb-item.active {
    color: #adb5bd;
  }
  .breadcrumb-item + .breadcrumb-item::before {
    color: #6c757d;
  }
}

/* موبایل */
@media (max-width: 768px) {
  .breadcrumb {
    font-size: 0.75rem;
    padding: 8px 0;
  }
  .breadcrumb-item + .breadcrumb-item::before {
    padding: 0 5px;
  }
}

/* ============================================================
   ===== بهبود کنتراست =====
   ============================================================ */

/* بهبود کنتراست بخش ویژگی‌ها */
.features-section {
  background: #f0f4ff !important;
}

.section-tag {
  color: #1a1a2e !important;
  background: rgba(67, 97, 238, 0.15) !important;
}

.section-desc {
  color: #2d3748 !important;
}

/* بهبود کنتراست پروژه‌های موفق */
.projects-gallery .section-tag {
  color: #1a1a2e !important;
}

/* بهبود کنتراست متن‌های داخل کارت تیره */
.card[style*="background: #1a1a2e"] .small,
.card[style*="background: #1a1a2e"] .text-muted {
  color: rgba(255, 255, 255, 0.8) !important;
}
/* ===== رفع لوگو دسکتاپ ===== */
@media (min-width: 1025px) {
  .navbar-logo-img {
    height: 38px !important;
  }
  .footer-logo-img {
    height: 42px !important;
  }
}

/* ===== جلوگیری از CLS در گالری ===== */
.gallery-img {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4/3;
    background: #f0f0f0;
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== کلاس sr-only برای دسترسی‌پذیری ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===== دکمه اعلان‌ها با aria-label ===== */
.btn-notification {
    background: none;
    border: none;
    padding: 0;
    position: relative;
    cursor: pointer;
}

.btn-notification:focus-visible {
    outline: 2px solid #4361ee;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== موبایل ===== */
@media (max-width: 768px) {
    .hero-slider-full {
        height: 70vh;
        min-height: 400px;
    }
    
    .hero-slider-full .slide {
        min-height: 400px;
    }
    
    .hero-content-overlay {
        min-height: 70vh;
        padding: 80px 0 40px;
    }
}

/* ===== برای موبایل‌های خیلی کوچک ===== */
@media (max-width: 480px) {
    .hero-slider-full {
        height: 60vh;
        min-height: 350px;
    }
    
    .hero-slider-full .slide {
        min-height: 350px;
    }
}