/* photos.css */

/* CSS Variables - EXACT from journal.css */
:root {
    --text: #000;
    --border: #2D403E;
    --bg: #C9F0C5;
    --gradientTop: #60875C;
    --gradientBottom: #80B07B;
}

/* start dark mode styling */
@media (prefers-color-scheme: dark) {
    :root {
        --text: black;
        --border: #5a7678;
        --accent: #74C365;
        --bg: rgb(0,60,60,.8);
        --gradientBottom: rgb(0, 50, 60);
        --gradientTop: darkslategrey;
        a:link { color: lightblue; }
    }
    header {
        background: url('***dark mode banner image***');
        aspect-ratio: 16 / 9;
    }
}
/* end dark mode styling */

/* ============================================
   SIDEBAR NAVIGATION (EXACT FROM journal.css)
   ============================================ */

.sidenav {
    height: 100vh;
    width: 160px;
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border: 2px ridge var(--border);
    border-radius: 5px;
    padding: 5px;
    background: linear-gradient(var(--gradientTop), var(--gradientBottom));
}

.sidenav a {
    display: block;
    margin: 5px;
    background: linear-gradient(to right, var(--bg), var(--gradientBottom));
    border-radius: 5px;
    padding: 2px 7px;
    text-decoration: none;
    color: #000;
    transition: background 0.3s ease;
    text-align: center;
}

.sidenav a:link,
.sidenav a:visited,
.sidenav a:hover,
.sidenav a:active {
    color: #000;
}

.sidenav a:hover {
    background: linear-gradient(to right, var(--bg), var(--gradientBottom), var(--gradientTop));
}

.sidenavmid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 75%;
    overflow: hidden;
}

.sidenavmid h1 {
    font-size: 20px;
    margin: 10px 0;
    color: #fff;
    text-align: center;
}

.sidenavmid a {
    display: block;
    margin: 5px;
    background: linear-gradient(to right, var(--bg), var(--gradientBottom));
    border-radius: 5px;
    padding: 2px 7px;
    text-decoration: none;
    color: #000;
    text-align: center;
}

.sidenavmid a:link,
.sidenavmid a:visited,
.sidenavmid a:hover,
.sidenavmid a:active {
    color: #000;
}

.sidenavmid a:hover {
    background: linear-gradient(to right, var(--bg), var(--gradientBottom), var(--gradientTop));
}

/* Style page content */
.main {
    margin-left: 170px;
    padding: 0px 10px;
}

body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    color: var(--text);
}

img {
    image-rendering: -moz-crisp-edges;
    image-rendering: -o-crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    -ms-interpolation-mode: nearest-neighbor;
}

html {
    cursor: url(images/rainbow2.png), auto;
}

a {
    cursor: url(images/rainbow2link.png), auto;
}

button {
    cursor: url(images/rainbow2link.png), auto;
}

.arrow {
    position: absolute;
    top: 20px;
    left: 180px;
    z-index: 100;
}

.arrow img {
    width: 40px;
    height: auto;
    cursor: pointer;
}

.header {
    text-align: center;
    margin: 40px 0;
}

.header h1 {
    font-size: 2.5em;
    margin: 0;
}

/* Photo List Styling */
#photoList {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.phone, .hmd, .dslr, .digicam, .handy {
    display: inline-block;
    margin: 20px;
    text-align: center;
    vertical-align: top;
}

.photo-link {
    cursor: pointer;
    display: inline-block;
    transition: transform 0.2s;
    text-align: center;
}

.photo-link:hover {
    transform: scale(1.05);
}

.photo-link img {
    display: block;
    margin: 0 auto 10px;
}

/* Make all images bigger */
.phone .photo-link img,
.hmd .photo-link img,
.dslr .photo-link img,
.digicam .photo-link img,
.handy .photo-link img {
    width: 300px;
    height: auto;
}

.photo-link span {
    display: block;
    font-size: 1.2em;
    font-weight: bold;
    margin-top: 10px;
}

/* Gallery Content Styling */
#galleryContent {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.back-button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 20px;
    transition: background-color 0.2s;
}

.back-button:hover {
    background-color: #555;
}

#galleryDisplay h2 {
    text-align: center;
    font-size: 2em;
    margin: 20px 0;
}

/* Photo Grid Styling */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.photo-grid img {
    width: 100%;
    height: auto;
    transition: transform 0.2s;
}

.photo-grid img:hover {
    transform: scale(1.05);
    cursor: pointer;
}

/* Responsive Design */
@media screen and (max-height: 450px) {
    .sidenav {
        padding-top: 15px;
    }
    .sidenav a {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .main {
        margin-left: 0;
    }
    
    .sidenav {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .phone, .hmd, .dslr, .digicam, .handy {
        display: block;
        margin: 20px auto;
    }
    
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

a:hover, a:focus {
    font-style: italic;
}

a:visited {
    color: #74C365;
}