/* OMU DSpace Home Cover Safe V1.4 */
/* CSS only: bottom-aware balanced cover, no JavaScript, no header restructuring */

ds-themed-home-news,
ds-home-news {
  display: block !important;
  width: 100% !important;
}

/* Render cover once only */
ds-themed-home-news::before {
  content: "" !important;
  display: block !important;
  width: min(calc(100% - 72px), 1280px) !important;
  height: clamp(450px, 34vw, 590px) !important;
  margin: clamp(18px, 2.2vw, 30px) auto clamp(18px, 2vw, 28px) !important;
  border-radius: clamp(18px, 2vw, 26px) !important;
  background-color: #f7f9fc !important;
  background-repeat: no-repeat !important;
  background-position: center 58% !important;
  background-size: cover !important;
  box-shadow: 0 14px 36px rgba(9, 44, 78, 0.10) !important;
  border: 1px solid rgba(9, 44, 78, 0.08) !important;
  pointer-events: none !important;
}

/* Prevent duplicate cover on nested home-news */
ds-themed-home-news ds-home-news::before {
  content: none !important;
  display: none !important;
  background-image: none !important;
}

/* Arabic cover */
html[dir="rtl"] ds-themed-home-news::before,
body[dir="rtl"] ds-themed-home-news::before,
html[lang^="ar"] ds-themed-home-news::before {
  background-image: url("omu-cover-safe/home-cover-ar.webp?v=20260602-2026-06-02-0031-home-cover-bottom-aware-safe-v1-4") !important;
}

/* English cover */
html[dir="ltr"] ds-themed-home-news::before,
body[dir="ltr"] ds-themed-home-news::before,
html[lang^="en"] ds-themed-home-news::before {
  background-image: url("omu-cover-safe/home-cover-en.webp?v=20260602-2026-06-02-0031-home-cover-bottom-aware-safe-v1-4") !important;
}

/* Hide old large home logo/image only inside home news */
ds-themed-home-news ds-home-news img#header-logo,
ds-themed-home-news ds-home-news img[src*="header-logo"],
ds-themed-home-news ds-home-news img[src*="logo"] {
  display: none !important;
  visibility: hidden !important;
}

/* Keep header functions untouched */
ds-themed-lang-switch,
ds-lang-switch,
ds-themed-auth-nav-menu,
ds-auth-nav-menu,
ds-themed-search-navbar,
ds-search-navbar {
  pointer-events: auto !important;
}

@media (max-width: 992px) {
  ds-themed-home-news::before {
    width: calc(100% - 32px) !important;
    height: clamp(350px, 50vw, 480px) !important;
    margin-top: 18px !important;
    border-radius: 16px !important;
    background-position: center 58% !important;
  }
}

@media (max-width: 576px) {
  ds-themed-home-news::before {
    width: calc(100% - 20px) !important;
    height: 290px !important;
    margin-top: 14px !important;
    border-radius: 14px !important;
    background-position: center 58% !important;
  }
}
