/* Gallery Feed Styles */

/* Header */
.gallery-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--text-white);
    padding: 6rem 0 3rem;
    text-align: center;
}

.gallery-header h1 {
    color: var(--text-white);
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
}

.gallery-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

/* Feed */
.gallery-feed {
    padding: 2rem 0 5rem;
    background-color: var(--bg-light);
}

.gallery-feed .container {
    max-width: 860px; /* Wider feed */
}

/* Single Column Feed Grid */
.gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Cards */
.gallery-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* Subtle social styling */
    cursor: pointer;
    transition: box-shadow 0.2s ease;
}

.gallery-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Text Header Area (Top) */
.gallery-card-header {
    padding: 1rem 1.25rem;
    background: white;
}

.gallery-card-title {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.gallery-card-caption {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap;
}

.mt-2 {
    margin-top: 0.5rem;
}

/* User Info Styles */
.gallery-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-placeholder {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.gallery-username {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Image Area */
.gallery-card-img {
    width: 100%;
    background-color: #f8f9fa;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.gallery-card-img img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 800px;
    object-fit: contain; /* Shows full image without cropping */
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.gallery-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--border);
}

.gallery-empty h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* Pagination */
.gallery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}

.pagination-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-numbers {
    display: flex;
    gap: 0.35rem;
}

.pagination-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.pagination-num:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.pagination-num.active {
    background: var(--primary);
    color: var(--text-white);
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-info {
    text-align: center;
    padding: 1rem 0 0;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0 0 0.35rem;
    line-height: 1.5;
}

.lightbox-reviewer {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Responsive columns */
@media (max-width: 1200px) {
    .gallery-grid { columns: 3; }
}

@media (max-width: 768px) {
    .gallery-header { padding: 5rem 0 2.5rem; }
    .gallery-header h1 { font-size: 2rem; }
    .gallery-grid { columns: 2; column-gap: 0.75rem; }
    .gallery-card { margin-bottom: 0.75rem; }

    .lightbox-prev, .lightbox-next {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    .lightbox-prev { left: 0.75rem; }
    .lightbox-next { right: 0.75rem; }
}

@media (max-width: 480px) {
    .gallery-grid { columns: 2; column-gap: 0.5rem; }
    .gallery-card { margin-bottom: 0.5rem; border-radius: 8px; }
    .gallery-card-info { padding: 0.5rem 0.65rem; }
    .gallery-card-caption { font-size: 0.8rem; }
    .gallery-card-reviewer { font-size: 0.72rem; }
}
