
/*
============================================================
Project     : Madhurima Mindscape
File Name   : picture-gallery.css
Author      : Madhurima Rawat
Created On  : 25 November 2026

Description :
    Defines the visual presentation and responsive styling
    of the Picture Gallery.

    Features:
    - Gallery-specific layout, spacing, and alignment
    - Lightweight glassmorphic container with frosted effects
    - Subtle lavender glow and ambient shadow effects
    - Centered, evenly spaced image thumbnail arrangement
    - Rounded, borderless image badges
    - Smooth hover transitions and interactive animations
    - Theme-aware text and accent colors
    - Responsive layouts for desktop, tablet, and mobile
    - Keyboard focus visibility and reduced-motion support

Dependencies :
    HTML : Images_Gallery.html
    JS   : js/picture-gallery.js

Usage :
    Include this stylesheet through the Picture Gallery
    layout or directly in the corresponding HTML page.

============================================================
*/


/* ==========================================================
   01. Global Paragraph Typography
   ========================================================== */

/* Establishes consistent alignment and typography for
   paragraph text within the gallery page. */

p {
    text-align: center;
    font-size: 0.8em;
}


/* ==========================================================
   02. Main Gallery Container
   ========================================================== */

/* Creates the primary gallery wrapper with a subtle,
   translucent glass appearance and spacious layout. */

.gallery-shell {
    font-family: Arial, sans-serif;
    color: var(--text-color, #333);

    width: 80%;
    max-width: 1250px;
    min-height: 350px;

    /* Centers the gallery and provides surrounding space. */
    margin: 55px auto 70px;
    padding: 32px;

    /* Adds a delicate layered background that blends
       naturally with the website's existing theme. */
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.055),
            rgba(196, 181, 253, 0.025),
            rgba(255, 255, 255, 0.045));

    border: none;
    border-radius: 28px;

    /* Applies a lightweight frosted-glass appearance. */
    backdrop-filter: blur(16px) saturate(125%);
    -webkit-backdrop-filter: blur(16px) saturate(125%);

    /* Creates a soft lavender ambience without
       overpowering the surrounding page design. */
    box-shadow:
        0 8px 30px rgba(31, 20, 65, 0.045),
        0 0 20px rgba(167, 139, 250, 0.055),
        0 0 45px rgba(167, 139, 250, 0.025),
        inset 0 1px 2px rgba(255, 255, 255, 0.10);

    /* Smoothly transitions the container's visual effects. */
    transition:
        background 0.4s ease,
        box-shadow 0.4s ease;
}


/* ==========================================================
   03. Gallery Container Interaction
   ========================================================== */

/* Slightly enhances the glass effect and lavender glow
   when the user interacts with the gallery container. */

.gallery-shell:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.075),
            rgba(196, 181, 253, 0.035),
            rgba(255, 255, 255, 0.055));

    box-shadow:
        0 10px 35px rgba(31, 20, 65, 0.055),
        0 0 25px rgba(167, 139, 250, 0.075),
        inset 0 1px 2px rgba(255, 255, 255, 0.13);
}


/* ==========================================================
   04. Gallery Thumbnail Grid
   ========================================================== */

/* Arranges image badges in a flexible, centered layout.
   Automatically wraps thumbnails onto additional rows
   when the available horizontal space becomes limited. */

.gallery-grid {
    display: flex;
    flex-wrap: wrap;

    justify-content: center;
    align-items: center;

    gap: 20px;
    width: 100%;
}


/* ==========================================================
   05. Individual Image Badges
   ========================================================== */

/* Styles each clickable thumbnail wrapper with rounded
   corners, a translucent lavender background, and
   a gentle ambient glow. */

.gallery-item {
    display: block;

    width: 105px;
    height: 105px;
    flex: 0 0 105px;

    padding: 7px;
    overflow: hidden;

    background: rgba(167, 139, 250, 0.07);

    border: none;
    outline: none;

    border-radius: 22px;
    text-decoration: none;

    /* Adds depth through soft outer and inner shadows. */
    box-shadow:
        0 4px 12px rgba(167, 139, 250, 0.12),
        0 0 12px rgba(167, 139, 250, 0.12),
        inset 0 0 12px rgba(167, 139, 250, 0.05);

    /* Enables smooth movement and visual transitions. */
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}


/* ==========================================================
   06. Image Badge Hover Interaction
   ========================================================== */

/* Adds a gentle floating and enlarging effect to
   thumbnails while intensifying their lavender glow. */

.gallery-item:hover {
    transform: translateY(-6px) scale(1.07);

    background: rgba(167, 139, 250, 0.13);

    box-shadow:
        0 7px 18px rgba(167, 139, 250, 0.22),
        0 0 22px rgba(167, 139, 250, 0.25),
        0 0 38px rgba(167, 139, 250, 0.12);
}


/* ==========================================================
   07. Image Thumbnail Presentation
   ========================================================== */

/* Ensures images completely fill their badges while
   maintaining consistent dimensions and rounded corners. */

.gallery-item img {
    display: block;

    width: 100%;
    height: 100%;

    /* Crops images proportionally without distortion. */
    object-fit: cover;

    border: none;
    outline: none;

    border-radius: 16px;

    /* Provides a subtle glow around each thumbnail. */
    box-shadow:
        0 3px 10px rgba(167, 139, 250, 0.12);

    transition:
        transform 0.35s ease,
        filter 0.35s ease,
        box-shadow 0.35s ease;
}


/* ==========================================================
   08. Image Hover Enhancement
   ========================================================== */

/* Adds a slight zoom, brightness, and saturation boost
   to create a more engaging thumbnail interaction. */

.gallery-item:hover img {
    transform: scale(1.09);

    filter: brightness(1.08) saturate(1.12);

    box-shadow:
        0 0 14px rgba(167, 139, 250, 0.3);
}


/* ==========================================================
   09. Keyboard Accessibility
   ========================================================== */

/* Makes the currently focused gallery badge visually
   identifiable when navigating with a keyboard. */

.gallery-item:focus-visible {
    outline: 2px solid var(--accent-color, #a78bfa);
    outline-offset: 4px;
    border-radius: 22px;
}


/* ==========================================================
   10. Gallery Status and Error Messages
   ========================================================== */

/* Centers informational messages displayed when gallery
   images are unavailable or an error occurs. */

#message {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-color, #555);
}


/* ==========================================================
   11. Responsive Layout — Tablets and Small Screens
   ========================================================== */

/* Adjusts container dimensions, thumbnail sizes, and
   spacing to maintain a balanced layout on tablets. */

@media (max-width: 768px) {

    p {
        font-size: 0.7em;
    }

    .gallery-shell {
        width: 82%;
        margin: 25px auto;
        padding: 22px 15px;
        border-radius: 20px;
    }

    .gallery-grid {
        justify-content: center;
        gap: 15px;
    }

    .gallery-item {
        width: 92px;
        height: 92px;
        flex-basis: 92px;
        padding: 7px;
        border-radius: 19px;
    }

    .gallery-item img {
        border-radius: 14px;
    }

}


/* ==========================================================
   12. Responsive Layout — Mobile Devices
   ========================================================== */

/* Further reduces thumbnail dimensions and container
   spacing to accommodate narrow mobile displays. */

@media (max-width: 480px) {

    p {
        font-size: 0.6em;
    }

    .gallery-shell {
        width: 84%;
        margin: 18px auto;
        padding: 18px 10px;
    }

    .gallery-grid {
        gap: 12px;
    }

    .gallery-item {
        width: 78px;
        height: 78px;
        flex-basis: 78px;
        padding: 6px;
        border-radius: 17px;
    }

    .gallery-item img {
        border-radius: 12px;
    }

}


/* ==========================================================
   13. Reduced Motion Accessibility
   ========================================================== */

/* Respects the user's operating-system motion preferences
   by disabling decorative transitions and hover movement. */

@media (prefers-reduced-motion: reduce) {

    .gallery-item,
    .gallery-item img {
        transition: none;
    }

    .gallery-item:hover,
    .gallery-item:hover img {
        transform: none;
    }

}
