.ad-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Center the content */
    align-items: center;     /* Vertically center content */
    padding: 10px;
    margin: 10px 0;
}

/* Style for handling images inside the ad-container */
.ad-container img {
    margin: 0.2rem 2rem !important;
    width: 100%; /* Allow the image to fill its container */
    height: auto; /* Maintain the aspect ratio of the image */
    object-fit: contain; /* Ensures the entire image is visible without distortion */
    border-radius: 5px; /* Optional: rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Optional shadow for aesthetics */
}

/* Handling banners with specific max-width and height constraints */
.ad-container img[src*="banner"], /* Match images with banner in URL or class */
.ad-container img[src*="gif"] {  /* If the source includes 'gif' as part of the URL */
    max-width: 56.25rem;  /* Restrict to max 900px width */
    width: 100%;  /* Adjust width to fit within the container */
    height: auto;  /* Let the height adjust according to the aspect ratio */
}

/* Handling square images */
.ad-container img[src*="square"] {
    max-width: 16rem;
    width: 100%;   /* Fixed width for square images */
    /*height: 250px;  !* Fixed height for square images *!*/
    object-fit: contain;  /* Ensure the image covers the container without distortion */
}

/* Optional: Responsive behavior for smaller screens */
@media (max-width: 768px) {
    .ad-container img {
        width: 100%;  /* Images will fill the container width on smaller screens */
        max-width: 100%; /* Ensure no overflow */
    }
}

/* full jacket ad css starts */

/* Modal container */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent background */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Modal content */
.modal-content {
    position: relative;
    max-width: calc(100vw - 40px); /* 20px padding on each side */
    max-height: calc(100vh - 40px); /* 20px padding on each side */
    overflow: hidden; /* Prevent content overflow */
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

/* Close button */
.close-btn {
    position: relative;
    top: 10px;
    right: 10px;
    font-size: 20px;
    font-weight: bold;
    color: white;
    background: red;
    padding: 0.4rem;
    justify-content: center;
    border-radius: 10%;
    border: 1px solid white;
    cursor: pointer;
    z-index: 10;
}

/* Image inside modal */
.modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Preserve aspect ratio and fit within the bounds */
    border-radius: 5px;
    height: auto; /* Ensure the image height auto-adjusts */
    width: auto;  /* Ensure the image width auto-adjusts */
}


