/* ============================================================
   SOFTWARE A MEDIDA — page-specific section styles (R1)
   Scope: sma-problem-*, sma-cap-*, sma-compare-*
   ============================================================ */

/* -------------------------------------------------------
   SECTION A — Problem cards (replaces about-mini-grid)
   ------------------------------------------------------- */

.sma-problem-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 26px);
  width: 100%;
}

.sma-problem-card {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid rgba(205, 219, 240, 0.9);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow-soft);
  transition:
    transform 220ms var(--ease),
    box-shadow 220ms var(--ease),
    border-color 220ms var(--ease);
}

.sma-problem-card:hover {
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.sma-problem-card .icon-chip {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
}

.sma-problem-card .icon-chip svg {
  width: 22px;
  height: 22px;
  color: var(--blue-600);
}

.sma-problem-card__title {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: clamp(15px, 1.1vw, 17px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.sma-problem-card__body {
  margin: 0;
  color: #4a5e78;
  font-size: clamp(14px, 0.95vw, 15px);
  line-height: 1.65;
  max-width: none;
}

/* -------------------------------------------------------
   SECTION B — Numbered capability grid (replaces about-mini-grid)
   ------------------------------------------------------- */

.sma-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin-top: clamp(16px, 3vw, 32px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(205, 219, 240, 0.7);
  background: rgba(248, 251, 255, 0.6);
}

.sma-cap-item {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.2vw, 42px) clamp(22px, 2.8vw, 36px);
  border-right: 1px solid rgba(205, 219, 240, 0.7);
  border-bottom: 1px solid rgba(205, 219, 240, 0.7);
}

.sma-cap-item:nth-child(3n) {
  border-right: none;
}

.sma-cap-item:nth-child(n+4) {
  border-bottom: none;
}

.sma-cap-item__num {
  display: block;
  margin-bottom: 18px;
  color: var(--blue-600);
  font-size: clamp(24px, 2.2vw, 30px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-feature-settings: "tnum";
}

.sma-cap-item__title {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: clamp(14.5px, 1.05vw, 16.5px);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.sma-cap-item__body {
  margin: 0;
  color: #4a5e78;
  font-size: clamp(13.5px, 0.9vw, 14.5px);
  line-height: 1.65;
  max-width: none;
}

/* -------------------------------------------------------
   SECTION C — Comparison cards (replaces about-mini-grid)
   ------------------------------------------------------- */

.sma-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
  width: 100%;
}

.sma-compare-card {
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3.5vw, 48px);
  border: 1px solid rgba(205, 219, 240, 0.9);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f9fcff 100%);
  box-shadow: var(--shadow-soft);
}

.sma-compare-card--ready {
  border-color: rgba(37, 99, 235, 0.2);
  background: linear-gradient(180deg, #f5f9ff 0%, #edf3ff 100%);
}

.sma-compare-card__label {
  margin-bottom: 16px;
}

.sma-compare-card__title {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: clamp(18px, 1.5vw, 23px);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.sma-compare-card__intro {
  margin: 0 0 22px;
  color: #4a5e78;
  font-size: clamp(14px, 0.95vw, 15px);
  line-height: 1.65;
}

.sma-compare-card__list {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sma-compare-card__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #3e5172;
  font-size: clamp(13.5px, 0.88vw, 14.5px);
  line-height: 1.55;
}

.sma-compare-card__list li::before {
  content: "";
  flex-shrink: 0;
  margin-top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--blue-600);
}

.sma-compare-card--ready .sma-compare-card__list li::before {
  background: var(--blue);
}

.sma-compare-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 24px;
  color: var(--blue-600);
  font-size: clamp(13.5px, 0.9vw, 14px);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: gap 180ms var(--ease);
}

.sma-compare-card__link:hover {
  text-decoration: underline;
  gap: 7px;
}

/* -------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------- */

@media (max-width: 860px) {
  .sma-problem-grid {
    grid-template-columns: 1fr;
  }

  .sma-cap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Reset 3-column border rules */
  .sma-cap-item:nth-child(3n) {
    border-right: 1px solid rgba(205, 219, 240, 0.7);
  }

  .sma-cap-item:nth-child(n+4) {
    border-bottom: 1px solid rgba(205, 219, 240, 0.7);
  }

  /* Apply 2-column border rules */
  .sma-cap-item:nth-child(2n) {
    border-right: none;
  }

  .sma-cap-item:nth-child(n+5) {
    border-bottom: none;
  }
}

@media (max-width: 640px) {
  .sma-cap-grid {
    grid-template-columns: 1fr;
    border-radius: var(--radius-sm);
  }

  /* Reset 2-column border rules */
  .sma-cap-item:nth-child(2n) {
    border-right: none;
  }

  .sma-cap-item:nth-child(n+5) {
    border-bottom: 1px solid rgba(205, 219, 240, 0.7);
  }

  /* Apply 1-column rules */
  .sma-cap-item {
    border-right: none;
  }

  .sma-cap-item:last-child {
    border-bottom: none;
  }

  .sma-compare-grid {
    grid-template-columns: 1fr;
  }
}
