/* Overlay wrapper */
html.legacy-popup-open,
body.legacy-popup-open {
  overflow: hidden !important;
  height: 100%;
}

html.legacy-popup-open {
  /* prevenim “bounce” / scroll chaining */
  overscroll-behavior: none;
}

.legacy-popup.is-open {
  /* ca să poți scrolla în interiorul popup-ului dacă e nevoie */
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.legacy-popup {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  }
  
  .legacy-popup.is-open {
    display: block;
  }
  
  /* Dim background */
  .legacy-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
  }
  
  /* Panel */
  .legacy-popup__panel {
    position: relative;
    width: min(980px, calc(100vw - 40px));
    margin: 6vh auto 0 auto;
  
    background: var(--legacy-popup-bg, #8DBF43);
    color: var(--legacy-popup-text, #fff);
  
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(0,0,0,0.35);
    overflow: hidden;
  
    transform: translateY(10px);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
  }
  
  .legacy-popup.is-open .legacy-popup__panel {
    transform: translateY(0);
    opacity: 1;
  }
  
  /* Close button */
  button.legacy-popup__close {
    position: absolute;
    top: 4px;
    right: 9px;
    width: 40px;
    height: 40px;
  
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.85);
    font-size: 32px;
    line-height: 40px;
    cursor: pointer;
    box-shadow: none;
	  z-index:200;
  }
  button.legacy-popup__close:after, button.legacy-popup__close:before{
    display:none;
  }
  .legacy-popup__close:hover {
    color: rgba(255,255,255,1);
  }
  
  /* Layout – card with integrated background image */
  .legacy-popup__grid {
    display: grid;
    grid-template-columns: 2.25fr 1fr;
    gap: 22px;
    align-items: stretch;
    min-height: 420px;
    background-color: var(--legacy-popup-bg, #8DBF43);
    background-image: var(--legacy-card-bg-image);
    background-repeat: no-repeat;
    background-position: -270% 10px;
    background-size: 110%;
  }
  
  .legacy-popup__content {
    padding: 48px 36px 34px 42px;
  }
  
  .legacy-popup__title {
    margin: 0 0 18px 0;
    font-size: 46px;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--legacy-popup-text, #fff)!important;
  }
  
  .legacy-popup__text {
    font-size: 15px;
    line-height: 1.55;
    max-width: 520px;
    opacity: 0.95;
    padding-right: 30%;
  }
  
  .legacy-popup__text p { margin: 0 0 14px 0; }
  .legacy-popup__text p:last-child { margin-bottom: 0; }
  
  .legacy-popup__btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
  
    margin-top: 22px;
    padding: 14px 18px;
  
    background: var(--legacy-popup-btn-bg, #fff);
    color: var(--legacy-popup-btn-text, #5b7f2a);
    text-decoration: none;
  
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
  }
  
  .legacy-popup__btn:hover {
    filter: brightness(0.98);
  }
  
  .legacy-popup__arrow {
    font-size: 18px;
    line-height: 1;
  }
  
  /* Image column: hidden on desktop (image is grid background) */
  .legacy-popup__media {
    position: relative;
    padding: 28px 26px 24px 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
  }
  
  .legacy-popup__media .legacy-popup__image,
  .legacy-popup__media .legacy-popup__imagePlaceholder {
    display: none;
  }
  
  .legacy-popup__image {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
  
    border-radius: 14px;
    filter: drop-shadow(0 18px 26px rgba(0,0,0,0.25));
  }
  
  /* fallback placeholder */
  .legacy-popup__imagePlaceholder {
    width: 100%;
    height: 380px;
    border-radius: 14px;
    background: rgba(255,255,255,0.18);
  }
  
  /* Responsive */
  @media (max-width: 860px) {
    .legacy-popup__grid {
      grid-template-columns: 1fr;
      min-height: auto;
      background-image: none;
    }
  
    .legacy-popup__content {
      padding: 44px 24px 18px 24px;
      padding-right: 24px;
    }
  
    .legacy-popup__media {
      padding: 0 22px 26px 22px;
      justify-content: flex-start;
		display:none;
    }
  
    .legacy-popup__media .legacy-popup__image,
    .legacy-popup__media .legacy-popup__imagePlaceholder {
      display: block;
    }
  
    .legacy-popup__title {
      font-size: 34px;
    }
  
    .legacy-popup__image {
      max-height: 320px;
    }
    .legacy-popup__text{
        padding-right: 0;
    }
  }
