.sectors{
	padding: 5rem 0;
}

.sectors__wrapper{
	margin-top: 4rem;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(6, 1fr); 
	grid-column-gap: 2rem;
	grid-row-gap: 2rem; 
	min-height: 700px;
}

.sectors__item:nth-child(1) { grid-area: 1 / 1 / 4 / 3; }
.sectors__item:nth-child(2) { grid-area: 4 / 1 / 7 / 3; }
.sectors__item:nth-child(3) { grid-area: 1 / 3 / 3 / 5; }
.sectors__item:nth-child(4) { grid-area: 3 / 3 / 5 / 5; }
.sectors__item:nth-child(5) { grid-area: 5 / 3 / 7 / 5; } 


.sectors__item{
	border-radius: 22px;
	border: 1px solid var(--color-primary);
	display: flex;
	justify-content: center;
	align-items: center;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 100%;
	overflow: hidden;
	cursor: pointer;
	transition: all .4s;
}

.sectors__item:hover{
	background-size: 110%;
}


.sectors__popup{
    position: fixed;
    display: none;      /* скрыт по умолчанию */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 1);
    color: #000;
    padding: 1rem;
    overflow-y: auto;
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.sectors__popup.active {
    display: flex;     /* показываем только когда есть класс active */
}

.sectors__descr{
	width: 60%;
}

.sectors__close{
	position: absolute;
	top: 4rem;
	right: 5rem;
	background: none;
	border: none;
	font-size: 7rem;
	cursor: pointer;
}

.sectors__name{
	font-size: var(--h1-size);
	font-weight: 600;
	color: var(--color-light);
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100%;
	width: 100%;
	background-color: rgba(0, 0, 0, 0.4);
}









/* Фиксированные позиции на больших экранах */
@media (min-width: 1024px) {
    .sectors__item:nth-child(1) { grid-area: 1 / 1 / 4 / 3; }
    .sectors__item:nth-child(2) { grid-area: 4 / 1 / 7 / 3; }
    .sectors__item:nth-child(3) { grid-area: 1 / 3 / 3 / 5; }
    .sectors__item:nth-child(4) { grid-area: 3 / 3 / 5 / 5; }
    .sectors__item:nth-child(5) { grid-area: 5 / 3 / 7 / 5; }
}

/* Планшеты: 2 колонки, авто-ряды */
@media (max-width: 1023px) and (min-width: 768px) {
    .sectors__wrapper {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 250px; /* высота блока */
        grid-template-rows: auto;
    }
    .sectors__item {
        grid-area: auto !important; /* сброс фиксированных областей */
    }
}

/* Телефоны: 1 колонка, блоки вниз */
@media (max-width: 767px) {
    .sectors__wrapper {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
        grid-template-rows: auto;
    }
    .sectors__item {
        grid-area: auto !important; /* сброс фиксированных областей */
    }
}