/* index.css с улучшенной адаптивностью */
.header__content {
  z-index: 1;
  background-color: #eef1f2;
  min-height: 100dvh;
  overflow-x: clip;
}
.header__inner {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 100dvh;
  height: auto;
  transition: min-height 0.4s linear;
  box-sizing: border-box;
  padding: 80px 0 20px;
}
.header__box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: center;
  width: 100%;
  min-width: 0;
  position: relative;
}
.header__content-items {
  align-self: end;
  width: 100%;
  margin-top: 1rem;
  min-width: 0;
}
.header__about {
  max-width: 800px;
  font-size: 36px;
  color: var(--secondary-color);
  margin: auto 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.header__about-icon {
  width: 120px;
  display: inline-block;
}
.background-container {
  display: flex;
  width: 550px;
  overflow: hidden;
}
.header__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  flex-shrink: 0;
}

.header__img--active {
  opacity: 1;
}
.header__content-link {
  display: grid;
  align-items: center;
  justify-items: center;
  grid-template-rows: 150px auto;
  align-content: start;
  row-gap: 10px;
  padding: 10px 0;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  box-shadow: 0px 7px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.25s, box-shadow 0.25s;
  border-radius: 5px;
  max-width: 100%;
  width: 100%;
  height: 250px;
  min-width: 0;
}
.header__content-link:hover {
  transform: translateY(-10px);
  box-shadow: 0px 10px 16px rgba(0, 0, 0, 0.45);
}

.header__content-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 15px;
  line-height: 1.08;
}

.header__content-link-icon {
  width: 120px;
  display: inline-block;
  margin: 0 auto;
}

.header__content-link > img {
  width: auto;
  max-width: 100%;
  height: 170px;
  object-fit: contain;
  justify-self: center;
}

@media (max-width: 75rem) {
  .header__box {
    flex-direction: column;
    height: auto;
  }
  .header__content-items {
    position: static;
    width: 100%;
    margin-top: 1.25rem;
  }
}

@media (min-width: 48.001rem) and (max-width: 75rem) {
  .header__content {
    min-height: auto;
  }

  .header__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    min-height: auto;
    padding-top: 76px;
    padding-bottom: 16px;
  }

  .header__box {
    gap: 10px;
    justify-content: center;
  }

  .header__about {
    max-width: 100%;
    margin: 0;
    font-size: clamp(1.18rem, 2.35vw, 1.55rem);
    line-height: 1.25;
    text-shadow: none;
  }

  .header__about-icon {
    width: clamp(70px, 9vw, 95px);
  }

  .background-container {
    width: min(100%, 420px);
    height: clamp(150px, 18vw, 210px);
    margin: 0 auto;
  }

  .header__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .header__content-items {
    margin-top: 0;
  }

  .carousel {
    justify-content: center;
    gap: 8px;
    margin: 0;
  }

  .carousel__item {
    max-width: 160px;
  }

  .header__content-link {
    grid-template-rows: 80px auto;
    min-height: 130px;
    height: auto;
    row-gap: 4px;
    padding: 6px 4px;
    font-size: clamp(0.72rem, 1.35vw, 0.88rem);
    line-height: 1.12;
  }

  .header__content-link > img {
    height: 80px;
  }

  .header__content-link-icon {
    width: 68px;
  }
}

/* Улучшение адаптивности контейнеров */
@media (max-width: 64rem) {
  .container {
    padding: 0 1.5rem;
  }
}

/* Адаптивность для заголовка */
@media (max-width: 48rem) {
  .container {
    padding: 0 1rem;
  }

  .header__content {
    min-height: auto;
  }

  .header__box {
    gap: 10px;
    justify-content: center;
    min-height: auto;
    overflow: visible;
    border-radius: 0;
    padding: 0;
    isolation: auto;
  }

  .background-container {
    position: static;
    display: flex;
    width: min(100%, 420px);
    height: 180px;
    margin: 0 auto;
  }

  .background-container::after {
    content: none;
  }

  .header__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .header__inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 12px;
    padding-top: 76px;
    padding-bottom: 16px;
    min-height: auto;
  }

  .header__about {
    position: relative;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 12px;
    font-size: 1.32rem;
    font-weight: 500;
    line-height: 1.3;
    background: transparent;
    backdrop-filter: none;
    border-radius: 0;
    text-shadow: none;
  }

  .header__about-icon {
    width: 76px;
  }

  .header__content-items {
    margin-top: 0;
  }
}

@media (max-width: 30rem) {
  .header__about {
    padding: 10px;
    font-size: 1.08rem;
    line-height: 1.25;
  }

  .background-container {
    width: 100%;
    height: 150px;
  }

  .header__about-icon {
    width: 64px;
  }
}

@media (min-width: 75.001rem) and (max-height: 52rem) {
  .header__inner {
    min-height: 100dvh;
    padding-top: 90px;
    padding-bottom: 12px;
  }

  .header__about {
    /* font-size: 30px; */
    line-height: 1.2;
  }

  .background-container {
    width: min(100%, 460px);
  }

  .header__img {
    height: 330px;
    object-fit: contain;
  }

  .header__content-items {
    margin-top: 0.75rem;
  }

  .header__content-link {
    height: 220px;
    grid-template-rows: 150px auto;
    align-content: start;
    row-gap: 6px;
  }

  .header__content-link > img {
    height: 150px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    justify-self: center;
  }
}

/* Плитки продукции на главной странице */

.carousel {
  display: flex;
  justify-content: space-evenly;
  align-items: stretch;
  gap: clamp(10px, 1.4vw, 20px);
  flex-wrap: nowrap;
  padding: 0;
  margin: 20px 0 0;
}

.carousel__item {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  max-width: 240px;
}

@media (min-width: 48.001rem) and (max-width: 75rem) {
  .carousel {
    justify-content: center;
    gap: 8px;
    margin: 0;
  }

  .carousel__item {
    max-width: 160px;
  }
}

/* Улучшение адаптивности плиток */
@media (max-width: 48rem) {
  .carousel {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0;
    margin: 0;
  }

  .carousel__item {
    flex: 1 1 calc(50% - 10px);
    max-width: none;
  }

  .header__content-link {
    grid-template-rows: 78px auto;
    align-content: center;
    min-height: 126px;
    height: auto;
    row-gap: 5px;
    padding: 6px 4px;
    font-size: 0.82rem;
    line-height: 1.15;
  }

  .header__content-link > img {
    height: 78px;
  }

  .header__content-link-icon {
    width: 76px;
  }
}

@media (max-width: 30rem) {
  .carousel {
    gap: 8px;
    padding: 0;
    margin: 0;
  }

  .carousel__item {
    flex: 1 1 calc(50% - 8px);
    max-width: none;
  }

  .header__content-link {
    grid-template-rows: 70px auto;
    min-height: 116px;
    padding: 6px 4px;
    font-size: 0.76rem;
  }

  .header__content-link-icon {
    width: 64px;
  }

  .header__content-link > img {
    height: 70px;
  }
}

/* О нас */
.about {
  padding: 3.125rem 0;
  color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(0.625rem);
  box-shadow: 0 0.25rem 1.875rem rgba(0, 0, 0, 0.1);
}
.about__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
}

.about__text {
  flex: 1;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: left;
  padding-bottom: 1.25rem;
}
.about__text p {
  margin-bottom: 1.25rem;
  color: var(--secondary-color);
}
.about__text p:last-child {
  margin-bottom: 0;
}
.about__text-icon {
  width: 60px;
  display: inline-block;
}


/* Адаптивность секции "О нас" */
@media (max-width: 48rem) {
  .about {
    padding: 2.5rem 0;
  }

  .about__content {
    flex-direction: column;
    text-align: center;
  }

  .about__text {
    font-size: 1rem;
  }

  .about__text-icon {
    width: 45px;
  }
}

@media (max-width: 30rem) {
  .about {
    padding: 2rem 0;
  }

  .about__text {
    font-size: 0.9rem;
  }

  .about__text-icon {
    width: 40px;
  }
}

/* Клиенты */
.clients {
  padding: 3.75rem 0;
  background-color: #f3f4f8;
  color: var(--secondary-color);
  box-shadow: 0.0625rem 0.0625rem 0.25rem rgba(0, 0, 0, 0.5);
}
.clients__text {
  margin-bottom: 3.75rem;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
}
.clients-slider-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
}
.clients-slider {
  display: flex;
  align-items: center;
  cursor: grab;
  user-select: none;
}
.clients-slider:active {
  cursor: grabbing;
}
.clients-slide {
  flex: 0 0 auto;
  padding: 0 1.25rem;
  transition: transform 0.3s ease;
}
.clients__img {
  width: 30rem;
  height: 10.9375rem;
  object-fit: contain;
}

/* Улучшение адаптивности секции клиентов */
@media (max-width: 48rem) {
  .clients {
    padding: 2.5rem 0;
  }

  .clients__text {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
  }

  .clients__img {
    width: 20rem;
    height: 7rem;
  }

  .clients-slider-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .clients-slider-wrapper::-webkit-scrollbar {
    display: none; 
  }
}

@media (max-width: 30rem) {
  .clients {
    padding: 2rem 0;
  }

  .clients__text {
    font-size: 1.3rem;
    margin-bottom: 2rem;
  }

  .clients__img {
    width: 15rem;
    height: 5.5rem;
  }

  .clients-slide {
    padding: 0 0.75rem;
  }
}
