.home-categories {
  width: 100%;
  background: #ffffff;
  color: #0c141b;
  padding: 0;
  box-sizing: border-box;
}

.home-categories * {
  box-sizing: border-box;
}

.home-categories__layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.34fr) minmax(0, 0.66fr);
  align-items: stretch;
}

.home-categories__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-categories__intro {
  position: relative;
  padding: clamp(18px, 2.2vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background: #0b9ab9;
  color: #ffffff;
  overflow: hidden;
  min-height: clamp(460px, 18vw, 740px);
}

.home-categories__intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='480' viewBox='0 0 900 480'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.22' stroke-width='2'%3E%3Cpath d='M92 330c38-58 92-92 170-106 92-16 166 8 224 72'/%3E%3Cpath d='M110 120h150c28 0 50 22 50 50v10c0 28-22 50-50 50H110c-28 0-50-22-50-50v-10c0-28 22-50 50-50z'/%3E%3Cpath d='M520 96h140v52H520z'/%3E%3Cpath d='M590 148v190'/%3E%3Ccircle cx='590' cy='212' r='64'/%3E%3Cpath d='M560 212h60'/%3E%3Cpath d='M590 182v60'/%3E%3Cpath d='M708 312h118'/%3E%3Cpath d='M768 242v140'/%3E%3Ccircle cx='768' cy='212' r='30'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  background-position: 10% 50%;
  opacity: 0.9;
  pointer-events: none;
}

.home-categories__intro-inner {
  position: relative;
  z-index: 1;
}

.home-categories__intro-title {
  margin: 0;
  font-size: clamp(28px, 3.1vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.home-categories__viewall {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: rgba(0, 0, 0, 0.12);
  color: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 160ms ease,
    background 160ms ease;
  will-change: transform;
}

.home-categories__viewall:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.18);
}

.home-categories__viewall:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.92);
  outline-offset: 3px;
}

.home-categories__viewall svg {
  width: 16px;
  height: 16px;
}

.home-categories__mosaic {
  background: #ffffff;
}

.home-categories__mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, clamp(260px, 9vw, 380px));
  gap: 1px;
  background: #ffffff;
}

.home-categories__tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f4f6;
  text-decoration: none;
  overflow: hidden;
}

.home-categories__hover-layer {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 27, 0.42);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 180ms ease,
    transform 220ms ease;
  pointer-events: none;
  z-index: 1;
}

.home-categories__label {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: min(90%, 420px);
  padding: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow:
    0 2px 10px rgba(12, 20, 27, 0.55),
    0 1px 1px rgba(12, 20, 27, 0.35);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 6px));
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.home-categories__tile:hover .home-categories__hover-layer {
  opacity: 1;
  transform: translateY(0);
}

.home-categories__tile:hover .home-categories__label {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.home-categories__tile img {
  width: min(320px, 78%);
  height: auto;
  max-height: 78%;
  object-fit: contain;
  object-position: 50% 50%;
  display: block;
  z-index: 0;
  transition:
    box-shadow 220ms ease,
    transform 220ms ease;
  will-change: box-shadow, transform;
}

.home-categories__tile:hover img {
  /* box-shadow:
    0 18px 44px rgba(12, 20, 27, 0.22),
    0 2px 10px rgba(12, 20, 27, 0.14); */
  transform: translateY(-1px);
}

.home-categories__tile:focus-visible {
  outline: 2px solid rgba(12, 20, 27, 0.72);
  outline-offset: -2px;
}

.home-categories__tile--a {
  grid-column: 1 / span 4;
  grid-row: 1 / span 1;
}

.home-categories__tile--b {
  grid-column: 5 / span 4;
  grid-row: 1 / span 1;
}

.home-categories__tile--c {
  grid-column: 9 / span 4;
  grid-row: 1 / span 1;
}

.home-categories__tile--d {
  grid-column: 1 / span 7;
  grid-row: 2 / span 1;
}

.home-categories__tile--e {
  grid-column: 8 / span 5;
  grid-row: 2 / span 1;
}

@media (max-width: 980px) {
  .home-categories__layout {
    grid-template-columns: 1fr;
  }

  .home-categories__intro {
    min-height: 220px;
  }

  .home-categories__mosaic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(120px, 1fr);
  }

  .home-categories__tile--a,
  .home-categories__tile--b,
  .home-categories__tile--c,
  .home-categories__tile--d,
  .home-categories__tile--e {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  .home-categories__mosaic-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: minmax(150px, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-categories__hover-layer,
  .home-categories__label,
  .home-categories__tile img,
  .home-categories__viewall {
    transition: none;
  }
}
