/* 1695 Portfolio Frontend Styles */

.portfolio-1695-grid {
    width: 100%;
    padding: 2rem 0;
}

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

.portfolio-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Stagger effect voor masonry layout */
.portfolio-column[data-column="0"] {
    margin-top: 0;
}

.portfolio-column[data-column="1"] {
    margin-top: 3rem;
}

.portfolio-column[data-column="2"] {
    margin-top: 1.5rem;
}

.portfolio-column[data-column="3"] {
    margin-top: 4rem;
}

.portfolio-video-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.video-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    opacity: 0;
}

.portfolio-video-card:hover .video-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 1;
}

.play-icon {
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.portfolio-video-card:hover .play-icon {
    opacity: 1;
    transform: scale(1);
}

.video-info {
    padding: 1.5rem;
}

.video-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #EF4444;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.video-link-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    color: #000;
    font-weight: 400;
    transition: gap 0.3s ease;
}

.portfolio-video-card:hover .video-link-text {
    gap: 0.75rem;
}

.arrow-icon {
    transition: transform 0.3s ease;
}

.portfolio-video-card:hover .arrow-icon {
    transform: translate(3px, -3px);
}

/* Verberg scroll wanneer lightbox open is */
body.portfolio-lightbox-open {
    overflow: hidden;
}

/* Lightbox overlay */
.portfolio-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.portfolio-lightbox-container {
    position: relative;
    z-index: 1;
    width: 90vw;
    max-width: 1100px;
}

.portfolio-lightbox-title {
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-right: 2.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.portfolio-lightbox-close {
    position: absolute;
    top: -2.75rem;
    right: 0;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.portfolio-lightbox-close:hover {
    color: #EF4444;
    transform: scale(1.15);
}

.portfolio-lightbox-iframe-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.portfolio-lightbox-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Foutmelding bij geblokkeerde video */
.portfolio-lightbox-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #fff;
    padding: 2rem;
    text-align: center;
    gap: 1rem;
}

.portfolio-lightbox-error p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #ccc;
    max-width: 400px;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.portfolio-lightbox-error-link {
    display: inline-block;
    background: #EF4444;
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.portfolio-lightbox-error-link:hover {
    background: #dc2626;
    color: #fff;
    text-decoration: none;
}

/* Responsive */

@media (max-width: 768px) {
    .portfolio-lightbox-container {
        width: 96vw;
    }
}

@media (max-width: 1200px) {
    .portfolio-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .portfolio-column[data-column="3"] {
        display: none;
    }
    
    .portfolio-column[data-column="2"] {
        margin-top: 2.5rem;
    }
}

@media (max-width: 768px) {
    .portfolio-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .portfolio-column[data-column="2"],
    .portfolio-column[data-column="3"] {
        display: none;
    }
    
    .portfolio-column[data-column="1"] {
        margin-top: 2rem;
    }
    
    .video-title {
        font-size: 1.25rem;
    }
    
    .video-info {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .portfolio-grid-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .portfolio-column {
        margin-top: 0 !important;
    }
    
    .video-title {
        font-size: 1.125rem;
    }
}
