/* ===================================
   PORTFOLIO PAGE STYLES
   =================================== */

/* Portfolio Hero */
.portfolio-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 120px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.portfolio-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(247, 147, 30, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.portfolio-title {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 900;
    background: linear-gradient(135deg, var(--color-text) 0%, var(--color-accent) 50%, var(--color-accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.portfolio-subtitle {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 1;
}

.portfolio-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    position: relative;
    z-index: 1;
}

/* Gallery Section */
.gallery-section {
    padding: 60px 0 100px;
    background: var(--color-bg);
}

/* Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 12px 24px;
    background: var(--color-card);
    border: 1px solid var(--color-card-border);
    border-radius: 30px;
    color: var(--color-text-secondary);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--color-accent);
    color: var(--color-text);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-secondary));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 20px var(--color-accent-glow);
}

/* Gallery Grid - Masonry */
.gallery-grid {
    position: relative;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    break-inside: avoid;
    margin-bottom: 20px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.gallery-item-overlay h3 {
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 6px;
}

.gallery-item-overlay p {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.gallery-item-zoom {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-item-zoom {
    opacity: 1;
    transform: scale(1);
}

.gallery-item-zoom::before {
    content: '🔍';
    font-size: 16px;
}

/* Load More */
.gallery-load-more {
    text-align: center;
    margin-top: 50px;
}

.gallery-load-more .btn {
    min-width: 200px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    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: 20px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--color-accent);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-nav:hover {
    background: var(--color-accent);
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    text-align: center;
    padding: 20px;
    color: white;
}

.lightbox-caption h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

.lightbox-caption p {
    color: var(--color-text-secondary);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* CTA Section */
.portfolio-cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
    position: relative;
    overflow: hidden;
}

.portfolio-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.portfolio-cta::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(247, 147, 30, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(28px, 5vw, 42px);
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Loading Animation */
.gallery-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .portfolio-hero {
        min-height: 50vh;
        padding-top: 100px;
    }
    
    .portfolio-stats {
        gap: 30px;
    }
    
    .gallery-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .portfolio-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .gallery-filters {
        gap: 6px;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* Skeleton Loading */
.gallery-item-skeleton {
    background: linear-gradient(90deg, 
        var(--color-card) 25%, 
        var(--color-card-border) 50%, 
        var(--color-card) 75%
    );
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
