<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Keeler Family Gallery - WnashTime</title>
    <link rel="icon" type="image/png" href="files/logo.png">
    <link href="https://fonts.googleapis.com/css2?family=Cairo:wght@400;600&display=swap" rel="stylesheet">
    <style>
        :root {
            --primary-red: #c50d25;
            --primary-gray: #0d1112;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Cairo', sans-serif;
            cursor: url('files/cursor.png'), auto;
        }

        body {
            background-color: var(--primary-gray);
            color: white;
        }

        header {
            background-color: var(--primary-red);
            padding: 1rem;
            text-align: center;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .mobile-menu-btn {
            display: none;
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            width: 40px;
            height: 40px;
            cursor: pointer;
        }

        .mobile-menu-btn img {
            width: 100%;
            height: 100%;
            transition: transform 0.3s ease;
        }

        .mobile-menu-btn.active img {
            transform: rotate(90deg);
        }

        .nav-menu {
            position: fixed;
            top: 0;
            left: -100%;
            width: 250px;
            height: 100vh;
            background-color: var(--primary-gray);
            padding: 2rem;
            transition: left 0.3s ease;
            z-index: 1000;
            box-shadow: 2px 0 5px rgba(0,0,0,0.2);
        }

        .nav-menu.active {
            left: 0;
        }

        .nav-menu a {
            display: block;
            color: white;
            text-decoration: none;
            padding: 1rem;
            margin: 0.5rem 0;
            border-radius: 5px;
            transition: background-color 0.3s ease;
        }

        .nav-menu a:hover {
            background-color: var(--primary-red);
        }

        .gallery-title {
            font-size: 2.5rem;
            margin: 2rem 0;
            text-align: center;
            color: var(--primary-red);
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        .gallery-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 2rem;
            padding: 2rem;
        }

        .gallery-item {
            position: relative;
            overflow: hidden;
            border-radius: 15px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .gallery-item:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 25px rgba(197, 13, 37, 0.4);
        }

        .gallery-item img {
            width: 100%;
            height: 300px;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .gallery-item:hover img {
            transform: scale(1.1);
            filter: brightness(0.7);
        }

        .gallery-item .overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
            padding: 1rem;
            color: white;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .gallery-item:hover .overlay {
            opacity: 1;
        }

        .gallery-item .view-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0);
            width: 50px;
            height: 50px;
            opacity: 0;
            transition: all 0.3s ease;
        }

        .gallery-item:hover .view-icon {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }

        .fullscreen-view {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 1000;
            justify-content: center;
            align-items: center;
        }

        .fullscreen-view.active {
            display: flex;
        }

        .fullscreen-image {
            max-width: 90%;
            max-height: 90vh;
            object-fit: contain;
        }

        .nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(197, 13, 37, 0.7);
            color: white;
            padding: 1rem;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .prev-btn {
            left: 2rem;
        }

        .next-btn {
            right: 2rem;
        }

        .close-btn {
            position: absolute;
            top: 2rem;
            right: 2rem;
            background: rgba(197, 13, 37, 0.7);
            color: white;
            width: 40px;
            height: 40px;
            border: none;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.5rem;
            transition: all 0.3s ease;
        }

        .nav-btn:hover, .close-btn:hover {
            background: var(--primary-red);
            transform: scale(1.1);
        }

        .back-btn {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            background-color: var(--primary-red);
            color: white;
            padding: 1rem 2rem;
            border: none;
            border-radius: 25px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 1.1rem;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        }

        .back-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
        }

        @media (max-width: 768px) {
            .mobile-menu-btn {
                display: block;
            }

            .gallery-grid {
                grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
                padding: 1rem;
            }

            .nav-btn {
                padding: 0.5rem;
            }

            .prev-btn {
                left: 1rem;
            }

            .next-btn {
                right: 1rem;
            }

            .close-btn {
                top: 1rem;
                right: 1rem;
            }

            .back-btn {
                bottom: 1rem;
                right: 1rem;
                padding: 0.8rem 1.5rem;
            }
        }
    </style>
</head>
<body>
    <header>
        <button class="mobile-menu-btn">
            <img src="files/more1.png" alt="Menu">
        </button>
        <h1>Keeler Family Gallery</h1>
    </header>

    <nav class="nav-menu">
        <a href="index.html">الرئيسية</a>
        <a href="about.html">من نحن</a>
        <a href="gallery.html">معرض الصور</a>
        <a href="store.html">المتجر</a>
        <a href="apps.html">التطبيقات</a>
    </nav>

    <h2 class="gallery-title">معرض صور عائلة كيلر</h2>

    <div class="gallery-grid">
        <div class="gallery-item" onclick="openFullscreen(0)">
            <img src="files/p4.jpg" alt="Family Moment">
            <img src="files/eye.png" alt="View" class="view-icon">
            <div class="overlay">
                <h3>ممتلكات العائلة</h3>
                <p>الفندق ثاني للعائلة</p>
            </div>
        </div>
        <div class="gallery-item" onclick="openFullscreen(1)">
            <img src="files/p5.jpg" alt="Family Event">
            <img src="files/eye.png" alt="View" class="view-icon">
            <div class="overlay">
                <h3>ممتلكات العائلة</h3>
                <p>القصر الثاني للعائلة</p>
            </div>
        </div>
        <div class="gallery-item" onclick="openFullscreen(2)">
            <img src="files/p6.jpg" alt="Family Gathering">
            <img src="files/eye.png" alt="View" class="view-icon">
            <div class="overlay">
                <h3>ممتلكات العائلة</h3>
                <p>كراج العائلة</p>
            </div>
        </div>


    <div class="fullscreen-view" id="fullscreenView">
        <img src="" alt="Fullscreen Image" class="fullscreen-image" id="fullscreenImage">
        <button class="nav-btn prev-btn" onclick="navigate(-1)">&#10094;</button>
        <button class="nav-btn next-btn" onclick="navigate(1)">&#10095;</button>
        <button class="close-btn" onclick="closeFullscreen()">X</button>
    </div>

    <button class="back-btn" onclick="window.location.href='index.html'">العودة للرئيسية</button>

    <script>
        const images = ['files/p1.jpg', 'files/p3.jpg', 'files/p2.jpg'];
        let currentImageIndex = 0;

        function openFullscreen(index) {
            currentImageIndex = index;
            const fullscreenView = document.getElementById('fullscreenView');
            const fullscreenImage = document.getElementById('fullscreenImage');
            fullscreenImage.src = images[index];
            fullscreenView.classList.add('active');
        }

        function closeFullscreen() {
            const fullscreenView = document.getElementById('fullscreenView');
            fullscreenView.classList.remove('active');
        }

        function navigate(direction) {
            currentImageIndex = (currentImageIndex + direction + images.length) % images.length;
            const fullscreenImage = document.getElementById('fullscreenImage');
            fullscreenImage.src = images[currentImageIndex];
        }

        // Mobile menu functionality
        const menuBtn = document.querySelector('.mobile-menu-btn');
        const menuImg = menuBtn.querySelector('img');
        const navMenu = document.querySelector('.nav-menu');

        menuBtn.addEventListener('click', () => {
            menuBtn.classList.toggle('active');
            navMenu.classList.toggle('active');
            
            if(menuBtn.classList.contains('active')) {
                menuImg.src = 'files/more2.png';
            } else {
                menuImg.src = 'files/more1.png';
            }
        });
    </script>
</body>
</html>
