/* ==========================================================================
   unesa-perf.css — 2026-12-01
   Berisi: (1) hero statis pengganti Revolution Slider, (2) aturan gambar
   supaya tidak ada layout shift, (3) perbaikan aksesibilitas dari audit
   Lighthouse (kontras, ukuran target sentuh, teks khusus screen reader).
   Dimuat setelah unesa-blog.css di php/template/header.php.
   ========================================================================== */

/* --------------------------------------------------------------- gambar */
/* <picture> dari helper unesa_picture() harus "transparan" terhadap layout
   supaya tidak mengubah selektor CSS/ flexbox yang sudah ada. */
picture {
  display: contents;
}

/* Jaring pengaman: gambar tidak pernah melebihi wadahnya dan rasio asli
   dipertahankan (width/height atribut tetap memesan ruang → CLS = 0). */
img {
  max-width: 100%;
  height: auto;
}

/* ---------------------------------------------------------------- utilitas */
.unesa-sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------------- hero */
.unesa-hero-wrap {
  width: 100%;
}

.unesa-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: clamp(420px, 72vh, 760px);
  background: #0a1f44;
  overflow: hidden;
  color: #ffffff;
}

.unesa-hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.unesa-hero__slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  /* Ikut tinggi minimum .unesa-hero supaya gambar menutup seluruh hero
     dan teks tetap berada di bawah (bukan meluber ke atas). */
  min-height: inherit;
}

.unesa-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(4, 16, 38, 0.92) 0%, rgba(4, 16, 38, 0.72) 42%, rgba(4, 16, 38, 0.15) 78%, rgba(4, 16, 38, 0.35) 100%),
    linear-gradient(0deg, rgba(4, 16, 38, 0.85) 0%, rgba(4, 16, 38, 0) 55%);
  pointer-events: none;
}

.unesa-hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) clamp(20px, 5vw, 72px) clamp(72px, 9vw, 120px);
}

.unesa-hero__title {
  margin: 0 0 12px;
  font-family: "Bitter", Georgia, "Times New Roman", serif;
  font-weight: 700;
  font-size: clamp(26px, 4.2vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
  max-width: 22ch;
}

.unesa-hero__eyebrow {
  margin: 0 0 18px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffcf5c;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

/* Tombol memakai .rs-button dari header.php; di sini hanya jarak & ukuran
   target sentuh minimum 44px. */
.unesa-hero .rs-button {
  margin-top: 26px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Titik navigasi slide — target sentuh 24px (audit target-size). */
.unesa-hero__dots {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 5vw, 72px);
  bottom: clamp(20px, 3vw, 34px);
  display: flex;
  gap: 8px;
}

.unesa-hero__dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.unesa-hero__dot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.25s ease, transform 0.25s ease;
}

.unesa-hero__dot.is-active::after,
.unesa-hero__dot:hover::after {
  background: #ffcf5c;
  transform: scale(1.25);
}

.unesa-hero__dot:focus-visible {
  outline: 3px solid #ffcf5c;
  outline-offset: 2px;
  border-radius: 50%;
}

@media (max-width: 767px) {
  .unesa-hero {
    min-height: clamp(360px, 62vh, 520px);
  }

  .unesa-hero__title {
    max-width: none;
  }
}

/* --------------------------------------------------- aksesibilitas (audit) */
/* Kontras gagal di audit: teks krem di atas latar krem (1,07:1). */
p.descripti,
.elementor-widget-text-editor .descripti {
  color: #4a4a4a !important;
}

/* Tombol dengan teks putih di atas latar terang. */
span.button-text {
  color: inherit;
}

/* Titik pagination kecil (10x10 px) pada slider lain → minimal 24x24 px. */
button.angka-dot {
  min-width: 24px;
  min-height: 24px;
}
