/* ── Manar2022 UX Fixes — 2026-06-06 ── */

/* ── 1. Slider: limit image height, crop center ── */
#site_slider .owl-item img {
  max-height: 620px;
  width: 100%;
  object-fit: cover;
  object-position: center center;
}

/* ── 2. Slider arrows: center on sides (prev left / next right) ── */
#site_slider .owl-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  bottom: auto !important;
  left: 0 !important;
  right: 0;
  width: 100%;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 100;
}
#site_slider .owl-next,
#site_slider .owl-prev {
  pointer-events: all;
  margin-bottom: 0 !important;
  margin-right: 0 !important;
}

/* ── 3. About section: reduce top gap ── */
#about_site {
  margin-top: 40px !important;
  margin-bottom: 60px !important;
}

/* ── 4. Remove forced min-height on about text ── */
.aboutright h4 {
  min-height: auto !important;
}

/* ── 5. Hide entire firstabblock when image src is empty ── */
.firstabblock:has(img[src=""]),
.firstabblock:has(img:not([src])),
.firstabblock:has(img[src="undefined"]) {
  display: none !important;
}
/* Fallback: hide the secoabblock container too */
.secoabblock img[src=""],
.secoabblock img:not([src]),
.secoabblock img[src="undefined"] {
  display: none !important;
}

/* ── 6. Make about text column full width when image is missing ── */
#about_site .col-md-6:first-child {
  transition: none;
}
#about_site:has(.firstabblock:not(:is(:has(img[src=""]),
    :has(img:not([src])), :has(img[src="undefined"])))
  ) .col-md-6:first-child {
  /* only restrict when image exists */
}

/* ── 7. Photo album title: reduce oversized dark-blue block ── */
.photo_title {
  min-height: 140px !important;
  padding-top: 20px;
  padding-bottom: 20px;
}

/* ── 8. Reduce photocontent forced min-height ── */
.photocontent {
  min-height: 300px !important;
  padding-top: 20px !important;
}

/* ── 9. Gallery filter tabs: allow wrapping, fix overflow ── */
.photocontent .nav {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 6px;
  overflow: visible !important;
  padding: 8px 12px;
}
.photocontent .nav > li {
  white-space: nowrap;
  float: none !important;
}
.photocontent .nav > li > a {
  padding: 6px 14px;
  line-height: 1.4;
}

/* ── Mobile ── */
@media (max-width: 991px) {
  #site_slider .owl-item img {
    max-height: 320px;
  }
  #site_slider .owl-nav {
    padding: 0 8px;
  }
  #about_site {
    margin-top: 24px !important;
  }
  .photo_title {
    min-height: 110px !important;
  }
}
@media (max-width: 480px) {
  #site_slider .owl-item img {
    max-height: 220px;
  }
}
