/* ========================================================================== */
/* SYMBIONT MUSIC GENRES MAP — shared mini periodic genre cards v3.1          */
/* Used by /genres/ archive and “Другие жанры в семействе” block              */
/* ========================================================================== */

.sym-genre-card,
.sym-genre-card-v1 {
  position: relative;
  min-width: 0;
  min-height: 100%;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.sym-genre-card__link,
.sym-genre-card-v1__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none !important;
}

.sym-genre-card-v1__periodic {
  position: relative;
  min-height: 248px;
  height: 100%;
  aspect-ratio: 1 / 1.08;
  padding: 16px 16px 18px;
  overflow: hidden;
  border: 2px solid var(--sym-genre-card-accent, #111827);
  border-radius: 8px;
  background:
    linear-gradient(rgba(12, 20, 28, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 20, 28, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(247,251,252,.97));
  background-size: 24px 24px, 24px 24px, 100% 100%;
  box-shadow: 0 14px 34px rgba(12,19,30,.06);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.sym-genre-card-v1__periodic::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--sym-genre-card-accent, #111827), rgba(33,255,190,.72));
  z-index: 8;
}

.sym-genre-card-v1__link:hover .sym-genre-card-v1__periodic,
.sym-genre-card-v1__link:focus-visible .sym-genre-card-v1__periodic {
  transform: translateY(-4px);
  border-color: var(--sym-genre-card-accent, #111827);
  box-shadow: 0 20px 44px rgba(12,19,30,.12);
}

.sym-genre-card-v1__top,
.sym-genre-card-v1__bottom {
  position: absolute;
  left: 15px;
  right: 15px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(46px, 1fr) minmax(0, 1.5fr) minmax(46px, 1fr);
  align-items: center;
  gap: 8px;
  font-family: var(--sym-font-heading, "Tektur", system-ui, sans-serif);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: normal;
  color: #0b1116;
}

.sym-genre-card-v1__top { top: 16px; }
.sym-genre-card-v1__bottom { bottom: 17px; align-items: end; }

.sym-genre-card-v1__number,
.sym-genre-card-v1__bpm { justify-self: start; text-align: left; }
.sym-genre-card-v1__family,
.sym-genre-card-v1__level {
  justify-self: center;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
}
.sym-genre-card-v1__family-number,
.sym-genre-card-v1__rhythm { justify-self: end; text-align: right; }

.sym-genre-card-v1__wave {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 47%;
  z-index: 2;
  height: 84px;
  display: grid;
  grid-template-columns: repeat(29, minmax(1px, 1fr));
  align-items: center;
  justify-items: center;
  transform: translateY(-50%);
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}

.sym-genre-card-v1__wave i {
  display: block;
  width: 2px;
  border-radius: 0;
  background: linear-gradient(to bottom, rgba(11,17,22,0), rgba(11,17,22,.20) 22%, rgba(11,17,22,.20) 78%, rgba(11,17,22,0));
}
.sym-genre-card-v1__wave i:nth-child(odd) { height: 24px; opacity: .50; }
.sym-genre-card-v1__wave i:nth-child(even) { height: 42px; opacity: .60; }
.sym-genre-card-v1__wave i:nth-child(4n) { height: 56px; opacity: .66; }
.sym-genre-card-v1__wave i:nth-child(5n) { height: 68px; opacity: .54; }

.sym-genre-card-v1__halo {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 47%;
  width: 136px;
  height: 136px;
  border: 0;
  outline: 0;
  box-shadow: none;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.sym-genre-card-v1__symbol {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 47%;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 2px solid #050608;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  color: #050608;
}

.sym-genre-card-v1__symbol span {
  font-family: var(--sym-font-heading, "Tektur", system-ui, sans-serif);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: normal;
  color: #050608;
  -webkit-text-fill-color: #050608;
  text-align: center;
}

.sym-genre-card-v1 h3 {
  position: absolute;
  z-index: 10;
  left: 15px;
  right: 15px;
  top: 68.5%;
  margin: 0;
  font-family: var(--sym-font-heading, "Tektur", system-ui, sans-serif);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: normal;
  text-align: center;
  color: #0b1116;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Shared grid for “Другие жанры в семействе” on single genre page. */
.sym-genre-v1__family-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

/* Hide legacy card fragments if cached markup/classes remain. */
.sym-genre-card__media,
.sym-genre-card__body,
.sym-genre-card__chips,
.sym-genre-card__metrics {
  display: none !important;
}

html[data-theme="dark"] .sym-genre-card-v1__periodic,
body.dark .sym-genre-card-v1__periodic,
body.theme-dark .sym-genre-card-v1__periodic,
body.digital_newspaper_dark_mode .sym-genre-card-v1__periodic {
  background:
    linear-gradient(rgba(244,247,251,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,247,251,.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(12,17,23,.98), rgba(8,12,18,.98));
  box-shadow: none;
}
html[data-theme="dark"] .sym-genre-card-v1__top,
html[data-theme="dark"] .sym-genre-card-v1__bottom,
html[data-theme="dark"] .sym-genre-card-v1 h3,
body.dark .sym-genre-card-v1__top,
body.dark .sym-genre-card-v1__bottom,
body.dark .sym-genre-card-v1 h3,
body.theme-dark .sym-genre-card-v1__top,
body.theme-dark .sym-genre-card-v1__bottom,
body.theme-dark .sym-genre-card-v1 h3,
body.digital_newspaper_dark_mode .sym-genre-card-v1__top,
body.digital_newspaper_dark_mode .sym-genre-card-v1__bottom,
body.digital_newspaper_dark_mode .sym-genre-card-v1 h3 {
  color: #f4f7fb;
}
html[data-theme="dark"] .sym-genre-card-v1__wave i,
body.dark .sym-genre-card-v1__wave i,
body.theme-dark .sym-genre-card-v1__wave i,
body.digital_newspaper_dark_mode .sym-genre-card-v1__wave i {
  background: linear-gradient(to bottom, rgba(244,247,251,0), rgba(244,247,251,.23) 22%, rgba(244,247,251,.23) 78%, rgba(244,247,251,0));
}

@media (max-width: 1180px) {
  .sym-genre-v1__family-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 980px) {
  .sym-genre-v1__family-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 720px) {
  .sym-genre-card-v1__periodic { min-height: 228px; }
  .sym-genre-card-v1 h3 { font-size: 18px; }
  .sym-genre-v1__family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 520px) {
  .sym-genre-v1__family-grid { grid-template-columns: 1fr !important; }
}
