/* /mediawiki/resources/styles/gallery.css */

/* Override body for gallery */
body {
    padding: 20px 0 60px; /* Top & bottom padding only */
    background-color: #121212;
    background-image: url('../backgrounds/SinisterCruz2.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-blend-mode: color-dodge;
    background-attachment: fixed;
}

/* Gallery page specific layout */
h1 {
    text-align: center;
    font-family: 'GothicTitle', sans-serif;
    font-size: 2.8em;
    margin-bottom: 30px;
    flex-shrink: 0;
}

h2 {
    font-family: 'GothicTitle', sans-serif;
    font-size: 1.8em;
    color: #f0f0f0;
    margin-bottom: 10px;
    border-bottom: 1px solid #555;
    padding-bottom: 5px;
}

a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

a:hover {
    color: #f39c12;
}

footer {
    left: 0;
    padding-left: 0;
    padding-right: 0;
}

.container {
    padding: 0 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.gallery-item {
    text-align: center;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;        /* or 3 / 2, or whatever ratio fits best */
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    height: auto;              /* Remove if you had fixed height before */
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.caption {
    margin-top: 8px;
    font-size: 16px;
    color: #ccc;
    word-break: break-word;
}

.lightbox {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 999;
    flex-direction: column;

    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
    transition: transform 0.2s ease;
}
