/* 
 * JeyamFlash Photography - Category Page Styles
 */

.category-header {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(10, 10, 10, 0.8) 100%);
    padding: 100px 0 80px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 80px;
}

.header-content {
    animation: fadeInUp 0.8s ease forwards;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    transition: var(--transition-fast);
}

.back-btn:hover {
    gap: 12px;
    color: var(--primary-color-hover);
}

.category-title {
    font-size: 3.5rem;
    font-family: var(--font-secondary);
    margin-bottom: 15px;
    text-transform: capitalize;
    animation: slideInDown 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.category-desc {
    font-size: 1.1rem;
    color: var(--text-color-muted);
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    background: var(--secondary-color);
    cursor: pointer;
    aspect-ratio: 3/4; /* portrait cards to better preserve faces */
    animation: scaleInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.15s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.25s; }
.gallery-item:nth-child(5) { animation-delay: 0.3s; }
.gallery-item:nth-child(6) { animation-delay: 0.35s; }

.gallery-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center; /* center subjects to reduce face clipping */
    transition: transform 0.6s var(--transition-slow);
    cursor: pointer;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(212, 175, 55, 0.1);
    backdrop-filter: blur(0px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-slow);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
    backdrop-filter: blur(8px);
}

.gallery-item:hover .gallery-item-img {
    transform: scale(1.1);
}

.expand-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-color);
    font-size: 24px;
    transition: all var(--transition-fast);
    transform: scale(0.8);
    opacity: 0;
}

.gallery-item:hover .expand-icon {
    transform: scale(1);
    opacity: 1;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    width: auto;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.3s ease;
}

.lightbox-image {
    width: auto;
    height: auto;
    max-width: 45%;
    max-height: 45%;
    object-fit: contain;
    border-radius: var(--border-radius);
    display: block;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    color: var(--primary-color-hover);
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.lightbox-prev,
.lightbox-next {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    border: none;
    color: var(--bg-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 18px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--primary-color-hover);
    transform: scale(1.1);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.lightbox-prev:disabled:hover,
.lightbox-next:disabled:hover {
    transform: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h2 {
    margin-bottom: 10px;
    color: var(--text-color);
}

.empty-state p {
    color: var(--text-color-muted);
    margin-bottom: 30px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleInUp {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-header {
        padding: 60px 0 40px;
        margin-top: 60px;
    }

    .category-title {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 28px;
    }

    .lightbox-nav {
        bottom: auto;
        top: 50%;
        transform: translateY(-50%);
        left: auto;
        right: 10px;
        flex-direction: column;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .category-title {
        font-size: 1.8rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
