/* ============================================
   ADVANCED GALLERY STYLES
   Tell Projects - Houston TX
   ============================================ */

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    padding: 0 20px;
}

.filter-btn {
    padding: 12px 24px;
    background: var(--bg-card);
    border: 2px solid var(--accent-gold-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gold-primary);
    color: var(--bg-dark);
    border-color: var(--gold-primary);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* Gallery Counter */
.gallery-count {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.gallery-count span {
    color: var(--gold-primary);
    font-weight: 600;
}

/* Gallery Masonry Grid */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    grid-auto-rows: auto;
    gap: 25px;
    padding: 0 10px;
    align-items: start;
}

/* Gallery Card */
.gallery-card {
    position: relative;
    border-radius: 15px;
    overflow: visible;
    cursor: pointer;
    background: var(--bg-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: auto;
    min-height: auto;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

/* Gallery Card Overlay */
.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

/* Zoom Icon */
.gallery-card-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: var(--gold-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
}

.gallery-card:hover .gallery-card-zoom {
    transform: translate(-50%, -50%) scale(1);
}

.gallery-card-zoom i {
    color: var(--bg-dark);
    font-size: 1.4rem;
}

/* Project Info */
.project-info {
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-card:hover .project-info {
    transform: translateY(0);
}

.project-info h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.project-info .project-location,
.project-info .project-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    margin-right: 15px;
}

.project-info .project-location {
    color: var(--gold-primary);
}

.project-info .project-type {
    color: var(--text-muted);
}

.project-info i {
    font-size: 0.8rem;
}

/* ============================================
   LIGHTBOX STYLES - IMPROVED DESIGN
   ============================================ */

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.98);
    backdrop-filter: blur(15px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(209, 160, 4, 0.3);
    border: 3px solid rgba(209, 160, 4, 0.5);
}

/* Lightbox Details */
.lightbox-details {
    background: linear-gradient(135deg, #0f2340 0%, #1a2f4f 100%);
    padding: 30px 40px;
    border-radius: 20px;
    margin-top: 25px;
    text-align: center;
    border: 2px solid rgba(209, 160, 4, 0.5);
    min-width: 350px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-details h3 {
    color: #ffffff;
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.lightbox-details p {
    color: #e0e0e0;
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.6;
}

.lightbox-details p i {
    color: #d1a004;
    margin-right: 10px;
    font-size: 1.1rem;
}

.lightbox-details .btn {
    margin-top: 20px;
    background: linear-gradient(135deg, #d1a004 0%, #f4c430 100%);
    color: #0a1628;
    font-weight: 800;
    padding: 14px 32px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 6px 20px rgba(209, 160, 4, 0.4);
    transition: all 0.3s ease;
}

.lightbox-details .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(209, 160, 4, 0.6);
}

/* Lightbox Navigation */
.lightbox-close {
    position: absolute;
    top: -60px;
    right: 0;
    background: rgba(209, 160, 4, 0.2);
    border: 2px solid rgba(209, 160, 4, 0.6);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: linear-gradient(135deg, #d1a004 0%, #f4c430 100%);
    color: #0a1628;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(209, 160, 4, 0.6);
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #0f2340 0%, #1a2f4f 100%);
    border: 2px solid rgba(209, 160, 4, 0.5);
    color: #ffffff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: linear-gradient(135deg, #d1a004 0%, #f4c430 100%);
    color: #0a1628;
    border-color: #d1a004;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 10px 30px rgba(209, 160, 4, 0.6);
}

.lightbox-prev i,
.lightbox-next i {
    font-size: 1.4rem;
    font-weight: bold;
}

/* ============================================
   FILTER ANIMATION
   ============================================ */

.gallery-card.hidden {
    display: none;
}

.gallery-card.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

.gallery-card.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .gallery-filters {
        gap: 8px;
        padding: 0 15px;
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .gallery-masonry {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .gallery-card-overlay {
        padding: 20px;
    }

    .project-info h4 {
        font-size: 1rem;
    }

    .project-info .project-location,
    .project-info .project-type {
        font-size: 0.8rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-details {
        padding: 20px;
        min-width: 250px;
    }

    .lightbox-details h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .gallery-filters {
        gap: 6px;
    }

    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .gallery-masonry {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gallery-card {
        aspect-ratio: 16/10;
    }

    .gallery-card-zoom {
        width: 50px;
        height: 50px;
    }

    .lightbox-content img {
        max-height: 50vh;
    }

    .lightbox-details {
        min-width: 90vw;
    }
}

/* ============================================
   LOADING SKELETON
   ============================================ */

.gallery-card.loading {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-secondary) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   CATEGORY BADGES (Optional Enhancement)
   ============================================ */

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--gold-primary);
    color: var(--bg-dark);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.gallery-card:hover .category-badge {
    opacity: 1;
    transform: translateY(0);
}
