/* ===== 1. إعدادات عامة وخطوط ===== */
:root {
  --primary-dark: #0f766e;
  --primary-light: #14b8a6;
  --accent-gold: #f59e0b;
  --bg-gradient: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  --card-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 25px 50px -12px rgba(15, 118, 110, 0.2);
  --radius-xl: 20px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

body.software-page {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

/* ===== 2. الهيدر ===== */
.software-header {
  text-align: center;
  padding: 100px 20px 80px;
  background: linear-gradient(170deg, #111827, #0f766e);
  color: #fff;
  border-bottom-left-radius: 50px;
  border-bottom-right-radius: 50px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  margin-bottom: 50px;
  position: relative;
}

.software-header h1 {
  margin: 0 0 15px;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.software-header p {
  max-width: 700px;
  margin: auto;
  font-size: 1.2rem;
  opacity: 0.9;
  font-weight: 300;
  color: #ccfbf1;
}

/* زر العودة للرئيسية */
.btn-back-home {
  position: absolute;
  top: 30px;
  right: 30px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-back-home:hover {
  background: #fff;
  color: var(--primary-dark);
  transform: translateX(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ===== 3. الشبكة والتخطيط ===== */
.software-wrapper {
  padding: 0 20px 80px;
  max-width: 1250px;
  margin: auto;
}

.main-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 60px;
  color: var(--text-main);
  position: relative;
  display: block;
}

.main-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 5px;
  background: var(--accent-gold);
  margin: 20px auto 0;
  border-radius: 50px;
}

.software-unified-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 40px;
}

/* ===== 4. تصميم البطاقة ===== */
.software-card-vertical {
  background: var(--card-bg);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.7);
  overflow: hidden;
  position: relative;
  height: 100%;
}

.software-card-vertical:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.software-image {
  height: 240px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.software-image img {
  max-width: 90%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.software-card-vertical:hover .software-image img {
  transform: scale(1.08);
}

.card-content {
  padding: 25px 25px 0;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.software-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 10px;
  color: #111827;
}

.software-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #d1fae5;
  color: #047857;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 15px;
}

.software-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.software-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: auto;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== 5. الأزرار ===== */
.actions-wrapper {
  padding: 25px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-discover {
  background: linear-gradient(90deg, #0f766e, #115e59);
  color: white;
  padding: 16px;
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
  transition: transform 0.2s;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  cursor: pointer;
  width: 100%;
}

.btn-discover:hover {
  transform: translateY(-2px);
  background: linear-gradient(90deg, #115e59, #0f766e);
}

.btn-training {
  background: transparent;
  color: var(--text-muted);
  border: 2px solid #cbd5e1;
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
  display: block;
}

.btn-training:hover {
  border-color: var(--primary-dark);
  color: var(--primary-dark);
  background: #f0fdfa;
}

/* ===== 6. الفوتر والرخصة ===== */
.software-license {
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
  padding-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 5px;
}

.software-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px;
  text-align: center;
  border-top: 4px solid var(--accent-gold);
}

.software-footer a {
  color: var(--accent-gold);
  text-decoration: none;
}

/* ===== 7. تصميم النافذة (Modal) ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: #fff;
  width: 90%;
  max-width: 450px;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #f1f5f9;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #ef4444;
  color: #fff;
}

.modal-header h3 {
  color: #0f766e;
  margin: 0 0 10px;
  font-size: 1.5rem;
}

.modal-header p {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #334155;
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.input-icon input {
  width: 100%;
  padding: 12px 40px 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s;
}

.input-icon input:focus {
  border-color: #0f766e;
}

.btn-submit-modal {
  width: 100%;
  background: #25D366;
  /* لون واتساب */
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: background 0.3s;
  margin-top: 10px;
}

.btn-submit-modal:hover {
  background: #20bd5a;
}

/* حركات */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.software-card-vertical {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

.software-card-vertical:nth-child(1) {
  animation-delay: 0.1s;
}

.software-card-vertical:nth-child(2) {
  animation-delay: 0.2s;
}

.software-card-vertical:nth-child(3) {
  animation-delay: 0.3s;
}

.software-card-vertical:nth-child(4) {
  animation-delay: 0.4s;
}

.software-card-vertical:nth-child(5) {
  animation-delay: 0.5s;
}

.software-card-vertical:nth-child(6) {
  animation-delay: 0.6s;
}

/* للموبايل */
@media (max-width: 768px) {
  .software-header {
    border-radius: 0 0 30px 30px;
    padding: 60px 20px;
  }

  .software-header h1 {
    font-size: 2rem;
  }

  .software-unified-grid {
    grid-template-columns: 1fr;
  }

  .btn-back-home {
    top: 20px;
    right: 20px;
    padding: 8px 15px;
    font-size: 0.85rem;
  }
}