/* Home page: connection protocols grid + pricing segments (حجمی / نامحدود).
   Loaded after app.min.css and built only on its theme variables. */

/* ---------- Connection section ---------- */
#howItWorking-section .steps.steps-networks [class*="col-"] .card {
  background-image: unset;
  background-color: var(--color-secondary);
}

#howItWorking-section .steps.steps-protocols {
  margin-right: -10px;
  margin-left: -10px;
}

#howItWorking-section .steps.steps-protocols [class*="col-"] {
  padding-right: 10px;
  padding-left: 10px;
}

#howItWorking-section .steps.steps-protocols [class*="col-"] .card {
  height: 130px;
  padding: 10px;
  margin-bottom: 20px;
}

#howItWorking-section .steps.steps-protocols [class*="col-"]:not(:last-child):not(:first-child) .card {
  background-color: var(--color-theme-white);
}

#howItWorking-section .steps.steps-protocols .card .card-title p {
  direction: ltr;
  font-size: 16px;
  text-transform: none;
}

#howItWorking-section .steps.steps-protocols [class*="col-"]:not(:last-child):not(:first-child) .card .card-title i,
#howItWorking-section .steps.steps-protocols .card .card-title i {
  width: 50px;
  height: 50px;
  margin: 0 0 10px;
  background: var(--color-gradient);
  color: var(--color-theme-white);
}

#howItWorking-section .steps.steps-protocols .card .card-title img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin: 0 0 10px;
}

/* The Cisco file has transparent padding around the mark; scale it to match the others */
#howItWorking-section .steps.steps-protocols .card .card-title .app-logos-image-cisco {
  transform: scale(1.35);
}

/* Checkerboard, 4 columns */
@media (min-width: 768px) {
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+2):not(:first-child) .card,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+4):not(:first-child) .card,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+5):not(:first-child) .card,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+7):not(:first-child) .card {
    background-color: var(--color-secondary);
  }

  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+2) .card p,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+4) .card p,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+5) .card p,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+7) .card p {
    color: var(--color-theme-white);
  }

  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+2):not(:first-child):not(:last-child) .card .card-title i,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+4):not(:first-child):not(:last-child) .card .card-title i,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+5):not(:first-child):not(:last-child) .card .card-title i,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(8n+7):not(:first-child):not(:last-child) .card .card-title i {
    background: var(--color-theme-white);
    color: var(--color-secondary);
  }
}

/* Checkerboard, 2 columns */
@media (max-width: 767.98px) {
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(4n+2):not(:first-child) .card,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(4n+3):not(:first-child) .card {
    background-color: var(--color-secondary);
  }

  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(4n+2) .card p,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(4n+3) .card p {
    color: var(--color-theme-white);
  }

  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(4n+2):not(:first-child):not(:last-child) .card .card-title i,
  #howItWorking-section .steps.steps-protocols [class*="col-"]:nth-child(4n+3):not(:first-child):not(:last-child) .card .card-title i {
    background: var(--color-theme-white);
    color: var(--color-secondary);
  }

  #howItWorking-section .steps.steps-networks {
    margin-right: -10px;
    margin-left: -10px;
  }

  #howItWorking-section .steps.steps-networks [class*="col-"] {
    padding-right: 10px;
    padding-left: 10px;
  }

  #howItWorking-section .steps.steps-networks .card {
    margin-bottom: 20px;
  }
}

/* ---------- Pricing section ---------- */
#pricing-section .section-title {
  margin-bottom: 30px;
}

#pricing-section .plan .title {
  margin-bottom: 10px;
}

#pricing-section .plan-tabs {
  display: inline-flex;
  flex-wrap: nowrap;
  max-width: 100%;
  margin: 0 auto 20px;
  padding: 6px;
  border-radius: 40px;
  background: var(--color-theme-white-dark);
}

/* The theme animates every a / div / ::before; switched off here so the button,
   its icon and its text all change state in the same frame. */
#pricing-section .plan-tabs,
#pricing-section .plan-tabs .nav-item,
#pricing-section .plan-tabs .nav-link,
#pricing-section .plan-tabs .nav-link i,
#pricing-section .plan-tabs .nav-link i::before,
#pricing-section .tab-content,
#pricing-section .tab-content > .tab-pane {
  transition: none;
}

#pricing-section .plan-tabs .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 10px 20px;
  border-radius: 40px;
  color: var(--color-gray);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#pricing-section .plan-tabs .nav-link i {
  width: 20px;
  margin-left: 8px;
  color: inherit;
  text-align: center;
}

@media (hover: hover) {
  #pricing-section .plan-tabs .nav-link:not(.active):hover {
    color: var(--color-main);
  }
}

#pricing-section .plan-tabs .nav-link.active,
#pricing-section .plan-tabs .nav-link.active:hover,
#pricing-section .plan-tabs .nav-link.active:focus {
  background-color: var(--color-secondary);
  color: var(--color-theme-white);
}

#pricing-section .plan-tabs .nav-link:focus-visible {
  outline: 2px solid var(--color-tertiary);
  outline-offset: 2px;
}

#pricing-section .tab-content > .tab-pane.active {
  animation: plans-in .2s ease-out;
}

@keyframes plans-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  #pricing-section .tab-content > .tab-pane.active {
    animation: none;
  }
}

#pricing-section .plan .badge-top-right span {
  font-size: 11px;
}

#pricing-section .tab-pane > .row {
  max-width: 990px;
  margin-right: auto;
  margin-left: auto;
}

/* h2/h3 that keep the theme's previous h3/h5 look */
.section-title h2.h3,
#features-section .card-title h3.h5 {
  line-height: 1.6;
}

/* Price number: same look as the theme's ".price h1", without extra h1 tags */
#pricing-section .plan .price .price-value {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 500;
  line-height: 1;
}

/* Second level: duration, inside the حجمی segment */
#pricing-section .plan-tabs.plan-subtabs {
  margin-bottom: 30px;
  padding: 0;
  background: transparent;
}

#pricing-section .plan-subtabs .nav-link {
  min-width: 110px;
  margin: 0 4px;
  padding: 6px 18px;
  border: 1px solid var(--color-gray-light);
  font-size: 14px;
}

#pricing-section .plan-subtabs .nav-link.active,
#pricing-section .plan-subtabs .nav-link.active:hover,
#pricing-section .plan-subtabs .nav-link.active:focus {
  border-color: var(--color-secondary);
  background-color: var(--color-theme-white);
  color: var(--color-secondary);
}

#pricing-section #plans-unlimited {
  padding-top: 20px;
}

/* Four monthly cards: one row on desktop, two by two on laptop / tablet */
#pricing-section #plans-traffic-month > .row {
  max-width: 720px;
}

@media (min-width: 1200px) {
  #pricing-section #plans-traffic-month > .row {
    max-width: none;
    margin-right: -15px;
    margin-left: -15px;
  }
}

#pricing-section .plan .title small {
  display: block;
  margin-top: 4px;
  color: var(--color-main);
  font-size: 16px;
  font-weight: 500;
}

#pricing-section .plan li .protocols {
  direction: ltr;
  padding: 0 20px;
  text-transform: none;
}

@media (max-width: 575.98px) {
  #pricing-section .plan-tabs {
    display: flex;
  }

  #pricing-section .plan-tabs .nav-item {
    flex: 1 1 0;
  }

  #pricing-section .plan-tabs .nav-link {
    min-width: 0;
    padding: 10px 8px;
    font-size: 15px;
  }

  #pricing-section .plan-subtabs .nav-item {
    flex: 1 1 auto;
  }

  #pricing-section .plan-subtabs .nav-link {
    margin: 0 3px;
    padding: 7px 6px;
    font-size: 13px;
  }
}
