/* ============================================
   Hero News Carousel — premium hero slider
   Chap: gradient + pattern + text; o'ng: image
   Keng container, katta panel balandligi, yirik matn
   ============================================ */

.hnc {
  --hnc-radius: 24px;
  --hnc-panel-height: 580px;
  --hnc-shadow: 0 24px 48px rgba(0, 0, 0, 0.18), 0 12px 24px rgba(0, 0, 0, 0.12);
  --hnc-gradient-start: #3d2468;
  --hnc-gradient-end: #1a4d8c;
  --hnc-text: #ffffff;
  --hnc-text-muted: rgba(255, 255, 255, 0.82);
  --hnc-pattern-opacity: 0.06;
  padding: 2rem 0;
  box-sizing: border-box;
}

.hnc__wrap {
  width: 95%;
  max-width: 1500px;
  margin: 0 auto;
  border-radius: var(--hnc-radius);
  overflow: hidden;
  box-shadow: var(--hnc-shadow);
  position: relative;
  background: var(--hnc-gradient-end);
  min-height: var(--hnc-panel-height);
}

/* Track: barcha slaydlar */
.hnc__track {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Bitta slayd */
.hnc__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  pointer-events: none;
}

.hnc__slide--active {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Slayd havolasi — bosilganda yangilik sahifasiga o'tadi */
.hnc__slide-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Slayd ichki: 2 ta panel */
.hnc__inner {
  display: flex;
  flex-direction: row;
  min-height: var(--hnc-panel-height);
  flex: 1;
}

/* ========== Chap panel (matn) — 50% ========== */
.hnc__panel--text {
  flex: 0 0 50%;
  position: relative;
  background: linear-gradient(135deg, var(--hnc-gradient-start) 0%, var(--hnc-gradient-end) 100%);
  padding: 60px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.hnc__panel-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--hnc-gradient-start) 0%, var(--hnc-gradient-end) 100%);
  z-index: 0;
}

/* Dekorativ DNA/abstract pattern — juda yengil */
.hnc__panel-pattern {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--hnc-pattern-opacity);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse 80% 40% at 70% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
  background-size: 120px 120px, 200px 180px;
}

.hnc__panel-pattern::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0 Q45 15 30 30 Q15 45 30 60' stroke='white' fill='none' stroke-width='0.5' opacity='0.4'/%3E%3Cpath d='M0 30 Q15 45 30 30 Q45 15 60 30' stroke='white' fill='none' stroke-width='0.5' opacity='0.3'/%3E%3C/svg%3E");
  background-size: 80px 80px;
  opacity: 0.5;
}

.hnc__panel-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
}

.hnc__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.hnc__category {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hnc-text-muted);
}

.hnc__date {
  font-size: 0.9rem;
  color: var(--hnc-text-muted);
}

.hnc__title {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--hnc-text);
  margin: 0 0 1.25rem 0;
  letter-spacing: -0.02em;
}

/* 42px–48px desktopda: 3rem = 48px */
@media (min-width: 993px) {
  .hnc__title {
    font-size: clamp(2.625rem, 3.2vw, 3rem);
  }
}

.hnc__sep {
  width: 56px;
  height: 4px;
  background: rgba(255, 255, 255, 0.6);
  border: none;
  margin: 0 0 1.25rem 0;
  border-radius: 2px;
}

.hnc__desc {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--hnc-text-muted);
  margin: 0;
  max-width: 92%;
}

/* ========== O'ng panel (rasm) — 50%, to'liq egallash ========== */
.hnc__panel--image {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
  background: #0d1f2d;
  min-height: var(--hnc-panel-height);
}

.hnc__img {
  width: 100%;
  height: 100%;
  min-height: var(--hnc-panel-height);
  object-fit: cover;
  object-position: center;
  display: block;
}

.hnc__placeholder {
  width: 100%;
  height: 100%;
  min-height: var(--hnc-panel-height);
  background: linear-gradient(135deg, #2a3f4d 0%, #1a2a35 100%);
}

/* ========== Pastki boshqaruv ========== */
.hnc__nav {
  position: absolute;
  bottom: 2rem;
  left: 80px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hnc__btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hnc__btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.8);
}

.hnc__btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.hnc__counter {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* ========== Empty state ========== */
.hnc--empty .hnc__empty-inner {
  width: 95%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(135deg, var(--hnc-gradient-start) 0%, var(--hnc-gradient-end) 100%);
  border-radius: var(--hnc-radius);
  box-shadow: var(--hnc-shadow);
}

.hnc__empty-text {
  color: var(--hnc-text-muted);
  font-size: 1rem;
  margin: 0;
}

/* ========== Responsive — ustma-ust ========== */
@media (max-width: 992px) {
  .hnc {
    --hnc-panel-height: auto;
  }

  .hnc__inner {
    flex-direction: column;
  }

  .hnc__panel--text {
    flex: 0 0 auto;
    padding: 2.5rem 2rem;
    min-height: 320px;
  }

  .hnc__panel--image {
    flex: 0 0 auto;
    min-height: 280px;
  }

  .hnc__img,
  .hnc__placeholder {
    min-height: 280px;
  }

  .hnc__nav {
    left: 2rem;
    bottom: 1.5rem;
  }
}

@media (max-width: 576px) {
  .hnc__wrap {
    width: 95%;
  }

  .hnc__panel--text {
    padding: 2rem 1.5rem;
    min-height: 280px;
  }

  .hnc__title {
    font-size: 1.5rem;
  }

  .hnc__desc {
    max-width: 100%;
    font-size: 0.95rem;
  }

  .hnc__nav {
    left: 1.5rem;
    bottom: 1.25rem;
    gap: 0.5rem;
  }

  .hnc__btn {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
  }
}
