/* Portfolio page specific styles */

.portfolio-main {
    padding-top: 100px;
}

/* Portfolio Hero Section */
.portfolio-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.portfolio-hero .hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.portfolio-hero .hero-content p {
    font-size: 1.3rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Portfolio Filter */
.portfolio-filter {
    padding: 3rem 0;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid #c53030;
    color: #c53030;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #c53030;
    color: white;
    transform: translateY(-2px);
}

/* Portfolio Grid */
.portfolio-grid-section {
    padding: 6rem 0;
    background: #f8f9fa;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 350px;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

.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%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: all 0.3s ease;
}

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

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

.portfolio-info {
    color: white;
    margin-bottom: 1rem;
}

.portfolio-info h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-category {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.portfolio-year {
    font-size: 0.8rem;
    opacity: 0.6;
}

.portfolio-btn {
    background: #c53030;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.portfolio-btn:hover {
    background: #a02626;
    transform: translateY(-2px);
}

/* Portfolio Modal */
.portfolio-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.portfolio-modal .modal-content {
    background: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    color: #999;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

/* Portfolio Stats */
.portfolio-stats {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.portfolio-stats h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.stat-item {
    padding: 2rem 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #ffd700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Active navigation link */
.nav-menu a.active {
    color: #c53030;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 768px) {
    .portfolio-hero .hero-content h1 {
        font-size: 2rem;
    }
    
    .portfolio-hero .hero-content p {
        font-size: 1.1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-card {
        height: 300px;
        margin: 0 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filter-btn {
        width: 200px;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .portfolio-modal .modal-content {
        width: 95%;
        margin: 5% auto;
    }
}

@media (max-width: 480px) {
    .portfolio-main {
        padding-top: 80px;
    }
    
    .portfolio-hero {
        padding: 2rem 0;
    }
    
    .portfolio-hero .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .portfolio-grid-section {
        padding: 3rem 0;
    }
    
    .portfolio-stats {
        padding: 3rem 0;
    }
    
    .portfolio-stats h2 {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-overlay {
        padding: 1.5rem;
    }
    
    .portfolio-info h3 {
        font-size: 1.2rem;
    }
}

/* Animation for filtering */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portfolio-item.show {
    animation: fadeIn 0.5s ease forwards;
}

/* Loading states */
.portfolio-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 0.4; }
    100% { opacity: 0.7; }
}

/* ===== Gallery dynamiczna ===== */
.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.gallery-item figcaption {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: #333;
}
