/**
 * SmartWeb Portfolio Styles
 */

/* Portfolio Container */
.smartweb-portfolio {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Portfolio Filter */
.portfolio-filter {
    text-align: center;
    margin-bottom: 3rem;
}

.filter-tabs {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f3f4f6;
    border-radius: 50px;
    overflow: hidden;
}

.filter-tabs li {
    margin: 0;
}

.filter-tabs a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.filter-tabs li.active a,
.filter-tabs a:hover {
    color: #667eea;
}

.filter-tabs li.active a {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Portfolio Grid */
.portfolio-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.portfolio-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.portfolio-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.portfolio-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Portfolio Item */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.portfolio-item.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.portfolio-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Portfolio Thumbnail */
.portfolio-thumbnail {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 4/3;
}

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

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

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.placeholder-image svg {
    width: 60px;
    height: 60px;
    color: #d1d5db;
}

/* Portfolio Overlay */
.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

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

.overlay-content {
    width: 100%;
}

.portfolio-overlay .portfolio-title {
    color: white;
    margin-bottom: 0.5rem;
}

.portfolio-overlay .portfolio-title a {
    color: white;
    text-decoration: none;
}

.portfolio-categories {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.portfolio-categories span {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.75rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.portfolio-actions {
    display: flex;
    gap: 0.5rem;
}

.portfolio-actions a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: #374151;
    transition: all 0.3s ease;
}

.portfolio-actions a:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.portfolio-actions svg {
    width: 20px;
    height: 20px;
}

/* Portfolio Content */
.portfolio-content {
    padding: 1.5rem;
    background: white;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content .portfolio-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.portfolio-content .portfolio-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.3s ease;
}

.portfolio-content .portfolio-title a:hover {
    color: #667eea;
}

.portfolio-client {
    color: #667eea;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.portfolio-excerpt {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Masonry Style */
.smartweb-portfolio[data-style="masonry"] .portfolio-grid {
    display: block;
    column-count: 3;
    column-gap: 2rem;
}

.smartweb-portfolio[data-style="masonry"] .portfolio-item {
    break-inside: avoid;
    margin-bottom: 2rem;
}

.smartweb-portfolio[data-style="masonry"] .portfolio-thumbnail {
    aspect-ratio: auto;
}

/* Carousel Style */
.smartweb-portfolio[data-style="carousel"] .portfolio-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding-bottom: 1rem;
}

.smartweb-portfolio[data-style="carousel"] .portfolio-item {
    flex: 0 0 350px;
    scroll-snap-align: start;
}

/* Load More Button */
.portfolio-pagination {
    text-align: center;
    margin-top: 3rem;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-load-more.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-load-more.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* No Portfolio */
.no-portfolio {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

/* Single Portfolio */
.portfolio-single {
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-header {
    margin-bottom: 3rem;
}

.portfolio-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.portfolio-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
}

.portfolio-meta-item svg {
    width: 20px;
    height: 20px;
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 1;
}

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

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 1024px) {
    .portfolio-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .smartweb-portfolio[data-style="masonry"] .portfolio-grid {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .portfolio-grid.columns-3,
    .portfolio-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-item.featured {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
        border-radius: 8px;
    }
    
    .filter-tabs a {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .smartweb-portfolio[data-style="masonry"] .portfolio-grid {
        column-count: 1;
    }
    
    .portfolio-meta {
        flex-direction: column;
        gap: 1rem;
    }
}