/**
 * Puzzle Gallery Component Styles
 * Interactive SVG puzzle gallery with clickable thumbnails
 */

.puzzle-gallery-wrapper {
    width: 100%;
    max-width: 900px;
    margin: 3rem auto;
    /* padding: 2rem; */
}

.puzzle-gallery-container {
    position: relative;
    width: 100%;
    max-width: 765px;
    margin: 0 auto;
}

/* Subtitle Display (above puzzle) */
.puzzle-subtitle-display {
    text-align: center;
    /* margin-bottom: 1rem; */
    /* min-height: 2rem; */
    position: relative;
}

.puzzle-subtitle-text {
    font-family: var(--font-body);
    font-size: 1.5rem;
    color: #333;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.puzzle-subtitle-text.active {
    display: block;
    opacity: 1;
}

/* Main Puzzle SVG */
.puzzle-gallery-svg {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 2rem;
}

.puzzle-group {
    transition: fill 0.3s ease;
}

/* Puzzle Pattern Images */
.puzzle-pattern-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.puzzle-pattern-image.puzzle-image-active {
    opacity: 1;
}

/* Thumbnail Selector */
.puzzle-thumbnails {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.puzzle-thumbnail {
    width: 120px;
    height: 120px;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.puzzle-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.puzzle-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.puzzle-thumbnail.active {
    border-color: #761004;
    box-shadow: 0 4px 16px rgba(118, 16, 4, 0.4);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .puzzle-gallery-wrapper {
        padding: 1rem;
    }

    .puzzle-subtitle-text {
        font-size: 1.2rem;
    }

    .puzzle-thumbnail {
        width: 80px;
        height: 80px;
    }
}

/* Puzzle Instructions */
.puzzle-instructions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.puzzle-instructions-text {
    font-family: var(--font-writing);
    font-size: 1.2rem;
    color: #333;
    margin: 0;
}

.puzzle-instructions-arrow {
    width: 60px;
    height: auto;
    transform: rotate(140deg) scaleX(-1);
}

@media (max-width: 480px) {
    .puzzle-subtitle-text {
        font-size: 1rem;
    }

    .puzzle-thumbnail {
        width: 60px;
        height: 60px;
    }

    .puzzle-thumbnails {
        gap: 0.5rem;
    }

    .puzzle-instructions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .puzzle-instructions-text {
        font-size: 1rem;
        text-align: center;
    }

    .puzzle-instructions-arrow {
        width: 40px;
    }
}
