/* =============================================
   ROOT VARIABLES (لایه رنگ روت)
   ============================================= */
:root {
  /* رنگ‌های اصلی */
  --primary-color: #2f55d4;
  --primary-hover: #2443ac;
  --success-color: #2eca8b;
  --warning-color: #f17425;
  --info-color: #17a2b8;
  --danger-color: #e43f52;
  --secondary-color: #5a6d90;
  --dark-color: #3c4858;
  --light-bg: #f8f9fc;
  --border-color: #dee2e6;
  --text-muted: #6c757d;
  
  /* سایه‌ها */
  --shadow-sm: 0 5px 10px -2px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 20px 35px -10px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 30px 45px -15px rgba(0, 0, 0, 0.25);
  --shadow-primary: 0 8px 25px -8px rgba(47, 85, 212, 0.5);
  
  /* فاصله‌ها */
  --border-radius-sm: 8px;
  --border-radius-md: 10px;
  --border-radius-lg: 20px;
  --border-radius-xl: 24px;
  --border-radius-2xl: 28px;
  
  /* انیمیشن */
  --transition-fast: 0.3s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   01. UTILITIES & HELPERS
   ============================================= */
.cursor-pointer {
  cursor: pointer;
}

/* =============================================
   02. TABLE STYLES
   ============================================= */
td,
th {
  vertical-align: middle !important;
  text-align: right !important;
}

/* =============================================
   03. PRICE STYLES
   ============================================= */
.old-price {
  color: #a4a4a4;
  text-decoration: line-through;
  font-size: 16px;
  line-height: 22px;
}

.price {
  color: #b11f1f;
  font-size: 1.4rem;
}

/* =============================================
   04. FONTS & TYPOGRAPHY
   ============================================= */
.datepicker-plot-area,
select,
#toast-container * {
  font-family: IRANYekan !important;
}

button {
  font-family: IRANSansfanum;
}

/* =============================================
   05. DROPDOWN
   ============================================= */
.dropdown-item {
  float: right;
  text-align: right;
  line-height: 40px;
}

/* =============================================
   06. COURSE SECTIONS (ادغام شده)
   ============================================= */
.course-section {
  border-top: solid 1px #cccccc;
  margin-top: 15px;
  padding-top: 10px;
}

.course-section:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}

.course-session {
  display: block;
  background-color: var(--light-bg);
  color: var(--dark-color);
  border: solid 1px #ffffff;
  padding: 8px 15px;
  border-radius: var(--border-radius-md);
  font-size: 14px;
  margin-top: 5px;
  transition: var(--transition-fast);
}

.course-session:hover {
  color: inherit;
  border-color: var(--border-color);
}

.course-session-details {
  display: flex;
}

.session-title {
  float: right;
  width: 70%;
}

.session-status {
  float: left;
  width: 30%;
  text-align: left;
  font-size: 12px;
}

.session-desc {
  font-weight: bold;
}

.status-text i {
  margin-left: 5px;
  font-size: 16px;
}

.status-text .mdi-lock {
  margin-right: 25px;
  margin-left: 0;
}

/* =============================================
   07. QUESTION STYLES
   ============================================= */
.question {
  background-color: var(--light-bg);
  color: var(--dark-color);
  border: solid 1px var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  margin-bottom: 10px;
}

.question-number {
  text-align: center;
  padding: 20px 0;
  font-weight: bold;
  border-bottom: 1px solid #e9ecef;
}

.question-title {
  margin: 15px 0;
}

.question-type {
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* =============================================
   08. IMAGE STYLES
   ============================================= */
.customer-testi.media img {
  height: 250px;
}

.blog .position-relative img {
  height: auto;
  max-height: 400px;
  width: 100%;
}

.work-container img,
.courses-desc img {
  height: 300px;
}

/* =============================================
   09. SELECT2
   ============================================= */
.select2-container .select2-selection--single {
  color: #969595;
  height: 40px;
}

/* =============================================
   10. MODAL
   ============================================= */
.modal-body {
  padding: 2rem !important;
}

/* =============================================
   11. CUSTOM SWITCH (بوت استرپ نداره)
   ============================================= */
.custom-switch {
  user-select: none;
  cursor: default;
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.custom-switch-input {
  position: absolute;
  z-index: -1;
  opacity: 0;
}

.custom-switches-stacked {
  display: flex;
  flex-direction: column;
}

.custom-switches-stacked .custom-switch {
  margin-bottom: 0.5rem;
}

.custom-switch-indicator {
  display: inline-block;
  height: 1.25rem;
  width: 2.25rem;
  background: #e9ecef;
  border-radius: 50px;
  position: relative;
  vertical-align: bottom;
  border: 1px solid #e3ebf3;
  transition: 0.3s border-color, 0.3s background-color;
}

.custom-switch-indicator:before {
  content: "";
  position: absolute;
  height: calc(1.25rem - 4px);
  width: calc(1.25rem - 4px);
  top: 1px;
  left: 1px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s left;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
}

.custom-switch-input:checked ~ .custom-switch-indicator {
  background: #4caf50;
}

.custom-switch-input:checked ~ .custom-switch-indicator:before {
  left: calc(1rem + 1px);
}

.custom-switch-input:focus ~ .custom-switch-indicator {
  box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.25);
  border-color: #4caf50;
}

.custom-switch-description {
  margin-left: 0.5rem;
  color: #6e7687;
  transition: 0.3s color;
}

.custom-switch-input:checked ~ .custom-switch-description {
  color: #495057;
}

/* =============================================
   12. SOFTWARE HERO
   ============================================= */
.software_hero {
  max-width: 400px;
  background: linear-gradient(145deg, rgba(130, 180, 230, 0.3), rgba(80, 130, 190, 0.2));
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius-2xl);
  box-shadow: -10px -10px 20px rgba(100, 150, 200, 0.25),
              10px 10px 20px rgba(0, 0, 0, 0.15),
              inset -2px -2px 4px rgba(0, 0, 0, 0.05),
              inset 2px 2px 4px rgba(255, 255, 255, 0.2);
  transition: var(--transition-fast);
}

.software_hero:hover {
  transform: translateY(-5px);
  box-shadow: -12px -12px 24px rgba(100, 150, 200, 0.3),
              12px 12px 24px rgba(0, 0, 0, 0.2);
}

/* =============================================
   13. HOVER EFFECTS (ادغام شده)
   ============================================= */
.catagories,
.key-feature,
.team,
.blog-card {
  transition: var(--transition-smooth);
}

.catagories:hover,
.key-feature:hover,
.team:hover,
.blog-card:hover {
  transform: translateY(-8px);
}

.catagories:hover,
.key-feature:hover,
.team:hover {
  box-shadow: var(--shadow-md);
}

/* =============================================
   14. BUTTONS (ادغام شده)
   ============================================= */
.btn-primary,
.btn-cta {
  transition: var(--transition-fast);
}

.btn-primary:hover,
.btn-cta:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2);
}

/* =============================================
   15. RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .section,
  body {
    overflow-x: hidden !important;
  }
  
  body {
    width: 100%;
  }

  #organs .organs-item img {
    width: 60px !important;
    height: 60px !important;
    background-color: #fff;
  }

  .form-group {
    margin-bottom: 15px !important;
  }

  .title-heading h1 {
    font-size: 1.8rem;
  }

  .catagories,
  .key-feature {
    margin-bottom: 15px;
  }

  .footer .text-sm-left,
  .footer .text-sm-right {
    text-align: center !important;
  }
}

/* =============================================
   16. COURSE CARD
   ============================================= */
.course-card {
  background: #fff;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition-fast);
}

.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.course-img {
  position: relative;
  overflow: hidden;
}

.course-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.course-card:hover .course-img img {
  transform: scale(1.05);
  filter: blur(2px);
}

.course-price {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(47, 86, 212, 0.77);
  color: #fff;
  padding: 4px 12px;
  border-radius: var(--border-radius-lg);
  font-size: 13px;
  font-weight: 500;
}

.course-info {
  padding: 16px;
}

.course-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1a1a2e;
  min-height: 48px; /* MERGED: from second file */
}

.course-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  min-height: 60px; /* MERGED: from second file */
}

.course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.course-meta span {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.course-meta i {
  font-size: 13px;
}

.register-count {
  color: #ff5722 !important;
}

.course-btn {
  display: block;
  text-align: center;
  background: var(--light-bg);
  color: var(--primary-color);
  padding: 8px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast);
}

.course-btn:hover {
  background: var(--primary-color);
  color: #fff;
}

/* =============================================
   17. NAV & HOVER GROUPS
   ============================================= */
.nav-item {
  white-space: nowrap;
}

.hover-group {
  transition: all 0.25s ease;
  cursor: pointer;
}

.hover-group:hover {
  background: linear-gradient(90deg, rgba(13, 110, 253, 0.03) 0%, rgba(13, 110, 253, 0) 100%);
  transform: translateX(-5px);
  padding-right: 1rem !important;
}

.hover-group:hover .mdi-chevron-left {
  opacity: 1 !important;
  transform: translateX(-3px);
  transition: all 0.2s ease;
}

.tracking-wide {
  letter-spacing: 1px;
}

.hover-group:hover .badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  transition: var(--transition-fast);
}

/* =============================================
   18. ANIMATIONS
   ============================================= */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.06; transform: scale(1); }
  50% { opacity: 0.12; transform: scale(1.05); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes ripple {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-pulse-slow {
  animation: pulse-slow 6s ease-in-out infinite;
}

/* =============================================
   19. BLOG CARD (ادغام شده)
   ============================================= */
.blog-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid rgba(179, 179, 179, 0.5);
  margin: 24px 0;
}

.blog-card:hover {
  box-shadow: 0 7px 14px -5px rgba(47, 85, 212, 0.25);
  border-color: rgba(47, 85, 212, 0.1);
}

.blog-card-img {
  transition: transform var(--transition-bounce);
  border-radius: 22px;
  box-shadow: 0 2px 5px -11px rgba(0, 0, 0, 0.25);
}

.blog-card:hover .blog-card-img {
  transform: scale(1.08);
}

.blog-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.blog-card:hover .blog-card-overlay {
  opacity: 1;
}

/* تگ‌ها (ادغام شده) */
.featured-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
  background: linear-gradient(135deg, var(--warning-color), var(--danger-color));
  color: white;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 4px 12px rgba(228, 63, 82, 0.3);
  animation: slideInRight 0.5s ease;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}

.category-tag-primary { background: rgba(47, 85, 212, 0.95); color: #fff; box-shadow: 0 4px 15px rgba(47, 85, 212, 0.3); }
.category-tag-success { background: rgba(46, 202, 139, 0.95); color: #fff; box-shadow: 0 4px 15px rgba(46, 202, 139, 0.3); }
.category-tag-warning { background: rgba(241, 116, 37, 0.95); color: #fff; box-shadow: 0 4px 15px rgba(241, 116, 37, 0.3); }
.category-tag-info { background: rgba(23, 162, 184, 0.95); color: #fff; box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3); }
.category-tag-danger { background: rgba(228, 63, 82, 0.95); color: #fff; box-shadow: 0 4px 15px rgba(228, 63, 82, 0.3); }
.category-tag-secondary { background: rgba(90, 109, 144, 0.95); color: #fff; box-shadow: 0 4px 15px rgba(90, 109, 144, 0.3); }

.date-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #fff;
}

.read-time-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  color: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* پروگرس بار */
.reading-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-card:hover .reading-progress {
  opacity: 1;
}

.reading-progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--success-color));
  border-radius: 3px;
  transition: width 0.6s ease;
}

.blog-card:hover .reading-progress-bar {
  width: 100%;
}

/* آواتارها (ادغام شده) */
.author-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: transform var(--transition-fast);
}

.blog-card:hover .author-avatar {
  transform: scale(1.05);
}

.author-avatar-primary { background: linear-gradient(135deg, rgba(47, 85, 212, 0.15), rgba(47, 85, 212, 0.05)); color: var(--primary-color); }
.author-avatar-success { background: linear-gradient(135deg, rgba(46, 202, 139, 0.15), rgba(46, 202, 139, 0.05)); color: var(--success-color); }
.author-avatar-warning { background: linear-gradient(135deg, rgba(241, 116, 37, 0.15), rgba(241, 116, 37, 0.05)); color: var(--warning-color); }
.author-avatar-info { background: linear-gradient(135deg, rgba(23, 162, 184, 0.15), rgba(23, 162, 184, 0.05)); color: var(--info-color); }
.author-avatar-danger { background: linear-gradient(135deg, rgba(228, 63, 82, 0.15), rgba(228, 63, 82, 0.05)); color: var(--danger-color); }
.author-avatar-secondary { background: linear-gradient(135deg, rgba(90, 109, 144, 0.15), rgba(90, 109, 144, 0.05)); color: var(--secondary-color); }

/* نشان‌ها */
.rating-stars {
  font-size: 0.65rem;
  color: var(--warning-color);
  white-space: nowrap;
}

.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, var(--danger-color), var(--warning-color));
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.65rem;
  font-weight: 600;
  color: white;
}

/* عنوان و توضیحات */
.blog-card-title {
  font-size: 1.05rem;
  line-height: 1.45;
  transition: color var(--transition-fast);
  min-height: 50px; /* MERGED: from second file (was commented) */
}

.blog-card-title a:hover {
  color: var(--primary-color) !important;
}

.blog-card-excerpt {
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.85rem;
  min-height: 70px; /* MERGED: from second file (was commented) */
}

/* فوتر کارت */
.blog-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.read-more-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-fast);
  cursor: pointer;
}

.blog-card:hover .read-more-link {
  color: var(--primary-color);
  gap: 12px;
}

.read-more-link i {
  transition: transform var(--transition-fast);
}

.blog-card:hover .read-more-link i {
  transform: translateX(-6px);
}

.blog-card:hover .stat-badge i.mdi-heart-outline {
  color: var(--danger-color);
}

/* =============================================
   20. CTA BUTTON (ادغام شده با دکمه‌ها)
   ============================================= */
.btn-cta {
  display: inline-block;
  text-decoration: none;
  position: relative;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  border-radius: 60px;
  box-shadow: var(--shadow-primary);
  overflow: hidden;
}

.btn-cta:hover {
  box-shadow: 0 12px 35px -10px rgba(47, 85, 212, 0.6);
}

.btn-cta-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 32px;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.btn-cta-icon {
  display: flex;
  gap: 4px;
}

.btn-cta-icon i {
  transition: transform var(--transition-fast);
}

.btn-cta:hover .btn-cta-icon i:first-child {
  transform: translateX(-5px);
}

.btn-cta:hover .btn-cta-icon i:last-child {
  transform: translateX(-10px);
}

.btn-cta-ripple {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-cta:active .btn-cta-ripple {
  width: 300px;
  height: 300px;
}

/* =============================================
   21. SHIMMER EFFECT
   ============================================= */
.shimmer-effect {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-color) 40%, #6e89e1 50%, var(--primary-color) 60%, var(--primary-color) 100%);
  background-size: 200% auto;
  animation: shimmer 3s linear infinite;
}

/* =============================================
   22. BORDER-BOTTOM
   ============================================= */
.border-bottom {
  transition: var(--transition-fast);
}

/* =============================================
   23. PRINT STYLES
   ============================================= */
@media print {
  .custom-form {
    width: 660px;
  }
}

.gradient-top-to-bottom {
  background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.gradient-bottom-to-top {
  background: linear-gradient(to top, #f8f9fa 0%, #ffffff 100%);
}