/* =============================
   PAGE MASTER — TOP HEADER
   ============================= */


/* Контейнер больше НЕ должен обрезать фон */
.page-masters-top-content .container {
  
    padding-left: 0;
    padding-right: 0;
}





/* .page-masters-top-content::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.68), rgba(0,0,0,0));
} */

.page-masters-top-content .container {
    position: relative;
    z-index: 2;
}

/* NAME — 1в1 FIGMA */
.masters-title {
    font-size: 60px;
    font-weight: 500;
    line-height: 1.1;
    color: #fff;
   
}

/* ПОКАЗ СПЕЦИАЛИЗАЦИЙ */
.way-row ul {
    display: flex;
    gap: 18px;
    padding: 0;
    margin: 0 0 15px 0;
    list-style: none;
}

.way-row ul li {
    font-size: 18px;
    font-weight: 500;
    color: #fff;
}

/* SHORT DESCRIPTION */
.masters-short-description {
        font-size: 16px;
    max-width: 420px;
    color: #fff;
    margin-bottom: 24px;
    line-height: 1.4;
    letter-spacing: -0.2px;
}
}

/* BUTTON — FIGMA */
.sw-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #000;
    font-size: 18px;
    font-weight: 500;
    padding: 16px 28px;
    border-radius: 14px;
    text-decoration: none;
    transition: 0.25s ease;
}

.sw-btn:hover {
    transform: translateY(-3px);
}


/* =============================
   TITLE: Портфоліо майстра
   ============================= */

.page-masters-bottom-content {
        font-size: 40px;
    font-weight: 500;
    text-align: center;
    padding: 100px 0 40px;
   color: #000;
}


/* =============================
   PORTFOLIO GRID (4 → 2)
   ============================= */

.master-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-bottom: 40px;
}

.master-portfolio-grid img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.master-portfolio-grid img:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* ADAPTIVE */
@media (max-width: 1024px) {
    .master-portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 26px;
    }
}

@media (max-width: 768px) {
    .master-portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .master-portfolio-grid img {
        height: 320px;
    }
}

@media (max-width: 480px) {
    .master-portfolio-grid {
        gap: 14px;
    }
    .master-portfolio-grid img {
        height: 260px;
    }
}


/* =============================
   MASTERS LIST PAGE (FILTER + GRID)
   ============================= */

/* FILTER SECTION */
.masters-filter-section {
    margin-bottom: 32px;
}

.masters-filter-section-wrap {
    display: flex;
    justify-content: space-between;
	 align-items: flex-start;
}

.masters-filter-section-wrap ul {
    display: flex;
    gap: 28px;
    padding: 0;
    margin: 0;
    list-style: none;
    align-items: flex-start;
}

.masters-filter-section-wrap li {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    color: #000;
}

/* FILTER CHECKBOX — FIGMA EXACT */
.sw-check {
    width: 16px;
    height: 16px;
    border: 2px solid #000;
    border-radius: 4px;
    transition: 0.2s ease;
}

.sw-check-active .sw-check {
    background: #000;
}

/* number of masters */
.master-quantity {
    font-size: 16px;
    font-weight: 500;
}

/* GRID (4 → 2) */
.masters-grid-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
	min-height: 1360px;

}

/* CARD EXACT 329×494 */
.masters-grid-card {
    width: 329px;
    height: 494px;
    border-radius: 24px;
    overflow: hidden;
    color: #000;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
}

/* HOVER */
.masters-grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* ANTI-WOODMART OVERRIDE */
.masters-grid-card:hover .masters-grid-card-title,
.masters-grid-card:hover .masters-grid-way ul li {
    color: #000 !important;
}

/* IMAGE */
.masters-grid-card-image img,
.image-master-custom {
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 12px;
}

/* TEXT (16 px top + 8px title spacing) */
.masters-grid-card-info {
    margin-top: 16px;
    padding: 0 4px;
}

.masters-grid-card-title {
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: #000 !important;
}

.masters-grid-way ul {
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 16px;
    color: #444;
}

/* ADAPTIVE (grid 4 → 2) */
@media (max-width: 768px) {
    .masters-grid-card {
        width: calc(50% - 10px);
        height: auto;
        max-width: 329px;
    }
    .masters-grid-wrap {
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .masters-grid-card {
        width: calc(50% - 8px);
    }
    .masters-grid-wrap {
        gap: 12px;
    }
    .masters-filter-section-wrap {
       
        align-items: flex-start;
        gap: 16px;
    }
    .masters-filter-section-wrap ul {
        gap: 16px 20px;
        flex-wrap: wrap;
    
    }
}



.page-masters-top-content {
        height: 700px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    padding-bottom:60px;
    align-items: flex-end;
    display: flex;
	background-size: cover;
    background-position: top;
padding-left:16px;
}

@media (max-width: 768px) {
    .masters-short-description {
        width: 360px;
    }
}
/* Контейнер внутри — фикс по ширине */
.hero-container {
    width: 100%;
    max-width: 1360px;       /* ограничение по макету */
    margin: 0 auto;
    padding: 0 20px;         /* боковые отступы */
    position: relative;
    z-index: 2;              /* поверх затемнения */

}





/* =============================
   PORTFOLIO MASTER GRID
   ============================= */

.master-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 колонки */
    gap: 32px; /* расстояние между карточками */
    max-width: 1280px;        /* ограничение ширины */
    margin: 0 auto;           /* центрируем */
}

/* Карточка */
.master-portfolio-grid .roboty-card {
    display: block;
    transition: transform .25s ease, box-shadow .25s ease;
	cursor:pointer;
}

.master-portfolio-grid .roboty-card-img img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    border-radius: 16px;
}

.master-portfolio-grid .roboty-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

/* Адаптив — планшет */
@media (max-width: 1024px) {
    .master-portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 26px;
    }
    .master-portfolio-grid .roboty-card-img img {
        height: 340px;
    }
}

/* Адаптив — мобилка */
@media (max-width: 768px) {
    .master-portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .master-portfolio-grid .roboty-card-img img {
        height: 300px;
    }
}

/* Более маленькая мобилка */
@media (max-width: 480px) {
    .master-portfolio-grid {
        gap: 14px;
    }
    .master-portfolio-grid .roboty-card-img img {
        height: 240px;
    }
}



/* =============================
   BUTTON — EXACT LIKE FIGMA
   ============================= */

.btn-master-wrap {
    display: flex;
    justify-content: center;
  
}

.btn-master {
        display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #000;
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    transition: transform .25s 
ease, box-shadow .25s 

}

.btn-master:hover .btn-master-text {
    color: #000300 !important;
}

.btn-master-text {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;

}

.btn-master-icon {
    background: #EFDD30;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 6px;

}

/* MOBILE */
@media (max-width: 768px) {
    .btn-master {
        font-size: 20px;
        padding: 18px 28px;
    }

    .btn-master-icon {
        padding: 10px;
        border-radius: 12px;
    }

    .btn-master-text {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .btn-master {
        font-size: 18px;
        padding: 16px 24px;
    }

    .btn-master-text {
        font-size: 18px;
    }

    .btn-master-icon {
        padding: 8px;
    }
}




/************* 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;
    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;
    }

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


















.sw-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 12px 18px 12px 18px;
    background-color: #ffffff;
    border: 1px solid #0000000d; /* тонкая, почти незаметная */
    border-radius: 12px;

    font-size: 16px;
    font-weight: 500;
    color: #000300;
    cursor: pointer;
    text-decoration: none;

    transition: all 0.2s ease-in-out;
}

/* Жёлтый квадрат справа */
.sw-btn-icon-wrap {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #FDE64B; /* жёлтый как на кнопке */
    border-radius: 8px;
}

/* Иконка внутри */
.sw-btn-icon-wrap svg {
    width: 18px;
    height: 18px;
}



.sw-btn a,
.sw-btn a:hover,
.sw-btn a:focus,
.sw-btn a:active {
    transition: none !important;
    transform: none !important;
    border-color: inherit !important;
    background-color: inherit !important;
    opacity: 1 !important;
    text-decoration: none !important;
	color:black; !important
}

a:hover {
    color: #000000 !important;
}

/* Hover эффект */


@media (max-width: 768px) {
    .masters-title {
        font-size: 48px;
        line-height: 95%;
        font-weight: 500;
		width:300px;
    }
}