.igm-hero {
  --igm-hero-h: 550px;
  --igm-hero-blue: var(--bs-primary, #0f4b91);
  position: relative;
  height: var(--igm-hero-h);
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(157, 174, 190, .3);
  isolation: isolate;
}

.igm-hero__slides,
.igm-hero__slide {
  position: absolute;
  inset: 0;
}

.igm-hero__slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease-in-out, visibility 0s 1s;
}

.igm-hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
  transition: opacity 1s ease-in-out;
}

.igm-hero__img {
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  object-fit: cover;
  clip-path: polygon(40% 0, 100% 0, 100% 100%, 0 100%);
}

.igm-hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--igm-hero-blue) 95%, transparent) 0%,
    color-mix(in srgb, var(--igm-hero-blue) 40%, transparent) 55%,
    transparent 100%);
  pointer-events: none;
}

.igm-hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 60%;
  height: 100%;
  padding: 60px 60px 60px 100px;
  color: #fff;
  text-align: left;
}

.igm-hero__slide.is-active .igm-hero__content {
  animation: igm-hero-up .8s ease-out both;
}

@keyframes igm-hero-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: none; }
}

.igm-hero__title {
  margin: 0 0 .5rem;
  font-size: clamp(1.5rem, 2.4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.igm-hero__title a,
.igm-hero__title a:hover {
  color: #fff;
  font-weight: inherit; /* tema pune "h2 a { font-weight: 300 }" */
  text-decoration: none;
}

.igm-hero__title a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .2em;
}

.igm-hero__text {
  margin: 0 0 .5rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.igm-hero__date {
  margin: .25rem 0 1.25rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .15);
  font-size: .95rem;
  font-weight: 600;
}

.igm-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: 14px 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--igm-hero-blue) 0%, color-mix(in srgb, var(--igm-hero-blue) 45%, #a9a9a9) 100%);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--igm-hero-blue) 30%, transparent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform .3s, box-shadow .3s;
}

.igm-hero__btn::after {
  content: "\2192";
  font-size: 1.15em;
}

.igm-hero__btn:hover,
.igm-hero__btn:focus-visible {
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--igm-hero-blue) 50%, transparent);
}

/* Sageti: apar la hover sau la focus de la tastatura. */
.igm-hero__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity .3s, background-color .3s, transform .3s;
}

.igm-hero__nav::before {
  content: "";
  width: 12px;
  height: 12px;
  border: solid currentColor;
  border-width: 0 0 3px 3px;
  transform: translateX(2px) rotate(45deg);
}

.igm-hero__nav--prev { left: 20px; }
.igm-hero__nav--next { right: 20px; }
.igm-hero__nav--next::before { transform: translateX(-2px) rotate(-135deg); }

.igm-hero:hover .igm-hero__nav,
.igm-hero__nav:focus-visible {
  opacity: 1;
}

.igm-hero__nav:hover {
  background: rgba(255, 255, 255, .4);
  transform: translateY(-50%) scale(1.1);
}

/* Puncte: punctul activ devine bara. */
.igm-hero__dots {
  position: absolute;
  bottom: 30px;
  left: 100px;
  z-index: 2;
  display: flex;
  gap: 10px;
}

.igm-hero__dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .3s, background-color .3s;
}

.igm-hero__dot:hover { background: rgba(255, 255, 255, .8); }

.igm-hero__dot[aria-current] {
  width: 40px;
  background: #fff;
}

.igm-hero :focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (max-width: 1023px) {
  .igm-hero { --igm-hero-h: 450px; }
  .igm-hero__content { width: 65%; padding: 40px 40px 40px 90px; }
  .igm-hero__dots { left: 90px; }
}

@media (max-width: 768px) {
  .igm-hero { --igm-hero-h: 350px; }
  .igm-hero__img { width: 60%; clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%); }
  .igm-hero__content { width: 80%; padding: 32px 32px 56px; }
  .igm-hero__text, .igm-hero__btn, .igm-hero__nav { display: none; }
  .igm-hero__dots { left: 32px; bottom: 20px; }
}

@media (max-width: 480px) {
  .igm-hero { --igm-hero-h: 300px; }
  .igm-hero__img { width: 100%; clip-path: none; }
  .igm-hero__slide::after {
    background: linear-gradient(0deg,
      color-mix(in srgb, var(--igm-hero-blue) 95%, transparent) 30%,
      color-mix(in srgb, var(--igm-hero-blue) 35%, transparent) 100%);
  }
  .igm-hero__content { width: 100%; justify-content: flex-end; padding: 20px 20px 44px; }
  .igm-hero__title { font-size: 1.2rem; }
  .igm-hero__date { margin-bottom: 0; font-size: .8rem; }
  .igm-hero__dots { left: 20px; bottom: 16px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .igm-hero__slide,
  .igm-hero__slide.is-active { transition: none; }
  .igm-hero__slide.is-active .igm-hero__content { animation: none; }
}

@media print {
  .igm-hero { height: auto; box-shadow: none; }
  .igm-hero__slide:not(.is-active), .igm-hero__nav, .igm-hero__dots { display: none; }
  .igm-hero__slide { position: static; }
}
