.portfolio-hero {
    background: linear-gradient(135deg, var(--primary-orange) 0%, #FF8E53 100%);
    padding: 120px 0 60px;
    color: white;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    grid-auto-flow: dense;
    gap: 12px;
}

@media (max-width: 992px) {
    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 200px;
    }
}

@media (max-width: 576px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
        gap: 8px;
    }

    .portfolio-card.span-2 {
        grid-column: span 1;
    }
}

/* Bento variety: horizontal, vertical, and big cards mixed with normal ones */
.portfolio-card.span-2 {
    grid-column: span 2;
}

.portfolio-card.span-tall {
    grid-row: span 2;
}

.portfolio-card.span-big {
    grid-column: span 2;
    grid-row: span 2;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: #f0f0f0;
}

@media (max-width: 576px) {
    .portfolio-card {
        border-radius: 8px;
    }
}

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

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

.portfolio-card .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.8), rgba(255, 142, 83, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

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

.portfolio-card .overlay i {
    color: white;
    font-size: 2rem;
    transform: scale(0.5);
    transition: transform 0.3s ease;
}

.portfolio-card:hover .overlay i {
    transform: scale(1);
}

@media (max-width: 576px) {
    .portfolio-card .overlay i {
        font-size: 1.5rem;
    }
}

/* Lazy loading placeholder */
.portfolio-card img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card img.loaded {
    opacity: 1;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#loadMoreContainer {
    min-height: 80px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 30px;
}

.filter-tab {
    padding: 8px 20px;
    border: 2px solid var(--primary-orange);
    border-radius: 25px;
    background: white;
    color: var(--primary-orange);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-tab:hover, .filter-tab.active {
    background: var(--primary-orange);
    color: white;
}

.stats-bar {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-top: -40px;
    position: relative;
    z-index: 10;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-orange);
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}
