.ihsg-section {
  width: 100%;
  margin: 16px 0;
}

.ihsg-container {
  width: min(100%, var(--ihsg-max-width));
  margin: 0 auto;
  box-sizing: border-box;
}

.ihsg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.11fr) minmax(0, 1fr);
  gap: var(--ihsg-gap);
  align-items: stretch;
}

.ihsg-slider,
.ihsg-tile {
  position: relative;
  overflow: hidden;
  background: #f3f5f8;
}

.ihsg-slider {
  aspect-ratio: 1.8 / 1;
  min-width: 0;
}

.ihsg-slider-viewport,
.ihsg-slider-track,
.ihsg-slide,
.ihsg-media-link,
.ihsg-slide picture,
.ihsg-tile picture {
  width: 100%;
  height: 100%;
}

.ihsg-slider-viewport {
  overflow: hidden;
}

.ihsg-slider-track {
  display: flex;
  transform: translate3d(0, 0, 0);
  transition: transform .45s ease;
  will-change: transform;
}

.ihsg-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
}

.ihsg-media-link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
}

.ihsg-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ihsg-caption {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  padding: clamp(20px, 4vw, 56px);
  color: var(--ihsg-text-color, #fff);
  pointer-events: none;
}

.ihsg-caption--left {
  align-items: flex-start;
  text-align: left;
}

.ihsg-caption--center {
  align-items: center;
  text-align: center;
}

.ihsg-caption--right {
  align-items: flex-end;
  text-align: right;
}

.ihsg-title {
  max-width: 90%;
  margin: 0;
  color: inherit;
  font-size: clamp(24px, 2.1vw, 40px);
  font-weight: 800;
  line-height: 1.08;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .22);
}

.ihsg-subtitle {
  max-width: 78%;
  font-size: clamp(14px, 1.2vw, 20px);
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .22);
}

.ihsg-subtitle p {
  margin: 0;
}

.ihsg-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin-top: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  background: #fff;
  color: #2459c8;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .16);
}

.ihsg-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .78);
  color: #2b5dbf;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  transform: translateY(-50%);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.ihsg-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.ihsg-arrow span {
  margin-top: -3px;
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}

.ihsg-arrow--prev {
  left: 16px;
}

.ihsg-arrow--next {
  right: 16px;
}

.ihsg-dots {
  position: absolute;
  right: 0;
  bottom: 12px;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 7px;
}

.ihsg-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .62);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .24);
  cursor: pointer;
  transition: width .2s ease, border-radius .2s ease, background .2s ease;
}

.ihsg-dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: #fff;
}

.ihsg-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--ihsg-gap);
  min-width: 0;
}

.ihsg-tiles--full {
  grid-column: 1 / -1;
  min-height: 420px;
}

.ihsg-tile--1 {
  grid-column: 1 / -1;
}

.ihsg-title--tile {
  max-width: 94%;
  font-size: clamp(18px, 1.55vw, 30px);
}

.ihsg-subtitle--tile {
  max-width: 92%;
  font-size: clamp(12px, .95vw, 16px);
}

.ihsg-button--tile {
  min-height: 34px;
  padding: 8px 15px;
  font-size: 12px;
}

@media (max-width: 1023px) {
  .ihsg-layout {
    grid-template-columns: 1fr;
  }

  .ihsg-slider {
    aspect-ratio: 1.8 / 1;
  }

  .ihsg-tiles {
    min-height: clamp(360px, 74vw, 620px);
  }
}

@media (max-width: 767px) {
  .ihsg-section {
    margin: 12px 0;
  }

  .ihsg-container {
    padding: 0 12px;
  }

  .ihsg-layout,
  .ihsg-tiles {
    gap: 12px;
  }

  .ihsg-slider {
    aspect-ratio: 1.45 / 1;
  }

  .ihsg-caption {
    padding: 22px;
  }

  .ihsg-title {
    max-width: 100%;
  }

  .ihsg-subtitle {
    max-width: 94%;
  }
}

@media (max-width: 575px) {
  .ihsg-tiles {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
  }

  .ihsg-tile,
  .ihsg-tile--1 {
    grid-column: 1;
    aspect-ratio: 1.75 / 1;
  }

  .ihsg-arrow {
    width: 34px;
    height: 34px;
  }

  .ihsg-arrow--prev {
    left: 10px;
  }

  .ihsg-arrow--next {
    right: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ihsg-slider-track,
  .ihsg-arrow,
  .ihsg-dot {
    transition: none !important;
  }
}

/* v1.3.0 - vizibilitate separată desktop / mobil */
@media (min-width: 768px) {
  .ihsg-slide[data-active-desktop="0"],
  .ihsg-tile[data-active-desktop="0"],
  .ihsg-dot[data-active-desktop="0"] {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .ihsg-slide[data-active-mobile="0"],
  .ihsg-tile[data-active-mobile="0"],
  .ihsg-dot[data-active-mobile="0"] {
    display: none !important;
  }
}

.ihsg-layout--no-slider,
.ihsg-layout--no-tiles {
  grid-template-columns: minmax(0, 1fr);
}

.ihsg-layout--no-slider .ihsg-tiles,
.ihsg-layout--no-tiles .ihsg-slider {
  grid-column: 1 / -1;
}

.ihsg-slider--full {
  aspect-ratio: 2.2 / 1;
}

.ihsg-tiles--no-top {
  grid-template-rows: minmax(0, 1fr);
}

.ihsg-tiles--only-top {
  grid-template-rows: minmax(0, 1fr);
}

.ihsg-tiles--only-top .ihsg-tile--1 {
  grid-row: 1;
}

.ihsg-tiles--single-bottom .ihsg-tile:not([hidden]) {
  grid-column: 1 / -1;
}

.ihsg-section[hidden],
.ihsg-slider[hidden],
.ihsg-tiles[hidden],
.ihsg-slide[hidden],
.ihsg-tile[hidden],
.ihsg-dot[hidden],
.ihsg-arrow[hidden],
.ihsg-dots[hidden] {
  display: none !important;
}

@media (max-width: 767px) {
  .ihsg-slider--full {
    aspect-ratio: 1.45 / 1;
  }
}
