@font-face {
  font-family: "Roboto";
  src: url(../fonts/Roboto-Regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto";
  src: url(../fonts/Roboto-Bold.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ---------------------------------------------------------------- */

:root {
  --color-dark: #222222;
  --color-light: #ffffff;
  --color-dark-gray: #3d3d3d;
  --color-light-gray: #f6f6f6;

  --font-family-400: "Roboto", sans-serif;
  --font-family-700: "Roboto", sans-serif;
  --font-weight-400: 400;
  --font-weight-700: 700;
  --font-size-s: .875rem;
  --font-size-m: 1rem;
  --font-size-l: 1.25rem;
  /* Не используются xl */
  --font-size-xl: 1.5rem;
  --font-size-xxl: 1.75rem;

  --padding-xs: .25rem;
  --padding-s: .5rem;
  --padding-m: 1rem;
  --padding-l: 1.5rem;
  --padding-xl: 2rem;
  --padding-xxl: 4rem;

  --margin-xs: .25rem;
  --margin-s: .5rem;
  --margin-m: 1rem;
  --margin-l: 1.5rem;
  --margin-xl: 2rem;
  --margin-xxl: 4rem;

  /* --header-height: calc(var(--padding-m) * 2 + var(--padding-xxl)); */
  --header-height: 4.25rem;

  --border-radius: 2.5rem;
  --border: 1px solid var(--color-dark);

  /* Слайдер */
  --animation-duration: 25s;
  /* Длительность полного цикла */
  --image-count: 5;
  /* Количество изображений */

}

html {
  font-size: clamp(.875rem, 1.5vw, 1.125rem);
}

body {
  font-family: var(--font-family-400);
  font-weight: var(--font-weight-400);
  line-height: 1.6;
  color: var(--color-dark-gray);
  background-color: var(--color-light);
}

main {
  max-width: 75rem;
  margin: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-700);
  text-transform: uppercase;
}

a {
  color: var(--color-dark-gray);
  text-decoration: none;
}

/* visually-hidden спрятать текст */
.visually-hidden {
  position: absolute !important;
  width: .0625rem !important;
  height: .0625rem !important;
  margin: -0.0625rem !important;
  border: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  clip-path: inset(100%) !important;
  clip: rect(0 0 0 0) !important;
  overflow: hidden !important;
}

/* ---Нормализация конец--- */


/* ---Мраморит--- */
.index-main {
  height: var(--padding-index-main);
}

.main-container {
  height: var(--padding-index-main);
  padding: var(--padding-xl) var(--padding-xxl);
}

.main-description {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-description-title {
  text-align: center;
  padding-bottom: var(--padding-s);
  border-bottom: .0625rem solid var(--color-dark-gray);
}

.main-description-item {
  display: flex;
  flex-direction: column;
  max-width: 35%;
  padding-right: var(--padding-xl);
}

.main-description-img {
  max-width: 65%;
  border-radius: var(--border-radius);
  transition: transform 0.3s, box-shadow 0.3s;
}

.main-description-img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Мраморит-Слайдер */
.hero {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: var(--font-size-xl);
  font-family: var(--font-family-700);
  font-weight: var(--font-weight-700);
  color: var(--color-light-gray);
  text-shadow: .125rem .125rem .25rem rgba(0, 0, 0, 0.8),
    -0.0625rem -0.0625rem .125rem rgba(255, 255, 255, 0.4);

  /* Не забыть добавить rem формулу */
  height: calc(100vh - var(--header-height));
  width: 100%;
  margin-bottom: calc(var(--margin-xxl) * 2);
  overflow: hidden;
  position: relative;
  box-sizing: border-box;

  background-size: cover;
  background-position: center;
  animation: changeBackground var(--animation-duration) infinite;
  /* animation-delay: 1s; */
  /*Пауза в начале*/
}

@keyframes changeBackground {

  0%,
  15% {
    background-image: url("../images/photo1.jpg");
  }

  20%,
  35% {
    background-image: url("../images/photo2.jpg");
  }

  40%,
  55% {
    background-image: url("../images/photo3.jpg");
  }

  60%,
  75% {
    background-image: url("../images/photo4.jpg");
  }

  80%,
  95% {
    background-image: url("../images/photo5.jpg");
  }

  100% {
    background-image: url("../images/photo1.jpg");
  }
}



/* ---Галерея--- */
.main-gallery {
  padding: 1rem 1rem;
}

.gallery {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;

  /* Принудительно закрытый спойлер */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.gallery_card {
  position: relative;
  height: 155px;
  cursor: pointer;
  overflow: hidden;
}

.gallery_card_pic {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s, box-shadow 0.3s;
  border-radius: 1rem;
}

.gallery_card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.slider {
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

.active {
  opacity: 1;
  pointer-events: all;
}

.slider_container {
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  width: 80vw;
  height: 80vh;
}



/* О нас */

.about-void {
  flex: 0 0 15%;
  /* Элемент занимает 15% ширины контейнера. для выравнивания текста*/
}

.about {
  display: flex;
  margin-bottom: var(--margin-m);
}

.about-content {
  flex: 1;
  /* Контент займет оставшееся пространство */
}

.about-title {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--padding-m);
  gap: 1rem;
}

.about-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: var(--padding-m);
}

.svg-icon {
  width: 1.6rem;
  height: 1.6rem;
}



/* Общие стили для кнопок */
.slider_btn {
  background-color: transparent;
  border: none;
  cursor: pointer;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  transition: all 0.3s ease;
  z-index: 10;
}

.slider_btn_left {
  left: 10px;
  top: 50%;
}

.slider_btn_right {
  right: 10px;
  top: 50%;
}

.slider_btn_close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 20;
}

/* Стиль для иконок */
.slider_btn svg {
  width: 30px;
  height: 30px;
  fill: none;
}

/* Эффекты при наведении */
.slider_btn:hover {
  transform: scale(1.1);
  background-color: rgba(0, 0, 0, 0.3);
  border-radius: 50%;
}

.slider_btn:focus {
  outline: none;
}

/* Стили для спойлера */
.spoiler {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spoiler_button {
  width: 90%;
  text-align: center;
  cursor: pointer;
  background: var(--color-light-gray);
  color: var(--color-dark-gray);
  border: none;
  padding: 1rem 2rem;
  margin: 1rem;
  border-radius: 1rem;
  border-bottom: 1px solid var(--color-dark-gray);
}



/* ---Материалы--- */
.materials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: var(--padding-s);
}

.materials-attention {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.9rem;
  padding: var(--padding-xxl);
}

.materials-name {
  padding: var(--padding-xs);
  text-transform: capitalize;
  border-bottom: 1px solid var(--color-dark-gray);
  margin-bottom: var(--margin-m);
}

.materials-mramor,
.materials-granit,
.materials-quartz {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  /* padding: var(--padding-xl); */
  margin-bottom: calc(var(--margin-xxl)*2);
}

.materials-quartz {
  margin-bottom: var(--margin-m);
}

.material-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 22%;
}

.material-item img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  transition: transform 0.3s, box-shadow 0.3s;
}

.material-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.material-item span {
  padding-top: var(--padding-s);
  font-size: 0.9rem;
}



/* ---Контакты--- */
.content-contacts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--padding-l) var(--padding-l);
}

.contacts-title {
  padding: var(--padding-m);
}

.map-container {
  border: .0625rem solid var(--color-dark-gray);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin: var(--margin-m);
  margin-bottom: var(--margin-xl);
}

.map-container iframe {
  width: 100%;
  height: 25rem;
}



/* ---Юридическая инфа--- */
.page-legal {
  font-family: Arial, sans-serif;
  padding: 1.25rem;
  border: .0625rem solid #ddd;
  border-radius: .3125rem;
  max-width: 50rem;
  margin: 1.25rem auto;
}

.page-legal ul {
  margin: .625rem 0;
  padding-left: 1.25rem;
}



/* Header */
header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: sticky;
  top: 0;
  padding: var(--padding-m) var(--padding-m);
  row-gap: 1.25rem;
  border-bottom: 1px solid rgba(34, 34, 34, 0.4);
  box-shadow: 0 2px 4px rgba(34, 34, 34, 0.2);
  background-color: var(--color-light);
  z-index: 1050;
  /* Хедер находится выше остальных обычных элементов */
}

.header-menu-list {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 2.5rem;
}

.header-menu-link {
  display: inline-flex;
  align-items: center;
  column-gap: .3125rem;
  padding-block: .3125rem;
  height: 2.1875rem;
  font-family: var(--font-family-400);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .075rem;
}

/* Footer */
footer {
  border-top: 1px solid rgba(34, 34, 34, 0.4);
  box-shadow: 0 -2px -4px rgba(34, 34, 34, 0.2);
  padding: 1.25rem 1.25rem;
}

.footer-slogan {
  display: flex;
  justify-content: center;
  text-align: center;
  padding-bottom: var(--padding-m);
}

.footer-menu {
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
}

.footer-info {
  display: inline-block;
  flex-direction: column;
  align-items: center;
}

.footer-legal {
  display: inline-block;
  flex-direction: column;
  align-items: center;
}

.footer ul {
  list-style: none;
}



@media (max-width: 768px) {
  .main-container {
    padding: var(--padding-l) var(--padding-xs);
  }

  .main-description {
    display: flex;
    flex-direction: column-reverse;
  }

  .main-description-title {
    padding: var(--padding-m);
  }

  .main-description-item {
    max-width: 65%;
    padding: 0px;
  }

  .main-description-img {
    max-width: 80%;
  }

  .material-item {
    max-width: 30%;
  }

  .about-void {
    flex: 0 0 0%;
    padding-left: var(--padding-m);
  }

  .slider_btn:hover {
    transform: scale(1);
    background-color: transparent;
    border-radius: 0;
  }
}

@media (max-width: 580px) {
  .material-item {
    max-width: 45%;
  }

  .slider_btn_close {
    position: absolute;
    top: 50px;
    right: 10px;
    z-index: 20;
  }
}