/* Portfolio specific styles */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 2rem 1.5rem 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    color: #222;
    letter-spacing: 1px;
    font-family: 'Playfair Display', serif;
    text-transform: uppercase;
}

.page-header p {
    color: #666;
    font-size: 1.15rem;
    margin-top: 0;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

/* Mobile filter dropdown - hidden on desktop */
.filter-dropdown-mobile {
    display: none;
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Hide desktop filter buttons on mobile */
    .filter-buttons {
        display: none;
    }
    
    /* Show mobile dropdown on mobile */
    .filter-dropdown-mobile {
        display: block;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .mobile-filter-select {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border: 2px solid #cbd5e1;
        border-radius: 8px;
        background-color: #fff;
        color: #333;
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 12px;
        padding-right: 2.5rem;
        font-weight: 500;
        transition: border-color 0.3s ease;
    }
    
    .mobile-filter-select:focus {
        outline: none;
        border-color: #94a3b8;
        box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
    }
    
    .portfolio-grid {
        padding: 0 1rem 4rem;
    }
    
    .category-title {
        padding-left: 1rem;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .container {
        padding: 1.5rem 0.5rem 0.5rem;
    }
    
    .page-header {
        margin-bottom: 1rem;
    }
}

.filter-btn {
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    color: #000 !important;
    font-weight: 500 !important;
}

.filter-btn:hover, 
.filter-btn.active {
    background: #cbd5e1 !important;
    color: #000 !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.category-title {
    grid-column: 1 / -1;
    font-size: 1.5em;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.3rem;
    text-transform: uppercase;
    color: #333;
    text-align: left;
    padding-left: 2rem;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #fff;
    will-change: transform;
    transform: translateZ(0);
    transition: transform 0.25s ease-out;
    /* Reserve space for image to prevent CLS */
    aspect-ratio: 6 / 7;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.artwork-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    will-change: transform, opacity;
}

.portfolio-item:hover .artwork-overlay {
    transform: translateY(0);
}

.artwork-info h3 {
    margin: 0 0 5px;
    font-size: 1.1em;
    color: #fff;
}

.artwork-meta {
    font-size: 0.9em;
    opacity: 0.9;
    color: #eee;
}

.artwork-meta span {
    display: block;
    margin: 3px 0;
}

.availability {
    margin-top: 5px;
    font-weight: 600;
}
.available { color: #2ecc71; }
.not-available { color: #e74c3c; }

/* Skeleton loader styles for CLS prevention */
.skeleton-item {
    aspect-ratio: 6 / 7;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

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

@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 2rem;
    }
    
    .category-title {
        padding-left: 1rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}
