/* Prevent scrolling when the popup is active */
html.popup-active,
body.popup-active {
    overflow: hidden !important;
}

/* Overlay styles */
body #overlay.overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    z-index: 999999 !important;
    display: none;
}

/* Popup styles */
body #adsPopup.popup-ads {
    display: none;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1000000 !important;
    width: 90% !important;
    max-width: 800px !important;
    background: #fff !important;
    border-radius: 10px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3) !important;
    margin: 0 !important;
    padding: 0 !important;
}

body #adsPopup .ads-content {
    display: flex !important;
    align-items: stretch !important;
    height: 100% !important;
    max-height: 80vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

body #adsPopup .ads-image {
    flex: 1 !important;
    background-image: url('../images/gallery/img8.jpg') !important;
    background-size: cover !important;
    background-position: center !important;
    border-top-left-radius: 10px !important;
    border-bottom-left-radius: 10px !important;
    min-height: 300px !important;
    margin: 0 !important;
    padding: 0 !important;
}

body #adsPopup .ads-text {
    flex: 1 !important;
    padding: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    background: #fff !important;
}

body #adsPopup .ads-text h2 {
    font-size: 28px !important;
    font-weight: bold !important;
    color: #000000 !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    line-height: 1.2 !important;
    margin-top: 0 !important;
}

body #adsPopup .ads-text p {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333333 !important;
    text-align: center !important;
    margin-bottom: 30px !important;
}

body #adsPopup .button-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    margin-top: 20px !important;
    width: 100% !important;
}

/* Button styles */
body #adsPopup .submit-btn,
body #adsPopup .ghost {
    width: 100% !important;
    padding: 12px 24px !important;
    border: none !important;
    border-radius: 5px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 16px !important;
    text-align: center !important;
    margin: 0 !important;
}

body #adsPopup .submit-btn {
    background-color: #e41b23 !important;
    color: white !important;
    border: none !important;
}

body #adsPopup .ghost {
    background-color: #e41b23 !important;
    color: white !important;
    border: none !important;
}

body #adsPopup .submit-btn:hover,
body #adsPopup .ghost:hover {
    background-color: #000000 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Media queries for responsive design */
@media screen and (min-width: 1920px) {
    body #adsPopup.popup-ads {
        max-width: 1000px !important;
    }
    
    body #adsPopup .ads-content {
        max-height: 600px !important;
    }
    
    body #adsPopup .ads-image {
        min-height: 400px !important;
    }
    
    body #adsPopup .ads-text {
        padding: 40px !important;
    }
    
    body #adsPopup .ads-text h2 {
        font-size: 32px !important;
        margin-bottom: 30px !important;
    }
    
    body #adsPopup .ads-text p {
        font-size: 18px !important;
    }
    
    body #adsPopup .button-container {
        margin-top: 40px !important;
    }
    
    body #adsPopup .submit-btn,
    body #adsPopup .ghost {
        padding: 15px 30px !important;
        font-size: 18px !important;
    }
}

@media screen and (max-width: 768px) {
    body #adsPopup.popup-ads {
        width: 95% !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
    
    body #adsPopup .ads-content {
        flex-direction: column !important;
    }
    
    body #adsPopup .ads-image {
        min-height: 200px !important;
        border-radius: 10px 10px 0 0 !important;
    }
    
    body #adsPopup .ads-text {
        padding: 20px !important;
    }
    
    body #adsPopup .button-container {
        margin-top: 15px !important;
    }
    
    body #adsPopup .ads-text h2 {
        font-size: 24px !important;
    }
    
    body #adsPopup .ads-text p {
        font-size: 14px !important;
    }
}

/* Animation */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

body #adsPopup.popup-ads {
    animation: popupFadeIn 0.3s ease-out forwards !important;
}

.popup-form {
    display: none;
    /* Initially hidden */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    z-index: 1000;
    width: 900px;
    max-width: 100%;
    /* Adjusted max width */
    overflow: hidden;
}

/* CSS for the text in the ad */

.ads-content .ads-text h2 {
    font-size: 2em;
}

.ads-content .ads-text p {
    font-size: 1.4em;
}

h2,
h4 {
    margin: 0 0 10px;
}

.email-input,
input[type="email"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.close-btn,
.submit-btn,
.popup-register-btn {
    background-color: #ff0000;
    border: none;
    color: white;
    padding: 8px 15px;
    /* cursor: pointer; */
    border-radius: 5px;
    margin-top: 10px;
    /* Add margin for spacing */
    width: 100%;
}

.close-btn {
    background-color: white;
    margin-right: 50px;
    transform: translateY(50px);
}

/* Popup Form Style */
.popup-form {
    width: 55%;
    height: 100%;
    overflow-y: auto;
    /* Enable vertical scrolling */
    padding: 30px;
    /* Reduced padding */
    font-size: 18px;
    /* Smaller font size */
    margin-top: 75px;
}

.section-title {
    text-align: center;
    /* Center the section titles */
    margin-bottom: 15px;
    /* Space below the title */
}

/* Image Style */
.popup-form img {
    width: 100%;
    /* Make the image responsive */
    max-height: 150px;
    /* Limit the height */
    object-fit: contain;
    /* Keep aspect ratio */
    margin-bottom: 10px;
    /* Add margin below image */
}

/* Form Section Margin */
.form-section {
    margin-bottom: 15px;
    /* Reduced margin */
}

/* Form Group Style */
.form-group {
    display: flex;
    /* Use flexbox for horizontal alignment */
    align-items: center;
    /* Center labels and inputs vertically */
    margin-bottom: 10px;
    /* Margin between fields */
}

/* Label Style */
label {
    font-size: 0.85em;
    /* Smaller label font size */
}

/* Input and Select Styles */
input[type="email"],
input[type="tel"],
input[type="date"],
select {
    width: calc(100% - 10px);
    /* Full width minus padding */
    padding: 8px;
    /* Reduced padding */
    margin: 5px 0;
    /* Reduced margin */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
    /* Smaller font size */
}

/* Button Container Style */
.button-container {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
    margin-bottom: 40px;
    gap: 20px;
}

/* Button Styles */
.close-btn,
.popup-register-btn {
    padding: 8px 10px;
    /* Reduced padding */
    font-size: 0.9em;
    /* Smaller button font size */
}

.close {
    position: fixed;
    /* Change to fixed */
    top: 20px;
    /* Adjust the distance from the top */
    right: 50px;
    /* Adjust the distance from the right */
    background-color: white;
    /* Background color */
    color: red;
    /* Text color */
    border: none;
    /* No border */
    /* cursor: pointer; Pointer cursor */
    font-size: 45px;
    /* Font size for visibility */
    z-index: 1001;
    /* Ensure it's above other elements */
    translate: 38px;
}

/* Remove hover effect */
.close:hover {
    background-color: white;
    /* No change on hover */
    color: #ff0000;
    /* No change on hover */
}

/* Footer Style */
.popup-footer {
    text-align: center;
    margin-top: 10px;
    font-size: 0.85em;
    /* Smaller footer font size */
}

/* Form Group Style */
.form-group {
    display: flex;
    /* Use flexbox for horizontal alignment */
    align-items: center;
    /* Center labels and inputs vertically */
    margin-bottom: 10px;
    /* Margin between fields */
}

/* Label Style */
label {
    width: 30%;
    /* Set a fixed width for labels */
    margin-right: 10px;
    /* Space between label and input */
    font-size: 0.85em;
    /* Smaller label font size */
}

/* Input and Select Styles */

input[type="email"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    /* Set all inputs to the same width */
    padding: 8px;
    /* Adjust padding */
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 0.9em;
    /* Smaller font size */
}

/* Ensure Button Width Matches Input Fields */
.popup-register-btn {
    width: 100%;
    /* Full width for the register button */
    padding: 10px;
    /* Padding for the button */
    font-size: 0.9em;
    /* Button font size */
}

.submit-btn:active {
    box-shadow: none;
    transform: scale(0.98);
}

.btn:focus {
    outline: none;
}

.btn.ghost {
    display: flex;
    /* Flexbox to center the text */
    justify-content: center;
    /* Center text horizontally */
    align-items: center;
    /* Center text vertically */
    background-color: #ff0000;
    border: 0;
    border-radius: 5px;
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.3);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    padding: 15px 30px;
    /* Same padding as .submit-btn */
    position: relative;
    top: 10px;
    width: 100%;
    /* Make it the same width as .submit-btn */
    height: 22%;
    /* Make it the same height as .submit-btn */
}

.btn.ghost:hover {
    background-color: #000000;

}

.btn.ghost span {
    display: none;
    background-color: #db3434;
    border: 0;
    border-radius: 5px;
    color: #fff;
    font-size: 9px;
    padding: 3px 7px;
    position: absolute;
    top: -10px;
    right: -10px;
    transform: rotate(10deg);
}

.popup img {
    width: px;
}

/* Mobile Adjustments */

@media screen and (max-width: 911px) {
    .ads-image {
        display: none;
    }

    .ads-content .ads-text h2 {
        font-size: 1.6em;
    }

    .ads-content .ads-text p {
        font-size: 1em;
    }

    h2,
    h4 {
        margin: 0 0 10px;
    }

    .popup-ads {
        width: 70%;
    }

    .ads-content {
        flex-direction: column;
    }
}