/* SportSerwis.pl — Oferta według obiektu v1.0.0 */
.ssob-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 565px;
  overflow: hidden;
  border-radius: 13px;
  background: #101512;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .16);
  transition: transform .3s ease, box-shadow .3s ease;
}

.ssob-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, .23);
  color: #fff !important;
}

.ssob-card__photo {
  position: absolute;
  inset: 0 0 auto;
  height: 68%;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  transition: transform .5s cubic-bezier(.22,.61,.36,1);
}

.ssob-card:hover .ssob-card__photo {
  transform: scale(1.035);
}

.ssob-card--outdoor .ssob-card__photo {
  background-image: url('/modules/ssobjectassets/views/img/boisko-v100.webp');
  background-position: 50% 50%;
}

.ssob-card--indoor .ssob-card__photo {
  background-image: url('/modules/ssobjectassets/views/img/sala-v100.webp');
  background-position: 50% 50%;
}

.ssob-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,12,9,0) 24%, rgba(8,12,9,.18) 46%, rgba(9,13,10,.94) 68%, #0b100d 100%);
  pointer-events: none;
}

.ssob-card__content {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 38px 36px;
  text-align: center;
}

.ssob-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #fff;
  color: #72c34a;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}

.ssob-card__icon svg {
  width: 43px;
  height: 43px;
  stroke: currentColor;
}

.ssob-card__title {
  margin: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
  text-transform: uppercase;
}

.ssob-card__title::after {
  content: "";
  display: block;
  width: 58px;
  height: 3px;
  margin: 16px auto 17px;
  background: #72c34a;
}

.ssob-card__description {
  max-width: 440px;
  min-height: 54px;
  margin: 0 auto 24px;
  color: rgba(255,255,255,.9);
  font-size: 17px;
  line-height: 1.55;
}

.ssob-card__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  width: min(100%, 350px);
  min-height: 56px;
  margin: 0 auto;
  padding: 12px 20px;
  border-radius: 8px;
  background: #72c34a;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  transition: background .25s ease;
}

.ssob-card:hover .ssob-card__button {
  background: #61ad3b;
}

.ssob-card__arrow {
  font-size: 25px;
  line-height: 1;
  transition: transform .25s ease;
}

.ssob-card:hover .ssob-card__arrow {
  transform: translateX(5px);
}

@media (max-width: 991px) {
  .ssob-card { min-height: 530px; }
  .ssob-card__content { padding: 0 26px 30px; }
  .ssob-card__title { font-size: 27px; }
}

@media (max-width: 767px) {
  .ssob-card { min-height: 500px; }
  .ssob-card__photo { height: 65%; }
  .ssob-card__content { padding: 0 20px 24px; }
  .ssob-card__icon { width: 66px; height: 66px; margin-bottom: 14px; }
  .ssob-card__icon svg { width: 38px; height: 38px; }
  .ssob-card__title { font-size: 25px; }
  .ssob-card__description { min-height: 0; font-size: 16px; }
  .ssob-card__button { min-height: 52px; font-size: 15px; }
}

/* Interaktywna plansza — Boisko sportowe v1.1.0 */
.ssob-map {
  width: 100%;
  margin: 0 auto;
}

.ssob-map__stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: #152019;
  box-shadow: 0 16px 38px rgba(0, 0, 0, .18);
}

.ssob-map__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1400 / 748;
  object-fit: cover;
}

.ssob-map__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 12, 7, .05) 35%, rgba(4, 12, 7, .28) 100%),
    linear-gradient(90deg, rgba(5, 12, 8, .12), transparent 28%, transparent 72%, rgba(5, 12, 8, .12));
}

.ssob-map__hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.ssob-map__hotspot {
  --x: 50%;
  --y: 50%;
  position: absolute;
  left: var(--x);
  top: var(--y);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff !important;
  text-decoration: none !important;
  transform: translate(-22px, -50%);
  white-space: nowrap;
  z-index: 3;
}

.ssob-map__dot {
  position: relative;
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #72c34a;
  color: #fff;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  box-shadow: 0 0 0 8px rgba(114, 195, 74, .20), 0 6px 18px rgba(0, 0, 0, .30);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

.ssob-map__dot::after {
  content: "";
  position: absolute;
  inset: -11px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: inherit;
  animation: ssob-map-pulse 2.2s ease-out infinite;
}

.ssob-map__label {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 22px;
  background: rgba(8, 13, 10, .88);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: .01em;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
  backdrop-filter: blur(5px);
  transition: background .25s ease, transform .25s ease;
}

.ssob-map__hotspot:hover .ssob-map__dot,
.ssob-map__hotspot:focus-visible .ssob-map__dot {
  transform: scale(1.12);
  background: #61ad3b;
  box-shadow: 0 0 0 10px rgba(114, 195, 74, .28), 0 8px 22px rgba(0, 0, 0, .36);
}

.ssob-map__hotspot:hover .ssob-map__label,
.ssob-map__hotspot:focus-visible .ssob-map__label {
  background: rgba(11, 18, 13, .97);
  transform: translateX(3px);
}

.ssob-map__hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px 0 0;
  color: #58625b;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.ssob-map__hint-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #72c34a;
  box-shadow: 0 0 0 4px rgba(114, 195, 74, .18);
}

@keyframes ssob-map-pulse {
  0% { opacity: .85; transform: scale(.82); }
  70%, 100% { opacity: 0; transform: scale(1.35); }
}

@media (prefers-reduced-motion: reduce) {
  .ssob-map__dot::after { animation: none; }
  .ssob-map__dot,
  .ssob-map__label { transition: none; }
}

@media (max-width: 991px) {
  .ssob-map__dot {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .ssob-map__label {
    min-height: 37px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .ssob-map__stage {
    overflow: visible;
    border-radius: 13px;
    background: transparent;
    box-shadow: none;
  }

  .ssob-map__image {
    overflow: hidden;
    border-radius: 13px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
  }

  .ssob-map__shade { display: none; }

  .ssob-map__hotspots {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
  }

  .ssob-map__hotspot {
    position: static;
    display: flex;
    min-width: 0;
    min-height: 62px;
    gap: 10px;
    padding: 9px 11px;
    border: 1px solid #dfe5df;
    border-radius: 10px;
    background: #fff;
    color: #111 !important;
    transform: none;
    white-space: normal;
    box-shadow: 0 7px 18px rgba(0, 0, 0, .07);
  }

  .ssob-map__hotspot:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .ssob-map__dot {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-width: 2px;
    font-size: 20px;
    box-shadow: 0 0 0 5px rgba(114, 195, 74, .16);
  }

  .ssob-map__dot::after { display: none; }

  .ssob-map__label {
    min-width: 0;
    min-height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #111;
    font-size: 12px;
    box-shadow: none;
    backdrop-filter: none;
  }

  .ssob-map__hotspot:hover .ssob-map__label,
  .ssob-map__hotspot:focus-visible .ssob-map__label {
    background: transparent;
    transform: none;
  }

  .ssob-map__hint { margin-top: 14px; }
}

@media (max-width: 430px) {
  .ssob-map__hotspots { grid-template-columns: 1fr; }
  .ssob-map__hotspot:last-child:nth-child(odd) { grid-column: auto; }
}

/* Interaktywność hotspotów v1.3.0 — etykiety rozwijane dopiero po wskazaniu */
@media (min-width: 768px) {
  .ssob-map__label {
    max-width: 0;
    min-height: 42px;
    padding-right: 0;
    padding-left: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    border-width: 0;
    transform: translateX(-8px) scale(.96);
    transform-origin: left center;
    transition:
      max-width .32s cubic-bezier(.22,.61,.36,1),
      padding .32s cubic-bezier(.22,.61,.36,1),
      opacity .18s ease,
      visibility 0s linear .32s,
      transform .32s cubic-bezier(.22,.61,.36,1),
      border-width .1s ease,
      background .25s ease;
  }

  .ssob-map__hotspot:hover,
  .ssob-map__hotspot:focus-visible,
  .ssob-map__hotspot.is-active {
    z-index: 30;
  }

  .ssob-map__hotspot:hover .ssob-map__label,
  .ssob-map__hotspot:focus-visible .ssob-map__label,
  .ssob-map__hotspot.is-active .ssob-map__label {
    max-width: 330px;
    padding: 9px 16px;
    opacity: 1;
    visibility: visible;
    border-width: 1px;
    transform: translateX(3px) scale(1);
    transition-delay: 0s;
  }

  /* Punkty blisko prawej krawędzi rozwijają nazwę w lewo. */
  .ssob-map__hotspot:nth-child(7),
  .ssob-map__hotspot:nth-child(9),
  .ssob-map__hotspot:nth-child(10),
  .ssob-map__hotspot:nth-child(11),
  .ssob-map__hotspot:nth-child(12),
  .ssob-map__hotspot:nth-child(15) {
    flex-direction: row-reverse;
    transform: translate(calc(-100% + 22px), -50%);
  }

  .ssob-map__hotspot:nth-child(7) .ssob-map__label,
  .ssob-map__hotspot:nth-child(9) .ssob-map__label,
  .ssob-map__hotspot:nth-child(10) .ssob-map__label,
  .ssob-map__hotspot:nth-child(11) .ssob-map__label,
  .ssob-map__hotspot:nth-child(12) .ssob-map__label,
  .ssob-map__hotspot:nth-child(15) .ssob-map__label {
    transform-origin: right center;
    transform: translateX(8px) scale(.96);
  }

  .ssob-map__hotspot:nth-child(7):hover .ssob-map__label,
  .ssob-map__hotspot:nth-child(7):focus-visible .ssob-map__label,
  .ssob-map__hotspot:nth-child(7).is-active .ssob-map__label,
  .ssob-map__hotspot:nth-child(9):hover .ssob-map__label,
  .ssob-map__hotspot:nth-child(9):focus-visible .ssob-map__label,
  .ssob-map__hotspot:nth-child(9).is-active .ssob-map__label,
  .ssob-map__hotspot:nth-child(10):hover .ssob-map__label,
  .ssob-map__hotspot:nth-child(10):focus-visible .ssob-map__label,
  .ssob-map__hotspot:nth-child(10).is-active .ssob-map__label,
  .ssob-map__hotspot:nth-child(11):hover .ssob-map__label,
  .ssob-map__hotspot:nth-child(11):focus-visible .ssob-map__label,
  .ssob-map__hotspot:nth-child(11).is-active .ssob-map__label,
  .ssob-map__hotspot:nth-child(12):hover .ssob-map__label,
  .ssob-map__hotspot:nth-child(12):focus-visible .ssob-map__label,
  .ssob-map__hotspot:nth-child(12).is-active .ssob-map__label,
  .ssob-map__hotspot:nth-child(15):hover .ssob-map__label,
  .ssob-map__hotspot:nth-child(15):focus-visible .ssob-map__label,
  .ssob-map__hotspot:nth-child(15).is-active .ssob-map__label {
    transform: translateX(-3px) scale(1);
  }
}

/* Plansza sali i hotspoty z wieloma linkami v1.4.0 */
@media (min-width: 768px) {
  .ssob-map__hotspot--left {
    flex-direction: row-reverse;
    transform: translate(calc(-100% + 22px), -50%);
  }

  .ssob-map__hotspot--left .ssob-map__label {
    transform-origin: right center;
    transform: translateX(8px) scale(.96);
  }

  .ssob-map__hotspot--left:hover .ssob-map__label,
  .ssob-map__hotspot--left:focus-visible .ssob-map__label,
  .ssob-map__hotspot--left.is-active .ssob-map__label,
  .ssob-map__hotspot--left:focus-within .ssob-map__label {
    transform: translateX(-3px) scale(1);
  }
}

.ssob-map__hotspot--menu {
  cursor: default;
}

.ssob-map__trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.ssob-map__menu {
  position: absolute;
  top: calc(50% + 27px);
  left: 53px;
  display: grid;
  width: max-content;
  min-width: 245px;
  max-width: 330px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 12px;
  background: rgba(8,13,10,.97);
  box-shadow: 0 14px 34px rgba(0,0,0,.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-7px);
  transition: opacity .18s ease, transform .22s ease, visibility 0s linear .22s;
  z-index: 60;
}

.ssob-map__hotspot--left .ssob-map__menu {
  right: 53px;
  left: auto;
}

.ssob-map__hotspot--menu:hover .ssob-map__menu,
.ssob-map__hotspot--menu:focus-within .ssob-map__menu,
.ssob-map__hotspot--menu.is-active .ssob-map__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.ssob-map__menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border-radius: 8px;
  color: #fff !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
  text-transform: none;
  white-space: normal;
}

.ssob-map__menu a::after {
  content: "→";
  flex: 0 0 auto;
  color: #72c34a;
  font-size: 17px;
}

.ssob-map__menu a:hover,
.ssob-map__menu a:focus-visible {
  background: rgba(114,195,74,.18);
}

@media (max-width: 767px) {
  .ssob-map__hotspot--menu {
    display: block;
    padding: 9px 11px;
  }

  .ssob-map__trigger {
    width: 100%;
  }

  .ssob-map__menu {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-top: 9px;
    padding: 6px;
    border-color: #dfe5df;
    background: #f7f9f7;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .ssob-map__menu a {
    padding: 8px 9px;
    color: #111 !important;
    font-size: 12px;
  }
}

/* Korekta krawędzi i responsywności hotspotów v1.4.1 */
.ssob-map,
.ssob-map *,
.ssob-map *::before,
.ssob-map *::after {
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .ssob-map__hotspot {
    left: clamp(34px, var(--x), calc(100% - 34px));
    top: clamp(28px, var(--y), calc(100% - 28px));
  }

  .ssob-map__label {
    max-inline-size: min(290px, calc(100vw - 120px));
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ssob-map__hotspot:hover .ssob-map__label,
  .ssob-map__hotspot:focus-visible .ssob-map__label,
  .ssob-map__hotspot.is-active .ssob-map__label,
  .ssob-map__hotspot:focus-within .ssob-map__label {
    max-width: min(290px, calc(100vw - 120px));
  }

  .ssob-map__menu {
    width: min(330px, calc(100vw - 70px));
    min-width: min(245px, calc(100vw - 70px));
    max-width: min(330px, calc(100vw - 70px));
    overflow-wrap: anywhere;
  }

  /* Punkt 10 leży przy lewej krawędzi — delikatne odsunięcie do środka. */
  .ssob-map__hotspots > .ssob-map__hotspot:nth-child(10) {
    left: max(48px, var(--x));
  }
}

@media (max-width: 767px) {
  .ssob-map__hotspots,
  .ssob-map__hotspot,
  .ssob-map__trigger,
  .ssob-map__menu {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .ssob-map__hotspot--menu {
    overflow: hidden;
  }

  .ssob-map__menu a,
  .ssob-map__label {
    overflow-wrap: anywhere;
    word-break: normal;
  }
}

/* Poprawka planszy sali v1.4.2
   Stare reguły boiska wybierały punkty po numerze elementu (nth-child),
   przez co punkty 9, 10, 11 i 12 na planszy sali otwierały się w złą stronę. */
@media (min-width: 768px) {
  /* Na sali kierunek etykiety wynika wyłącznie z jawnej klasy --left. */
  .ssob-map--sala .ssob-map__hotspot:not(.ssob-map__hotspot--left) {
    flex-direction: row;
    transform: translate(-22px, -50%);
  }

  .ssob-map--sala .ssob-map__hotspot:not(.ssob-map__hotspot--left) .ssob-map__label {
    transform-origin: left center;
    transform: translateX(-8px) scale(.96);
  }

  .ssob-map--sala .ssob-map__hotspot:not(.ssob-map__hotspot--left):hover .ssob-map__label,
  .ssob-map--sala .ssob-map__hotspot:not(.ssob-map__hotspot--left):focus-visible .ssob-map__label,
  .ssob-map--sala .ssob-map__hotspot:not(.ssob-map__hotspot--left).is-active .ssob-map__label,
  .ssob-map--sala .ssob-map__hotspot:not(.ssob-map__hotspot--left):focus-within .ssob-map__label {
    transform: translateX(3px) scale(1);
  }

  /* Punkt 10 jest bardzo blisko lewej krawędzi. */
  .ssob-map--sala .ssob-map__hotspots > .ssob-map__hotspot:nth-child(10) {
    left: max(52px, var(--x));
    z-index: 35;
  }

  /* Menu punktu 10 zawsze rozwija się do wnętrza planszy. */
  .ssob-map--sala .ssob-map__hotspots > .ssob-map__hotspot:nth-child(10) .ssob-map__menu {
    right: auto;
    left: 53px;
  }
}
