/* =============================================
   MASET Popup Styles
   Modern, Attractive Popup Design
   ============================================= */

/* Popup Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.popup-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: scale(0.7) translateY(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 107, 53, 0.1);
}

/* Custom Scrollbar for Popup */
.popup-container::-webkit-scrollbar {
    width: 6px;
}

.popup-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.popup-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 3px;
}

.popup-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #e55a2b, #e0841a);
}

.popup-overlay.active .popup-container {
    transform: scale(1) translateY(0);
}

/* Popup Header */
.popup-header {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    padding: 25px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.popup-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(180deg); }
}

.popup-header h3 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
}

.popup-header .subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    margin-top: 8px;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Popup Content */
.popup-content {
    padding: 30px;
    text-align: center;
}

.popup-content .icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.popup-content .icon i {
    font-size: 36px;
    color: #ffffff;
}

.popup-content h4 {
    color: #0d3e6e;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.popup-content p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Popup Features */
.popup-features {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    flex-wrap: wrap;
}

.popup-feature {
    text-align: center;
    flex: 1;
    min-width: 120px;
    margin: 10px 5px;
}

.popup-feature .feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0d3e6e, #1e5a8a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    transition: transform 0.3s ease;
}

.popup-feature:hover .feature-icon {
    transform: translateY(-3px);
}

.popup-feature .feature-icon i {
    color: #ffffff;
    font-size: 20px;
}

.popup-feature .feature-text {
    color: #0d3e6e;
    font-size: 14px;
    font-weight: 600;
}

/* Popup Buttons */
.popup-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.popup-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #ff6b35, #f7931e);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.popup-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    color: #ffffff;
    text-decoration: none;
}

.popup-btn-secondary {
    background: transparent;
    color: #0d3e6e;
    border: 2px solid #0d3e6e;
}

.popup-btn-secondary:hover {
    background: #0d3e6e;
    color: #ffffff;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Popup Footer */
.popup-footer {
    background: #f8f9fa;
    padding: 20px 30px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.popup-footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.popup-footer .highlight {
    color: #ff6b35;
    font-weight: 600;
}

/* Responsive Design */

/* Large Desktop (1920px and up) */
@media (min-width: 1920px) {
    .popup-container {
        max-width: 600px;
    }
    
    .popup-header h3 {
        font-size: 32px;
    }
    
    .popup-content h4 {
        font-size: 28px;
    }
    
    .popup-offer {
        padding: 25px;
    }
    
    .popup-offer h5 {
        font-size: 20px;
    }
    
    .popup-offer p {
        font-size: 17px;
    }
}

/* Desktop (1200px - 1919px) */
@media (min-width: 1200px) and (max-width: 1919px) {
    .popup-container {
        max-width: 500px;
    }
}

/* Tablet Landscape (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .popup-container {
        max-width: 450px;
        width: 85%;
    }
    
    .popup-header {
        padding: 22px 28px;
    }
    
    .popup-header h3 {
        font-size: 26px;
    }
    
    .popup-content {
        padding: 28px 25px;
    }
    
    .popup-offer {
        padding: 18px;
    }
}

/* Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .popup-container {
        width: 90%;
        max-width: 400px;
        margin: 15px;
    }
    
    .popup-header {
        padding: 20px 25px;
    }
    
    .popup-header h3 {
        font-size: 24px;
    }
    
    .popup-content {
        padding: 25px 20px;
    }
    
    .popup-content h4 {
        font-size: 20px;
    }
    
    .popup-offer {
        padding: 16px;
        margin-bottom: 18px;
    }
    
    .popup-offer h5 {
        font-size: 16px;
    }
    
    .popup-offer p {
        font-size: 14px;
    }
    
    .popup-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .popup-btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Mobile Landscape (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .popup-container {
        width: 95%;
        max-width: 380px;
        margin: 10px;
    }
    
    .popup-header {
        padding: 18px 22px;
    }
    
    .popup-header h3 {
        font-size: 22px;
    }
    
    .popup-header .subtitle {
        font-size: 14px;
    }
    
    .popup-content {
        padding: 22px 18px;
    }
    
    .popup-content h4 {
        font-size: 18px;
    }
    
    .popup-offer {
        padding: 15px;
        margin-bottom: 16px;
    }
    
    .popup-offer h5 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .popup-offer p {
        font-size: 13px;
        margin-bottom: 12px;
    }
    
    .popup-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        margin-top: 25px;
    }
    
    .popup-btn {
        width: 100%;
        max-width: 260px;
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .popup-footer {
        padding: 18px 22px;
    }
    
    .popup-footer p {
        font-size: 13px;
    }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
    .popup-container {
        width: 95%;
        max-width: 350px;
        margin: 8px;
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 16px 20px;
    }
    
    .popup-header h3 {
        font-size: 20px;
    }
    
    .popup-header .subtitle {
        font-size: 13px;
    }
    
    .popup-close {
        width: 35px;
        height: 35px;
        font-size: 18px;
        top: 12px;
        right: 16px;
    }
    
    .popup-content {
        padding: 18px 14px;
    }
    
    .popup-content .icon {
        width: 50px;
        height: 50px;
        margin-bottom: 12px;
    }
    
    .popup-content .icon i {
        font-size: 24px;
    }
    
    .popup-content h4 {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .popup-offer {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .popup-offer h5 {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .popup-offer p {
        font-size: 11px;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .popup-buttons {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        margin-top: 15px;
    }
    
    .popup-btn {
        width: 100%;
        max-width: 220px;
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .popup-footer {
        padding: 14px 18px;
    }
    
    .popup-footer p {
        font-size: 11px;
    }
}

/* Extra Small Mobile (up to 375px) */
@media (max-width: 375px) {
    .popup-container {
        width: 98%;
        max-width: 320px;
        margin: 5px;
        max-height: 95vh;
    }
    
    .popup-header {
        padding: 12px 16px;
    }
    
    .popup-header h3 {
        font-size: 16px;
    }
    
    .popup-header .subtitle {
        font-size: 11px;
    }
    
    .popup-content {
        padding: 16px 12px;
    }
    
    .popup-content .icon {
        width: 45px;
        height: 45px;
        margin-bottom: 10px;
    }
    
    .popup-content .icon i {
        font-size: 20px;
    }
    
    .popup-content h4 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .popup-offer {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .popup-offer h5 {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .popup-offer p {
        font-size: 10px;
        margin-bottom: 6px;
        line-height: 1.2;
    }
    
    .popup-buttons {
        margin-top: 12px;
        gap: 5px;
    }
    
    .popup-btn {
        max-width: 200px;
        padding: 7px 14px;
        font-size: 11px;
    }
    
    .popup-footer {
        padding: 12px 16px;
    }
    
    .popup-footer p {
        font-size: 10px;
    }
}

/* Ultra-wide screens (2560px and up) */
@media (min-width: 2560px) {
    .popup-container {
        max-width: 700px;
    }
    
    .popup-header h3 {
        font-size: 36px;
    }
    
    .popup-content h4 {
        font-size: 32px;
    }
    
    .popup-offer {
        padding: 30px;
    }
    
    .popup-offer h5 {
        font-size: 22px;
    }
    
    .popup-offer p {
        font-size: 18px;
    }
    
    .popup-btn {
        padding: 15px 30px;
        font-size: 18px;
    }
}

/* Animation Classes */
.popup-fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Popup Offer Sections */
.popup-offer {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.popup-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.popup-offer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 4s ease-in-out infinite;
    opacity: 0.3;
}

.popup-offer h5 {
    position: relative;
    z-index: 2;
}

.popup-offer p {
    position: relative;
    z-index: 2;
}

.popup-offer .popup-btn {
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.popup-offer .popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Special Effects */
.popup-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b35, #f7931e, #0d3e6e, #1e5a8a);
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-container:hover::before {
    opacity: 0.1;
}

/* Loading Animation */
.popup-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.popup-loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
