/* =========================
   DIVE SITES — page only
   ========================= */

.td-dive-sites{
  background: var(--td-bg, #f6fbff);
}

/* Wrapper */
.td-ds-wrap{
  width: min(1200px, calc(100% - 28px));
  margin-inline: auto;
}

/* Hero */
.td-ds-hero{
  padding: 34px 0 18px;
}
.td-ds-title{
  margin: 0;
  font-size: clamp(26px, 3.2vw, 42px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--td-blue, #093a5a);
}
.td-ds-subtitle{
  margin: 10px 0 0;
  max-width: 70ch;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(9,58,90,.72);
}

/* Grid */
.td-ds-gallery{
  padding: 16px 0 46px;
}
.td-ds-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Card (button) */
.td-ds-card{
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 18px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(0,0,0,.08);
  transform: translateZ(0);
}
.td-ds-card img{
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .35s ease;
}
.td-ds-card::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 58%, rgba(0,0,0,.35));
  opacity: .9;
  pointer-events: none;
}
.td-ds-chip{
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: rgba(9,58,90,.9);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.td-ds-card:hover img{
  transform: scale(1.04);
}
.td-ds-card:focus-visible{
  outline: 3px solid rgba(32,162,196,.55);
  outline-offset: 4px;
}

/* Lightbox */
.td-ds-lightbox{
  position: fixed;
  inset: 0;
  z-index: 99999;
  place-items: center;
  display: none; /* مهم: افتراضيًا مخفي */
}

.td-ds-lightbox:not([hidden]){
  display: grid; /* يظهر فقط لما hidden يتشال */
}

.td-ds-lb-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
}

.td-ds-lb-dialog{
  position: relative;
  width: min(1100px, calc(100% - 26px));
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.35);
  background: #000;
}

.td-ds-lb-img{
  width: 100%;
  height: auto;
  display: block;
  max-height: 86vh;
  object-fit: contain;
  background: #000;
}

.td-ds-lb-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.92);
  color: #111;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(0,0,0,.25);
}


/* Mobile tweaks */
@media (max-width: 520px){
  .td-ds-hero{ padding: 26px 0 10px; }
  .td-ds-grid{ gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}