/* Overlay to blur and block background */
#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* semi-transparent dark */
  backdrop-filter: blur(6px);    /* blur effect */
  z-index: 9998;                 /* below popup */
  display: none;                 /* hidden by default */
}

/* Popup Banner */
#popup-banner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* perfectly center */
  
  width: 80%;
  max-width: 800px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999; /* above overlay */
  overflow: hidden;
  display: none; /* hidden by default, controlled with JS */
  animation: fadeIn 0.4s ease-in-out;
}

/* Popup Content Flex */
.popup-content {
  display: flex;
  align-items: stretch; /* stretch both sides full height */
  padding: 20px;
  position: relative;
}

/* Left Text + Button Column */
.popup-text {
  flex: 1;
  padding-right: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* separate text block & button */
}

/* Wrapper for heading + paragraph to center vertically */
.text-wrapper {
  margin: auto 0; /* vertically center heading + paragraph */
}

/* Heading and Paragraph */
.popup-text h2 {
  font-size: 3.2rem;
  margin-bottom: 10px;
}

.popup-text p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 15px;
}

/* Right Image Column */
.popup-image {
  flex: 1; 
  margin: -20px -20px -20px 0; /* stretch image to touch banner edges */
  overflow: hidden; 
  border-radius: 0 12px 12px 0; /* keep rounded corner only on right */
}

.popup-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* make it cover top/bottom/side */
  display: block;
}

/* Close Button */
.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 2.5rem;
  cursor: pointer;
  color: #555;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #000;
}

/* Fade In Animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -60%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* Button Container */
.btn-container {
  display: flex;
  justify-content: flex-end; /* aligns button to the right */
  margin-top: 20px;           /* move button slightly lower */
}

/* Button Style */
.quote-btn {
  display: inline-block;
  padding: 12px 24px;
  background: #0077ff;
  color: #fff;
  font-size: 1rem;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.3s ease;
}

.quote-btn:hover {
  background: #005bcc;
}

/* Responsive: stack image below text on tablets and mobile */
@media (max-width: 768px) {
  #popup-banner {
    width: 90%;
    max-height: 90vh;   /* don’t take full screen height */
    overflow-y: auto;   /* enable scrolling if needed */
  }

  /* Heading and Paragraph */
.popup-text h2 {
  font-size: 3.5rem;
  margin-top: 50px;
}




  .popup-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px; /* restore padding on mobile */
  }

  .popup-text {
    padding-right: 0;
  }

  .btn-container {
    justify-content: center;
    margin-top: 15px;
  }

  .popup-image {
    margin: 15px 0 0 0; /* spacing below text */
    width: 100%;
    border-radius: 8px; /* soft corners for image */
    overflow: hidden;
  }

  .popup-image img {
    width: 100%;
    height: auto; /* keep aspect ratio */
    display: block;
  }
}

@media (max-width: 480px) {
  #popup-banner {
    width: 95%;
    max-height: 90vh;   /* leave space at top/bottom */
    overflow-y: auto;   /* scroll if content is taller */
  }

    /* Heading and Paragraph */
.popup-text h2 {

  margin-top: 50px;
}


  .popup-content {
    padding: 15px;
  }

    .close-btn {
    top: 1px; /* move closer to the top */
    right: 12px; /* keep right position */
  }

  .popup-text h2 {
    font-size: 3rem;
  }

  .popup-text p {
    font-size: 0.95rem;
  }

  .quote-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .popup-image {
    margin: 12px 0 0 0; /* smaller spacing */
    border-radius: 8px;
  }
}
