/* Companion stylesheet for ghabi-az-tarikh-clean.html */
.history-gallery-dots{display:flex;justify-content:center;gap:8px;padding:0 18px 20px;background:linear-gradient(145deg,#eee8df,#f8f4ee)}
.history-gallery-dots button{width:8px;height:8px;padding:0;border:0;border-radius:50%;background:#c7b79f;cursor:pointer}.history-gallery-dots button.is-active{width:24px;border-radius:999px;background:#c9964d}
.history-gallery-pagination{display:flex;align-items:center;justify-content:center;gap:12px;direction:rtl}.history-page-numbers{display:flex;gap:7px}.history-page-number,.history-page-btn{min-width:40px;height:40px;padding:0 12px;border:1px solid #cdb78f;background:#fff;color:#173047;border-radius:999px;cursor:pointer;font-family:inherit}.history-page-number.is-active{background:#0c2233;color:#fff;border-color:#0c2233}.history-page-btn:disabled{opacity:.35;cursor:not-allowed}


/* Final four-collection layout */
.history-gallery-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
  align-items:start!important;
}
.history-gallery-card,
html.history-gallery-js .history-gallery-card{
  display:block!important;
}
.history-gallery-pagination{display:none!important}
.history-gallery-image-wrap img{cursor:zoom-in!important}

@media(max-width:1100px){
  .history-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:640px){
  .history-gallery-grid{grid-template-columns:1fr!important}
}

/* Image lightbox */
.history-image-lightbox{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:22px;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:.22s ease;
}
.history-image-lightbox.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.history-image-lightbox-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
  background:rgba(0,0,0,.9);
  cursor:zoom-out;
}
.history-image-lightbox-dialog{
  position:relative;
  z-index:2;
  width:min(1200px,94vw);
  max-height:92vh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.history-image-lightbox-dialog img{
  display:block;
  width:auto;
  max-width:100%;
  max-height:88vh;
  height:auto;
  object-fit:contain;
  border-radius:12px;
  box-shadow:0 24px 80px rgba(0,0,0,.5);
}
.history-image-lightbox-close{
  position:absolute;
  top:12px;
  left:12px;
  z-index:3;
  width:46px;
  height:46px;
  border:1px solid rgba(255,255,255,.28);
  border-radius:14px;
  background:rgba(8,18,27,.85);
  color:#fff;
  font-size:28px;
  cursor:pointer;
}
body.history-lightbox-open{overflow:hidden}
