/* Hero banner widget. Sizes and colors come from Elementor controls as variables.
   Do NOT use container-type / cqw here: size containment inside Elementor flex
   containers inflates the widget height (content ~150px, wrapper 600px+).
   Fluid fallbacks use % (width-relative) or vw instead. */

.medadak-banner-hero {
  --banner-ratio: 2.33;
  --banner-min-h: 0px;
  --column-gap: 0px;
  --info-width: 40%;
  --badge-color: #ffffff;
  --offer-color: #ffffff;
  --title-color: #ffffff;
  --desc-color: rgba(255, 255, 255, 0.75);
  --media-min-h: 0px;
  --media-pad: 0px;
  --media-x: 50%;
  --media-y: 58%;
  --media-c1: #78b84a;
  --media-c2: #5c9334;
  --media-c3: #3f6e28;
  --media-stop: 48%;
  --image-fit: contain;
  --image-pos: center;
  --image-radius: 0px;
  width: 100%;
  color: inherit;
}

/* Keep full column width; height must follow content (not flex stretch). */
.elementor-widget-medadak-banner-hero {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
}

.medadak-banner-hero,
.medadak-banner-hero *,
.medadak-banner-hero *::before,
.medadak-banner-hero *::after {
  box-sizing: border-box;
}

.medadak-banner-hero__frame {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  aspect-ratio: var(--banner-ratio);
  min-height: var(--banner-min-h);
  gap: var(--column-gap);
  border-radius: var(--banner-radius, clamp(14px, 3.5vw, 40px));
  overflow: hidden;
  background-color: #b7dd7e;
  text-decoration: none;
  color: inherit;
}

a.medadak-banner-hero__frame,
a.medadak-banner-hero__frame:hover,
a.medadak-banner-hero__frame:focus {
  text-decoration: none;
  color: inherit;
}

a.medadak-banner-hero__frame:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.medadak-banner-hero--image-left .medadak-banner-hero__frame {
  flex-direction: row-reverse;
}

.rtl .medadak-banner-hero--image-left .medadak-banner-hero__frame,
[dir="rtl"] .medadak-banner-hero--image-left .medadak-banner-hero__frame {
  flex-direction: row;
}

.rtl .medadak-banner-hero--image-right .medadak-banner-hero__frame,
[dir="rtl"] .medadak-banner-hero--image-right .medadak-banner-hero__frame {
  flex-direction: row-reverse;
}

.medadak-banner-hero__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 0 0 var(--info-width);
  width: var(--info-width);
  max-width: 100%;
  min-width: 0;
  gap: var(--info-gap, clamp(8px, 1.5vw, 60px));
  padding: clamp(8px, 2.5%, 40px);
  text-align: center;
}

.medadak-banner-hero--no-media .medadak-banner-hero__info {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
}

.medadak-banner-hero__offer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--offer-gap, clamp(4px, 1.2vw, 24px));
  max-width: 100%;
}

.medadak-banner-hero__badge {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--badge-width, clamp(30px, 8vw, 110px));
  min-width: var(--badge-width, clamp(30px, 8vw, 110px));
  height: var(--badge-height, clamp(32px, 8.5vw, 116px));
  padding: 0;
  color: var(--badge-color);
  font-size: var(--badge-font, clamp(15px, 4vw, 58px));
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  background-repeat: no-repeat;
  background-position: center;
  background-size: var(--badge-size, clamp(30px, 8vw, 110px));
}

.medadak-banner-hero__badge.is-plain {
  background-image: none !important;
}

.medadak-banner-hero__offer-text,
.medadak-banner-hero__title,
.medadak-banner-hero__description {
  margin: 0;
  padding: 0;
  overflow-wrap: break-word;
}

.medadak-banner-hero__offer-text {
  min-width: 0;
  color: var(--offer-color);
  font-size: var(--offer-font, clamp(8px, 1.6vw, 24px));
  font-weight: 700;
  line-height: 1.7;
  text-align: right;
  white-space: nowrap;
}

.medadak-banner-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  gap: var(--copy-gap, clamp(2px, 0.6vw, 10px));
}

.medadak-banner-hero__title {
  color: var(--title-color);
  font-size: var(--title-font, clamp(11px, 2.4vw, 36px));
  font-weight: 800;
  line-height: 1.4;
  text-wrap: balance;
}

.medadak-banner-hero__description {
  color: var(--desc-color);
  font-size: var(--desc-font, clamp(8px, 1.5vw, 22px));
  font-weight: 400;
  line-height: 1.7;
  text-wrap: balance;
}

.medadak-banner-hero__media {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--media-min-h);
  overflow: hidden;
}

.medadak-banner-hero--radial .medadak-banner-hero__media {
  background-image: radial-gradient(
    circle at var(--media-x) var(--media-y),
    var(--media-c1) 0%,
    var(--media-c2) var(--media-stop),
    var(--media-c3) 100%
  );
}

.medadak-banner-hero--bg-none .medadak-banner-hero__media {
  background: transparent;
}

.medadak-banner-hero__media img {
  position: absolute;
  inset: var(--media-pad);
  display: block;
  width: calc(100% - (var(--media-pad) * 2));
  height: calc(100% - (var(--media-pad) * 2));
  max-width: none;
  object-fit: var(--image-fit);
  object-position: var(--image-pos);
  border-radius: var(--image-radius);
}

/* Stacked layout: drop horizontal aspect-ratio so height follows content. */
@media (max-width: 1024px) {
  .medadak-banner-hero--stack-tablet .medadak-banner-hero__frame,
  .rtl .medadak-banner-hero--stack-tablet .medadak-banner-hero__frame,
  [dir="rtl"] .medadak-banner-hero--stack-tablet .medadak-banner-hero__frame {
    flex-direction: column;
    aspect-ratio: auto;
    min-height: var(--banner-min-h);
  }

  .medadak-banner-hero--stack-tablet .medadak-banner-hero__info,
  .medadak-banner-hero--stack-tablet .medadak-banner-hero__media {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .medadak-banner-hero--stack-tablet .medadak-banner-hero__media {
    min-height: max(var(--media-min-h), min(240px, 52vw));
  }

  .medadak-banner-hero--stack-tablet.medadak-banner-hero--mobile-media .medadak-banner-hero__media {
    order: -1;
  }
}

@media (max-width: 767px) {
  .medadak-banner-hero--stack-mobile .medadak-banner-hero__frame,
  .rtl .medadak-banner-hero--stack-mobile .medadak-banner-hero__frame,
  [dir="rtl"] .medadak-banner-hero--stack-mobile .medadak-banner-hero__frame {
    flex-direction: column;
    aspect-ratio: auto;
    min-height: var(--banner-min-h);
  }

  .medadak-banner-hero--stack-mobile .medadak-banner-hero__info,
  .medadak-banner-hero--stack-mobile .medadak-banner-hero__media {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .medadak-banner-hero--stack-mobile .medadak-banner-hero__media {
    min-height: max(var(--media-min-h), min(220px, 52vw));
  }

  .medadak-banner-hero--stack-mobile.medadak-banner-hero--mobile-media .medadak-banner-hero__media {
    order: -1;
  }
}
