/* Category card treatment matched to the selected reference image. */
.meshkat-category-section > .container {
  width: calc(100% - 32px);
  max-width: 1670px;
  padding-inline: 0;
}

.meshkat-category-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3.5vw, 60px);
}

.meshkat-category-heading .meshkat-category-title {
  margin: 0;
  color: #0d235d;
  font-weight: 800;
  font-size: clamp(23px, 1.9vw, 32px);
  line-height: 1.45;
}

.meshkat-category-heading-rule {
  display: flex;
  align-items: center;
  width: 50px;
  flex: 0 0 50px;
  color: #1686fa;
}

.meshkat-category-heading-rule hr {
  flex: 1;
  margin: 0;
  border: 0;
  border-top: 1px solid #b6d8ff;
  opacity: 1;
}

.meshkat-category-heading-rule i {
  font-size: 6px;
}

.meshkat-category-section .meshkat-category-subtitle {
  margin: 4px 0 8px;
  color: #7b91bc;
  font-size: 16px;
  line-height: 1.5;
}

.meshkat-category-section .meshkat-category-grid {
  gap: 14px;
}

.meshkat-category-grid > .category-icon {
  --category-color: #2374ce;
  --category-tint: #e4f0fd;
  --category-asset-hue: 0deg;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 140px;
  padding: 18px 8px 17px !important;
  justify-content: flex-start;
  gap: 13px;
  border: 1px solid #cfe2ff;
  border-radius: 17px !important;
  background: #fff;
  box-shadow: 0 10px 20px rgba(43, 89, 157, 0.11);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.meshkat-category-grid > .category-icon::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background-image: url('/img/front-pages/backgrounds/meshkat-category-card-skin.webp?v=20261011-white');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  filter: hue-rotate(var(--category-asset-hue)) saturate(1.12);
  pointer-events: none;
}

.meshkat-category-section .meshkat-category-grid > .category-icon .meshkat-category-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 60px;
  width: 60px;
  height: 60px;
  margin: 0;
  border: 1px solid #fff;
  border-radius: 19px;
  background: var(--category-tint);
  color: var(--category-color);
  box-shadow: 0 3px 6px rgba(45, 94, 159, 0.1);
}

.meshkat-category-symbol > i {
  font-size: 28px;
  line-height: 1;
}

.meshkat-category-mobile-icon {
  display: none;
}

.meshkat-category-grid > .category-icon > .meshkat-category-label {
  color: #10215f;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: normal;
}

.meshkat-category-grid > .category-icon:nth-child(2) {
  --category-color: #248f7e;
  --category-tint: #e1f5ef;
  --category-asset-hue: -48deg;
}

.meshkat-category-grid > .category-icon:nth-child(3) {
  --category-color: #13879f;
  --category-tint: #e1f3f9;
  --category-asset-hue: -25deg;
}

.meshkat-category-grid > .category-icon:nth-child(4) {
  --category-color: #6850b2;
  --category-tint: #ece7fb;
  --category-asset-hue: 46deg;
}

.meshkat-category-grid > .category-icon:nth-child(5) {
  --category-color: #a97820;
  --category-tint: #fbf0da;
  --category-asset-hue: 190deg;
}

.meshkat-category-grid > .category-icon:nth-child(6) {
  --category-color: #4663b4;
  --category-tint: #e7edfb;
  --category-asset-hue: 20deg;
}

.meshkat-category-grid > .category-icon:nth-child(7) {
  --category-color: #387787;
  --category-tint: #e3f0f4;
  --category-asset-hue: -30deg;
}

.meshkat-category-grid > .category-icon:nth-child(8) {
  --category-color: #ae5577;
  --category-tint: #f9e6ee;
  --category-asset-hue: 110deg;
}

.meshkat-category-grid > .category-icon:nth-child(9) {
  --category-color: #805dab;
  --category-tint: #efe7f8;
  --category-asset-hue: 65deg;
}

.meshkat-category-grid > .category-icon:focus-visible {
  outline: 3px solid #83baf9;
  outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .meshkat-category-grid > .category-icon:hover {
    transform: translateY(-3px);
    border-color: var(--category-color);
    box-shadow: 0 13px 24px rgba(43, 89, 157, 0.16);
  }
}

@media (min-width: 1280px) {
  .meshkat-category-section > .container {
    width: calc(100% - 80px);
  }

  .meshkat-category-section .meshkat-category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.17fr) repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) and (max-width: 1499.98px) {
  .meshkat-category-grid > .category-icon > .meshkat-category-label {
    font-size: 14px;
  }
}

@media (max-width: 767.98px) {
  .meshkat-category-heading {
    gap: 12px;
  }

  .meshkat-category-heading-rule {
    width: 30px;
    flex-basis: 30px;
  }

  .meshkat-category-section .meshkat-category-subtitle {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .meshkat-category-section .meshkat-category-grid {
    gap: 10px;
  }

  .meshkat-category-grid > .category-icon {
    min-height: 118px;
    padding: 16px 5px 12px !important;
    gap: 10px;
    border-radius: 15px !important;
  }

  .meshkat-category-section .meshkat-category-grid > .category-icon .meshkat-category-symbol {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: none;
  }

  .meshkat-category-symbol > i {
    font-size: 20px;
  }

  .meshkat-category-desktop-icon {
    display: none;
  }

  .meshkat-category-mobile-icon {
    display: block;
  }

  .meshkat-category-grid > .category-icon > .meshkat-category-label {
    font-size: 12px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .meshkat-category-grid > .category-icon {
    transition: none;
  }
}

/* Compact landing tiles. Keep these rules after the base card treatment so the
   landing layout wins over the shared category-card defaults at every breakpoint. */
@media (max-width: 767.98px) {
  .meshkat-category-section .meshkat-category-grid {
    gap: 0.55rem;
  }

  .meshkat-category-section .meshkat-category-grid > .category-icon {
    min-height: 5.5rem;
    padding: 0.55rem 0.25rem !important;
    gap: 0.35rem;
    border-radius: 0.9rem !important;
  }

  .meshkat-category-section .meshkat-category-grid > .category-icon .meshkat-category-symbol {
    flex-basis: 2.45rem;
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.7rem;
  }

  .meshkat-category-section .meshkat-category-grid > .category-icon .meshkat-category-symbol > i {
    font-size: 1.05rem;
  }

  .meshkat-category-grid > .category-icon > .meshkat-category-label {
    font-size: 0.7rem;
    line-height: 1.3;
  }
}

@media (min-width: 768px) and (max-width: 1279.98px) {
  .meshkat-category-section .meshkat-category-grid > .category-icon {
    min-height: 6.4rem;
    padding: 0.7rem 0.4rem !important;
    gap: 0.45rem;
  }

  .meshkat-category-section .meshkat-category-grid > .category-icon .meshkat-category-symbol {
    flex-basis: 2.8rem;
    width: 2.8rem;
    height: 2.8rem;
  }

  .meshkat-category-section .meshkat-category-grid > .category-icon .meshkat-category-symbol > i {
    font-size: 1.2rem;
  }

  .meshkat-category-grid > .category-icon > .meshkat-category-label {
    font-size: 0.78rem;
  }
}

@media (min-width: 1280px) {
  .meshkat-category-section .meshkat-category-grid > .category-icon {
    min-height: 5.2rem;
    padding: 0.4rem 0.25rem !important;
    gap: 0.3rem;
  }

  .meshkat-category-section .meshkat-category-grid > .category-icon .meshkat-category-symbol {
    flex-basis: 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
  }

  .meshkat-category-section .meshkat-category-grid > .category-icon .meshkat-category-symbol > i {
    font-size: 1rem;
  }

  .meshkat-category-grid > .category-icon > .meshkat-category-label {
    font-size: 0.7rem;
  }
}
