/* ==========================================================================
   Aho Image POPUP - Frontend Stylesheet
   Luxury Golden Glow Border & Premium Modal Styling
   ========================================================================== */

/* Overlay Container */
.aho-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s ease;
    padding: 20px;
    box-sizing: border-box;
}

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

/* Modal Window Container */
.aho-popup-modal {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 16px;
    background: #0d0d0d;
    padding: 6px; /* Space for the golden border glow */
    box-sizing: border-box;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Luxury Golden Glow Border Effect */
    background-image: linear-gradient(135deg, #bf953f 0%, #fcf6ba 25%, #b38728 50%, #fbf5b7 75%, #aa771c 100%);
    box-shadow: 
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 40px rgba(212, 175, 55, 0.4),
        0 0 60px rgba(179, 135, 40, 0.2),
        0 20px 40px rgba(0, 0, 0, 0.8);
    animation: ahoGoldPulse 3s infinite alternate ease-in-out;
}

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

/* Inner Container for Image */
.aho-popup-content-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: calc(90vh - 12px);
}

/* Link wrapper */
.aho-popup-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    line-height: 0;
    outline: none;
    position: relative;
    overflow: hidden;
}

.aho-popup-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: left 0.75s ease;
}

.aho-popup-link:hover::after {
    left: 150%;
}

/* Popup Image */
.aho-popup-image {
    display: block;
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.aho-popup-link:hover .aho-popup-image {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* Close Button (X) */
.aho-popup-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1a1a1a, #000000);
    border: 2px solid #fcf6ba;
    border-radius: 50%;
    color: #fcf6ba;
    font-size: 22px;
    font-weight: bold;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 4px 10px rgba(0, 0, 0, 0.5);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
}

.aho-popup-close-btn:hover {
    background: linear-gradient(135deg, #d4af37, #aa771c);
    color: #000;
    transform: scale(1.15) rotate(90deg);
    box-shadow: 
        0 0 15px rgba(255, 215, 0, 1),
        0 0 25px rgba(255, 215, 0, 0.8);
}

/* Golden Pulse Keyframe Animation */
@keyframes ahoGoldPulse {
    0% {
        box-shadow: 
            0 0 15px rgba(255, 215, 0, 0.5),
            0 0 30px rgba(212, 175, 55, 0.3),
            0 15px 30px rgba(0, 0, 0, 0.8);
    }
    100% {
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.9),
            0 0 55px rgba(212, 175, 55, 0.6),
            0 0 80px rgba(255, 223, 0, 0.3),
            0 25px 45px rgba(0, 0, 0, 0.9);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .aho-popup-modal {
        max-width: 95%;
        padding: 4px;
    }
    .aho-popup-close-btn {
        top: -12px;
        right: -12px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}
