/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-image: url('../extra/Background/Background2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    padding: 2vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, transparent 30%, rgba(0,0,0,0.7) 100%);
    z-index: -1;
}

header {
    text-align: center;
    position: relative;
    color: #fff;
    z-index: 10;
}

header h1 {
    display: inline-block;
    font-size: clamp(1.8rem, 8vw, 7rem);
    color: transparent;
    background: linear-gradient(180deg,
        #ffffff 0%,
        #c8c8c8 25%,
        #a0a0a0 50%,
        #d8d8d8 75%,
        #888888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter:
        drop-shadow(0 1px 0 rgba(255,255,255,0.6))
        drop-shadow(0 2px 4px rgba(0,0,0,0.8))
        drop-shadow(0 4px 8px rgba(0,0,0,0.5));
    letter-spacing: 0.05em;
}

.back-btn,
.download-btn {
    position: absolute;
    top: 0;
    color: #ffffffaa;
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-btn { left: 0; }
.download-btn { right: 0; }

.back-btn:hover,
.download-btn:hover {
    color: #ffffff;
    transform: scale(1.15);
}

.back-btn svg,
.download-btn svg {
    width: clamp(1.5rem, 3vw, 2.5rem);
    height: clamp(1.5rem, 3vw, 2.5rem);
}

main {
    max-width: 100vw;
    margin: 0 auto;
    padding: 1vw;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 0;
}

.gallery {
    display: flex;
    align-items: center;
    gap: 1.5vw;
}

.gallery-previews {
    display: flex;
    gap: 1.5vw;
}

.image-box {
    display: block;
    width: min(100%, 28vh);
    height: 28vh;
    aspect-ratio: 1 / 1;
    background-color: #ebe3e300;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 
        0 6px 12px rgba(97, 94, 94, 0.397),
        inset 0 1px 0 rgba(255,255,255,0.4),
        inset 0 -2px 0 rgba(82, 80, 80, 0.356),
        inset 2px 0 0 rgba(255,255,255,0.2);
    border: clamp(2px, 0.4vw, 4px) solid #575f63a9;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.image-box:hover,
.image-box:focus {
    transform: scale(1.08);
    border-color: #ffffffcc;
    box-shadow: 0 12px 28px rgba(0,0,0,0.5);
    outline: none;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-more-btn {
    background: none;
    border: none;
    color: #ffffffdd;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    padding: 0.5rem;
    flex-shrink: 0;
}

.gallery-more-btn:hover {
    color: #fff;
    transform: scale(1.15);
}

.gallery-more-btn svg {
    width: clamp(2.5rem, 5vw, 4rem);
    height: clamp(2.5rem, 5vw, 4rem);
    stroke-width: 3;
}

/* Overlay */
.gallery-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 100;
    overflow-y: auto;
    padding: 2rem;
}

.gallery-overlay.open {
    display: block;
}

.gallery-overlay-close {
    position: sticky;
    top: 0;
    float: right;
    background: none;
    border: none;
    color: #ffffffaa;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 101;
}

.gallery-overlay-close:hover {
    color: #fff;
    transform: scale(1.15);
}

.gallery-overlay-close svg {
    width: 2rem;
    height: 2rem;
}

.gallery-overlay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    clear: both;
}

.gallery-overlay-grid .image-box {
    width: 100%;
    height: 200px;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

#lightbox.open {
    display: flex;
}

#lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.8);
}

#lightbox-close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #ffffffaa;
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

#lightbox-close:hover {
    color: #fff;
    transform: scale(1.2);
}


footer {
    margin-top: auto;
    text-align: center;
    font-size: clamp(0.6rem, 2.5vw, 1rem);
    padding: 1vw;
}

footer p {
    display: inline-block;
    background: rgba(255, 255, 255, 0.63);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    padding: 0.3rem 1rem;
    color: #000000;
}
