/* 
   LGA Engagement Layer - Cinematic Modals & Popups
   Glassmorphism + "Apple-inspired" Aesthetics
*/

/* 1. FEATURED POST MODAL */
.engagement-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    padding: 20px;
}

.engagement-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.featured-modal-card {
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(50px) saturate(210%);
    -webkit-backdrop-filter: blur(50px) saturate(210%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    max-width: 850px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-shadow: 0 60px 120px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.05);
    transform: scale(0.9) translateY(40px);
    transition: all 0.9s cubic-bezier(0.23, 1, 0.32, 1);
}

.engagement-modal-overlay.show .featured-modal-card {
    transform: scale(1) translateY(0);
}

.modal-img-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-height: 350px;
}

.modal-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 12s linear;
}

.featured-modal-card:hover .modal-img-container img {
    transform: scale(1.1);
}

.modal-text-container {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
}

.modal-badge {
    display: inline-block;
    background: #b71c1c;
    color: white;
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    width: fit-content;
}

.modal-text-container h2 {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
    color: white;
    letter-spacing: -0.5px;
}

.modal-text-container p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 24px;
}

/* THE CLICK-BAIT BUTTON */
.modal-cta-btn {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 100px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    box-shadow: 0 10px 30px rgba(183, 28, 28, 0.4);
    animation: pulse-glow 3s infinite;
}

@keyframes pulse-glow {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(183, 28, 28, 0.7); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(183, 28, 28, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(183, 28, 28, 0); }
}

.close-engagement {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

@media (max-width: 768px) {
    .featured-modal-card { 
        flex-direction: column; 
        max-height: 90vh;
        width: 92%;
        border-radius: 24px;
        overflow-y: auto;
    }

    .modal-img-container { 
        min-height: 200px;
        max-height: 250px;
        flex: none;
    }

    .modal-text-container { 
        padding: 24px 20px; 
        text-align: center;
        align-items: center;
    }

    .modal-text-container h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }

    .modal-text-container p {
        font-size: 0.85rem;
        margin-bottom: 20px;
    }

    .modal-cta-btn {
        padding: 14px 28px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

    .close-engagement {
        top: 15px;
        right: 15px;
        width: 36px;
        height: 36px;
        background: rgba(0,0,0,0.5); /* Better visibility on top of image */
        backdrop-filter: blur(10px);
    }
}

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


.cookie-overlay {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    width: calc(100% - 40px);
    max-width: 550px;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    padding: 20px 24px;
    z-index: 11000;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
}

.cookie-overlay.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.cookie-icon { 
    font-size: 1.8rem; 
    color: #b71c1c;
    background: rgba(183, 28, 28, 0.1);
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cookie-content { flex: 1; }
.cookie-content p { color: rgba(255,255,255,0.8); font-size: 0.85rem; line-height: 1.5; margin: 0; font-weight: 500; }

.cookie-actions { display: flex; gap: 8px; }

.btn-cookie {
    background: rgba(255,255,255,0.05);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 10px 18px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.btn-cookie.primary { 
    background: #b71c1c; 
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(183, 28, 28, 0.3);
}

.btn-cookie:hover { 
    transform: translateY(-2px); 
    background: rgba(255,255,255,0.1);
}

.btn-cookie.primary:hover {
    background: #d32f2f;
    box-shadow: 0 6px 20px rgba(183, 28, 28, 0.5);
}

/* 3. iOS INSTALL HINT */
.ios-install-hint {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    padding: 18px;
    z-index: 12000;
    color: white;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transform: translateY(150%);
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.ios-install-hint.show { transform: translateY(0); }

.ios-hint-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ios-hint-header img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.ios-hint-header span {
    font-weight: 700;
    font-size: 0.95rem;
    flex: 1;
}

.ios-hint-header button {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.ios-install-hint p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 15px;
    line-height: 1.4;
}

.ios-instructions {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 14px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.ios-instructions i {
    color: #007aff; /* Apple Blue */
    margin: 0 4px;
}

