/* =============================
   ROBOTY FILTERS — like masters
   ============================= */

.roboty-card {
    cursor: pointer;
}

.roboty-filters {
    display: flex;
    gap: 20px;
    padding: 0;
       align-items: flex-start;
}

.roboty-filters li {
    display: flex;
   
    gap: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 500;
    color: #000;
    line-height: 1;
    white-space: nowrap;
}

/* квадрат */
.roboty-filters .sw-check {
    width: 16px;
    height: 16px;
    border: 1px solid #000300;
    border-radius: 4px;
    transition: 0.2s ease;
    flex-shrink: 0;
}

/* активный квадратик */
.roboty-filters li.active .sw-check {
    background: #000;
}

/* активный текст */
.roboty-filters li.active {
    font-weight: 700;
}

/* мобильный селект */
.roboty-filter-mobile {
    display: none;
}

.roboty-filter-mobile select {
    border: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='20' width='20' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
}

/* На мобильных скрываем обычные фильтры */
@media (max-width: 768px) {

    .roboty-filter-mobile {
        display: block;
        margin-bottom: 20px;
    }

    .roboty-filters {
        display: none;
    }
}

/* GRID */
.roboty-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-content: flex-start;
}

/* CARD */
.roboty-card {
    display: block;
    transition: transform .20s ease;
}

.roboty-card:hover {
    transform: translateY(-3px);
}

.roboty-card-img img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
	height: 362px;
}

/* LOADER */
.roboty-loader {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    display: none;
}

/* FIX: отменяем влияние глобального :is(ul,ol) li:last-child */
.roboty-filters li:last-child {
    margin: 0 !important;
    display: flex !important;
}



/* =============================
   ROBOTY — GRID LAYOUT CONTROL
   ============================= */

/* 4 карточки в линию */
.roboty-card {
    width: calc(25% - 18px); /* 4 шт + gap 24px */
}



/* 2 карточки на мобильном */
@media (max-width: 768px) {
    .roboty-card {
        width: calc(50% - 12px);
    }

    .roboty-grid {
        gap: 20px;
    }
}

/* Более компактный mobile */
@media (max-width: 480px) {
    .roboty-card {
        width: calc(50% - 8px);
    }

    .roboty-grid {
        gap: 16px;
    }
}

/* =============================
   ROBOTY HEADER — filters + count in one row
   ============================= */

.roboty-header-wrap {
    display: flex;
    justify-content: space-between;
  
}

/* На мобильных: в столбец, как у masters */
@media (max-width: 768px) {
    .roboty-header-wrap {
        flex-direction: row;
        align-items: center;
        
        display: flex;
    }
	

}

 @media (max-width: 768px) {
   #roboty-mobile-select  {
/*     border: none !important;
    width: 100px !important;  */
	visibility: visible !important;
	   display:block;
}
}

#roboty-mobile-select  {
/*     border: none !important;
    width: 100px !important;  */
	visibility: hidden;
	display:none;
}

.roboty-grid {
  min-height: 750px;     /* фиксированная высота */
  overflow-y: auto;    /* позволяет прокручивать содержимое, если оно больше */
}

.roboty-wrapper {
  display: grid;
  gap: 40px;
}


/* ========= LOAD MORE BUTTON (макетна версія) ========= */

.roboty-load-more {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #FFFFFF;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    gap:8px;
    margin: 0 auto;
 width: 200px;
margin-top: 40px;
}


.roboty-load-more:hover {
    background: #FAFAFA;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.roboty-load-more.hidden {
    display: none;
}

.roboty-load-more .load-text {
    color: #000;
    line-height: 1;
    flex-grow: 1;
    text-align: left;
}


/* ========== Жовтий квадрат справа ========== */

.roboty-load-more .load-icon {
    background: #EFDD30;
    border-radius: 6px ;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.roboty-load-more .load-icon svg {
    width: 20px;
    height: 20px;
    fill: #000;
}


/************* 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: 16px;
    line-height: 1.45;
    color: #444;
    flex-grow: 1;
	    margin: 20px 0;
    font-size: 14px;
    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;
    }
}



















/* GRID for [roboty_latest] */
.roboty-latest-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-content: flex-start;
}

/* 4 карточки в линию */
.roboty-latest-grid .roboty-card {
    width: calc(25% - 18px);
    cursor: pointer;
    transition: transform .20s ease;
}

.roboty-latest-grid .roboty-card:hover {
    transform: translateY(-3px);
}

.roboty-latest-grid .roboty-card-img img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* MOBILE 2 in row */
@media (max-width: 768px) {
    .roboty-latest-grid .roboty-card {
        width: calc(50% - 12px);
    }

    .roboty-latest-grid {
        gap: 20px;
    }
}

/* MOBILE SMALL */
@media (max-width: 480px) {
    .roboty-latest-grid .roboty-card {
        width: calc(50% - 8px);
    }

    .roboty-latest-grid {
        gap: 16px;
    }
	
	.roboty-card-img img {
         height: 228px;
}
}


































/* ============================================
   GRID for [roboty_latest]
   ============================================ */

.roboty-latest-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-content: flex-start;
}

/* CARD */
.roboty-latest-grid .roboty-card {
    width: calc(25% - 18px);  /* 4 в ряд */
    cursor: pointer;
    transition: transform 0.2s ease;
}

.roboty-latest-grid .roboty-card:hover {
    transform: translateY(-3px);
}

.roboty-latest-grid .roboty-card-img img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
}

/* MOBILE: 2 в ряд */
@media (max-width: 768px) {
    .roboty-latest-grid .roboty-card {
        width: calc(50% - 12px);
    }

    .roboty-latest-grid {
        gap: 20px;
    }
}

/* SMALL MOBILE */
@media (max-width: 480px) {
    .roboty-latest-grid .roboty-card {
        width: calc(50% - 8px);
    }

    .roboty-latest-grid {
        gap: 16px;
    }
}

/* =============================
   ROBOTY MOBILE DROPDOWN
   ============================= */

.roboty-mobile-select-wrap {
    display: none;
}

.roboty-mobile-select-wrap select {
    border: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='20' width='20' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
}

/* Показываем на мобильном */
@media (max-width: 768px) {

    .roboty-mobile-select-wrap {
        display: block;
    }

    /* Скрываем ПК фильтр roboty */
    .roboty-filters {
        display: none;
    }

    /* Выравнивание header-wrap как в masters */
    .roboty-header-wrap {
        align-items: center !important;
        gap: 16px;
    }

}

