/* Вид материала — cards.html design */
.material-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  width: 100%;
  max-width: 1180px;
  margin-bottom: 40px;
  align-items: stretch;
}

.material-cards-grid .material-card {
  background: #fbfbfc;
  border-radius: 22px;
  overflow: visible;
  border: 1px solid #ececf0;
  box-shadow: 0 2px 10px rgba(44, 42, 57, 0.05);
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  height: 100%;
}

.material-cards-grid .material-card-top {
  position: relative;
  margin: 3px 3px 0;
  padding: 14px 12px 12px;
  border-radius: 16px;
  background: #e8f4fc;
  overflow: visible;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.material-cards-grid .ac-hours-tip {
  position: relative;
  display: inline;
  cursor: help;
  border-bottom: 1px dashed rgba(44, 44, 48, 0.35);
}

.material-cards-grid .ac-hours-tip__popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  padding: 14px 16px 12px;
  background: #3d3b44;
  border-radius: 10px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 30;
  text-align: left;
  box-shadow: 0 10px 28px rgba(28, 26, 36, 0.22);
}

.material-cards-grid .ac-hours-tip__popup::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #3d3b44;
}

.material-cards-grid .ac-hours-tip__title {
  display: block;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  margin-bottom: 6px;
  color: #fff;
}

.material-cards-grid .ac-hours-tip__text {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
}

.material-cards-grid .ac-hours-tip:hover .ac-hours-tip__popup,
.material-cards-grid .ac-hours-tip:focus-within .ac-hours-tip__popup,
.material-cards-grid .ac-hours-tip:focus-visible .ac-hours-tip__popup,
.material-cards-grid .ac-hours-tip:active .ac-hours-tip__popup {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 768px) {
  .material-cards-grid .ac-hours-tip__popup {
    bottom: auto;
    top: calc(100% + 8px);
    left: 0;
    right: auto;
    transform: none;
    width: min(280px, calc(100vw - 32px));
    max-width: min(280px, calc(100vw - 32px));
    z-index: 50;
  }

  .material-cards-grid .ac-hours-tip__popup::after {
    top: auto;
    bottom: 100%;
    left: 20px;
    transform: none;
    border: 7px solid transparent;
    border-bottom-color: #3d3b44;
    border-top-color: transparent;
  }
}

.material-cards-grid .top-text {
  max-width: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.material-cards-grid .tag {
  display: block;
  color: #2c2c30;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

.material-cards-grid .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: #2c2c30;
  flex-wrap: wrap;
  margin-top: auto;
}

.material-cards-grid .meta .item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.material-cards-grid .meta .item strong {
  font-weight: 600;
}

.material-cards-grid .meta .dot {
  color: #9a9aa0;
}

.material-cards-grid .meta svg {
  width: 19px;
  height: 19px;
  opacity: 0.85;
  flex: 0 0 19px;
}

.material-cards-grid .meta .currency-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  color: #2c2c30;
  opacity: 0.85;
  flex: 0 0 19px;
}

.material-cards-grid .cluster {
  display: none;
}

.material-cards-grid .blob {
  position: absolute;
}

.material-cards-grid .round { border-radius: 50%; }
.material-cards-grid .round::after {
  content: "";
  position: absolute;
  top: 16%;
  left: 22%;
  width: 32%;
  height: 28%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 70%);
}

.material-cards-grid .cube { border-radius: 6px; }
.material-cards-grid .pill { border-radius: 999px; }
.material-cards-grid .pill::after {
  content: "";
  position: absolute;
  top: 14%;
  left: 18%;
  width: 22%;
  height: 60%;
  border-radius: 999px;
  background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
}

.material-cards-grid .pink .p1 {
  width: 42px; height: 42px; top: 28px; left: 12px;
  background: radial-gradient(circle at 34% 28%, #fff 0%, #ff8dc1 30%, #e8388c 70%, #a3175e 100%);
  box-shadow: inset -6px -7px 13px rgba(120, 0, 55, 0.5), 0 7px 12px rgba(180, 30, 110, 0.35);
}
.material-cards-grid .pink .p2 {
  width: 22px; height: 22px; top: 4px; left: 50px; transform: rotate(-15deg);
  background: linear-gradient(135deg, #ffd0e6, #f06aaa);
  box-shadow: inset -3px -3px 6px rgba(120, 0, 55, 0.4), 0 4px 7px rgba(180, 30, 110, 0.3);
}
.material-cards-grid .pink .p3 {
  width: 16px; height: 34px; top: 38px; left: 58px; transform: rotate(20deg);
  background: linear-gradient(110deg, #ffe2ef, #f48cbe);
  box-shadow: inset -3px 0 6px rgba(120, 0, 55, 0.4), 0 4px 7px rgba(180, 30, 110, 0.3);
}

.material-cards-grid .blue .p1 {
  width: 40px; height: 40px; top: 6px; left: 14px;
  background: conic-gradient(from 210deg, #bcdcff, #5d9af0, #1f63c4, #0f3f8c, #1f63c4, #5d9af0, #bcdcff);
  -webkit-mask: radial-gradient(circle, transparent 32%, #000 34%);
  mask: radial-gradient(circle, transparent 32%, #000 34%);
  box-shadow: 0 6px 10px rgba(20, 60, 130, 0.3);
  transform: rotate(-10deg);
}
.material-cards-grid .blue .p2 {
  width: 30px; height: 30px; top: 40px; left: 22px;
  background: radial-gradient(circle at 34% 28%, #fff 0%, #7eb2f5 32%, #2f7fe0 72%, #134a96 100%);
  box-shadow: inset -5px -6px 11px rgba(6, 32, 78, 0.5), 0 6px 10px rgba(20, 60, 130, 0.35);
}
.material-cards-grid .blue .p3 {
  width: 18px; height: 18px; top: 16px; left: 58px;
  background: linear-gradient(135deg, #cfe2ff, #6aa3ee);
  box-shadow: inset -3px -3px 6px rgba(6, 32, 78, 0.4), 0 4px 7px rgba(20, 60, 130, 0.3);
}

.material-cards-grid .yellow .p1 {
  width: 18px; height: 46px; top: 22px; left: 14px; transform: rotate(-18deg);
  background: linear-gradient(110deg, #fffbe0, #ffe06a 40%, #d29a10);
  box-shadow: inset -3px 0 7px rgba(120, 80, 0, 0.45), 0 5px 9px rgba(200, 150, 20, 0.3);
}
.material-cards-grid .yellow .p2 {
  width: 36px; height: 36px; top: 8px; left: 40px;
  background: radial-gradient(circle at 34% 28%, #fffbe0 0%, #ffe06a 32%, #e0ad14 72%, #9c7208 100%);
  box-shadow: inset -5px -6px 11px rgba(120, 80, 0, 0.45), 0 6px 10px rgba(200, 150, 20, 0.35);
}
.material-cards-grid .yellow .p3 {
  width: 20px; height: 20px; top: 50px; left: 56px; transform: rotate(18deg);
  background: linear-gradient(135deg, #fff2bf, #efcb55);
  box-shadow: inset -3px -3px 6px rgba(120, 80, 0, 0.4), 0 4px 7px rgba(200, 150, 20, 0.3);
}

.material-cards-grid .green .p1 {
  width: 38px; height: 38px; top: 30px; left: 10px; transform: rotate(-10deg);
  background: linear-gradient(135deg, #a4eeb2, #34b455 60%, #167a34);
  box-shadow: inset -5px -6px 11px rgba(15, 70, 32, 0.45), 0 6px 10px rgba(30, 120, 55, 0.35);
}
.material-cards-grid .green .p2 {
  width: 28px; height: 28px; top: 4px; left: 46px;
  background: radial-gradient(circle at 34% 28%, #fff 0%, #84e399 30%, #34b455 72%, #167a34 100%);
  box-shadow: inset -4px -5px 9px rgba(15, 70, 32, 0.4), 0 5px 9px rgba(30, 120, 55, 0.35);
}
.material-cards-grid .green .p3 {
  width: 18px; height: 18px; top: 46px; left: 58px;
  background: linear-gradient(135deg, #d2f7da, #74da90);
  box-shadow: inset -3px -3px 6px rgba(15, 70, 32, 0.4), 0 4px 7px rgba(30, 120, 55, 0.3);
}

.material-cards-grid .material-card-body {
  padding: 12px 12px 6px;
  display: flex;
  flex-direction: column;
  background: #fbfbfc;
  min-height: 0;
}

.material-cards-grid .features-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #9a9aa0;
  margin-bottom: 12px;
}

.material-cards-grid .features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.material-cards-grid .features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #2c2c30;
  line-height: 1.45;
  min-width: 0;
}

.material-cards-grid .features .feature-text {
  flex: 1;
  min-width: 0;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: auto;
}

.material-cards-grid .check {
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #3d39f4;
  margin-top: 1px;
}

.material-cards-grid .check svg {
  width: 11px;
  height: 11px;
}

.material-cards-grid .progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: auto 0 10px;
  padding-top: 18px;
}

.material-cards-grid .progress-head span {
  font-size: 14px;
  color: #4a4a4e;
}

.material-cards-grid .progress-head .pct {
  font-weight: 700;
  color: #111113;
}

.material-cards-grid .bar {
  height: 8px;
  border-radius: 999px;
  background: #ececef;
  position: relative;
}

.material-cards-grid .bar .fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #3d39f4;
  border-radius: 999px;
}

.material-cards-grid .bar .knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d39f4;
  transform: translate(-50%, -50%);
}

.material-cards-grid .material-card-bottom {
  padding: 12px 12px 14px;
  background: #fbfbfc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@supports not (grid-template-rows: subgrid) {
  .material-cards-grid .material-card-top {
    min-height: 108px;
  }
}

.material-cards-grid .material-card-bottom .info {
  font-size: 14px;
  color: #4a4a4e;
}

.material-cards-grid .material-card-bottom .info strong {
  color: #111113;
  font-weight: 700;
}

.material-cards-grid .material-card-bottom .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.material-cards-grid .btn-plan {
  background: transparent;
  color: #3d39f4;
  border: 1px solid #3d39f4;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.material-cards-grid .btn-main {
  background: #3d39f4;
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 1024px) {
  .material-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .material-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }

  .material-cards-grid .material-card {
    border-radius: 18px;
  }

  .material-cards-grid .material-card-top {
    margin: 2px 2px 0;
    padding: 12px 10px 10px;
    border-radius: 14px;
  }

  .material-cards-grid .top-text {
    max-width: calc(100% - 48px);
  }

  .material-cards-grid .cluster {
    width: 44px;
    height: 42px;
    right: 4px;
    top: 10px;
    transform: scale(0.82);
    transform-origin: top right;
  }

  .material-cards-grid .desc {
    font-size: 15px;
    line-height: 1.45;
  }

  .material-cards-grid .material-card-body {
    padding: 10px 12px 6px;
  }

  .material-cards-grid .material-card-bottom {
    padding: 10px 12px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .material-cards-grid .material-card-bottom .info {
    font-size: 13px;
  }

  .material-cards-grid .material-card-bottom .actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .material-cards-grid .btn-plan,
  .material-cards-grid .btn-main {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
    text-align: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
}

@media (max-width: 380px) {
  .material-cards-grid .material-card-bottom .actions {
    grid-template-columns: 1fr;
  }

  .material-cards-grid .cluster {
    display: none;
  }

  .material-cards-grid .top-text {
    max-width: 100%;
  }
}
