/* ModelBook V6.0.4 — Home gallery + lightbox + menu/admin fixes */

/* Desktop header text visibility */
@media(min-width:801px){
  .v6-header{
    color:#111 !important;
    background:#f4f0e8 !important;
  }

  .v6-header .v6-nav a,
  .v6-header .brand span{
    color:#111 !important;
  }

  .v6-header .v6-nav{
    border-bottom-color:rgba(0,0,0,.12) !important;
  }
}

/* Mobile burger single-click fix */
.mobile-menu-toggle{
  cursor:pointer;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

@media(max-width:800px){
  .v6-nav{
    pointer-events:none;
  }

  body.menu-open .v6-nav,
  html.menu-open .v6-nav{
    pointer-events:auto;
  }

  .mobile-menu-toggle{
    z-index:9999;
  }
}

/* Home gallery: closer to the old editorial version */
.home-editorial-gallery{
  background:var(--section-bg,#080808);
  color:var(--text-main,#f7f2e9);
  padding:110px 6vw 120px;
  overflow:hidden;
}

.home-gallery-head{
  max-width:920px;
  margin:0 auto 54px;
  text-align:center;
}

.home-gallery-head h2{
  font-family:Georgia,serif;
  font-size:clamp(56px,8vw,112px);
  line-height:.86;
  letter-spacing:-.055em;
  margin:18px 0 22px;
}

.home-gallery-head p:not(.section-kicker){
  color:var(--text-soft,#d6d0c8);
  font-size:clamp(18px,2vw,26px);
  line-height:1.5;
  margin:0 auto;
  max-width:760px;
}

.home-masonry{
  display:grid;
  grid-template-columns:repeat(12,1fr);
  grid-auto-rows:120px;
  gap:18px;
  max-width:1480px;
  margin:0 auto;
}

.home-masonry-item{
  display:block;
  position:relative;
  overflow:hidden;
  background:#111;
  min-height:220px;
}

.home-masonry-item img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform .55s ease, filter .55s ease;
}

.home-masonry-item:hover img{
  transform:scale(1.035);
  filter:contrast(1.04);
}

.home-masonry .item-1{grid-column:1 / span 5; grid-row:span 5;}
.home-masonry .item-2{grid-column:6 / span 3; grid-row:span 3;}
.home-masonry .item-3{grid-column:9 / span 4; grid-row:span 4;}
.home-masonry .item-4{grid-column:6 / span 3; grid-row:span 3;}
.home-masonry .item-5{grid-column:9 / span 2; grid-row:span 2;}
.home-masonry .item-6{grid-column:11 / span 2; grid-row:span 2;}

.home-more{
  margin-top:46px;
}

/* Lightbox robust */
.mb-lightbox{
  position:fixed;
  inset:0;
  z-index:999999;
  background:rgba(0,0,0,.94);
  display:none;
  align-items:center;
  justify-content:center;
  padding:26px;
}

.mb-lightbox.open{
  display:flex;
}

.mb-lightbox-img{
  max-width:96vw;
  max-height:92vh;
  width:auto;
  height:auto;
  object-fit:contain;
  box-shadow:0 30px 90px rgba(0,0,0,.5);
}

.mb-lightbox-close{
  position:fixed;
  top:22px;
  right:22px;
  z-index:1000000;
  width:48px;
  height:48px;
  border-radius:999px;
  border:0;
  background:#fff;
  color:#111;
  font-size:30px;
  line-height:1;
  cursor:pointer;
}

body.lightbox-open{
  overflow:hidden;
}

/* Admin hard reset for image overflow */
.admin-main{
  overflow-x:hidden !important;
}

.admin-photo-grid{
  align-items:start;
}

.admin-photo-grid article{
  overflow:hidden;
}

.admin-photo-grid img{
  max-width:100% !important;
  height:220px !important;
  object-fit:cover !important;
}

/* Admin form checkboxes cleaner */
.admin-main input[type="checkbox"]{
  width:auto !important;
}

/* Mobile home gallery */
@media(max-width:800px){
  .home-editorial-gallery{
    padding:78px 24px 86px;
  }

  .home-gallery-head{
    text-align:left;
    margin-bottom:34px;
  }

  .home-gallery-head h2{
    font-size:clamp(54px,16vw,84px);
  }

  .home-gallery-head p:not(.section-kicker){
    font-size:20px;
  }

  .home-masonry{
    display:flex;
    flex-direction:column;
    gap:18px;
  }

  .home-masonry-item{
    min-height:0;
    height:auto;
  }

  .home-masonry-item img{
    height:auto;
    min-height:0;
    object-fit:contain;
  }

  .home-more{
    margin-top:32px;
  }

  .mb-lightbox{
    padding:16px;
  }

  .mb-lightbox-close{
    top:14px;
    right:14px;
  }
}
