/* Gallery Specific Styles */
body.gallery-page {
    background-color: #0d0d0d;
    color: #e0e0e0;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

#gallery-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.gallery-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    pointer-events: none;
    /* Let clicks pass through inactive items */
}

.gallery-item.active {
    opacity: 1;
    z-index: 10;
    pointer-events: auto;
}

.gallery-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    transform: scale(1.1);
    z-index: 0;
}

.gallery-content {
    position: relative;
    text-align: center;
    z-index: 20;
    /* High z-index to stay above everything */
    max-width: 80%;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.4);
    /* Removed backdrop-filter to prevent text blurring artifacts */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0);
    /* Start at 0, animate if needed */
    opacity: 1;
    /* Default to visible, animate in JS */
}

.gallery-image {
    max-height: 70vh;
    max-width: 100%;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.gallery-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.gallery-caption {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 0.5rem;
}

/* Controls */
#gallery-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
    display: flex;
    gap: 1rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Portal Effect Mask */
.portal-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    background: black;
    clip-path: circle(0% at 50% 50%);
}