@font-face {
  font-family: peyda;
  src: url("font/Peyda-Medium.ttf") format("truetype");
  font-display: swap;
}

:root {
  --primary: #A3238e;
  --primary-dark: #700469;
  --primary-soft: #f9e8f8;
  --primary-soft-2: #fff3fe;
  --text-main: #2d2d2d;
  --text-muted: #666;
  --text-light: #888;
  --bg-main: #faf7fb;
  --card-bg: #ffffff;
  --border-soft: #eee2ef;
  --shadow-soft: 0 8px 20px rgba(175, 6, 164, 0.08);
  --shadow-hover: 0 14px 30px rgba(175, 6, 164, 0.16);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  direction: rtl;
  font-family: peyda;
  color: var(--text-main);
  background: radial-gradient(
    circle at top right,
    rgba(175, 6, 164, 0.02),
    transparent 32%
  ),
  linear-gradient(180deg, #fcfafc 0%, #f9f6f9 100%);
  min-height: 100vh;
}

.software-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 90px 22px 70px;
}

.software-list {
  display: grid;
  grid-template-columns: repeat(3, 250px);
  justify-content: center;
  gap: 16px;
}

.soft-card {
  background: rgba(255, 255, 255, 0.95);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
  width: 250px;
  height: 350px;
}

.soft-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(175, 6, 164, 0.22);
}

.soft-image {
  width: 100%;
  height: 200px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-soft), #ffffff);
  border: 1px solid rgba(175, 6, 164, 0.12);
  position: relative;
  z-index: 1;
}

.soft-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.soft-card h3 {
  margin: 0 0 8px 0;
  color: var(--text-main);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: -0.1px;
  position: relative;
  z-index: 1;
}

.soft-card h3::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(175, 6, 164, 0.08);
  vertical-align: middle;
}

.soft-card p {
  color: var(--text-muted);
  line-height: 1.75;
  margin: 0 0 12px 0;
  font-size: 15px;
  overflow-wrap: anywhere;
  word-break: break-word;
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 42px;
}

.btn-download {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  background-color: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.1px;
  box-shadow: 0 8px 18px rgba(175, 6, 164, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  position: relative;
  z-index: 1;
}

.btn-download:hover {
  box-shadow: 0 12px 22px rgba(175, 6, 164, 0.28);
}

.btn-download:active {
  transform: translateY(0);
  box-shadow: 0 6px 14px rgba(175, 6, 164, 0.18);
}

.error-message {
  background: #fff0f0;
  color: #d9534f;
  padding: 18px;
  border: 1px solid #ffc9c9;
  border-radius: 14px;
  text-align: center;
  font-weight: bold;
  margin: 34px auto;
  max-width: 560px;
  line-height: 1.9;
  box-shadow: 0 10px 28px rgba(217, 83, 79, 0.08);
}

.info-message {
  background: #f3fbff;
  color: #31708f;
  padding: 18px;
  border: 1px solid #cceeff;
  border-radius: 14px;
  text-align: center;
  margin: 18px auto;
  max-width: 560px;
  line-height: 1.9;
  box-shadow: 0 10px 28px rgba(49, 112, 143, 0.08);
}

.btn-download:focus-visible {
  outline: 3px solid rgba(175, 6, 164, 0.25);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .software-list {
    grid-template-columns: repeat(2, 250px);
    justify-content: center;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .software-container {
    padding: 76px 16px 56px;
  }

  .software-container h1 {
    margin-bottom: 28px;
    font-size: 24px;
  }

  .software-list {
    grid-template-columns: repeat(2, 220px);
    justify-content: center;
    gap: 14px;
  }

  .soft-card {
    width: 220px;
    height: 320px;
    padding: 11px;
  }

  .soft-image {
    height: 160px;
    margin-bottom: 9px;
  }

  .soft-card h3 {
    font-size: 16px;
  }

  .soft-card p {
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 10px;
    min-height: 38px;
  }

  .btn-download {
    min-height: 38px;
    font-size: 12px;
    padding: 8px 10px;
  }
}

@media (max-width: 520px) {
  .software-container {
    padding: 66px 12px 44px;
  }

  .software-container h1 {
    font-size: 21px;
    margin-bottom: 22px;
  }

  .software-container h1::after {
    width: 60px;
    height: 3px;
  }

  .software-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .soft-card {
    width: 100%;
    height: 285px;
    padding: 9px;
    border-radius: 13px;
  }

  .soft-card::before {
    height: 3px;
  }

  .soft-image {
    height: 135px;
    border-radius: 10px;
    margin-bottom: 8px;
  }

  .soft-card h3 {
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.5;
  }

  .soft-card h3::before {
    width: 7px;
    height: 7px;
    margin-left: 5px;
    box-shadow: 0 0 0 3px rgba(175, 6, 164, 0.08);
  }

  .soft-card p {
    font-size: 10.8px;
    line-height: 1.55;
    margin-bottom: 8px;
    min-height: 34px;
  }

  .btn-download {
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 10.8px;
    gap: 4px;
  }

  .info-message,
  .error-message {
    font-size: 13px;
    padding: 14px;
    border-radius: 12px;
  }
}

@media (max-width: 340px) {
  .software-list {
    grid-template-columns: 1fr;
  }

  .soft-card {
    width: 100%;
    height: 295px;
  }

  .soft-image {
    height: 145px;
  }
}
