.fg-trigger,
.fg-etrigger {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: transparent !important;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 999 !important;
  pointer-events: auto !important;
  appearance: none;
}
.fg-trigger:focus-visible,
.fg-etrigger:focus-visible {
  outline: 2px solid #5db4d7;
  outline-offset: -2px;
}

.fg-modal {
  --fg-dark: #1c2b3a;
  --fg-text: #1c2b3a;
  --fg-muted: #6b7684;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw;
  height: 100vh;
  margin: 0;
  transform: none !important;
  z-index: 999999 !important;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.fg-modal.is-open {
  display: flex;
}

.fg-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 14, 0.94);
}

.fg-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  max-height: 88vh;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.fg-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--fg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}
.fg-close:hover {
  background: #fff;
}
.fg-close,
.fg-download {
  box-sizing: border-box !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  line-height: 1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  color: #1c2b3a !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-transform: none !important;
}
.fg-close:hover,
.fg-download:hover {
  background: #fff !important;
  color: #3f7b9c !important;
}
.fg-close {
  top: 14px !important;
  right: 14px !important;
}
.fg-download {
  position: absolute;
  top: 14px;
  right: 64px;
  z-index: 3;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.fg-download svg,
.fg-close svg {
  stroke: currentColor !important;
  fill: none !important;
}

.fg-image-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
  max-height: 72vh;
  background: #0a0e14;
  touch-action: pan-y;
  user-select: none;
}

.fg-images {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 55vh;
  max-height: 72vh;
}

.fg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.fg-image.is-active {
  opacity: 1;
  pointer-events: auto;
  cursor: pointer;
}
.fg-video.is-active {
  cursor: default;
}

.fg-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
  transition: opacity 0.2s;
  opacity: 0.85;
}
.fg-nav svg {
  width: 30px;
  height: 30px;
}
.fg-nav:hover {
  opacity: 1;
}
.fg-prev { left: 8px; }
.fg-next { right: 8px; }

.fg-counter {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: rgba(10, 14, 20, 0.6);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
}

.fg-text {
  padding: 24px 28px 28px;
  overflow-y: auto;
}
.fg-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-text);
}
.fg-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg-muted);
}
.fg-desc p {
  margin: 0 0 12px;
}
.fg-desc p:last-child {
  margin-bottom: 0;
}

body.fg-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .fg-modal { padding: 0; }
  .fg-modal-box { max-width: none; max-height: 100vh; height: 100%; border-radius: 0; }
  .fg-image-stage, .fg-images { max-height: 50vh; }
  .fg-text { padding: 18px 18px 24px; }
}