/**
 * Solution Illustrations - Animation Styles
 * anonymize.solutions v1.4.21
 *
 * Features:
 * - Small preview thumbnail (15% width)
 * - Click to open in popup overlay
 * - Fade in on scroll
 */

/* ==========================================================================
   BASE: Preview Thumbnail (15% width)
   ========================================================================== */

.solution-illustration {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    position: relative;
    margin: 16px auto 24px;
    max-width: 15%;
    min-width: 120px;
    cursor: pointer;
}

.solution-illustration.visible {
    opacity: 1;
    transform: translateY(0);
}

.solution-illustration img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--warm-gray, #E8E6E1);
    border-radius: 6px;
    background: #FAFAF8;
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.solution-illustration:hover img {
    box-shadow: 0 4px 16px rgba(43, 90, 76, 0.2);
    border-color: var(--deep-teal, #2B5A4C);
    transform: scale(1.05);
}

/* Click hint */
.solution-illustration::after {
    content: 'Click to enlarge';
    display: block;
    margin-top: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    color: var(--graphite, #3D3D3D);
    opacity: 0.5;
    text-align: center;
}

/* ==========================================================================
   POPUP OVERLAY
   ========================================================================== */

.illustration-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.95);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.illustration-popup-overlay.active {
    display: flex;
}

.illustration-popup-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.illustration-popup-content img {
    display: block;
    width: 80vw;
    max-width: 1200px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    background: #FAFAF8;
    border: 2px solid rgba(255,255,255,0.1);
}

/* Close button */
.illustration-popup-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: #2B5A4C;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}

.illustration-popup-close:hover {
    background: #C4A35A;
    transform: scale(1.1);
}

.illustration-popup-close::before,
.illustration-popup-close::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: white;
}

.illustration-popup-close::before {
    transform: rotate(45deg);
}

.illustration-popup-close::after {
    transform: rotate(-45deg);
}

/* Popup hint */
.illustration-popup-hint {
    margin-top: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 768px) {
    .solution-illustration {
        max-width: 50%;
        min-width: 150px;
    }

    .solution-illustration::after {
        content: 'Tap to enlarge';
    }

    .illustration-popup-content img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .illustration-popup-close {
        top: -45px;
        right: -5px;
    }
}

/* ==========================================================================
   TABLET
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .solution-illustration {
        max-width: 25%;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .solution-illustration,
    .solution-illustration img {
        transition: none;
        transform: none;
    }

    .solution-illustration {
        opacity: 1;
    }
}

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
    .solution-illustration {
        opacity: 1;
        transform: none;
        max-width: 100%;
    }

    .solution-illustration::after {
        display: none;
    }

    .illustration-popup-overlay {
        display: none !important;
    }
}
