@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root{--mg-navy:#1E1A4B;--mg-orange:#F05A22;--mg-gray:#F2F4F8;--mg-white:#fff;}

/* SECTION */
.mmgal-section{
  padding:4rem 2rem;
  background:#fff;
  font-family:'DM Sans',sans-serif;
}
.mmgal-header{text-align:center;margin-bottom:2.5rem;}
.mmgal-tag{
  font-size:.68rem;font-weight:700;letter-spacing:.22em;
  text-transform:uppercase;color:var(--mg-orange);
  display:block;margin-bottom:.4rem;
}
.mmgal-h2{
  font-family:'Playfair Display',serif;
  font-size:clamp(1.6rem,2.8vw,2.4rem);
  font-weight:700;color:var(--mg-navy);
}
.mmgal-divider{width:50px;height:3px;background:var(--mg-orange);margin:.7rem auto 0;}

/* GRID — force full width, 3 equal columns */
.mmgal-grid{
  display:grid !important;
  gap:6px;
  width:100%;
  max-width:1200px;
  margin:0 auto;
  box-sizing:border-box;
}
.mmgal-cols-3{grid-template-columns:repeat(3,1fr) !important;}
.mmgal-cols-4{grid-template-columns:repeat(4,1fr) !important;}
.mmgal-cols-2{grid-template-columns:repeat(2,1fr) !important;}

/* ITEM */
.mmgal-item{
  position:relative;
  overflow:hidden;
  cursor:pointer;
  aspect-ratio:4/3;
  background:var(--mg-gray);
  display:block;
}
.mmgal-item img{
  width:100%;height:100%;
  object-fit:cover;display:block;
  transition:transform .5s ease;
}
.mmgal-item:hover img{transform:scale(1.06);}
.mmgal-placeholder{
  height:100%;display:flex;align-items:center;justify-content:center;
  font-size:2.5rem;
  background:linear-gradient(135deg,var(--mg-navy),#2d2870);
}

/* ── OVERLAY — strong gradient + always visible ── */
.mmgal-item .mmgal-overlay{
  position:absolute !important;
  bottom:0 !important;
  left:0 !important;
  right:0 !important;
  top:auto !important;
  background:linear-gradient(
    to top,
    rgba(0,0,0,.92) 0%,
    rgba(0,0,0,.75) 35%,
    rgba(0,0,0,.28) 70%,
    transparent 100%
  ) !important;
  padding:2.8rem 1rem 1rem !important;
  opacity:1 !important;
  transition:padding .3s;
  pointer-events:none;
}
.mmgal-item:hover .mmgal-overlay{
  padding-bottom:1.3rem !important;
}

/* ── TITLE — force white, no theme override ── */
.mmgal-section .mmgal-item .mmgal-overlay .mmgal-overlay-inner h4,
.mmgal-section .mmgal-item .mmgal-overlay h4{
  font-family:'DM Sans',sans-serif !important;
  font-size:.92rem !important;
  font-weight:700 !important;
  color:#ffffff !important;
  background:none !important;
  text-decoration:none !important;
  margin:0 !important;
  padding:0 0 0 .6rem !important;
  line-height:1.35 !important;
  border-left:3px solid #F05A22 !important;
  text-shadow:0 1px 8px rgba(0,0,0,1) !important;
  -webkit-text-fill-color:#ffffff !important;
}

/* ── DESCRIPTION — slides in on hover ── */
.mmgal-section .mmgal-item .mmgal-overlay .mmgal-overlay-inner p,
.mmgal-section .mmgal-item .mmgal-overlay p{
  font-size:.76rem !important;
  color:rgba(255,255,255,.90) !important;
  line-height:1.55 !important;
  margin:.35rem 0 0 !important;
  padding-left:.7rem !important;
  text-shadow:0 1px 5px rgba(0,0,0,.9) !important;
  -webkit-text-fill-color:rgba(255,255,255,.90) !important;
  background:none !important;
  /* slide in on hover */
  max-height:0;
  overflow:hidden;
  opacity:0;
  transition:max-height .35s ease,opacity .3s ease;
}
.mmgal-item:hover .mmgal-overlay p{
  max-height:80px;
  opacity:1;
}

/* Hide zoom button — whole item is clickable */
.mmgal-zoom-btn{display:none !important;}

/* ── LIGHTBOX ── */
.mmgal-lightbox{position:fixed;inset:0;z-index:99999;display:flex;align-items:center;justify-content:center;}
.mmgal-lb-backdrop{position:absolute;inset:0;background:rgba(5,4,20,.94);cursor:pointer;}
.mmgal-lb-modal{position:relative;z-index:1;max-width:920px;width:93%;background:#fff;box-shadow:0 30px 80px rgba(0,0,0,.6);}
.mmgal-lb-img-wrap{width:100%;max-height:62vh;overflow:hidden;background:#111;}
.mmgal-lb-img-wrap img{width:100%;max-height:62vh;object-fit:contain;display:block;}
.mmgal-lb-info{padding:1.1rem 1.5rem;background:#fff;border-top:3px solid var(--mg-orange);}
.mmgal-lb-info h3{font-family:'Playfair Display',serif;font-size:1.1rem;font-weight:700;color:var(--mg-navy);margin-bottom:.3rem;}
.mmgal-lb-info p{font-size:.84rem;color:#6B7280;line-height:1.65;}
.mmgal-lb-close{position:absolute;top:-2.5rem;right:0;background:var(--mg-orange);color:#fff;border:none;width:36px;height:36px;font-size:1rem;cursor:pointer;}
.mmgal-lb-prev,.mmgal-lb-next{position:absolute;top:50%;transform:translateY(-50%);background:rgba(30,26,75,.85);color:#fff;border:none;width:42px;height:42px;font-size:1.1rem;cursor:pointer;z-index:2;transition:background .2s;display:flex;align-items:center;justify-content:center;}
.mmgal-lb-prev{left:-21px;}.mmgal-lb-next{right:-21px;}
.mmgal-lb-prev:hover,.mmgal-lb-next:hover{background:var(--mg-orange);}

.mmgal-empty{padding:3rem;text-align:center;background:var(--mg-gray);font-size:.9rem;color:#6B7280;}
.mmgal-empty a{color:var(--mg-orange);}

/* RESPONSIVE */
@media(max-width:900px){
  .mmgal-cols-3,.mmgal-cols-4{grid-template-columns:repeat(2,1fr) !important;}
  .mmgal-lb-prev{left:-10px;}.mmgal-lb-next{right:-10px;}
}
@media(max-width:560px){
  .mmgal-cols-3,.mmgal-cols-4,.mmgal-cols-2{grid-template-columns:1fr !important;}
}

/* Visual click hint — expand icon appears top-right on hover */
.mmgal-item::after{
  content:'⤢';
  position:absolute;top:.6rem;right:.7rem;
  background:rgba(240,90,34,.9);
  color:#fff;font-size:.75rem;font-weight:700;
  width:26px;height:26px;
  display:flex;align-items:center;justify-content:center;
  border-radius:3px;
  opacity:0;transition:opacity .25s;
  pointer-events:none;z-index:3;
}
.mmgal-item:hover::after{opacity:1;}

/* ── CRITICAL FIX: block all overlay children from intercepting clicks on desktop ── */
.mmgal-item .mmgal-overlay,
.mmgal-item .mmgal-overlay *,
.mmgal-item .mmgal-overlay-inner,
.mmgal-item .mmgal-overlay-inner *,
.mmgal-item .mmgal-overlay h4,
.mmgal-item .mmgal-overlay p{
  pointer-events:none !important;
  cursor:pointer !important;
}
