/* Color Palette */
:root {
    --dub-brown: #8B4513;
    --lightbox-cream: rgba(255, 248, 230, 0.95);
}

/* Lightbox Styles */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 20px;
    padding-bottom: 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: var(--lightbox-cream);
    animation: fadeIn 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lightbox-content {
    display: block;
    max-width: 90%;
    max-height: calc(100vh - 180px);
    object-fit: contain;
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: #333;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1000;
    background: transparent;
    border: none;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--dub-brown);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lightbox-info {
    margin: 10px auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 80%;
    max-width: 700px;
    padding: 10px 0;
    min-height: 60px;
}

.lightbox-caption {
    color: var(--dub-brown);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0;
    min-height: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

.lightbox-tags {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: nowrap;
    align-items: center;
}

.lightbox-tag {
    font-size: 2rem;
    transition: transform 0.2s ease;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    text-decoration: none !important;
    color: inherit;
}

.lightbox-tag:hover,
.lightbox-tag:focus,
.lightbox-tag:active {
    transform: scale(1.3);
    text-decoration: none !important;
    color: inherit;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #333;
    border: none;
    font-size: 2rem;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-nav:hover {
    color: var(--dub-brown);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Post image container cursor for lightbox trigger */
.post-image-container {
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .lightbox-content {
        max-height: calc(100vh - 160px);
    }

    .lightbox-nav {
        font-size: 1.5rem;
        padding: 15px;
        width: 50px;
        height: 50px;
    }

    .lightbox-info {
        flex-direction: column;
        gap: 10px;
        min-height: 80px;
    }

    .lightbox-caption {
        font-size: 1.2rem;
        white-space: normal;
        max-width: 100%;
    }

    .lightbox-tag {
        font-size: 1.5rem;
    }

    .lightbox-close {
        font-size: 30px;
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 576px) {
    .lightbox-content {
        max-height: calc(100vh - 140px);
    }

    .lightbox-nav {
        font-size: 1.2rem;
        padding: 10px;
        width: 45px;
        height: 45px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-caption {
        font-size: 1rem;
    }

    .lightbox-tag {
        font-size: 1.2rem;
    }

    .lightbox-close {
        font-size: 24px;
        bottom: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
    }
}
