.gr-gallery-section {
  --gr-card-width: calc(339 / 1920 * 100vw);
  --gr-card-height: calc(210 / 1920 * 100vw);
  --gr-mobile-dot-size: 8px;
  --gr-mobile-dot-active-width: 24px;
  --gr-mobile-slide-width: min(320px, 80vw);
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 20px 0;
}

.gr-gallery-section,
.gr-gallery-section * {
  box-sizing: border-box;
}

.gr-row {
  width: 100%;
}

.gr-gallery-mobile {
  display: none;
}

.gr-gallery-wrap {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.gr-track {
  display: flex;
  flex-wrap: nowrap;
  width: max-content;
  margin: 0 -5px;
  will-change: transform;
  user-select: none;
  touch-action: pan-y;
  cursor: grab;
}

.gr-track.is-dragging {
  cursor: grabbing;
}

.gr-item {
  padding: 5px;
  flex: 0 0 var(--gr-card-width);
  display: block;
  border-radius: 0;
}

.gr-item-container {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #232323;
  position: relative;
}

.gr-img {
  min-height: 0;
  height: var(--gr-card-height);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  aspect-ratio: 339 / 210;
}

.gr-text {
  display: table;
  width: 100%;
  padding: 0;
  background: #232323;
  text-align: left;
}

.gr-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: #ffffff;
  padding: 5px;
  display: inline-block;
}

.gr-spacer {
  width: 100%;
  min-height: 1px;
}

.gr-mobile-pagination {
  display: none;
}

@media (max-width: 767px) {
  .gr-gallery-desktop {
    display: none;
  }

  .gr-gallery-mobile {
    display: block;
  }

  .gr-mobile-slider {
    width: var(--gr-mobile-slide-width);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
  }

  .gr-mobile-viewport {
    width: 100%;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    cursor: grab;
  }

  .gr-mobile-viewport.is-dragging {
    cursor: grabbing;
  }

  .gr-mobile-slider-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    will-change: transform;
  }

  .gr-mobile-slide {
    flex: 0 0 var(--gr-mobile-slide-width);
    width: var(--gr-mobile-slide-width);
    user-select: none;
  }

  .gr-mobile-card {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #232323;
    aspect-ratio: 20 / 11;
  }

  .gr-mobile-image {
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    filter: brightness(0.68);
  }

  .gr-mobile-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
  }

  .gr-mobile-title {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  }

  .gr-mobile-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: calc(100% - 24px);
    margin: 0 auto;
  }

  .gr-mobile-dot {
    appearance: none;
    border: 0;
    width: var(--gr-mobile-dot-size);
    height: var(--gr-mobile-dot-size);
    padding: 0;
    border-radius: 999px;
    background: rgba(148, 148, 148, 0.55);
    opacity: 0.9;
    cursor: pointer;
    transition: width 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  }

  .gr-mobile-dot.is-active {
    width: var(--gr-mobile-dot-active-width);
    background: rgba(255, 255, 255, 1);
    opacity: 1;
  }
}
