


/* - - - - - - - - - - - - - - - - - -  MODAL VARIANT: VIDEO - - - - - - - - - - - - - - - - - - */
/* This targets the container ONLY inside a video modal */
.modal-video .website-container {
  /* ... your other flexbox styles for centering ... */
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  box-shadow: none;
  background-color: transparent;
}

/* This targets the iframe ONLY inside a video modal */
.modal-video .website-container iframe {
  /* ... your other aspect-ratio styles ... */
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  display: block;
  /* This transition is still needed for the fade-in effect */
  transition: opacity 0.4s ease-in-out;
}

/* This rule is STILL a key part of the solution */
.modal-video .website-container.loading iframe {
  opacity: 0;
}







/* - - - - - - - - - - - - - - - - - -
   MODAL VARIANT: IMAGE
- - - - - - - - - - - - - - - - - - */

/* Target the container ONLY inside an image modal */
.modal-image .website-container {
  /* Use flexbox to perfectly center the image both vertically and horizontally */
  display: flex;
  justify-content: center;
  align-items: center;
  
  /* Override base styles that might conflict */
  box-shadow: none;
  background-color: transparent;
}

/* Target the image element ONLY inside an image modal */
.modal-image .website-container img {
  /* 
    This is the key to responsive scaling for any image dimension.
    - max-width/max-height ensures the image never overflows its container.
    - The browser automatically respects the image's aspect ratio.
  */
  max-width: 100%;
  max-height: 100%;
  
  /* Let the max- apects control the size */
  width: auto;
  height: auto;
  
  /* Optional: Add a subtle shadow directly to the image for a nice effect */
  border-radius: 4px; /* A little polish */
}






/* - - - - - - - - - - - - - - - - - -   M O D A L   - - - - - - - - - - - - - - - - - -*/
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* UPDATED to use RGBA for 90% opacity */
  background-color: rgba(29, 29, 31, 0.99); 
}

.modal-content {
  position: relative;
  z-index: 1001;
  padding-top: 0.7in;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* Allow vertical scrolling if needed */
}

.modal-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.75in;
  display: flex;
  align-items: center;
  padding: 0 36px;
}



.return-link img {
    margin-right: 10px !important; /* Using !important for testing */
    height: 15px !important; /* Using !important for testing */
    width: auto !important; /* Using !important for testing */
}

.return-link {
font-weight: 500;
color: #cbcbd9;
text-decoration: none;
font-size: 16px;
display: flex;
align-items: center;
margin-top: 3px; /* Adjust this value to move up */
}


.return-link:hover {
    color: #ffffff; /* Change this to your desired hover color */
}

.return-link img {
    margin-right: 24px;
    height: 15px;
    width: auto;
    /* This is the calculated filter to produce #c0c0c5 */
    filter: invert(85%) sepia(3%) saturate(163%) hue-rotate(196deg) brightness(91%) contrast(85%);
    transition: filter 0.3s ease;
}

.return-link:hover img {
    /* This filter makes the SVG black (#ffffff) */
   filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}


/* Adjust the website section for the modal context */
.modal #website-section {
  margin: 0;
  padding: 0 36px;
  height: calc(100vh - 0.7in);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.modal .website-container {
  flex-grow: 1;
  margin-bottom: 40px; /* Kept your adjusted value for bottom spacing */
  height: 100%; /* Ensure it takes full height of its parent */
}

.website-frame {
  width: 100%;
  height: 100%;
  border: none;
}

/* Animation classes */
.modal.active .modal-overlay {
  /* UPDATED to use RGBA to match the default state */
  background-color: rgba(29, 29, 31, 0.99);
}

.modal.active .modal-content {
  transform: translateY(0);
}

/*
=============================================
  MODAL: MOBILE PADDING ADJUSTMENTS
=============================================
*/
@media screen and (max-width: 768px) {
  /* Reduce side padding for the modal header on mobile */
  .modal-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Reduce side padding for the main modal content area on mobile */
  .modal #website-section {
    padding-left: 20px;
    padding-right: 20px;
  }
}







/* - - - - - - - - - - - - - - - - - -
   MODAL VARIANT: IFRAME / RESUME (Based on Working Pattern)
- - - - - - - - - - - - - - - - - - */

/* Make the modal body a simple container that fills the available space */
#ajax-modal .modal-body {
  flex-grow: 1;
  display: flex; /* This is important for its child to fill the space */
}

/* 
* THIS IS THE KEY: We now style the .website-container exactly like your video modal,
* using flexbox to perfectly center the iframe.
*/
#ajax-modal .website-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  padding: 20px; /* Provides space on all sides, on all devices */
}

/* Style the iframe itself */
#ajax-modal iframe {
  width: 100%;
  height: 100%;
  max-width: 900px; /* Sets the max desktop width */
  border: none;
  border-radius: 8px; /* Consistent rounded corners */
  background-color: #fff;
}