/* ==============================================
   PORTFOLIO MODAL LAYOUT (Behance Style)
   ============================================== */

/* Modal Container Overrides */
.opigno-portfolio-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;
}

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

.portfolio-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1;
    backdrop-filter: blur(5px);
}

body.portfolio-modal-open {
    overflow: hidden;
}

.opigno-portfolio-modal .portfolio-modal-container {
    padding: 0;
    width: 95vw;
    height: 95vh;
    max-width: 1600px;
    max-height: 1000px;
    background: #000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    border-radius: 8px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}



.opigno-portfolio-modal .portfolio-modal-content {
    width: 100%;
    height: 100%;
}

/* Close Button Positioning */
.opigno-portfolio-modal .portfolio-modal-close {
    top: 15px;
    right: 15px;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.opigno-portfolio-modal .portfolio-modal-close:hover {
    background: #fff;
    transform: rotate(90deg);
}

/* Two Column Layout */
.portfolio-detail-container {
    display: flex;
    width: 100%;
    height: 100%;
    background: #000;
}

/* Left: Main Area (Images) */
.portfolio-main-area {
    flex: 1;
    height: 100%;
    overflow-y: auto;
    background: #0b0b0b;
    /* Very dark grey/black */
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.portfolio-gallery {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 1000px;
}

.gallery-item {
    width: 100%;
    background: transparent;
    display: flex;
    justify-content: center;
}

.gallery-item img {
    max-width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.portfolio-no-images {
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/* Right: Sidebar */
.portfolio-sidebar {
    width: 400px;
    min-width: 350px;
    background: #fff;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 100;
}

/* Sidebar Components */
.portfolio-sidebar__header {
    padding: 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-owner {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    gap: 12px;
}

.sidebar-owner-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #eee;
}

.sidebar-owner-info {
    display: flex;
    flex-direction: column;
}

.sidebar-owner-name {
    font-weight: 700;
    font-size: 16px;
    color: #3f1937;
    /* Theme dark color */
}

.sidebar-date {
    font-size: 12px;
    color: #999;
}

.portfolio-sidebar__content {
    padding: 24px;
    flex: 1;
}

.sidebar-title {
    margin: 0 0 16px 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    color: #333;
}

.sidebar-description {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 24px;
}

.sidebar-collaborators {
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sidebar-collaborators .label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 8px;
    font-weight: 600;
}

.collaborator-pill {
    display: inline-block;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    font-size: 13px;
    color: #333;
    text-decoration: none;
    margin-right: 6px;
    margin-bottom: 6px;
    transition: all 0.2s;
}

.collaborator-pill:hover {
    background: #3f1937;
    color: #fff;
    border-color: #3f1937;
}

.sidebar-badges {
    margin-top: 16px;
}

.type-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
}

.type-badge--moodboard {
    background: linear-gradient(135deg, #ff9a9e, #fecfef);
    color: #884444;
}

.type-badge--portfolio {
    background: linear-gradient(135deg, #a1c4fd, #c2e9fb);
    color: #446688;
}

.type-badge--lookbook {
    background: linear-gradient(135deg, #d4fc79, #96e6a1);
    color: #448855;
}

/* Comments Section */
.portfolio-sidebar__comments {
    padding: 24px;
    border-top: 1px solid #eee;
    background: #fff;
}

.comments-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px 0;
    text-transform: uppercase;
    color: #333;
}

.comments-list {
    min-height: 100px;
    margin-bottom: 16px;
}

.empty-comments {
    font-style: italic;
    color: #999;
    text-align: center;
    padding: 20px;
}

.comment-form-placeholder {
    display: flex;
    gap: 10px;
}

.comment-form-placeholder .form-control {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-form-placeholder .form-control:focus {
    border-color: #3f1937;
}

.comment-form-placeholder .btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: #3f1937;
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 900px) {
    .portfolio-detail-container {
        flex-direction: column;
    }

    .portfolio-main-area {
        height: 50%;
    }

    .portfolio-sidebar {
        width: 100%;
        height: 50%;
    }
}