/* Цвет выделяемого текста */
::selection {
  color: white;
  background-color: #E01B24;
}

.header-footer a, .section-1-text h1, .section-text-h, .text-overlay h2 {
  text-transform: uppercase;
}

/* Фон для всей страницы сайта */
body::before {
  content: '';
  position: fixed;
  width: 100%;
  height: 100%;
  background: url('img/bg_body.webp') no-repeat center center;
  background-size: cover;
  filter: brightness(20%); /* Затемняет изображение на 30 % */
  z-index: -1;
}
/* Чёрный фон для первого и последнего блока */
footer, header{
	background-color: black;
}

.row, .blocks, .portfolio-blocks, .section-1-bg{
  display: grid;
}

/* Разделение текста на столбцы */
.row {
  grid-template-columns: 1fr 1fr; /* две равные колонки */
  gap: 30px; /* расстояние между колонками */
}

.column {
  padding-block: 20px;
}
/* Блоки */
.blocks {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.block {
  position: relative;
	overflow: hidden;
}

.block-hide-cover{
	display:none;  
}

.block img {
  filter: brightness(60%); /* затемнение изображения */
}

.block, .block img, .portfolio-block img {
  width: 100%;
}

.portfolio-blocks {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.portfolio-block h3{
	padding: 10px;
	background-color: #3a3a3a;
	font-size: 30px;
}
/* Текст поверх изображения */
.text-overlay {
  top: 50%;
  color: white;
}
/* Кнопка под текстом */
.subtitle-box {
  padding: 10px 20px;
  border: 1px solid white; /* рамка */
  font-size: 1rem;
  top: 80%;
}

.text-overlay, .subtitle-box{
  position: absolute;
  transform: translate(-50%, -50%); /* центрирование текста */
  left: 50%;
}

.section-1{
	background-position: center; /* центрирует по горизонтали и вертикали */
   background-repeat: no-repeat; /* отключает повторение */
	background-size: cover;
	background-image: url('img/index/bg/bg_q80.webp');
	height: 860px;
	justify-content: center; /* горизонтальное */
	align-items: center;    /* вертикальное */
	font-size: 30px;
}

.section-1-bg{
	backdrop-filter: brightness(60%);
	width: 100%;
	height: 860px;
   place-items: center;
}

.section-1-text, .text-overlay{
  text-shadow: 4px 4px 4px rgba(0, 0, 0, 0.5);
}

.section-2, .section-3{
	font-size: 25px;
}

.section-1-text, .section-2 h2, .section-3 h2, .header-footer a, .footer-text h1, .text-overlay, .section-text-h{
	padding: 20px;
}

.footer-text h3{
	padding-top: 10px;
	color: red;
}

.section-1-text p{
	padding-block: 20px;
}

.section-text{
	padding: 40px;
	font-size: 20px;
	max-width: 1200px;
	margin: auto;
}

.section-text a{
	text-decoration-line: underline;
}

.footer-text, .text-overlay, .section-1, .section-2, .section-3, .section-text-h{
	text-align: center;
}

* {
    margin: 0;
    padding: 0;
}

body {
	font-family: "Montserrat Medium";
	background-color: black;
	color: white;
}

a{
	text-decoration: none;
	color: white;
}

a:hover{
	color: red;
	transition: 0.3s;
}

/* Изменения блока с фоном при наведении курсора */
.section-3 .block:hover img{
	transform: scale(1.1);
	filter: brightness(50%);
	transition: 0.3s;
}

.section-3 .block:hover .subtitle-box{
	color: white;    
    background-color: #ff0000bd;
      border: 0;
}

footer, .portfolio-block img, .section-3 img{
	display: block;
}

header, .footer-nav, .section-1, .section-1-text div, .block, .block{
	display: flex;
}

footer{
	padding: 10px 0 20px 0;
}

.footer-nav{
  justify-content: center;
}

.header-footer h1{
	margin-block: auto;
	font-size: 25px;
	padding-inline: 20px;
}

.header-footer img{
	height: 60px;
	opacity: 0.9;
	display: none;
}

.header-footer-logo{
	padding: 0 !important;
	margin: 0 !important;
}

/* Большие экраны (2K и выше) */
@media (min-width: 1921px) {
	.blocks {
		grid-template-columns: repeat(6, 1fr);
	}
	.portfolio-blocks {
		grid-template-columns: repeat(3, 1fr);
	}
	.subtitle-box{
		border: 2px solid white;
	}
	.section-1, .section-1-bg{
		height:1600px;
	}
}

/* Очень большие экраны (3200+ px, близко к 4K) */
@media (min-width: 3200px) {

}

/* Адаптивность для планшетов (2 колонки при ширине до 900 px) */
@media (max-width: 900px) {
	.header-footer a{
		margin: auto;
	}
  .blocks {
  	grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-blocks {
    grid-template-columns: 1fr;
  }
  .block-hide-cover{
		display:grid;  
  }
  .section-1, .section-1-bg{
	height:600px; 
  }
  .row{
	grid-template-columns: 1fr;
  }
	.column {
	  padding-block: 0px;
	}
  .text-overlay {
  		font-size: 20px;
  }
}

/* Адаптивность для мобильных (1 колонка при ширине до 600 px) */
@media (max-width: 600px) {
	header h1, .block-hide-cover, .block-hide-portfolio{
		display: none;	
	}
	.section-1{
		font-size: 20px;	
	}
  .blocks {
    grid-template-columns: 1fr;
  }
	.portfolio-block h3{
	font-size: 20px;
	}
	.blocks, .portfolio-blocks{
   gap: 2px;
	}
	.header-footer img{
	display: block;
	}
	.section-1-text{
	padding: 0;
	}
	.footer-nav{
   display: grid;
	}
}

/* Дополнительная адаптация для очень маленьких экранов (до 400 px) */
@media (max-width: 400px) {

}

/* Шрифты */
@font-face {
	font-family: "Montserrat Medium";
	src: url("fonts/montserrat-medium/montserrat-medium.eot"); /* IE9 Compat Modes */
	src: url("fonts/montserrat-medium/montserrat-medium.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */
		url("fonts/montserrat-medium/montserrat-medium.otf") format("opentype"), /* Open Type Font */
		url("fonts/montserrat-medium/montserrat-medium.svg") format("svg"), /* Legacy iOS */
		url("fonts/montserrat-medium/montserrat-medium.ttf") format("truetype"), /* Safari, Android, iOS */
		url("fonts/montserrat-medium/montserrat-medium.woff") format("woff"), /* Modern Browsers */
		url("fonts/montserrat-medium/montserrat-medium.woff2") format("woff2"); /* Modern Browsers */
	font-weight: normal;
	font-style: normal;	
	font-display: swap;
}
