/* ================================
RESET
================================ */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

body{
  font-family:Arial,sans-serif;
  background:#111;
  color:#f5f5f5;
  line-height:1.6;
}

/* ================================
GALLERY GRID
================================ */

.gallery{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:16px;
  padding:80px 40px 60px;
  max-width:1400px;
  margin:auto;
}

/* Project title — spans full grid width, appears before each project's media */
.gallery-project-title{
  grid-column:1 / -1;
  font-size:0.95rem;
  font-weight:600;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:rgba(255,255,255,0.45);
  padding:18px 0 4px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  margin-bottom:4px;
}

.gallery-item{
  display:flex;
  flex-direction:column;
  align-items:center;
}

.gallery img,
.gallery video{
  width:100%;
  height:auto;
  max-height:340px;
  object-fit:contain;
  cursor:pointer;
  border-radius:4px;
  transition:transform .25s ease,opacity .25s ease;
  display:block;
}

.gallery img:hover,
.gallery video:hover{
  transform:scale(1.02);
  opacity:.85;
}

/* ================================
CAPTIONS - Grid
================================ */
.caption{
  margin-top:10px;
  text-align:center;
  max-width:95%;
}

.caption h3{
  font-size:1rem;
  font-weight:400;
  letter-spacing:.04em;
  color:#ffcc00;
  margin-bottom:4px;
}

.caption p{
  font-size:.9rem;
  opacity:.85;
}

/* ================================
UI CONTROLS
================================ */

/* return arrow */
/* ══════════════════════════════════════════════════════════════
   STICKY NAV BAR
   ══════════════════════════════════════════════════════════════ */
#stickyNav{
  position:fixed;
  top:0; left:0; right:0;
  height:52px;
  display:flex;
  align-items:center;
  gap:0;
  background:rgba(10,10,10,0.92);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(255,255,255,0.07);
  z-index:2000;
  padding:0 12px;
  box-sizing:border-box;
}

/* ── Return arrow — just the ← symbol, compact ── */
#returnArrow{
  flex-shrink:0;
  font-size:1.3rem;
  color:rgba(255,255,255,0.6);
  text-decoration:none;
  padding:4px 8px 4px 0;
  white-space:nowrap;
  transition:color .2s;
  line-height:1;
}
#returnArrow:hover{color:#fff;}

/* ── Tab buttons (scrollable row on mobile) ── */
#menuTabs{
  flex:1;
  display:flex;
  align-items:center;
  gap:4px;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding:0 4px;
  /* hide scrollbar on webkit */
}
#menuTabs::-webkit-scrollbar{display:none;}

.menu-tab{
  flex-shrink:0;
  background:none;
  border:1px solid rgba(255,255,255,0.15);
  border-radius:14px;
  color:rgba(255,255,255,0.65);
  font-size:0.78rem;
  padding:4px 12px;
  cursor:pointer;
  transition:background .2s, color .2s, border-color .2s;
  white-space:nowrap;
  font-family:inherit;
}
.menu-tab:hover{
  color:#fff;
  border-color:rgba(255,255,255,0.4);
}
.menu-tab.active{
  background:rgba(255,204,0,0.15);
  border-color:#ffcc00;
  color:#ffcc00;
}

/* ── Right group (lang + hamburger) ── */
#navRight{
  flex-shrink:0;
  display:flex;
  align-items:center;
  padding-left:8px;
  margin-left:auto;   /* always push to the right end of the bar */
}

/* ── Hamburger icon (inside sticky nav) ── */
#stickyNav #hamburgerIcon{
  font-size:1.6rem;
  cursor:pointer;
  color:rgba(255,255,255,0.7);
  line-height:1;
  padding:4px 0;
  transition:color .2s;
  position:static;
}
#stickyNav #hamburgerIcon:hover{color:#fff;}


/* Hamburger icon on index.php (no stickyNav) — stays top-right */
body:not(.sculptures):not(.piano):not(.kungfu):not(.contact-page) #hamburgerIcon{
  position:fixed;
  top:15px;
  right:15px;
  font-size:2rem;
  cursor:pointer;
  z-index:2000;
  color:white;
}

/* contact-page uses stickyNav — hamburger stays inside the bar on the right */
body.contact-page #stickyNav #hamburgerIcon{
  position:static;
}

/* ══ HAMBURGER PANEL ══════════════════════════════════════════════════ */
#hamburgerMenu{
  position:fixed;
  top:0;
  right:-260px;
  width:260px;
  height:100vh;
  background:#111;
  padding:2rem 1.5rem;
  transition:right .35s ease;
  z-index:2100;
}
#hamburgerMenu.open{right:0;}
#hamburgerMenu ul{list-style:none; margin-top:3rem;}
#hamburgerMenu li{margin:1rem 0;}
#hamburgerMenu a{color:white; text-decoration:none; font-size:1.1rem;}
#hamburgerClose{
  position:absolute;
  top:15px;
  right:18px;
  font-size:2rem;
  cursor:pointer;
  color:white;
}


/* ══ TAB PANEL ════════════════════════════════════════════════════════ */
#menuPanel{
  position:fixed;
  top:52px; left:0; right:0;
  max-height:0;
  overflow:hidden;
  background:rgba(12,12,12,0.97);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,0.08);
  z-index:1990;
  transition:max-height .35s ease;
}
#menuPanel.open{
  max-height:70vh;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
#menuPanelInner{
  padding:24px 32px 32px;
  max-width:780px;
  margin:0 auto;
}
.menu-panel-content h3{
  color:#ffcc00;
  font-size:1.05rem;
  margin:0 0 14px;
  font-weight:600;
  letter-spacing:0.03em;
}
.menu-panel-content p{
  color:rgba(255,255,255,0.82);
  font-size:0.9rem;
  line-height:1.7;
  margin:0 0 12px;
}
.menu-panel-content p:last-child{margin-bottom:0;}
.menu-panel-content strong{color:rgba(255,255,255,0.95);}
.menu-panel-content em{color:rgba(255,204,0,0.85); font-style:italic;}
.menu-panel-content blockquote{
  border-left:2px solid #ffcc00;
  margin:16px 0;
  padding:4px 14px;
  color:#ffcc00;
  font-size:0.88rem;
  font-style:italic;
}

/* ── Push gallery down below the fixed nav bar ── */
main.gallery{
  padding-top:64px;
}

/* ── Hamburger panel (unchanged, just z-index above menuPanel) ── */
/* ================================
BACK TO TOP
================================ */
#backToTop{
  position:fixed;
  bottom:25px;
  right:25px;
  width:48px;
  height:48px;
  border-radius:50%;
  border:none;
  font-size:1.4rem;
  background:rgba(255,255,255,0.15);
  color:white;
  cursor:pointer;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:2000;
}

/* readMoreModal removed — unused */


/* ================================
FULLSCREEN SLIDESHOW
================================ */

.slideshow-modal{
position:fixed;
top:0; left:0; right:0; bottom:0;
background:#000;
display:none;
z-index:5000;
overflow:hidden;
overscroll-behavior:none;
}

.slideshow-modal.open{
display:flex;
flex-direction:column;
/* --real-top = visualViewport.offsetTop (non-zero when iOS toolbar overlaps from top)
   --real-vh  = visualViewport.height    (visible height below the toolbar)
   Both are kept up-to-date by JS on every resize AND scroll of the visual viewport,
   so the modal reacts when the user swipes to show/hide the Safari toolbar. */
top:    var(--real-top, 0px);
height: var(--real-vh,  100dvh);
}

body.slideshow-open{
overflow:hidden;
/* position:fixed prevents iOS Safari from scrolling the page underneath the modal
   when the user swipes inside the fullscreen gallery */
position:fixed;
width:100%;
}

/* Scroll wrapper: fills modal, only scrolling element */
.slideshow-scroll{
width:100%;
flex:1;
overflow-y:auto;
-webkit-overflow-scrolling:touch;
/* Prevent iOS Safari from scrolling the page / revealing toolbar when
   user swipes at the top or bottom edge inside the modal */
overscroll-behavior:none;
overscroll-behavior-y:none;
display:flex;
flex-direction:column;
padding-top:env(safe-area-inset-top, 0px);
padding-left:env(safe-area-inset-left, 0px);
padding-right:env(safe-area-inset-right, 0px);
box-sizing:border-box;
}

/* Inner: flex:none + min-height:100% means it grows with content.
   justify-content:center still centers short content.
   When content is taller than the scroll container, the inner div grows
   past 100% — no top-clipping. The scroll container scrolls to top freely. */
.slideshow-inner{
flex:none;
min-height:100%;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
padding:56px 16px 56px;
gap:16px;
box-sizing:border-box;
}

/* Media: fill available width, capped by max-height.
   object-fit:contain letterboxes without distortion.
   72svh leaves room for the fixed close button (60px top padding) and bottom safe area. */
.slideshow-content img,
.slideshow-content video{
display:block;
margin:0 auto;
width:min(88vw, 1100px);
max-width:min(88vw, 1100px);
max-height:72vh;
max-height:72svh;
height:auto;
object-fit:contain;
border-radius:4px;
}


/* Video wrapper: matches image width. Video element uses width:100% so it's
   as large as images. JS clips video.style.width to content after metadata
   loads — eliminating Safari's blue letterbox without losing size. */
.slideshow-video-wrapper{
display:flex;
flex-direction:column;
align-items:center;
width:min(88vw, 1100px);
max-width:min(88vw, 1100px);
margin:0 auto;
position:relative;
}
.slideshow-video-wrapper video{
display:block;
width:auto;
max-width:min(88vw, 1100px);
max-height:72vh;
max-height:72svh;
height:auto;
background:#000;
cursor:pointer;
transition:opacity 0.2s;
}
.has-caption .slideshow-video-wrapper video{
max-height:60vh;
max-height:60svh;
}

/* Loading spinner */
.sv-spinner{
width:44px; height:44px;
border:3px solid rgba(255,255,255,0.15);
border-top-color:#ffcc00;
border-radius:50%;
animation:sv-spin 0.75s linear infinite;
position:absolute;
top:50%; left:50%;
transform:translate(-50%,-50%);
z-index:2;
pointer-events:none;
}
@keyframes sv-spin{ to{ transform:translate(-50%,-50%) rotate(360deg); } }

/* ================================
CUSTOM VIDEO CONTROLS
================================ */
.sv-controls{
display:flex;
align-items:center;
gap:6px;
padding:6px 10px;
background:rgba(18,18,18,0.95);
width:100%;
box-sizing:border-box;
flex-wrap:nowrap;
}

.sv-btn{
background:none;
border:none;
color:rgba(255,255,255,0.8);
cursor:pointer;
font-size:1rem;
padding:3px 5px;
flex-shrink:0;
line-height:1;
border-radius:3px;
}
.sv-btn:hover{ color:#fff; background:rgba(255,255,255,0.1); }

/* Progress scrubber */
.sv-progress{
flex:1;
height:4px;
appearance:none;
-webkit-appearance:none;
background:rgba(255,255,255,0.25);
border-radius:2px;
cursor:pointer;
accent-color:#ffcc00;
min-width:0;
}
.sv-progress::-webkit-slider-runnable-track{ height:4px; border-radius:2px; }
.sv-progress::-webkit-slider-thumb{
-webkit-appearance:none;
width:12px; height:12px;
border-radius:50%;
background:#ffcc00;
margin-top:-4px;
cursor:pointer;
}
.sv-progress::-moz-range-thumb{
width:12px; height:12px;
border-radius:50%;
background:#ffcc00;
border:none; cursor:pointer;
}

/* Time display */
.sv-time{
color:rgba(255,255,255,0.55);
font-size:0.72rem;
flex-shrink:0;
font-variant-numeric:tabular-nums;
white-space:nowrap;
letter-spacing:0.02em;
}

/* Volume slider */
.sv-volume{
width:60px;
height:4px;
appearance:none;
-webkit-appearance:none;
background:rgba(255,255,255,0.25);
border-radius:2px;
cursor:pointer;
accent-color:#ffcc00;
flex-shrink:0;
}
.sv-volume::-webkit-slider-thumb{
-webkit-appearance:none;
width:10px; height:10px;
border-radius:50%;
background:#ffcc00;
margin-top:-3px;
cursor:pointer;
}
.sv-volume::-moz-range-thumb{
width:10px; height:10px;
border-radius:50%;
background:#ffcc00;
border:none; cursor:pointer;
}
/* Hide volume slider on small screens — mute button alone */
@media(max-width:520px){
  .sv-volume{ display:none; }
}

/* Menu wrap + panel */
.sv-menu-wrap{
position:relative;
flex-shrink:0;
}
.sv-menu-panel{
position:absolute;
bottom:calc(100% + 6px);
right:0;
background:rgba(28,28,28,0.97);
border:1px solid rgba(255,255,255,0.15);
border-radius:6px;
padding:6px 0;
min-width:160px;
z-index:10;
box-shadow:0 4px 16px rgba(0,0,0,0.5);
}
.sv-menu-label{
color:rgba(255,255,255,0.4);
font-size:0.7rem;
letter-spacing:0.08em;
text-transform:uppercase;
padding:6px 14px 2px;
}
.sv-menu-item{
display:block;
width:100%;
background:none;
border:none;
color:rgba(255,255,255,0.85);
font-size:0.88rem;
text-align:left;
padding:7px 14px;
cursor:pointer;
}
.sv-menu-item:hover{ background:rgba(255,255,255,0.08); color:#fff; }
.sv-menu-item.sv-active{ color:#ffcc00; }

/* Caption area — no large bottom padding (that was pushing content up).
   Bottom space is handled by .slideshow-inner padding instead. */
.slideshow-caption{
max-width:720px;
width:100%;
line-height:1.7;
font-size:1rem;
color:white;
text-align:center;
padding:0 20px 12px;
}

/* With caption: only title shows initially (short+full behind Read more).
   Reduce max-height only enough to show the title + button comfortably. */
.has-caption .slideshow-content img{
max-height:62vh;
max-height:62svh;
}

/* Title always visible */
.caption-title{
font-size:1.1rem;
font-weight:600;
color:#ffcc00;
margin-bottom:6px;
}

.caption-separator{
width:40px;
height:1px;
background:rgba(255,255,255,0.3);
margin:8px auto;
}

.caption-short{
opacity:0.85;
margin-bottom:12px;
}

/* Full text — visible inside captionMore block (which handles show/hide) */
.caption-full{
opacity:0.75;
font-size:0.95rem;
margin-top:8px;
text-align:left;
}

/* Read more toggle button */
.caption-toggle{
display:inline-block;
margin-top:10px;
padding:4px 14px;
border:1px solid rgba(255,255,255,0.35);
border-radius:20px;
font-size:0.85rem;
color:rgba(255,255,255,0.7);
cursor:pointer;
background:none;
transition:border-color 0.2s, color 0.2s;
}

.caption-toggle:hover{
border-color:white;
color:white;
}

/* navigation */

/* ── Media Zoom Overlay ───────────────────────────────────────────────────
   Image starts fitted to viewport. JS handles all zoom (scale) and pan
   (translate) via transform. overflow:hidden — no scroll bars needed. */
.media-zoom-overlay{
position:fixed;
inset:0;
background:#000;
z-index:5500;
overflow:hidden;
display:flex;
align-items:center;
justify-content:center;
cursor:zoom-out;
touch-action:none;   /* all touch handled by JS — prevent browser interference */
}
.media-zoom-overlay img{
display:block;
/* No CSS size constraints — JS sets the initial scale to fit the viewport.
   This ensures scale=1 always means natural pixel size, and the opening
   view is always comfortably fitted regardless of image or screen dimensions. */
width:auto;
height:auto;
max-width:none;
max-height:none;
object-fit:none;
transform-origin:center center;
user-select:none;
-webkit-user-select:none;
will-change:transform;
}

/* Close pill — bottom-centre */
.media-zoom-close{
position:fixed;
bottom:28px;
left:50%;
transform:translateX(-50%);
font-size:0.88rem;
color:rgba(255,255,255,0.75);
cursor:pointer;
z-index:5600;
background:rgba(0,0,0,0.6);
border:1px solid rgba(255,255,255,0.3);
border-radius:20px;
padding:6px 18px;
letter-spacing:0.04em;
white-space:nowrap;
pointer-events:auto;
}
.media-zoom-close:hover{
color:#fff;
border-color:rgba(255,255,255,0.7);
background:rgba(0,0,0,0.85);
}

/* Hint — top-centre, fades out */
.media-zoom-hint{
position:fixed;
top:18px;
left:50%;
transform:translateX(-50%);
color:rgba(255,255,255,0.5);
font-size:0.78rem;
pointer-events:none;
z-index:5600;
animation:hint-fade 3s ease forwards;
white-space:nowrap;
background:rgba(0,0,0,0.4);
padding:4px 12px;
border-radius:12px;
}
@keyframes hint-fade{ 0%{opacity:1} 70%{opacity:1} 100%{opacity:0} }

.slideshow-prev,
.slideshow-next{
position:fixed;
top:50%;
transform:translateY(-50%);
font-size:3rem;
color:white;
cursor:pointer;
z-index:6000;
/* Stay inside safe area in landscape (notch / home bar sides) */
padding:12px;
}

.slideshow-prev{
left:0;
padding-left:max(12px, env(safe-area-inset-left, 12px));
}
.slideshow-next{
right:0;
padding-right:max(12px, env(safe-area-inset-right, 12px));
}

.slideshow-close{
position:fixed;
top:max(16px, env(safe-area-inset-top, 16px));
right:max(20px, env(safe-area-inset-right, 20px));
font-size:2.5rem;
color:rgba(255,255,255,0.85);
cursor:pointer;
z-index:6000;
transition:color .2s;
}
.slideshow-close:hover{color:#fff;}


/* ================================
RESPONSIVE
================================ */
@media(max-width:900px){
  .gallery{
    grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    padding:80px 20px;
  }
}

@media(max-width:600px){
  .gallery{
    grid-template-columns:1fr;
  }
  #hamburgerIcon{font-size:2.4rem;}
  #returnArrow{font-size:2rem;}
  .slideshow-prev,
  .slideshow-next{
    font-size:2.5rem;
  }
}

/* ── Landscape on small screens (phones).
   height:100dvh on .slideshow-modal.open already handles the Safari toolbar.
   This media query just tightens padding and sizes for the small landscape space. */
@media(max-height:500px) and (orientation:landscape){
  .slideshow-inner{
    padding:4px 16px 8px;
    gap:6px;
    justify-content:center;
  }
  /* Portrait images/videos in landscape: constrain width, let height breathe */
  .slideshow-content img,
  .slideshow-video-wrapper video{
    max-height:80dvh;
    max-height:80svh;
    width:auto;
    max-width:min(70vw, 1100px);
  }
  .slideshow-video-wrapper{
    width:min(70vw, 1100px);
    max-width:min(70vw, 1100px);
  }
  .has-caption .slideshow-content img,
  .has-caption .slideshow-video-wrapper video{
    max-height:65dvh;
    max-height:65svh;
    width:auto;
    max-width:min(60vw, 1100px);
  }
  .has-caption .slideshow-video-wrapper{
    width:min(60vw, 1100px);
    max-width:min(60vw, 1100px);
  }
  .slideshow-prev,
  .slideshow-next{
    font-size:2rem;
  }
  .slideshow-close{
    font-size:1.8rem;
  }
  /* Hide hamburger & return arrow so they don't overlap slideshow */
  body.slideshow-open #stickyNav,
  body.slideshow-open #menuPanel{
    display:none;
  }
}

/* ================================
INDEX PAGE
================================ */

.index-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:#111;
}

.index-main{
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:80px 30px 60px;
}

.index-title{
  font-size:clamp(1.4rem, 3vw, 2.2rem);
  font-weight:300;
  letter-spacing:0.1em;
  text-align:center;
  color:#f5f5f5;
  margin-bottom:48px;
}

.index-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:20px;
  width:100%;
  max-width:800px;
}

.index-card{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:120px;
  border:1px solid rgba(255,255,255,0.15);
  border-radius:6px;
  text-decoration:none;
  color:#f5f5f5;
  font-size:1.1rem;
  letter-spacing:0.06em;
  transition:background 0.25s, border-color 0.25s;
  background:rgba(255,255,255,0.04);
}

.index-card:hover{
  background:rgba(255,255,255,0.1);
  border-color:rgba(255,255,255,0.4);
}

.index-card-label{
  text-align:center;
  padding:10px;
}


/* ================================
CONTACT PAGE
================================ */

.contact-page{
  min-height:100vh;
  background:#111;
}

.contact-main{
  max-width:600px;
  margin:0 auto;
  padding:100px 30px 60px;
}

.contact-title{
  font-size:1.8rem;
  font-weight:300;
  letter-spacing:0.08em;
  color:#f5f5f5;
  margin-bottom:32px;
  text-align:center;
}

.contact-feedback{
  padding:12px 16px;
  border-radius:4px;
  margin-bottom:24px;
  font-size:0.95rem;
  text-align:center;
}

.contact-success{
  background:rgba(80,200,120,0.15);
  border:1px solid rgba(80,200,120,0.4);
  color:#7be0a0;
}

.contact-error{
  background:rgba(220,80,80,0.15);
  border:1px solid rgba(220,80,80,0.4);
  color:#f08080;
}

.contact-form{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.contact-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.contact-field label{
  font-size:0.85rem;
  letter-spacing:0.06em;
  opacity:0.7;
  text-transform:uppercase;
}

.contact-field input,
.contact-field textarea{
  background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.2);
  border-radius:4px;
  padding:12px 14px;
  color:#f5f5f5;
  font-family:inherit;
  font-size:1rem;
  transition:border-color 0.2s;
  resize:vertical;
}

.contact-field input:focus,
.contact-field textarea:focus{
  outline:none;
  border-color:rgba(255,204,0,0.6);
}

.contact-field input::placeholder,
.contact-field textarea::placeholder{
  opacity:0.35;
}

.contact-submit{
  align-self:flex-end;
  padding:11px 32px;
  background:none;
  border:1px solid rgba(255,255,255,0.35);
  border-radius:24px;
  color:#f5f5f5;
  font-size:1rem;
  letter-spacing:0.06em;
  cursor:pointer;
  transition:background 0.2s, border-color 0.2s;
}

.contact-submit:hover{
  background:rgba(255,255,255,0.1);
  border-color:white;
}


/* ================================
LANGUAGE SWITCH
================================ */

.lang-switch{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:4px;
}

.lang-switch span{
  opacity:0.3;
}

.lang-switch a{
  opacity:0.6;
}

.lang-switch a.active{
  opacity:1;
  color:#ffcc00 !important;
}


/* ================================
VIDEO GRID — play icon + Safari fix
================================ */

/* video-wrapper: contains ONLY the media (not caption).
   Play icon positions relative to this, so it centers on
   the thumbnail regardless of video aspect ratio. */
.video-wrapper{
  position:relative;
  width:100%;
  cursor:pointer;
}

/* Poster <img> fills wrapper exactly like a video would */
.video-poster{
  width:100%;
  height:auto;
  max-height:340px;
  object-fit:contain;
  display:block;
  border-radius:4px;
  cursor:pointer;
  transition:transform .25s ease, opacity .25s ease;
}

.video-wrapper:hover .video-poster,
.video-wrapper:hover video{
  transform:scale(1.02);
  opacity:0.85;
}

/* Play icon: centered over video-wrapper */
.video-play-icon{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  width:52px;
  height:52px;
  border-radius:50%;
  background:rgba(0,0,0,0.52);
  border:2px solid rgba(255,255,255,0.75);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.25rem;
  color:rgba(255,255,255,0.9);
  padding-left:4px;
  z-index:2;
  cursor:pointer;
  transition:background 0.2s, transform 0.2s;
}

.video-wrapper:hover .video-play-icon{
  background:rgba(0,0,0,0.72);
  transform:translate(-50%, -50%) scale(1.08);
}

/* Safari: suppress native video chrome in grid */
.gallery video{
  -webkit-appearance:none;
}

/* Play icon: pointer-events:auto — it has its own onclick="openSlideshow(N)"
   so it must receive clicks to open fullscreen. */
.video-play-icon{
  pointer-events:auto;
  cursor:pointer;
}

/* No-poster: play icon always shown */
.video-wrapper .video-play-icon{
  display:flex;
}

/* Videos in grid: pointer-events off by default (no controls).
   Chrome/Brave no-poster override below enables controls interaction. */
.video-wrapper video{
  pointer-events:none;
}

/* ================================
SLIDESHOW OPEN — hide nav overlaps
================================ */

/* When fullscreen slideshow is open, hamburger and return arrow
   must not overlap the close/nav buttons (any screen size). */
body.slideshow-open #stickyNav,
body.slideshow-open #menuPanel{
  display:none;
}

/* ================================
VIDEO GRID CONTROLS
Chrome/Brave: show native controls on no-poster videos so user
can play inline. The play-icon ▶ overlay opens fullscreen.
Safari: no controls shown; clicking play-icon or video opens fullscreen.
================================ */

/* Chrome/Brave/Firefox: enable pointer-events so controls are interactive */
.gallery .grid-video-noposter{
  pointer-events:auto;
}

/* Transparent overlay: covers upper ~75% of the video (above native controls bar).
   Clicking it opens fullscreen. The bottom 25% passes through to native controls. */
.video-fullscreen-overlay{
  position:absolute;
  top:0; left:0; right:0;
  height:72%;        /* leaves ~28% at bottom for the native controls bar */
  z-index:3;
  cursor:pointer;
  background:transparent;
}

/* Chrome/Brave: hide center play icon on no-poster videos — controls replace it.
   The fullscreen overlay handles "click upper area → open fullscreen". */
body:not(.is-safari) .video-wrapper:has(.grid-video-noposter) .video-play-icon{
  display:none;
}

/* Safari: hide controls, disable pointer-events on video (play-icon + overlay handle it) */
body.is-safari .gallery .grid-video-noposter{
  pointer-events:none;
}
body.is-safari .gallery .grid-video-noposter::-webkit-media-controls{
  display:none !important;
}
body.is-safari .gallery .grid-video-noposter{
  -webkit-appearance:none;
}
/* Safari: hide overlay (whole video area already opens fullscreen via play icon) */
body.is-safari .video-fullscreen-overlay{
  display:none;
}
