/* =========================================
   1) GLOBAL TYPOGRAPHY
========================================= */
.section-sub {
  font-size: 1rem;
  color: var(--color-muted);
  margin: 6px 0 16px;
  line-height: 1.6;
}

body[data-lang="fa"] .section-sub {
  text-align: right;
}

/* =========================================
   2) GRID SYSTEM (GENERIC)
========================================= */
.grid-responsive {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.grid-auto-fit-260 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-auto-fit-220 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

@media (max-width: 600px) {
  .grid-responsive {
    gap: 14px;
  }
}

/* =========================================
   3) CARD BASE + TYPOGRAPHY
========================================= */
.card-base {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0));
  padding: 22px;
  border-radius: var(--radius-base);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
  position: relative;
  overflow: hidden;
}

.card-base:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 26px rgba(107, 92, 255, 0.35),
    0 0 18px rgba(255, 0, 102, 0.22),
    inset 0 0 8px rgba(255, 0, 102, 0.12);
}

.card-base h3,
.card-base h4 {
  margin-bottom: 12px;
  color: var(--color-accent);
  font-weight: 600;
}

.card-base p,
.card-base li {
  color: var(--color-muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .card-base {
    padding: 18px;
  }
  .card-base h3,
  .card-base h4 {
    font-size: 1.15rem;
  }
  .card-base p {
    font-size: 0.9rem;
  }
}

/* =========================================
   4) BUTTONS INSIDE CARDS
========================================= */
.card-btn {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-alt));
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-base);
  text-decoration: none;
  transition: all 0.25s ease;
}

.card-btn:hover {
  transform: translateY(-3px);
  box-shadow:
    0 10px 30px rgba(107, 92, 255, 0.35),
    0 0 15px rgba(255, 0, 102, 0.3);
}

/* =========================================
   5) LICENSE CARDS BASE
========================================= */
.licenses-grid {
  display: grid;
  gap: 20px;
}

.license-card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-base);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* =========================================
   6) LICENSE RIBBONS & BADGES
========================================= */
.ribbon {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff5050;
  color: #fff;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  z-index: 2;
}

.discount-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #ff8c00;
  color: #fff;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: bold;
  border-radius: 4px;
  z-index: 2;
}

.license-card .price {
  font-size: 1.05rem;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.license-card .ribbon {
  background: var(--color-accent);
  right: 0;
  top: 10px;
  padding: 4px 10px;
  border-radius: 0 6px 6px 0;
  text-transform: uppercase;
}

.license-card.featured {
  border-color: rgba(107, 92, 255, 0.4);
}

/* PRICES */
.price {
  margin: 12px 0;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 0.9rem;
  display: block;
}

.new-price {
  color: #4caf50;
  font-size: 1.4rem;
  font-weight: bold;
}

/* ADD-TO-CART BUTTON */
.card-btn.add-cart {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-small);
  border: none;
  cursor: pointer;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-alt));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-btn.add-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(107, 92, 255, 0.3);
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .license-card {
    padding: 15px;
  }
  .new-price {
    font-size: 1.2rem;
  }
}

/* =========================================
   7) FAQ CARDS
========================================= */
.faq-card h4 {
  font-size: 1.15rem;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.faq-card p {
  font-size: 0.95rem;
  color: var(--color-muted);
  line-height: 1.6;
}

body[data-lang="fa"] .faq-card h4,
body[data-lang="fa"] .faq-card p {
  text-align: right;
}

/* =========================================
   8) FEATURES (SCROLLABLE SLIDER CARDS)
========================================= */
#features .card-base:hover {
  transform: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.features-wrap {
  position: relative;
  padding: 0 50px;
}

.feat-window {
  width: 100%;
  overflow: hidden;
}

.feat-track {
  display: flex;
  gap: 18px;
  transition: transform 0.5s ease;
  flex-wrap: nowrap;
}

.feat-card {
  flex: 0 0 300px;
}

/* Slider arrows (desktop only) */
.feat-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-accent);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 6px;
  z-index: 2;
}

.feat-arrow.left {
  left: 0;
}

.feat-arrow.right {
  right: 0;
}

@media (max-width: 900px) {
  .feat-card {
    flex: 0 0 45%;
    margin-bottom: 16px;
  }
}

@media (max-width: 600px) {
  .feat-window {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .feat-track {
    flex-wrap: nowrap;
  }
  .feat-card {
    flex: 0 0 90%;
    margin: 0 auto;
  }
  .feat-arrow {
    display: none;
  }
}

/* =========================================
   9) DOWNLOAD SECTION FIX HOVER
========================================= */
#download .card-base:hover {
  transform: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

/* =========================================
   10) GRID FOR 3 LICENSES PER ROW
========================================= */
.grid-licenses {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  margin-top: 28px;
}

@media (max-width: 900px) {
  .grid-licenses {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid-licenses {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   11) MODAL (PAYMENT POPUP)
========================================= */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0.03)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-base);
  padding: 28px 24px;
  width: 90%;
  max-width: 420px;
  text-align: center;

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.45),
    0 0 18px rgba(107, 92, 255, 0.25);

  position: relative;
  animation: modalFade 0.3s ease;

  color: #fff;
  font-family: inherit;
}

/* Fade animation */
@keyframes modalFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Close button */
.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 1.45rem;
  font-weight: bold;
  color: var(--color-accent);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.modal-close:hover {
  opacity: 0.6;
}

/* Payment buttons */
.btn-gateway {
  margin-top: 20px;
  padding: 12px 25px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-base);
  cursor: pointer;
  color: #fff;

  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-alt));
  box-shadow: 0 8px 20px rgba(107, 92, 255, 0.35);

  transition: all 0.25s ease;
}

.btn-gateway:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(107, 92, 255, 0.45);
}

.payment-buttons {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

#payment-lic-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

#payment-lic-price {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-accent);
  margin-top: 6px;
}
