﻿/* ========================================
   Image Gallery Page Styles - Featured Layout
   Separate from video gallery styles
   RTL/LTR handled via CSS logical properties
   ======================================== */

/* Image Gallery Specific Container */
.image-gallery-page {
    background: var(--white);
    min-height: 100vh;
}

/* Image Gallery Header */
.image-gallery-header {
    padding: var(--spacing-4) 0;
    text-align: start;
}

/* Image Gallery Section */
.image-gallery-section {
    padding-block-end: var(--spacing-5);
}

/* Featured Gallery Layout - Thumbnails Left, Large Image Right */
.image-gallery-featured {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 16px;
    margin-block-end: var(--spacing-4);
}

/* Thumbnails Column - Left Side */
.image-gallery-thumbnails {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Individual Thumbnail */
.image-gallery-thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

    .image-gallery-thumbnail:hover {
        transform: scale(1.02);
        box-shadow: var(--shadow-md);
    }

    .image-gallery-thumbnail:focus-visible {
        outline: 2px solid var(--primary-color);
        outline-offset: 4px;
    }

/* Thumbnail Image */
.image-gallery-thumbnail__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background-color: var(--gray-200);
}

/* Counter Overlay for Last Thumbnail (+16) */
.image-gallery-thumbnail__counter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: var(--font-weight-bold);
}

/* Featured Image - Right Side */
.image-gallery-featured-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--gray-200);
    max-height: 430px;
}

.image-gallery-featured-image__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover Overlay with Eye Icon */
.image-gallery-thumbnail__hover-overlay,
.image-gallery-featured-image__hover-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.image-gallery-thumbnail:hover .image-gallery-thumbnail__hover-overlay,
.image-gallery-featured-image:hover .image-gallery-featured-image__hover-overlay {
    opacity: 1;
}

/* Eye Icon - Shared for thumbnails and featured */
.image-gallery__eye-icon {
    width: 56px;
    height: 56px;
    padding: 12px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-fast);
}

.image-gallery-thumbnail:hover .image-gallery__eye-icon,
.image-gallery-featured-image:hover .image-gallery__eye-icon {
    transform: scale(1.1);
}

.image-gallery__eye-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--primary-color);
}

/* Smaller eye icon for thumbnails */
.image-gallery-thumbnail .image-gallery__eye-icon {
    width: 40px;
    height: 40px;
    padding: 8px;
}

    .image-gallery-thumbnail .image-gallery__eye-icon svg {
        width: 20px;
        height: 20px;
    }

/* No Results */
.image-gallery-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-5);
    text-align: center;
}

.image-gallery-no-results__icon {
    width: 64px;
    height: 64px;
    stroke: var(--gray-300);
    margin-block-end: var(--spacing-3);
}

.image-gallery-no-results__text {
    font-family: var(--font-primary);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    color: var(--gray-600);
    margin: 0;
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 1024px) {
    .image-gallery-featured {
        grid-template-columns: 180px 1fr;
        gap: 12px;
    }

    .image-gallery-thumbnails {
        gap: 12px;
    }
}
@media (max-width: 768px) {
    /* Stack layout vertically */
    .image-gallery-featured {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    /* Featured image first */
    .image-gallery-featured-image {
        order: 1;
        max-height: 360px;
    }

    /* Thumbnails under featured image */
    .image-gallery-thumbnails {
        order: 2;
        display: flex;
        flex-direction: row;
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    /* Thumbnails sizing for horizontal scroll */
    .image-gallery-thumbnail {
        flex: 0 0 140px;
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 768px) {

    .image-gallery__eye-icon {
        width: 48px;
        height: 48px;
        padding: 10px;
    }

        .image-gallery__eye-icon svg {
            width: 24px;
            height: 24px;
        }

    .image-gallery-thumbnail .image-gallery__eye-icon {
        width: 36px;
        height: 36px;
        padding: 8px;
    }

        .image-gallery-thumbnail .image-gallery__eye-icon svg {
            width: 18px;
            height: 18px;
        }
}

@media (max-width: 480px) {
    .image-gallery-thumbnail {
        min-width: 100px;
    }

    .image-gallery-thumbnail__counter {
        font-size: 22px;
    }
}
