/************* OVERLAY *************/
.container-popup {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
}
.master-popup-overlay {
        position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: 0.25s 
ease;
    z-index: 9999;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: center;
}
.master-container {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
}

.master-popup-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/************* POPUP CORE *************/
.master-popup {
      width: 900px;
    height: 520px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    position: relative;
	flex-direction: row-reverse;
}

/************* CLOSE BUTTON *************/

.popup-btn:hover,
.popup-btn:focus,
.popup-btn:active {
    color: inherit !important;
}

/************* LEFT PANEL (560px) *************/
.popup-info {
   width: 560px;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    background-image: url(https://tatoo.swtesthost.space/wp-content/uploads/2025/10/zheltыj-scaled.png), linear-gradient(rgb(239, 221, 48), rgb(239, 221, 48));
    background-size: cover;
}


/************* MASTER HEADER *************/
.popup-master-header {
      display: flex !important;
    flex-direction: column;
    gap: 16px !important;
}

.popup-master-header {
    display: flex !important;
    flex-direction: column;
    gap: 16px !important;
}



.popup-master-title-block {
    display: flex !important;
    gap: 8px !important;
    
    flex-direction: column;
}

.popup-master-avatar {
        width: 124px;
    height: 148px;
    object-fit: cover;
    border-radius: 12px;

}

.popup-master-title-block h2 {
        margin: 0;
    font-size: 24px;
    font-weight: 500;
}

.popup-master-role {
    font-size: 16px;
    color: #000300;
	line-height: 140%;
}

/************* WAYS *************/
.popup-ways {
    margin: 20px 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
	display:none; !important
}

.popup-ways li {
    background: #f3f3f3;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
}

/************* DESCRIPTION *************/
.popup-desc {
    margin: 20px 0;
    font-size: 14px !important;
    line-height: 1.45;
    color: #444;
    flex-grow: 1;
	    margin: 20px 0;
    font-size: 16px;
    line-height: 1.45;
    color: #444;
    flex-grow: 1;
    align-content: end;
}

/************* BUTTON *************/
.popup-btn {
       height: 56px;
    width: 250px;
    padding: 12px 12px 12px 16px;
    border-radius: 8px;
    background: #FFFFFF;
    color: #000300;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    display: flex;
    gap: 8px;
    align-items: center;
	letter-spacing: -0.2px;
}

.master-popup-close {
    
    background-color: transparent !important; /* ПРОЗРАЧНО */
    color: #ffffff !important; /* БЕЛЫЙ КРЕСТИК */
   
}

.popup-btn-icon {
background: #EFDD30;
	
	    border-radius: 6px;
}

/************* RIGHT IMAGE (640×720) *************/
.popup-photo-wrap {
    width: 640px;
    height: 720px;
    overflow: hidden;
}

.popup-work-photo {
    width: 100%;
    height: 528px;
    object-fit: cover;
}



/* =========================================================
   MOBILE POPUP — PERFECT MATCH TO YOUR DESIGN (max 767px)
========================================================= */
@media (max-width: 767px) {

    /* Overlay: popup sits at bottom like a drawer */
    .master-popup-overlay {
        
        padding: 0;
    }

    /* Main popup container, vertical */
    .master-popup {
        width: 340px;
        height: auto;
        max-height: 95vh;
        flex-direction: column;
       
        overflow-y: auto;
        position: relative;
    }

    /* Photo on top */
    .popup-photo-wrap {
        width: 100%;
        height: 390px; /* как на макете ~340x450 */
        flex-shrink: 0;
        border-radius: 16px 16px 0 0;
        overflow: hidden;
        position: relative;
    }

    .popup-work-photo {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Close button floating over photo */
    .master-popup-close {
        position: absolute; !important
        z-index: 1;
        background: rgba(0, 0, 0, 0.5) !important;
        border-radius: 50%;
        color: #fff !important;
		
    }

.master-popup-close.master-popup-close {
    position: absolute !important;
    
    z-index: 999999 !important;
    background: rgba(0,0,0,0.0) !important;
    padding: 40px 16px 0px 0px;
    color: #fff !important;
    
}

    /* Yellow info block */
    .popup-info {
        width: 100%;
        padding: 24px;
        height: auto;
        background-size: cover;
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    /* Header block: avatar + name */
    .popup-master-header {
        flex-direction: row !important;
        align-items: center;
        gap: 16px !important;
    }

    .popup-master-avatar {
        width: 80px;
        height: 80px;
        border-radius: 10px;
        object-fit: cover;
    }

    .popup-master-title-block h2 {
        font-size: 20px;
        margin: 0;
    }

    .popup-master-role {
        font-size: 14px;
        color: #000300;
    }

    /* Skills (ways) */
    .popup-ways {
        flex-wrap: wrap;
        gap: 8px;
        margin: 0;
        padding: 0;
        display:none; !important
    }

    .popup-ways li {
        font-size: 13px;
        padding: 6px 10px;
        background: #fff;
        border-radius: 8px;
    }

    /* Description */
    .popup-desc {
        font-size: 14px;
        line-height: 1.45;
        color: #000;
        margin: 0;
    }

    /* Button full width */
    .popup-btn {
        font-size: 16px;
        font-weight: 700;
        justify-content: center;
        padding: 12px 12px 12px 16px;
		width: 100%;
    }

    .popup-btn-icon {
       
        border-radius: 6px;
        background: #EFDD30;
    }
}