
.mdaItem{
	border-radius: 16px;
	background-color:whitesmoke;
	padding-bottom:5px
}
.mdaImage {
    cursor: pointer;
  display: block;
  max-width: 100%;
  height: auto;

  border-radius: 16px;
  overflow: hidden;      /* المهم هنا */
  object-fit: cover;     /* يمنع أي تمدد غريب */

  background-color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

  transition: 
    transform 0.3s ease,
    box-shadow 0.3s ease;
	
	background-color:#f7f7f7;
	padding:20px;
}


.mdaImage:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
  filter: brightness(1.03) contrast(1.05);
}

/* العنصر الحاوي للصورة */
figure.mdaImage {
  display: inline-block;     /* يخلي المربع على قدّ الصورة */
  border-radius: 16px;
  overflow: hidden;          /* قص الحواف */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	padding:3px;
	border:black solid 1px;
}

/* الصورة نفسها */
figure.mdaImage img {
  display: block;            /* يمنع أي فراغات */
  width: auto;
  height: auto;
  max-width: 100%;
}







/* ===== Responsive Grid (الحاوي فقط) ===== */
.mdaImageGallery {
  display: grid;
  grid-template-columns: repeat(var(--cols-desktop), 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .mdaImageGallery {
    grid-template-columns: repeat(var(--cols-mobile), 1fr);
  }
}

/* ===== Blur-up (مكمّل لتصميمك) ===== */
figure.mdaImage img.lazy-blur {
  filter: blur(14px);
  transition: filter .6s ease;
}

figure.mdaImage img.lazy-blur.loaded {
  filter: blur(0);
}

/* ===== Lightbox ===== */
.mdaLightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  z-index: 9999;
}

.mdaLightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.mdaLightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

/*
.mdaLightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
}*/


.mdaLightbox .download ,.mdaLightbox .share,.mdaLightbox .print,.mdaLightbox .close {
  font-size: 20px;
	border:gray 1px solid;
}


/* ===== Cursor ===== */
figure.mdaImage,
figure.mdaImage img {
  cursor: pointer;
}

/* ===== Lightbox Toolbar ===== */
.mdaLightboxToolbar {
  position: absolute;
  top: 50%;
  left: 20px;
	transform: translateY(-50%);
	flex-direction: column;   /* عمودي */
  display: flex;
  gap: 10px;
  z-index: 10;
}

.mdaBtn {
  background: rgba(0,0,0,.6);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 18px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.mdaBtn:hover {
  background: rgba(0,0,0,.85);
  transform: scale(1.1);
}

/* صورة اللايت بوكس */
.mdaLightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 16px;
}

.mdaCaption {
    margin-top: 8px;
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.mdaCaption-title {
    display: block;
    font-weight: 600;
    color: #111;
}


.mdaActions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

.mdaBtn {
    border: none;
    background: #f5f5f5;
		color:#3b88c3;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 20px;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
	width:50px;
	text-align:center;
}

.mdaBtn:hover {
    background: #111;
    color: #fff;
    transform: translateY(-2px);
}

.mdaBtn:active {
    transform: scale(0.95);
}
