/* Global Styles */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* ensures sticky footer */
    margin: 0;
    background: url('textures/parchment.jpg') repeat; /* default background, can override per page */
    font-family: 'Courier New', monospace;
    color: #f0e6d2;
}

main {
    flex: 1; /* take up remaining space above footer */
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 20px;
    background-color: #8B5A2B; /* Brown header */
    border-bottom: 4px solid #b89b56;
}

.header2 {
    text-align: center;
    padding: 20px;
    background: url('textures/rock.jpg') repeat;
    border-bottom: 4px solid #b89b56;
}

.header h1 {
    font-size: 48px;
    color: #ffcc00; /* Bright yellow for contrast */
    text-shadow: 2px 2px #000;
    margin: 0;
}

.header p {
    margin: 5px 0 0 0;
    color: #f0e6d2;
}

/* Navigation Bar */
nav ul {
    list-style: none;
    background-color: #222; /* dark nav background */
    padding: 0;
    display: flex;
    justify-content: center;
    margin: 0;
}

nav li {
    margin: 0 15px;
}

nav a {
    color: #f0e6d2;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border: 2px solid #b89b56; /* gold RPG-style border */
}

nav a:hover {
    background-color: #b89b56;
    color: #000;
}

/* Main content boxes */
.intro, .latest-blog, .latest-gallery, .blog-entry {
    background-color: rgba(0,0,0,0.6); /* semi-transparent black */
    border: 2px solid #b89b56; /* gold border */
    padding: 15px;
    margin-bottom: 20px;
}

.blog-post {
    background-color: rgba(0,0,0,0.6); /* semi-transparent black */
    border: 2px solid #b89b56; /* gold border */
    padding: 15px;
    margin-bottom: 20px;

}

.blog-snippet h4 {
    margin: 0;
}

/* Gallery-specific */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
}

.gallery-grid img {
    width: 100%;
    cursor: pointer;
    border: 2px solid #b89b56;
    box-shadow: 2px 2px 0 #000;
    image-rendering: pixelated;
    transition: transform 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

.button-row {
    text-align: center;
    margin: 12px 0 6px 0;
}

.button-row img {
    margin: 2px;
    image-rendering: pixelated;
    pointer-events: none; /* guarantees no clicking */
}


/* Lightbox */
#lightbox {
    visibility: hidden;
    opacity: 0;
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none; /* disables interaction when hidden */
}

#lightbox.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto; /* enables interaction when visible */
}

.lightbox-content {
    text-align: center;
    max-width: 90%;
    max-height: 90%;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh; /* fit viewport height */
    border: 3px solid #b89b56;
    image-rendering: pixelated;
    box-shadow: 2px 2px 0 #000;
}

#lightbox-caption {
    margin-top: 10px;
    padding: 8px;
    background-color: rgba(139, 90, 43, 0.9); /* brown RPG panel background */
    border: 2px solid #b89b56; /* gold border */
    color: #f0e6d2;
    font-family: 'Courier New', monospace;
    font-size: 16px;
}

/* Sticky Footer */
footer {
    text-align: center;
    background-color: #222;
    color: #f0e6d2;
    padding: 10px 0;
    border-top: 4px solid #b89b56; /* gold top border */
    border-bottom: 4px solid #b89b56; /* optional bottom border for RPG feel */
    font-family: 'Courier New', monospace;
}
