/* Omvex Energy Gallery • v1.4.0. Scoped to the existing website design system. */
.ov-site .ov-gallery-hero{position:relative;min-height:425px;background:#0b1525;color:#fff;isolation:isolate;overflow:hidden;display:flex;align-items:center}
.ov-site .ov-gallery-hero::before{content:"";position:absolute;inset:0;background-image:linear-gradient(90deg,rgba(9,20,36,1) 0%,rgba(9,20,36,.96) 35%,rgba(9,20,36,.65) 65%,rgba(9,20,36,.24) 100%),url('gallery/vessel-port-operations.webp');background-position:center,65% 46%;background-size:cover;z-index:-1}
.ov-site .ov-gallery-hero::after{content:"";position:absolute;left:-140px;bottom:-255px;border:1px solid rgba(255,255,255,.085);border-radius:50%;height:540px;width:540px;z-index:-1}
.ov-site .ov-gallery-hero-inner{padding:80px 0 78px;position:relative}
.ov-site .ov-gallery-hero .ov-kicker{margin-bottom:28px}
.ov-site .ov-gallery-hero h1{color:#fff;font-size:clamp(46px,6vw,82px);max-width:770px;margin-bottom:21px}
.ov-site .ov-gallery-hero p{font-size:17px;line-height:1.75;color:#d6dfeb;max-width:555px;margin-bottom:27px}
.ov-site .ov-gallery-hero-meta{display:flex;align-items:center;flex-wrap:wrap;gap:14px 32px;color:#b8c3ce;font-size:10px;letter-spacing:.14em;font-weight:750}
.ov-site .ov-gallery-hero-meta span+span{padding-left:30px;border-left:1px solid rgba(255,255,255,.25)}
.ov-site .ov-gallery-section{padding:98px 0 108px;background:#fff}
.ov-site .ov-gallery-intro{display:grid;grid-template-columns:1fr .8fr;gap:80px;align-items:end;margin-bottom:39px}
.ov-site .ov-gallery-intro h2{font-size:clamp(38px,4vw,57px);margin:0}
.ov-site .ov-gallery-intro>p{font-size:16.5px;line-height:1.8;max-width:480px;margin:0 0 7px}
.ov-site .ov-gallery-filter-head{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:28px;border-bottom:1px solid #e3e7ec}
.ov-site .ov-gallery-filters{display:flex;flex-wrap:wrap;gap:6px 31px;align-items:center}
.ov-site .ov-gallery-filter{appearance:none;border:0;border-bottom:2px solid transparent;background:none;color:#677383;font-weight:750;font-size:13px;letter-spacing:.005em;padding:17px 0 15px;cursor:pointer;position:relative;white-space:nowrap;transition:color .2s,border-color .2s}
.ov-site .ov-gallery-filter:hover,.ov-site .ov-gallery-filter.is-current{color:#132033;border-bottom-color:#ff5b16}
.ov-site .ov-gallery-filter span{display:inline-block;margin-left:5px;background:#f0f2f4;color:#6c7581;border-radius:100px;font-size:10px;line-height:1;vertical-align:middle;padding:5px 6px}
.ov-site .ov-gallery-filter:focus-visible,.ov-site .ov-gallery-card:focus-visible,.ov-site .ov-gallery-lightbox button:focus-visible{outline:3px solid #ff5b16;outline-offset:4px}
.ov-site .ov-gallery-count{font-size:12px;white-space:nowrap;color:#87919e;margin:0 0 8px}
.ov-site .ov-gallery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;align-items:stretch}
.ov-site .ov-gallery-card{appearance:none;position:relative;border:0;border-radius:4px;background:#1c2938;cursor:pointer;text-align:left;padding:0;min-height:305px;overflow:hidden;color:#fff;isolation:isolate}
.ov-site .ov-gallery-card.is-featured{grid-column:span 2;min-height:392px}
.ov-site .ov-gallery-card:not(.is-featured){min-height:310px}
.ov-site .ov-gallery-grid.is-filtered .ov-gallery-card{grid-column:auto;min-height:320px}
.ov-site .ov-gallery-card[hidden],.ov-site .ov-gallery-lightbox[hidden],.ov-site .ov-gallery-lightbox button[hidden]{display:none!important}
.ov-site .ov-gallery-card img{height:100%;width:100%;position:absolute;inset:0;object-fit:cover;transform:scale(1.001);transition:transform .65s cubic-bezier(.18,.6,.18,1),filter .3s;filter:saturate(.88)}
.ov-site .ov-gallery-card:hover img{transform:scale(1.065);filter:saturate(1)}
.ov-site .ov-gallery-card:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(9,18,32,.05) 10%,rgba(7,16,28,.13) 41%,rgba(7,16,28,.91) 100%);z-index:0}
.ov-site .ov-gallery-overlay{position:absolute;bottom:0;left:0;right:0;z-index:1;display:flex;flex-direction:column;align-items:flex-start;padding:25px 28px 24px}
.ov-site .ov-gallery-tag{color:#ff8d55;font-weight:800;font-size:10px;line-height:1.4;letter-spacing:.14em;text-transform:uppercase;margin-bottom:11px}
.ov-site .ov-gallery-title{font-size:clamp(19px,2vw,28px);font-weight:800;line-height:1.1;letter-spacing:-.035em;max-width:85%;color:#fff}
.ov-site .ov-gallery-explore{color:#e5e9f0;font-size:11.5px;font-weight:750;display:inline-flex;align-items:center;gap:9px;max-height:0;opacity:0;overflow:hidden;transform:translateY(8px);transition:all .25s}
.ov-site .ov-gallery-card:hover .ov-gallery-explore,.ov-site .ov-gallery-card:focus-visible .ov-gallery-explore{opacity:1;max-height:40px;transform:translateY(0);margin-top:13px}
.ov-site .ov-gallery-explore span{font-size:16px;color:#ff5b16}
.ov-site .ov-gallery-note{background:#f7f6f3;display:flex;align-items:center;gap:18px;padding:30px 35px;margin-top:46px;border-radius:3px}
.ov-site .ov-gallery-note>span{color:#ff5b16;font-size:23px;flex:none}
.ov-site .ov-gallery-note p{margin:0;line-height:1.6;font-size:14px;max-width:650px;flex:1}
.ov-site .ov-gallery-note a{font-size:13px;font-weight:800;color:#19283a;display:inline-flex;align-items:center;white-space:nowrap;gap:10px}
.ov-site .ov-gallery-note a:hover{color:#ff5b16}
.ov-site .ov-gallery-lightbox{position:fixed;inset:0;background:rgba(3,9,19,.97);z-index:99999;display:flex;align-items:center;justify-content:center;gap:20px;padding:74px 75px 44px;color:#fff}
.ov-gallery-modal-open{overflow:hidden!important}
.ov-site .ov-gallery-lightbox figure{margin:0;display:flex;flex-direction:column;max-width:min(1180px,100%);min-width:0;max-height:100%;align-items:center;justify-content:center}
.ov-site .ov-gallery-lightbox img{display:block;width:auto;max-width:100%;max-height:min(72vh,780px);height:auto;object-fit:contain;box-shadow:0 18px 52px rgba(0,0,0,.28);background:#111b29}
.ov-site .ov-gallery-lightbox figcaption{display:grid;grid-template-columns:1fr auto;gap:4px 30px;width:100%;max-width:930px;padding-top:18px;color:#fff}
.ov-site .ov-gallery-lightbox figcaption strong{font-size:17px;font-weight:800;grid-column:1}
.ov-site .ov-gallery-lightbox figcaption span{font-size:13px;color:#b9c3cd;grid-column:1}
.ov-site .ov-gallery-lightbox figcaption small{color:#ff5b16;grid-row:1;grid-column:2;font-size:13px;font-weight:800}
.ov-site .ov-gallery-lightbox button{appearance:none;border:1px solid rgba(255,255,255,.25);color:#fff;background:rgba(20,30,45,.75);border-radius:50%;cursor:pointer;display:grid;place-items:center;flex:0 0 48px;width:48px;height:48px;font-size:31px;line-height:1;transition:background .2s,color .2s}
.ov-site .ov-gallery-lightbox button:hover{background:#ff5b16;border-color:#ff5b16}
.ov-site .ov-gallery-lightbox .ov-gallery-close{position:absolute;right:31px;top:23px;font-size:28px;width:44px;height:44px}
@media (max-width:1000px){.ov-site .ov-gallery-intro{grid-template-columns:1fr .95fr;gap:40px}.ov-site .ov-gallery-grid{gap:12px}.ov-site .ov-gallery-card.is-featured{min-height:340px}.ov-site .ov-gallery-card:not(.is-featured){min-height:270px}.ov-site .ov-gallery-overlay{padding:20px}.ov-site .ov-gallery-filter-head{align-items:flex-start;flex-direction:column;gap:2px}.ov-site .ov-gallery-filters{gap:5px 24px}.ov-site .ov-gallery-count{margin:0 0 12px}}
@media (max-width:700px){.ov-site .ov-gallery-hero{min-height:380px}.ov-site .ov-gallery-hero-inner{padding:77px 0}.ov-site .ov-gallery-hero h1{font-size:clamp(42px,10.3vw,62px)}.ov-site .ov-gallery-hero p{font-size:15px}.ov-site .ov-gallery-hero-meta{font-size:9px;gap:9px}.ov-site .ov-gallery-hero-meta span+span{padding-left:12px}.ov-site .ov-gallery-section{padding:68px 0 76px}.ov-site .ov-gallery-intro{grid-template-columns:1fr;gap:20px;margin-bottom:27px}.ov-site .ov-gallery-intro h2{font-size:41px}.ov-site .ov-gallery-intro>p{font-size:15px}.ov-site .ov-gallery-filter-head{margin-bottom:20px}.ov-site .ov-gallery-filters{gap:4px 22px}.ov-site .ov-gallery-filter{font-size:12px;padding:13px 0}.ov-site .ov-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.ov-site .ov-gallery-card.is-featured{grid-column:span 2;min-height:310px}.ov-site .ov-gallery-card:not(.is-featured){min-height:255px}.ov-site .ov-gallery-grid.is-filtered .ov-gallery-card{min-height:255px}.ov-site .ov-gallery-overlay{padding:16px 14px}.ov-site .ov-gallery-title{font-size:18px;max-width:100%}.ov-site .ov-gallery-tag{font-size:9px}.ov-site .ov-gallery-note{flex-wrap:wrap;padding:24px;margin-top:30px;gap:13px}.ov-site .ov-gallery-note p{flex:1 1 calc(100% - 60px);font-size:13.5px}.ov-site .ov-gallery-note a{margin-left:31px}.ov-site .ov-gallery-lightbox{padding:60px 4px 58px;gap:3px}.ov-site .ov-gallery-lightbox button{width:37px;height:37px;flex-basis:37px;font-size:25px}.ov-site .ov-gallery-lightbox .ov-gallery-close{right:14px;top:13px;width:39px;height:39px}.ov-site .ov-gallery-lightbox figure{flex:1}.ov-site .ov-gallery-lightbox img{max-height:68vh}.ov-site .ov-gallery-lightbox figcaption{padding:14px 13px 0}.ov-site .ov-gallery-lightbox figcaption strong{font-size:15px}}
@media (max-width:390px){.ov-site .ov-gallery-grid{grid-template-columns:1fr}.ov-site .ov-gallery-card.is-featured,.ov-site .ov-gallery-card:not(.is-featured){grid-column:1;min-height:285px}.ov-site .ov-gallery-grid.is-filtered .ov-gallery-card{min-height:285px}.ov-site .ov-gallery-hero-meta{display:block}.ov-site .ov-gallery-hero-meta span{display:block;margin-bottom:5px}.ov-site .ov-gallery-hero-meta span+span{padding-left:0;border:0}}
@media (prefers-reduced-motion:reduce){.ov-site .ov-gallery-card img,.ov-site .ov-gallery-explore{transition:none}}

/* v1.5 lightbox refinement: close attached to photograph, swift preloaded navigation. */
.ov-site .ov-gallery-lightbox {
  padding: 70px 20px 30px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #07101d;
}
.ov-site .ov-gallery-lightbox .ov-gallery-dialog {
  position: relative;
  width: min(1260px, 100%);
  max-height: calc(100dvh - 100px);
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 22px;
}
.ov-site .ov-gallery-lightbox .ov-gallery-dialog > figure {
  position: relative;
  width: 100%;
  max-width: none;
  min-width: 0;
  max-height: calc(100dvh - 100px);
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.ov-site .ov-gallery-lightbox .ov-gallery-media {
  position: relative;
  width: 100%;
  height: min(70dvh, 720px);
  min-height: 240px;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}
.ov-site .ov-gallery-lightbox .ov-gallery-media img {
  grid-area: 1 / 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: transparent;
  border-radius: 3px;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .23);
}
.ov-site .ov-gallery-lightbox .ov-gallery-media .ov-gallery-image-next {
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 155ms cubic-bezier(.18, .7, .2, 1);
  will-change: opacity;
}
.ov-site .ov-gallery-lightbox .ov-gallery-media .ov-gallery-image-next.is-visible {
  opacity: 1;
}
.ov-site .ov-gallery-lightbox .ov-gallery-close {
  position: absolute;
  top: -28px;
  right: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .36);
  border-radius: 12px;
  font-size: 27px;
  line-height: 1;
  color: #fff;
  background: rgba(18, 30, 48, .96);
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.ov-site .ov-gallery-lightbox .ov-gallery-close:hover {
  background: #ff5b16;
  border-color: #ff5b16;
  transform: translateY(-1px);
}
.ov-site .ov-gallery-lightbox .ov-gallery-prev,
.ov-site .ov-gallery-lightbox .ov-gallery-next {
  width: 48px;
  height: 48px;
  flex: none;
  border-color: rgba(255, 255, 255, .34);
  background: rgba(22, 35, 53, .82);
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.ov-site .ov-gallery-lightbox .ov-gallery-prev:hover,
.ov-site .ov-gallery-lightbox .ov-gallery-next:hover {
  transform: scale(1.04);
}
.ov-site .ov-gallery-lightbox figcaption {
  max-width: 100%;
  width: 100%;
  padding-top: 14px;
}
@media (max-width: 700px) {
  .ov-site .ov-gallery-lightbox { padding: 72px 8px 23px; }
  .ov-site .ov-gallery-lightbox .ov-gallery-dialog {
    width: 100%;
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 5px;
  }
  .ov-site .ov-gallery-lightbox .ov-gallery-dialog > figure {
    max-height: calc(100dvh - 115px);
    flex: none;
  }
  .ov-site .ov-gallery-lightbox .ov-gallery-media {
    height: auto;
    aspect-ratio: 16 / 10;
    min-height: 0;
    touch-action: pan-y;
  }
  .ov-site .ov-gallery-lightbox .ov-gallery-close {
    top: -49px;
    right: 0;
    width: 42px;
    height: 42px;
    font-size: 25px;
  }
  .ov-site .ov-gallery-lightbox .ov-gallery-prev,
  .ov-site .ov-gallery-lightbox .ov-gallery-next {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .ov-site .ov-gallery-lightbox figcaption { padding: 14px 3px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ov-site .ov-gallery-lightbox .ov-gallery-media .ov-gallery-image-next,
  .ov-site .ov-gallery-lightbox .ov-gallery-close,
  .ov-site .ov-gallery-lightbox .ov-gallery-prev,
  .ov-site .ov-gallery-lightbox .ov-gallery-next { transition: none; }
}


/* v1.6 — photograph-aligned close control (not figure/screen aligned). */
.ov-site .ov-gallery-lightbox .ov-gallery-media .ov-gallery-close {
  position: absolute;
  /* JavaScript measures the actual contained image: this is the safe fallback. */
  top: 12px;
  right: 12px;
  bottom: auto;
  left: auto;
  z-index: 6;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0 !important;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 50%;
  background: rgba(8,19,35,.88);
  color: #fff;
  font-size: 0;
  line-height: 0;
  text-align: center;
  box-shadow: 0 5px 18px rgba(0,0,0,.32);
  transform: none;
  transition: background-color 120ms ease, border-color 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.ov-site .ov-gallery-lightbox .ov-gallery-media .ov-gallery-close:hover {
  background: #ff5b16;
  border-color: #ff5b16;
  transform: none;
}
.ov-site .ov-gallery-lightbox .ov-gallery-media .ov-gallery-close .ov-gallery-close-icon {
  display: block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  pointer-events: none;
  stroke: currentColor;
}
@media (max-width:700px) {
  .ov-site .ov-gallery-lightbox .ov-gallery-media .ov-gallery-close {
    width: 38px;
    height: 38px;
    top: 8px;
    right: 8px;
  }
  .ov-site .ov-gallery-lightbox .ov-gallery-media .ov-gallery-close .ov-gallery-close-icon {
    width: 17px;
    height: 17px;
    min-width: 17px;
    min-height: 17px;
  }
}
