/* Modal backdrop and container */
.popup-modal {
    display: none; /* Hidden initially */
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8); /* Semi-transparent backdrop */
    opacity: 0;
    transition: opacity 0.5s ease;
  }

  /* When the modal is shown */
  .popup-modal.show {
    display: block;
    opacity: 1;
  }

  /* Modal content box styling */
  .popup-content {
    background-color: #fff;
    width: 45%;                 /* Adjust overall modal width as needed for desktops */
    margin: 10% auto;           /* Centered vertically and horizontally */
    padding: 0;                 /* Remove extra padding to let the image flush */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
  }

  /* Layout: Two columns without extra gap (desktop) */
  .popup-body {
    display: flex;
    flex-direction: row;
    margin: 0;
  }

  /* Left Column: Text and close button */
  .popup-left {
    flex: 3;                        /* Adjust ratio as needed */
    display: flex;
    flex-direction: column;         /* Stack text content and button vertically */
    justify-content: space-between; /* Push button to bottom */
    padding: 20px;                  /* Internal padding for text */
    box-sizing: border-box;
    background: #f9f9f9;            /* Optional background for contrast */
    padding-top: 10%;
  }

  /* Right Column: Image column */
  .popup-right {
    flex: 7;        /* Making the image column 3/4 larger than the left */
    padding: 0;     /* Remove any padding and margin */
    margin: 0;
  }

  /* Ensure the image fills its container without extra space */
  .popup-right img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
  }

  /* Style the close button (positioned in the left column, bottom left) */
  .popup-button {
    text-align: left;
  }
  .popup-button button {
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
  }

  /* Popup Close Button Specific Styling */
  #popupClose {
    display: inline-block;
    outline: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 5px;
    font-weight: 600;
    border-radius: 8px;
    padding: 13px 23px;
    border: 1px solid #222222;
    transition: box-shadow 0.2s ease 0s, transform 0.1s ease 0s;
    background: #fff;
    color: #222222;
  }
  #popupClose:hover {
    border-color: #000000;
    background: #C9001f;
  }

  /* Mobile Styles: For viewports 768px wide or less */
  @media (max-width: 768px) {
    .popup-content {
      width: 90%;  /* Make modal wider relative to viewport */
      margin: 5% auto;
    }
    /* Stack columns vertically */
    .popup-body {
      flex-direction: column;
    }
    /* Change order so the image appears on top */
    .popup-right {
      order: 1;
      height: auto; /* Let the image determine its height */
    }
    /* Left column appears below */
    .popup-left {
      order: 2;
      padding: 20px;
      padding-top: 10px; /* Adjust top padding if needed */
    }
  }



  /* make sure popup-content is the positioning context */
  .popup-content {
    position: relative;
  }

  /* style and place the “×” */
  .popup-x {
    position: absolute;
    top: 2px;      /* adjust as needed */
    right: 12px;    /* adjust as needed */
    background: transparent;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #222;
    padding: 0;
  }

  .popup-x:hover {
    color: rgb(207, 37, 37);
  }