/* =========================================
   POPUP ADVERTISEMENT OVERLAY (THE MAST VERSION)
   ========================================= */

/* Overlay Container - Forces top layer */
#popup-ad-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important; /* Theme header se upar rakhne ke liye */
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 1rem !important;
    
    /* Smooth Fade Transition */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Show State */
#popup-ad-overlay.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Dark Blurred Background */
#popup-ad-bg {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, 0.85) !important; /* Thoda darker for focus */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1;
}

/* The Main Modal Card */
#popup-ad-modal {
    position: relative !important;
    z-index: 210 !important;
    width: 100%;
    max-width: 800px; /* Thoda wider desktop ke liye */
    
    /* Glassy Dark Theme */
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-top: 1px solid rgba(6, 182, 212, 0.3) !important; /* Top glow border */
    border-radius: 1.25rem !important;
    
    /* Deep Glow Shadow */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 20px rgba(6, 182, 212, 0.15) !important;
    
    overflow: hidden;
    
    /* Entry Animation (Pop up effect) */
    transform: translateY(30px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy effect */
}

#popup-ad-overlay.show #popup-ad-modal {
    transform: translateY(0) scale(1) !important;
}

/* Close Button - Stylish Circle */
#popup-ad-close {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 220 !important;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(0, 0, 0, 0.3);
    color: #cbd5e1; /* Text-Secondary */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    
    display: flex !important;
    align-items: center;
    justify-content: center;
    
    transition: all 0.3s ease;
}

#popup-ad-close:hover {
    background: #ef4444 !important; /* Red on hover */
    color: white !important;
    border-color: #ef4444;
    transform: rotate(90deg);
}

/* Content Grid Layout */
.popup-ad-grid {
    display: grid;
    grid-template-columns: 1fr;
}

/* Desktop layout adjustment */
@media (min-width: 768px) {
    .popup-ad-grid[data-count="2"] {
        grid-template-columns: 1.2fr 1fr; /* Image thodi badi, content compact */
    }
}

/* Ad Image Area */
.popup-ad-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 250px;
}

.popup-ad-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    transition: transform 0.5s ease;
}

/* Subtle Zoom on Modal Hover */
#popup-ad-modal:hover .popup-ad-image {
    transform: scale(1.05);
}

/* Content Area */
.popup-ad-content {
    padding: 2.5rem 2rem !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.popup-ad-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #06b6d4; /* Primary Color */
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.popup-ad-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem !important;
    line-height: 1.2;
    font-weight: 700 !important;
    color: #f8fafc !important; /* Text Primary */
    margin-bottom: 1rem !important;
}

.popup-ad-description {
    color: #94a3b8 !important; /* Text Tertiary */
    font-size: 1rem !important;
    line-height: 1.6;
    margin-bottom: 2rem !important;
}

/* NEW: CTA Button Style (Optional but recommended) */
.popup-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    color: white !important;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.popup-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.5);
}

/* Mobile Fixes */
@media (max-width: 640px) {
    #popup-ad-modal {
        max-width: 95% !important;
        overflow-y: auto;
        max-height: 85vh; /* Prevent cut-off on small phones */
    }
    .popup-ad-image {
        height: 200px !important;
    }
    .popup-ad-content {
        padding: 1.5rem !important;
        text-align: center;
    }
    .popup-cta-btn {
        width: 100%; /* Full width button on mobile */
    }
}


/* =========================================
   HERO ADDON STYLES (Optimized)
   ========================================= */

.hero-addon-container {
    display: inline-flex !important;
    align-items: center;
    gap: 1rem;
    
    /* Glass Effect */
    background: rgba(30, 41, 59, 0.6) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    
    border: 1px solid rgba(148, 163, 184, 0.15);
    padding: 0.5rem 1.5rem !important;
    border-radius: 9999px !important;
    margin-bottom: 2rem !important;
    
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
                
    animation: fadeInDown 0.8s ease-out;
}

/* Hover Effect on container */
.hero-addon-container:hover {
    border-color: rgba(6, 182, 212, 0.3); /* Subtle primary color glow */
    background: rgba(30, 41, 59, 0.8) !important;
}

.hero-addon-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #cbd5e1; /* Text Secondary */
    border-right: 1px solid rgba(148, 163, 184, 0.2);
    padding-right: 1rem;
    margin-right: 0.5rem;
}

.hero-addon-links {
    display: flex !important;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-addon-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #06b6d4; /* Primary */
    text-decoration: none !important;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.hero-addon-link:hover {
    color: #22d3ee; /* Lighter Primary */
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.4); /* Glow Text */
    transform: translateY(-1px);
}

.hero-addon-icon {
    font-size: 1.1rem;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .hero-addon-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        border-radius: 1rem !important;
        padding: 1rem !important;
        gap: 0.75rem;
        width: 100%;
        max-width: 100%;
    }
    
    .hero-addon-title {
        border-right: none !important;
        padding-right: 0 !important;
        border-bottom: 1px solid rgba(148, 163, 184, 0.2);
        padding-bottom: 0.5rem;
        width: 100%;
        display: block;
    }
}