/* PORTFOLIO.CSS - Zaktualizowane z kategoriami i filmami */

/* Recent Work Section */
.recent-work {
    padding: 60px 80px;
    background: #fff;
    position: relative;
    z-index: 10;
}

.recent-work-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Montserrat Alternates', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-accent); /* Pomarańczowy */
    margin-bottom: 50px;
}

/* Portfolio Categories - wyrównane do lewej */
.portfolio-categories {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
    justify-content: flex-start; /* Wyrównanie do lewej */
}

.category-btn {
    padding: 12px 30px;
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.category-btn:hover,
.category-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--bg-primary);
}

/* Category Sections - usuń nagłówki */
.portfolio-category {
    margin-bottom: 40px;
}

/* USUŃ style dla category-heading */

/* Unified Projects List - identyczny styl dla wszystkich */
.projects-list {
    /* Wszystkie projekty mają ten sam styl */
}

.project-item,
.video-project {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.project-item:hover,
.video-project:hover {
    padding: 15px 0;
    padding-left: 20px;
    align-items: flex-start;
}

.project-left {
    flex: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-title {
    font-size: 4rem;
    font-weight: 300;
    color: #000;
    transition: all 0.4s ease;
    margin: 60px 0;
    line-height: 1;
}

.project-item:hover .project-title,
.video-project:hover .project-title {
    font-size: 2.5rem;
    font-weight: 500;
    transform: translateY(-10px);
    margin: 40px 0;
}

.project-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    max-width: 500px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
    margin-bottom: 0;
}

.project-item:hover .project-description,
.video-project:hover .project-description {
    opacity: 1;
    max-height: none;
    height: auto;
    transform: translateY(0);
}

.project-tech {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.project-item:hover .project-tech,
.video-project:hover .project-tech {
    opacity: 1;
    max-height: 60px;
    transform: translateY(0);
}

.tech-tag {
    font-size: 0.85rem;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 15px;
    color: #666;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-item:hover .tech-tag,
.video-project:hover .tech-tag {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
}

.project-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    min-width: 200px;
    height: 100%;
    position: relative;
}

.project-category {
    font-size: 1rem;
    color: var(--color-accent);
    font-weight: 500;
    letter-spacing: 0.05em;
    text-align: right;
}

/* Efekt podkreślenia - identyczny dla wszystkich */
.project-item::after,
.video-project::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s ease;
}

.project-item:hover::after,
.video-project:hover::after {
    width: 100%;
}

/* USUŃ wszystkie stare style video - teraz używamy unified project style */

/* Project Preview - przywrócone miniaturki */
.project-preview {
    position: fixed;
    width: 400px;
    height: 250px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.project-preview.active {
    opacity: 1;
    transform: scale(1);
}

.project-preview-content {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Different project styles */
.project-preview.twice {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
}

.project-preview.dama {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.project-preview.fabric {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* Video Preview - miniaturki YouTube */
.video-preview {
    position: fixed;
    width: 300px;
    height: 180px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    border: 2px solid var(--color-accent);
}

.video-preview.active {
    opacity: 1;
    transform: scale(1);
}

.video-preview-content {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

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

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.video-preview:hover .video-play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Video Modal - pozostawiamy tylko modal */
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.video-info {
    flex: 1;
    padding: 0;
    margin-left: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-title {
    font-size: 4rem;
    font-weight: 300;
    color: var(--text-primary);
    margin: 60px 0;
    line-height: 1;
    transition: all 0.4s ease;
}

.video-item:hover .video-title {
    font-size: 2.5rem;
    font-weight: 500;
    transform: translateY(-10px);
    margin: 40px 0 20px 0;
}

.video-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    max-width: 500px;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
    margin-bottom: 0;
}

.video-item:hover .video-description {
    opacity: 1;
    max-height: 100px;
    margin-bottom: 20px;
    transform: translateY(0);
}

.video-tags {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.video-item:hover .video-tags {
    opacity: 1;
    max-height: 60px;
    transform: translateY(0);
}

.video-tags .tech-tag {
    background: rgba(255, 99, 30, 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(255, 99, 30, 0.2);
    font-size: 0.85rem;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.video-item:hover .video-tags .tech-tag {
    background: rgba(255, 99, 30, 0.15);
    border-color: rgba(255, 99, 30, 0.3);
}

/* Efekt podkreślenia dla filmów */
.video-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s ease;
}

.video-item:hover::after {
    width: 100%;
}

/* Project Preview - przywrócone miniaturki */
.project-preview {
    position: fixed;
    width: 400px;
    height: 250px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.project-preview.active {
    opacity: 1;
    transform: scale(1);
}

.project-preview img,
.project-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-preview-content {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Different project styles */
.project-preview.twice {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
}

.project-preview.dama {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.project-preview.fabric {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

/* Video Preview - miniaturki dla filmów */
.video-preview {
    position: fixed;
    width: 300px;
    height: 180px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1000;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.video-preview.active {
    opacity: 1;
    transform: scale(1);
}

.video-preview-content {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.video-preview-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 99, 30, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-preview-content::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-45%, -50%);
    color: white;
    font-size: 16px;
    z-index: 1;
}
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.video-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
}

.video-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Filter States */
.portfolio-category[data-category]:not(.active) {
    display: none;
}

.portfolio-category.active {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .recent-work {
        padding: 80px 60px;
    }
    
    .video-projects {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-title {
        font-size: 3rem;
    }
    
    .project-item:hover .project-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .recent-work {
        padding: 60px 40px;
    }
    
    .portfolio-categories {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .category-btn {
        padding: 10px 25px;
        font-size: 0.8rem;
    }
    
    .video-projects {
        grid-template-columns: 1fr;
    }
    
    .video-item {
        margin-bottom: 30px;
    }
    
    .video-thumbnail {
        height: 200px;
    }
    
    .project-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 15px;
    }
    
    .project-right {
        align-items: flex-start;
        min-width: auto;
        width: 100%;
    }
    
    .project-category {
        text-align: left;
    }
    
    .project-title {
        font-size: 2.5rem;
    }
    
    .project-item:hover .project-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .recent-work {
        padding: 40px 20px;
    }
    
    .video-modal-content {
        width: 95%;
    }
    
    .video-info {
        padding: 20px;
    }
    
    .video-title {
        font-size: 1.1rem;
    }
    
    .project-title {
        font-size: 2rem;
    }
    
    .project-item:hover .project-title {
        font-size: 1.5rem;
    }
}

/* ZASTĄP stary CSS miniaturki YouTube tym kodem */

/* YouTube preview - powiększona o 100% */
.youtube-preview {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 280px; /* POWIĘKSZONE: było 140px */
    height: 180px; /* POWIĘKSZONE: było 90px */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    z-index: 10;
    border: 3px solid var(--color-accent);
    box-shadow: 0 8px 25px rgba(255, 99, 30, 0.3);
}

.project-item:hover .youtube-preview {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.youtube-preview:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 99, 30, 0.4);
    border-color: var(--color-accent-light);
}

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

.youtube-preview:hover img {
    transform: scale(1.1);
}

/* Przyciski play - większy */
.youtube-preview .play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; /* POWIĘKSZONE: było 40px */
    height: 80px; /* POWIĘKSZONE: było 40px */
    background: rgba(255, 99, 30, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.youtube-preview:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.2);
    background: var(--color-accent);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.youtube-preview .play-triangle {
    width: 0;
    height: 0;
    border-left: 20px solid white; /* POWIĘKSZONE: było 10px */
    border-top: 12px solid transparent; /* POWIĘKSZONE: było 6px */
    border-bottom: 12px solid transparent; /* POWIĘKSZONE: było 6px */
    margin-left: 6px; /* POWIĘKSZONE: było 3px */
}

/* Animowany border */
.youtube-preview::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, var(--color-accent), var(--color-accent-light), var(--color-accent));
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    animation: borderPulse 2s ease-in-out infinite;
}

.project-item:hover .youtube-preview::before {
    opacity: 1;
}

@keyframes borderPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Tooltip "Kliknij aby obejrzeć" */
.youtube-preview::after {
    content: 'Kliknij aby obejrzeć';
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.youtube-preview:hover::after {
    opacity: 1;
}

/* Dodatkowy efekt "shimmer" */
.youtube-preview .shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.youtube-preview:hover .shimmer {
    left: 100%;
}

/* Badge "VIDEO" - większy */
.youtube-preview .video-badge {
    position: absolute;
    top: 8px; /* POWIĘKSZONE: było 5px */
    left: 8px; /* POWIĘKSZONE: było 5px */
    background: rgba(255, 0, 0, 0.9);
    color: white;
    padding: 4px 8px; /* POWIĘKSZONE: było 2px 6px */
    border-radius: 4px; /* POWIĘKSZONE: było 3px */
    font-size: 0.8rem; /* POWIĘKSZONE: było 0.6rem */
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Czas trwania - większy */
.youtube-preview .duration {
    position: absolute;
    bottom: 8px; /* POWIĘKSZONE: było 5px */
    right: 8px; /* POWIĘKSZONE: było 5px */
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px; /* POWIĘKSZONE: było 2px 5px */
    border-radius: 4px; /* POWIĘKSZONE: było 3px */
    font-size: 0.8rem; /* POWIĘKSZONE: było 0.6rem */
    font-weight: 500;
}

/* Responsywność - dostosowana do większej miniaturki */
@media (max-width: 768px) {
    .youtube-preview {
        width: 220px; /* POWIĘKSZONE: było 110px */
        height: 140px; /* POWIĘKSZONE: było 70px */
        right: 15px;
        bottom: 15px;
    }
    
    .youtube-preview .play-btn {
        width: 60px; /* POWIĘKSZONE: było 30px */
        height: 60px; /* POWIĘKSZONE: było 30px */
    }
    
    .youtube-preview .play-triangle {
        border-left: 16px solid white; /* POWIĘKSZONE: było 8px */
        border-top: 10px solid transparent; /* POWIĘKSZONE: było 5px */
        border-bottom: 10px solid transparent; /* POWIĘKSZONE: było 5px */
        margin-left: 4px; /* POWIĘKSZONE: było 2px */
    }
}
/* DODAJ na koniec projects.css - Prosty i elegancki modal wideo */

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    display: flex;
    opacity: 1;
}

/* Tło z blur */
.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    cursor: pointer;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    z-index: 10001;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

/* Elegancki przycisk X */
.video-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: var(--color-accent);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.video-close:hover {
    background: #e55a1f;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Wrapper dla iframe */
.video-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsywność */
@media (max-width: 768px) {
    .video-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .video-close {
        top: -45px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .video-modal-content {
        width: 98%;
        margin: 10px;
        border-radius: 8px;
    }
    
    .video-close {
        top: -40px;
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
}