@charset "utf-8";
/* CSS Document */
    /* --- CSS RESET & BASE STYLES --- */
        * { box-sizing: border-box; margin: 0; padding: 0; }
 

        /* --- GALLERY GRID STYLES --- */
        /* The 'array of images' layout - responsive grid */
        .gallery-container {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(min(33%, 270px), 1fr));
            gap: 20px;
            max-width: 1280px;
            margin: 0 auto;
        }

        /* For 'scrollable line' mode, you could use:
           display: flex; overflow-x: auto; padding-bottom: 15px; 
        */

        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
            background: #ddd;
            cursor: pointer;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            aspect-ratio: 4 / 3;
        }

        .gallery-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.2);
        }

        .gallery-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* Caption Styling */
        .gallery-caption {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0,0,0,0.7));
            color: white;
            padding: 15px;
            font-size: 0.9rem;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .gallery-item:hover .gallery-caption {
            opacity: 1;
        }

        /* --- LIGHTBOX (FULLSCREEN) STYLES --- */
        .lightbox {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.95);
            display: none; /* Hidden by default */
            justify-content: center;
            align-items: center;
            z-index: 10001;
            user-select: none;
            touch-action: manipulation;
        }

        .lightbox.active {
            display: flex;
        }

        .lightbox-content {
            position: relative;
            max-width: 90%;
            max-height: 85%;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .lightbox-image {
            max-width: 100%;
            max-height: 80vh;
            object-fit: contain;
            box-shadow: 0 0 30px rgba(0,0,0,0.5);
        }

        .lightbox-caption {
            color: white;
            margin-top: 15px;
            font-size: 1.2rem;
            text-align: center;
        }

        /* Navigation Buttons */
        .lightbox-btns {
            position: absolute;
            background: rgba(255, 255, 255, 0.2);
            color: #c0c0c0 !important;
            box-shadow: inset 0 0 0 2px #c0c0c0;
            border: none;
            width: 40px;
            height: 40px;
            padding: 0;
            border-radius: 30%;
            cursor: pointer;
            font-size: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1; /* Requirement 8: Centering fix */
            transition: background 0.3s ease;
            z-index: 10002;
        }

        .lightbox-btns:hover {
            background: rgba(255,  Achievable, 0.4);
        }

        /* Position buttons on sides */
        .btns-prev { left: 20px; top: 50%; transform: translateY(-50%); }
        .btns-next { right: 20px; top: 50%; transform: translateY(-50%); }
        .btns-close { 
            top: 20px; 
            right: 20px; 
            width: 40px; 
            height: 40px;
			background: rgba(255, 255, 255, 0.2);
			font-size: 24px;
        }

        /* Mobile Specific Adjustments */
        @media (max-width: 600px) {
            .lightbox-btns {
                width: 40px;
                height: 40px;
                font-size: 18px;
            }
            
            /* Hide buttons on mobile to rely on edge taps as requested */
            .btns-prev, .btns-next {
                display: none; 
            }

            /* We will implement the "Tap edges of image" via JS logic */
        }