/* Magnifita 37: catalogue controls match the existing six learning-path tiles. */
.catalog-tabs.mf37-catalog-paths {
  display: block;
  margin-top: 18px;
}

.mf37-catalog-paths .mf37-catalog-all {
  margin-bottom: 14px;
}

.catalog-tabs.mf37-catalog-paths button::before {
  display: none;
  content: none;
}

.catalog-tabs.mf37-catalog-paths .mf37-all-filter {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #bdd9e9;
  border-radius: 12px;
  background: #fff;
  color: #294959;
  font: 650 .875rem/1.4 system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  box-shadow: none;
}

.catalog-tabs.mf37-catalog-paths .mf37-all-filter[aria-pressed="true"] {
  border-color: #086ba9;
  background: #086ba9;
  color: #fff;
}

.mf37-catalog-paths .learning-paths.learning-path-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 12px;
  margin: 0;
}

.catalog-tabs.mf37-catalog-paths .learning-path {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  min-height: 88px;
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 1px solid #d5e4ec;
  border-radius: 16px;
  background: #fff;
  color: #294959;
  box-shadow: 0 3px 12px #183e5006;
  font: 650 .875rem/1.4 system-ui, sans-serif;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.mf37-catalog-paths .learning-path .path-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--path-tint);
  color: var(--path-color);
}

.mf37-catalog-paths .path-icon svg {
  width: 23px;
  height: 23px;
}

.mf37-catalog-paths .learning-path .path-content {
  display: flex;
  flex: 1;
  min-width: 0;
  width: auto;
}

.mf37-catalog-paths .path-content > strong {
  display: block;
  margin: 0;
  font: inherit;
  overflow-wrap: anywhere;
}

.mf37-catalog-paths .path-espressioni,
.mf37-catalog-paths .path-grammatica,
.mf37-catalog-paths .path-temi {
  --path-color: #086ba9;
  --path-tint: #e5f5ff;
}

.mf37-catalog-paths .path-situazioni {
  --path-color: #bc452b;
  --path-tint: #fff0e9;
}

.mf37-catalog-paths .path-letture {
  --path-color: #806000;
  --path-tint: #ffeb87;
}

.mf37-catalog-paths .path-verbi {
  --path-color: #127970;
  --path-tint: #e4f5ef;
}

.catalog-tabs.mf37-catalog-paths .learning-path[aria-pressed="true"] {
  border-color: #499dcc;
  background: #edf7fc;
  color: #075c8e;
  box-shadow: inset 0 -3px #1682ba;
  outline: 2px solid var(--path-color);
  outline-offset: 2px;
}

@media (hover: hover) {
  .catalog-tabs.mf37-catalog-paths .learning-path:hover:not([aria-pressed="true"]) {
    border-color: #79b7d5;
    background: #edf8ff;
    box-shadow: 0 12px 26px #1f271e12;
  }

  .catalog-tabs.mf37-catalog-paths .mf37-all-filter:hover:not(.active) {
    border-color: #79b7d5;
    background: #edf8ff;
  }
}

.catalog-tabs.mf37-catalog-paths .learning-path:focus-visible,
.catalog-tabs.mf37-catalog-paths .mf37-all-filter:focus-visible {
  outline: 3px solid #216ec2;
  outline-offset: 4px;
}

@media (max-width: 700px) {
  .mf37-catalog-paths .learning-paths.learning-path-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 600px) {
  .catalog-tabs.mf37-catalog-paths .learning-path {
    gap: 8px;
    min-height: 84px;
    padding: 10px;
  }
}

@media (max-width: 360px) {
  .catalog-tabs.mf37-catalog-paths .learning-path {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 108px;
  }

  .mf37-catalog-paths .learning-path .path-content {
    flex: 0 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-tabs.mf37-catalog-paths .learning-path {
    transition: none;
    transform: none;
  }
}
