.artist-works-container,
.artist-lightbox-overlay {
    font-family: 'iranyekan', sans-serif; 
}

/* ================================
   Tabs
   ================================ */
.artist-works-tabs {
    display: flex;
    justify-content: center;
    gap: 0px;
    border-bottom: 1px solid #dbdbdb;
    margin-bottom: 20px;
}
.artist-tab-link {
    font-size: 14px;
    font-weight: 600;
    color: #8e8e8e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: transparent !important;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    position: relative;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.artist-tab-link.active,
.artist-tab-link:hover {
    color: #262626;
    border-bottom-color: #262626;
}
.artist-tab-link.active {
    border-bottom-width: 2px;
	color:#58c7bb;
}

/* ================================
   Grid (Instagram Style)
   ================================ */
.artist-works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px !important;

}
@media (min-width: 768px) {
    .artist-works-grid {
gap: 4px !important;


    }
}
.artist-work-item-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
    background: #efefef;
    cursor: pointer;
}
.artist-work-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; 

}
.artist-work-thumbnail-bg {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;

    background-size: cover;
    background-position: center;
    filter: blur(10px) brightness(0.8);
    transform: scale(1.1);
    opacity: 0.7;
        aspect-ratio: 1 / 1;
    object-fit: cover;
}
.artist-work-thumbnail-main {
    position: relative; 
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}
.artist-work-thumbnail .work-type-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; 
}
.artist-work-thumbnail .work-icon-video {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-size: 16px 16px;
    background-position: center 55%;
    background-repeat: no-repeat;
}
.artist-work-item-link:hover .artist-work-thumbnail-main {
    opacity: 0.9;
}

/* ================================
   Lightbox
   ================================ */
.artist-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.artist-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}
body.artist-lightbox-active {
    overflow: hidden;
}
.artist-lightbox-close {
    position: absolute !important; 
    top: 15px !important;
    left: 15px !important;
    right: auto !important;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 99999; 
    opacity: 0.8;
    transition: opacity 0.2s ease;
}
.artist-lightbox-close:hover {
    opacity: 1;
}
.artist-lightbox-close::before,
.artist-lightbox-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 2px;
    background: #ffffff;
    transform-origin: center;
}
.artist-lightbox-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
.artist-lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* --- Navigation Wrapper --- */
.artist-lightbox-nav-wrapper {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
	flex-direction:row-reverse !important;
    justify-content: space-between;
    padding: 0 15px; /* Padding from edges */
    box-sizing: border-box;
    z-index: 10; /* Above media */
    pointer-events: none; /* Allow click/swipe on media */
}
/* --- FIX: Reduced padding on mobile-sized screens --- */
@media (max-width: 767px) {
    .artist-lightbox-nav-wrapper {
        padding: 0 5px; 
    }
    .artist-lightbox-caption{
        padding: 4px;
    }
}

.artist-lightbox-nav {
    position: relative; 
    top: auto;
    transform: none; 
    z-index: 99998;
    background: rgba(255, 255, 255, 0.7); 
    border: 1px solid #dbdbdb; 
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease, background 0.2s ease;
    pointer-events: all; 
}
.artist-lightbox-nav:hover {
    opacity: 1;
    background: #58c7bb);
}
.artist-lightbox-nav::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-top: 3px solid #262626; 
    border-right: 3px solid #262626; 
}
.artist-lightbox-nav.artist-lightbox-prev {
    /* Position handled by space-between */
}
/* --- FIX: Icon reverted to LTR logic ( < ) to match JS --- */
.artist-lightbox-nav.artist-lightbox-prev::before {
    transform: translate(-50%, -50%) rotate(45deg);
    margin-left: -2px;
}
.artist-lightbox-nav.artist-lightbox-next {
    /* Position handled by space-between */
}
/* --- FIX: Icon reverted to LTR logic ( > ) to match JS --- */
.artist-lightbox-nav.artist-lightbox-next::before {
    transform: translate(-50%, -50%) rotate(-135deg);
    margin-left: 2px;
}
/* --- FIX: Using original selector to hide buttons on touch --- */
body.touch-device .artist-lightbox-nav {
    display: none; 
}

.artist-lightbox-content {
    position: relative; /* For nav-wrapper positioning */
    background: #fff;
    width: 85%;
    max-width: 1100px; 
    height: 82vh;
    max-height: 750px;
    
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    align-items:  stretch;
    overflow: hidden; 
}
.artist-lightbox-media {
    flex: 1 1 50%; 
    background: #fff; 
    display: flex;
    align-items: center;
    justify-content: center;
    	align-content: center !important;
    overflow: hidden;
    position: relative;
    min-height: 300px;
    user-select: none;
}
.artist-lightbox-overlay.active .artist-lightbox-content {
    transform: scale(1);
}
@media (min-width: 900px) { 
    .artist-lightbox-content {
        flex-direction: row;
    }
}

.artist-lightbox-caption-header img{
    border-radius: 50px;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 2px solid #75bdbe !important;
}
.artist-lightbox-media {
    flex: 1 1 50%; 
    background: #fff; 
    display: flex;
    align-items: center;
    justify-content: center;
    	align-content: center !important;
    overflow: hidden;
    position: relative;
    min-height: 300px;
    user-select: none;
}
.artist-lightbox-media img,
.artist-lightbox-media video,
.artist-lightbox-media iframe {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; 
}
.artist-lightbox-media iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
}
.artist-lightbox-media video {
    width: 100%;
    height: 100%;
    background: #fff; 
}
.artist-lightbox-caption {
    flex: 1 1 50%; 
    padding: 25px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.7;
    color: #262626;
    border-top: 1px solid #efefef;
    background: #fff;
    direction: rtl; 
    text-align: right; 
}
@media (max-width: 899px) { 
    .artist-lightbox-caption {
        
        flex-basis: auto; 
        flex-grow: 0;
        flex-shrink: 1;
        max-height: 30vh;
    }
}
@media (min-width: 900px) {
    .artist-lightbox-media {
        flex-basis: 50%; 
        max-height: 100%;
    }
    .artist-lightbox-caption {
        flex-basis: 50%; 
        height: 100%;
        max-height: 82vh;
        border-top: none;
        border-left: 1px solid #efefef; 
    }
}
.artist-lightbox-caption-header {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #efefef;
}
.artist-caption-pic {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    object-fit: cover;
    margin-left: 10px;
}
.artist-caption-name {
    font-weight: 600;
    font-size: 15px;
    color: #262626;
}
.artist-lightbox-caption-body strong {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: #262626;
}
.artist-caption-text p {
    margin: 0 0 1em;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}
.artist-caption-text p:last-child {
    margin-bottom: 0;
}

/* ================================
   Follow Button
   ================================ */
.artist-follow-button {
    background-color: #0095f6;
    color: #fff;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 5px 9px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.artist-follow-button:hover {
    background-color: #0077c6;
}
.artist-follow-button.following {
    background-color: transparent;
    color: #262626;
    border: 1px solid #dbdbdb;
}
.artist-follow-button.following:hover {
    background-color: #fafafa;
}
.artist-follow-button.loading {
    opacity: 0.7;
    cursor: wait;
}
.follow-button-wrapper {
    position: relative;
    display: inline-block;
}
.artist-login-notice {
    display: block;
    font-size: 12px;
    color: #ed4956;
    margin-top: 5px;
}