/*
Theme Name: Opticade
Theme URI: https://dev.nathancourtney.com/opticade
Author: Nathan Courtney
Author URI: https://dev.nathancourtney.com
Description: A minimal one-page WordPress theme featuring a dynamic photo gallery with lightbox functionality.
Version: 1.0
License: GNU General Public License v2.0 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: one-page, minimal, photo-gallery, lightbox, responsive
Text Domain: opticade
*/

/* General Theme Styling */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
    text-align: center;
}

h1 {
    margin: 20px 0;
    font-size: 2.5em;
    color: #222;
}

/* Photo Grid Styling */
.photo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 20px;
}

.photo-grid img {
    height: 200px; /* Set a consistent height */
    object-fit: cover; /* Ensure images fit well */
    width: auto; /* Maintain aspect ratio */
    margin: 5px; /* Add some spacing between images */
    display: inline-block;
    border: 1px solid #ddd; /* Optional: border around images */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Lightbox Styling */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 1); /* White background with slight transparency */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it appears above all other content */
}

.lightbox img {
    height: 85%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Lightbox Close Button */
.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    color: black; /* Close button color */
    padding: 0;
}

.lightbox-close:hover {
    color: red; /* Optional: highlight on hover */
}
/* Responsive Photo Grid */
@media (max-width: 768px) {
    .photo-grid {
        flex-direction: column;
        align-items: center;
    }

    .photo-grid img {
        height: auto;
        width: 90%;
    }
}

/* Responsive Lightbox */
.lightbox img {
    max-width: 95%;
    max-height: 80%;
}

/* Lightbox Navigation Buttons */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    font-size: 20px;
    border-radius: 50%;
}

.lightbox-prev {
    left: 10px;
}

.lightbox-next {
    right: 10px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
}