/* Popup Styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(23, 23, 23, 0.8);
    z-index: 9999;
    animation: fadeIn 0.4s ease-in-out;
}

.popup-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 95%;
    min-height: 500px;
    overflow: hidden;
    animation: slideIn 0.4s ease-out;
}

.popup-inner {
    display: flex;
    align-items: stretch;
    min-height: 500px;
}

.popup-image {
    flex: 1;
    background: linear-gradient(135deg, #EC1C23, #d41419);
    padding: 60px 40px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.popup-text {
    flex: 1;
    padding: 60px 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s;
}

.popup-close:hover {
    color: #EC1C23;
}

.popup-text h2 {
    color: #333;
    font-size: 36px;
    margin: 0 0 15px 0;
    font-weight: bold;
}

.popup-text h3 {
    color: #666;
    font-size: 24px;
    margin: 0 0 15px 0;
    font-weight: normal;
}

.price {
    color: #EC1C23;
    font-weight: bold;
    font-size: 24px;
}

.benefits {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    text-align: center;
}

.benefits li {
    color: #555;
    margin: 12px 0;
    font-size: 16px;
    font-weight: 500;
}

.popup-btn {
    display: inline-block;
    background: linear-gradient(135deg, #EC1C23, #d41419);
    color: white;
    padding: 15px 35px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(236, 28, 35, 0.3);
    margin-top: 10px;
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 28, 35, 0.4);
    color: white;
    text-decoration: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 991px) {

    /* Tablet: Side-by-side but compact */
    .popup-content {
        max-width: 850px;
        width: 95%;
        min-height: 400px;
    }

    .popup-inner {
        min-height: 400px;
        display: flex;
        flex-direction: row;
    }

    .popup-image {
        flex: 1;
        padding: 30px;
        min-height: auto;
    }

    .popup-text {
        flex: 1.2;
        padding: 40px 30px;
    }

    .popup-text h2 {
        font-size: 28px;
    }
}

@media (max-width: 600px) {

    /* Mobile: Stacked with balanced proportions */
    .popup-content {
        width: 90%;
        max-width: 400px;
        height: auto;
        max-height: 85vh;
        /* Keep it within view */
        display: flex;
        flex-direction: column;
        border-radius: 15px;
        margin: 0 auto;
    }

    .popup-inner {
        flex-direction: column;
        min-height: 0;
        height: 100%;
        overflow-y: auto;
        display: flex;
    }

    /* Header Image Section */
    .popup-image {
        flex: 0 0 auto;
        padding: 25px 20px;
        /* More breathing room */
        min-height: auto;
        justify-content: center;
        background: linear-gradient(135deg, #EC1C23, #d41419);
    }

    .popup-image img {
        max-height: 140px;
        /* Larger, clearer image */
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }

    /* Content Section */
    .popup-text {
        flex: 1 0 auto;
        padding: 25px 20px;
        text-align: center;
    }

    .popup-text h2 {
        font-size: 24px;
        margin-bottom: 5px;
        color: #333;
    }

    .popup-text h3 {
        font-size: 16px;
        margin-bottom: 12px;
        color: #666;
    }

    .price {
        font-size: 22px;
    }

    .benefits {
        margin: 15px 0;
        text-align: center;
    }

    .benefits li {
        font-size: 14px;
        margin: 8px 0;
        color: #555;
    }

    .popup-btn {
        display: inline-block;
        padding: 12px 30px;
        font-size: 15px;
        margin-top: 10px;
        width: auto;
        /* Allow button to size itself or be full width if preferred, auto looks cleaner */
        min-width: 200px;
        border-radius: 50px;
    }

    /* Close Button */
    .popup-close {
        top: 10px;
        right: 15px;
        font-size: 28px;
        color: rgba(255, 255, 255, 0.95);
        background: transparent;
        width: auto;
        height: auto;
        line-height: 1;
        box-shadow: none;
    }
}

@media (max-width: 360px) {

    /* Adjustments for very small screens (iPhone SE, etc) */
    .popup-content {
        width: 95%;
    }

    .popup-image {
        padding: 20px 15px;
    }

    .popup-image img {
        max-height: 110px;
        /* Slightly smaller but still visible */
    }

    .popup-text {
        padding: 20px 15px;
    }

    .popup-text h2 {
        font-size: 20px;
    }

    .popup-text h3 {
        font-size: 15px;
    }

    .popup-btn {
        width: 100%;
        /* Full width on tiny screens is safer */
        padding: 10px 20px;
    }
}