/* =============================
   POPUP BLOG CONTROL v1.9c – compact/stabil
   ============================= */

.popup-blog-overlay {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow-y: auto;
    padding: 2vh;
}

.popup-blog-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ===== Box principal ===== */
.popup-blog-box {
    background: rgba(255, 255, 255, var(--popup-bg-opacity, 1));
    border-radius: 10px;
    width: 100%;
    max-width: min(400px, 92vw);
    text-align: center;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
    padding: 16px 14px;
    transform: translateY(25px) scale(0.98);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
                opacity 0.5s ease;
}

.popup-blog-overlay.active .popup-blog-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ===== Imagine ===== */
.popup-blog-box img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 10px;
    max-height: 45vh;
    object-fit: contain;
}

/* ===== Text ===== */
.popup-blog-box h3,
.popup-blog-box p {
    margin: 4px 0 6px 0;
    font-size: clamp(13px, 2.3vw, 16px);
    line-height: 1.3;
}

/* ===== Butoane ===== */
.popup-blog-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: nowrap;
}

.popup-blog-continue,
.popup-blog-cancel {
    flex: 0 0 auto; /* nu se mai întind */
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.25s ease, transform 0.2s ease;
}

/* ===== Buton principal ===== */
.popup-blog-continue {
    background: #0073aa;
    color: #fff;
}
.popup-blog-continue:hover {
    background: #005f8d;
    transform: translateY(-1px);
}

/* ===== Buton secundar ===== */
.popup-blog-cancel {
    background: #aaa;
    color: #fff;
    border: none;
}
.popup-blog-cancel:hover {
    background: #0073aa;
    transform: translateY(-1px);
}

/* ===== Mobile fix: doar sub 340px devin verticale ===== */
@media (max-width: 340px) {
    .popup-blog-buttons {
        flex-direction: column;
        gap: 6px;
    }
    .popup-blog-continue,
    .popup-blog-cancel {
        width: 100%;
    }
}
