/* ── Facility Gallery Widget — fg-style.css v3.2.2 ── */

.fg-wrap { width: 100%; }
.fg-wrap *, .fg-wrap *::before, .fg-wrap *::after { box-sizing: border-box; }

/* ── TAB BAR ── */
.fg-tabbar-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-bottom: 22px;
}

.fg-tabbar {
  display: flex;
  border-bottom: 2px solid rgba(58,80,107,0.12);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  flex: 1 1 auto;
  min-width: 0;
  /* Fade distances driven by JS state classes below */
  --fg-fade-l: 0px;
  --fg-fade-r: 0px;
  -webkit-mask-image: linear-gradient(to right,
      transparent 0,
      rgba(0,0,0,0.15) calc(var(--fg-fade-l) * 0.35),
      #000 var(--fg-fade-l),
      #000 calc(100% - var(--fg-fade-r)),
      rgba(0,0,0,0.15) calc(100% - var(--fg-fade-r) * 0.35),
      transparent 100%);
          mask-image: linear-gradient(to right,
      transparent 0,
      rgba(0,0,0,0.15) calc(var(--fg-fade-l) * 0.35),
      #000 var(--fg-fade-l),
      #000 calc(100% - var(--fg-fade-r)),
      rgba(0,0,0,0.15) calc(100% - var(--fg-fade-r) * 0.35),
      transparent 100%);
  transition: -webkit-mask-image 0.35s ease, mask-image 0.35s ease;
}
.fg-tabbar::-webkit-scrollbar { display: none; }

/* Fade the leading / trailing tabs when there's more to scroll that way */
.fg-tabbar-wrap.fg-can-prev .fg-tabbar { --fg-fade-l: 72px; }
.fg-tabbar-wrap.fg-can-next .fg-tabbar { --fg-fade-r: 72px; }

/* Grab cursor while draggable; grabbing while active drag */
.fg-tabbar.fg-draggable { cursor: grab; }
.fg-tabbar.fg-dragging {
  cursor: grabbing;
  scroll-behavior: auto;          /* no smooth fighting the drag */
  scroll-snap-type: none;
  user-select: none;
}
.fg-tabbar.fg-dragging .fg-tab { pointer-events: none; }  /* don't fire click after a drag */

/* ── SCROLL ARROWS ──
   Clean ghost-circle buttons that belong to the same minimal system as the
   tabs: no hard border, no heavy drop shadow. Subtle tint that deepens on
   hover, with the chevron nudging in its travel direction. */
.fg-tab-arrow {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  align-self: center;
  display: none;                  /* shown via JS only when overflowing */
  align-items: center;
  justify-content: center;
  background: rgba(58,80,107,0.06);
  color: #3A506B;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: none;
  padding: 0;
  font-size: 0;                   /* hide any text node; we use SVG */
  line-height: 0;
  cursor: pointer;
  z-index: 4;
  -webkit-appearance: none;
  appearance: none;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.28s ease,
    transform 0.28s ease;
  opacity: 0;                     /* hidden until that direction can scroll */
  pointer-events: none;
  transform: scale(0.85);
}
.fg-tab-arrow svg {
  width: 17px;
  height: 17px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.22s ease;
}
.fg-tab-arrow-prev { margin-right: 8px; }
.fg-tab-arrow-next { margin-left: 8px; }

.fg-tab-arrow:hover {
  background: #FFC43D;
  color: #1A2B3C;
  box-shadow: 0 4px 14px rgba(255,196,61,0.40);
}
.fg-tab-arrow-prev:hover svg { transform: translateX(-2px); }
.fg-tab-arrow-next:hover svg { transform: translateX(2px); }
.fg-tab-arrow:active { transform: scale(0.92); }
.fg-tab-arrow:focus-visible {
  outline: 2px solid #FFC43D !important;
  outline-offset: 3px;
}

/* Activate arrows when JS detects overflow */
.fg-tabbar-wrap.fg-scrollable .fg-tab-arrow { display: flex; }
.fg-tabbar-wrap.fg-can-prev .fg-tab-arrow-prev,
.fg-tabbar-wrap.fg-can-next .fg-tab-arrow-next {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Arrows fully hidden when disabled in editor (mask fade still active) */
.fg-tabbar-wrap.fg-arrows-off .fg-tab-arrow { display: none !important; }

/* Reset ALL Elementor button interference first */
.fg-tab,
.fg-tab:hover,
.fg-tab:focus,
.fg-tab:active,
.fg-tab:visited {
  /* layout */
  display: inline-block;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  /* borders & shadows */
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: none;
  /* spacing */
  padding: 10px 20px 10px 0;
  margin: 0;
  /* text */
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1;
  /* misc */
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

/* Inactive state */
.fg-tab {
  color: rgba(58,80,107,0.45);
}

/* Hover state — subtle only */
.fg-tab:hover {
  color: #3A506B !important;
}

/* Active state — clear visual distinction */
.fg-tab.fg-active {
  color: #3A506B !important;
  font-weight: 800 !important;
}

/* Active underline */
.fg-tab::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 3px;
  background: #FFC43D;
  transition: width 0.28s ease;
  border-radius: 0;
}
.fg-tab.fg-active::after {
  width: calc(100% - 20px);
}

/* Focus ring — keyboard only */
.fg-tab:focus-visible {
  outline: 2px solid #FFC43D !important;
  outline-offset: 2px;
  border-radius: 2px !important;
}

/* ── PANELS ── */
.fg-panel { display: none; }
.fg-panel.fg-active { display: block; animation: fgFade 0.28s ease; }
@keyframes fgFade { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }
.fg-empty { color:#999; font-size:13px; padding:24px 0; }

/* ── GRID ── */
.fg-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

/* ── ITEM ── */
.fg-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #b8cdd8;
}
.fg-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.5s cubic-bezier(.25,.46,.45,.94), filter 0.3s;
  filter: brightness(0.93);
  will-change: transform;
}
.fg-item:hover img,
.fg-item:focus-visible img {
  transform: scale(1.05);
  filter: brightness(1);
}
.fg-item:focus-visible { outline: 2px solid #FFC43D; outline-offset: -2px; }

/* ── CAPTION ── */
.fg-cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2rem 0.85rem 0.75rem;
  background: linear-gradient(to top, rgba(26,43,60,0.88) 0%, transparent 100%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.fg-item:hover .fg-cap,
.fg-item:focus-visible .fg-cap { opacity: 1; }
.fg-cap span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.92);
}
.fg-cap span::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #FFC43D;
  margin-right: 6px;
  vertical-align: middle;
  margin-bottom: 1px;
}

/* ── LIGHTBOX ── */
.fg-lb {
  display: none;
  position: fixed; inset: 0; z-index: 999999;
  background: rgba(26,43,60,0.97);
  align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fg-lb.fg-lb-open { display: flex; }

.fg-lb-inner { max-width: 1200px; width: 100%; animation: fgLbIn 0.22s ease; }
@keyframes fgLbIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:none; } }
.fg-lb-inner img {
  width: 100%; max-height: 86vh;
  object-fit: contain; display: block;
  border-radius: 3px;
  border: 2px solid rgba(255,195,61,0.22);
}

.fg-lb-close,
.fg-lb-prev,
.fg-lb-next {
  background: none;
  border: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.fg-lb-close {
  position: fixed; top: 16px; right: 20px;
  color: rgba(255,255,255,0.5); font-size: 2rem;
  line-height: 1; z-index: 1000000;
  transition: color 0.2s;
  padding: 0;
}
.fg-lb-close:hover { color: #FFC43D; }

.fg-lb-prev, .fg-lb-next {
  position: fixed; top: 50%; transform: translateY(-50%);
  background: rgba(58,80,107,0.75) !important;
  border: 1px solid rgba(255,195,61,0.22) !important;
  color: #fff; width: 46px; height: 46px;
  border-radius: 2px !important;
  font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  z-index: 1000000;
}
.fg-lb-prev { left: 12px; }
.fg-lb-next { right: 12px; }
.fg-lb-prev:hover, .fg-lb-next:hover {
  background: #FFC43D !important;
  border-color: #FFC43D !important;
  color: #3A506B !important;
}

.fg-lb-info {
  position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
  text-align: center; z-index: 1000000;
}
.fg-lb-title {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); display: block;
}
.fg-lb-count {
  font-size: 0.58rem; color: rgba(255,255,255,0.3);
  margin-top: 3px; display: block;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .fg-grid { grid-template-columns: repeat(6, 1fr) !important; }
  .fg-item { grid-column: span 3 !important; height: 200px !important; }
  .fg-item.fg-hero { grid-column: span 6 !important; height: 260px !important; }
}
@media (max-width: 560px) {
  .fg-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .fg-item { grid-column: span 1 !important; height: 160px !important; }
  .fg-item.fg-hero { grid-column: span 2 !important; height: 200px !important; }
  .fg-tab-arrow { width: 28px; font-size: 1.1rem; }
  .fg-tabbar-wrap::before, .fg-tabbar-wrap::after { width: 28px; }
}
