
/* Modern CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #bca69f 0%, #39271c 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;

    @media (max-width: 768px) {
        padding: 15px;
    }
}

/* Gallery Widget - Self-contained component */
.gallery-widget {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgb(255, 149, 71);
    max-width: 750px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;

    /* Loading Animation */
    opacity: 0;
    animation: slideUp 0.6s ease forwards;

    @media (max-width: 768px) {
        margin: 0;
        border-radius: 15px;
    }

    .main-display {
        position: relative;
        background: #f8f9fa;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .main-image-wrapper {
        height: 500px;
        background: #39271c;
        flex-shrink: 0;
        padding: 0.75rem;
        display: flex;

        @media (max-width: 768px) {
            height: initial;
            aspect-ratio: 3 / 2;
        }
    }

    .main-image {
        flex: 1;
        width: 100%;
        object-fit: cover;
        transition: opacity 0.3s ease;
        border-radius: 8px;
    }

    .main-image-info {
        padding: 2rem;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        flex-shrink: 0;

        @media (max-width: 768px) {
            padding: 1.5rem;
        }
    }

    .main-title {
        font-size: 1.8rem;
        color: #2c3e50;
        font-weight: 600;

        @media (max-width: 768px) {
            font-size: 1.5rem;
        }
    }

    .main-description {
        color: #39271c;
        line-height: 1.6;
        font-size: 1rem;

        @media (max-width: 768px) {
            font-size: 0.9rem;
        }

        p {
            margin: 0 0 1rem 0;

            &:last-child {
                margin-bottom: 0;
            }
        }
    }

    .thumbnail-container {
        padding: 1.5rem;
        background: white;
        border-top: 1px solid #e9ecef;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;

        @media (max-width: 768px) {
            padding: 1rem;
        }
    }

    .thumbnails {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        padding: 0.5rem 0;
        align-items: center;
        justify-content: flex-start;
    }

    .thumbnail {
        flex-shrink: 0;
        width: 90px;
        aspect-ratio: 3 / 2;
        border-radius: 8px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
        border: 3px solid transparent;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;

        @media (max-width: 768px) {
            width: 75px;
            aspect-ratio: 3 / 2;
        }

        &:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        &.active {
            border-color: #667eea;
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
        }

        &:focus {
            outline: 3px solid #4dabf7;
            outline-offset: 2px;
        }

        img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            transition: opacity 0.2s ease;
        }

        &:not(.active) img {
            opacity: 0.7;
        }

        &.active img {
            opacity: 1;
        }
    }
}

/* Animation Keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
