/* ==========================================================================
   BASE STYLES & LAYOUT
   ========================================================================== */
body {
    background-color: orange;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0; /* Ensures masthead touches the very top */
}

#wrapper {
    width: 100%; /* Spans the entire screen */
    box-sizing: border-box;
}

#masthead {
    background-color: brown;
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 5px solid brown;
}

#content {
    max-width: 1000px; /* Constrains the photos and text */
    margin: 0 auto;    /* Centers the content block on the screen */
    padding: 30px;
    text-align: left;
}

#footer {
    background-color: brown;
    color: white;
    padding: 20px;
}

#footer table {
    max-width: 1000px;
    margin: 0 auto;
}

/* ==========================================================================
   RETURN BUTTON
   ========================================================================== */
.return-button {
    display: inline-block;
    background-color: brown;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 20px;
}
.return-button:hover {
    background-color: darkred;
}

/* ==========================================================================
   THE PHOTO GRID
   ========================================================================== */
.photo-block {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    grid-auto-flow: dense; 
    gap: 20px;
    margin: 20px 0;
}

.layout-2col { grid-column: span 1; margin: 0; }
.layout-2left { grid-column: 1; margin: 0; }
.layout-2right { grid-column: 2; margin: 0; }
.layout-center { grid-column: 1 / -1; justify-self: center; width: 65%; margin: 0; }
.layout-panorama { grid-column: 1 / -1; width: 100%; margin: 0; }
.layout-video { grid-column: 1 / -1; justify-self: center; width: 80%; margin: 0; }

.photo-block img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
}

.photo-block figcaption {
    font-size: 0.9em;
    margin-top: 8px;
    text-align: left;
}

.layout-center figcaption, .layout-video figcaption {
    text-align: center;
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
#lightbox {
    display: none; 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); 
    z-index: 9999; 
    justify-content: center; align-items: center;
    cursor: pointer; 
}
#lightbox-img {
    max-width: 90vw; max-height: 90vh; 
    object-fit: contain; 
}

/* ==========================================================================
   MOBILE STACKING
   ========================================================================== */
@media (max-width: 800px) {
    .photo-block {
        display: flex;
        flex-direction: column;
    }
    .layout-center, .layout-video { width: 100%; }
}

/* ==========================================================================
   ALBUM INDEX LIST (Front Page)
   ========================================================================== */
.album-index-list a {
    display: block;          
    margin-bottom: 15px;     
    font-size: 1.1em;        
    text-decoration: none;   
    color: #000;             
}

.album-index-list a:hover {
    text-decoration: underline; 
}