:root {
  --color-primary: #555555;
  --color-primary-dark: #303030;
  --color-secondary: #9da4bd;
  --color-secondary-transparent: rgba(157, 164, 189, 0.6);
  --color-brand: #ff6c00;
  --color-white: #ffffff;
  --color-background-primary: #ffffff;
  --color-background-secondary: #f7f7f7;
  --color-background-contacts: #191c26;
  --color-form-line: rgba(157, 164, 189, 0.4);
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  color: var(--color-primary);
  font-family: 'Open Sans', sans-serif;
  background-color: var(--color-background-primary);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.85;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul {
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 15px;
}

@media screen and (min-width: 320px) and (max-width: 479px) {
  .container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
  }
}

@media screen and (min-width: 480px) {
  .container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0;
  }
}

@media screen and (min-width: 768px) {
  .container {
    max-width: 768px;
    padding: 0 39px;
    margin: 0 auto;
  }
}

@media screen and (min-width: 1280px) {
  .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 55px;
  }
}

.section-tagline {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  color: var(--color-primary-dark);
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-tagline::before {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background-color: currentColor;
}

.section-tagline-light {
  color: var(--color-secondary-transparent);
}

.section-title {
  font-family: 'Raleway', sans-serif;
  color: var(--color-primary-dark);
  font-size: 28px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 44px;
}

@media screen and (min-width: 1280px) {
  .section-title {
    font-family: 'Raleway', sans-serif;
    color: var(--color-primary-dark);
    font-size: 42px;
    line-height: 1.16;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 44px;
  }
}

.section-title-light {
  color: var(--color-white);
  text-align: center;
  font-size: 42px;
}

/* Header */
.header {
  position: absolute;
  width: 100%;
}

.header-container {
  position: relative;
  padding: 40px 15px 0 15px;
}

@media screen and (max-width: 767px) {
  .header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

@media screen and (min-width: 320px) and (max-width: 479px) {
  .header-container {
    padding: 40px 30px 0 30px;
  }
}

@media screen and (min-width: 480px) {
  .header-container {
    padding: 40px 30px 0 30px;
  }
}

@media screen and (min-width: 768px) {
  .header-container {
    padding: 32px 40px 0 50px;
    display: flex;
    margin: 0 auto;
  }
}

@media screen and (min-width: 1280px) {
  .header-container {
    align-items: center;
    padding: 32px 55px 0 55px;
  }
}

@media screen and (min-width: 768px) {
  .header-logo {
    margin-right: 50px;
  }
}

.header-icon {
  width: 70px;
  height: 56px;
  fill: var(--color-white);
}

@media screen and (min-width: 768px) {
  .header-icon {
    fill: var(--color-primary-dark);
  }
}

.header-nav-container {
  display: flex;
}

@media screen and (min-width: 1280px) {
  .header-nav-container {
    width: 100%;
    display: flex;
  }
}

@media screen and (min-width: 768px) {
  .header-nav-container {
    padding-top: 8px;
  }
}

@media screen and (min-width: 1280px) {
  .header-nav-container {
    padding-top: 0;
    padding-right: 55px;
    align-items: baseline;
  }
}

.header-nav {
  display: none;
}

@media screen and (min-width: 768px) {
  .header-nav {
    display: flex;
    padding-top: 10px;
  }
}

.header-menu {
  display: flex;
}

@media screen and (min-width: 768px) {
  .header-item:not(:last-child) {
    margin-right: 25px;
  }
}

@media screen and (min-width: 1280px) {
  .header-item:not(:last-child) {
    margin-right: 40px;
  }
}

.header-link {
  color: var(--color-white);
  font-size: 12px;
  line-height: 1.33;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-decoration: none;
  transition: color 300ms linear;
}

.header-link:hover,
.header-link:focus {
  color: var(--color-brand);
  cursor: pointer;
}

.header-contacts {
  margin-left: auto;
  display: none;
}

@media screen and (min-width: 768px) {
  .header-contacts {
    display: flex;
    flex-direction: column-reverse;
    margin-left: 20px;
    align-items: center;
  }
}

@media screen and (min-width: 1280px) {
  .header-contacts {
    flex-direction: row;
    align-items: baseline;
    margin-left: auto;
    margin-right: 2px;
    gap: 40px;
  }

  .header-link-tel {
    padding: 0;
  }
}

.button {
  padding: 12px 20px;
  color: var(--color-white);
  background-color: transparent;
  font-size: 12px;
  line-height: 1.33;
  font-weight: 600;
  letter-spacing: 1.08px;
  text-transform: uppercase;
  border: 1px solid var(--color-brand);
  border-radius: 25px;
  cursor: pointer;
  transition: color 300ms linear, background-color 300ms linear;
}

.button:hover {
  background-color: var(--color-brand);
}

@media screen and (min-width: 768px) {
  .header-button {
    margin-bottom: 20px;
  }
}

@media screen and (min-width: 1280px) {
  .header-button {
    margin-bottom: 0;
  }
}

.button-dark {
  color: var(--color-primary-dark);
  transition: color 300ms linear, background-color 300ms linear;
}

.button-dark:hover {
  color: var(--color-background-primary);
}

/* Burger menu */
.burger-menu-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: transparent;
  border: none;
  fill: var(--color-white);
  cursor: pointer;
}

.burger-menu-open:hover,
.burger-menu-open:focus {
  fill: var(--color-brand);
}
.icon-burger-open {
  transition: fill 300ms linear;
}

@media screen and (min-width: 768px) {
  .burger-menu-open {
    display: none;
  }
}

/* Mobile-menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 100%;
  max-width: 337px;
  max-height: 796px;
  background-color: var(--color-white);
  transform: translateX(100%);
  transition: transform 500ms linear;
  box-shadow: -21px 22px 28px -11px rgba(111, 111, 111, 0.67) inset;
}

.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu-container {
  display: flex;
  flex-direction: column;
  padding: 118px 0 0 40px;
}

.burger-menu-close {
  position: absolute;
  top: 48px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background-color: transparent;
  border: none;
  fill: var(--color-primary-dark);
  cursor: pointer;
}

.burger-menu-close:hover,
.burger-menu-close:focus {
  fill: var(--color-brand);
}

.icon-burger-close {
  transition: fill 300ms linear;
}

.mobile-navigation {
  margin-bottom: 64px;
}

.mobile-item {
  margin-bottom: 24px;
}

.mobile-item:last-child {
  margin-bottom: 0;
}

.mobile-link {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--color-primary-dark);
  text-decoration: none;
  cursor: pointer;
  transition: color 300ms linear;
}

.mobile-link:hover,
.mobile-link:focus {
  color: var(--color-brand);
}

.mobile-contacts {
  margin-bottom: 64px;
}

.mobile-tel {
  display: block;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color 300ms linear;
}

.mobile-tel:hover {
  color: var(--color-brand);
}

.mobile-soc {
  position: relative;
  padding-right: 105px;
  margin-left: 100px;
}

.mobile-soc-item::before {
  position: absolute;
  top: 4px;
  left: -70px;
  content: '';
  width: 1px;
  height: 60px;
  background-color: var(--color-primary-dark);
  transform: rotate(90deg) translate(-23px);
}

.mobile-soc-item:first-child {
  margin-bottom: 24px;
}

.mobile-soc-link {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color 300ms linear;
}

.mobile-soc-link:hover {
  color: var(--color-brand);
}

/* Hero section */
.hero-container {
  min-height: 580px;
  background-color: #303030;
  background-color: var(--color-background-secondary);
  background-image: linear-gradient(
      rgba(25, 28, 38, 0.2),
      rgba(25, 28, 38, 0.2)
    ),
    url('../images/Hero-mobile@1x.jpg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  padding: 208px 30px 0 31px;
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .hero-container {
    background-image: linear-gradient(
        rgba(25, 28, 38, 0.2),
        rgba(25, 28, 38, 0.2)
      ),
      url(../images/Hero-mobile@2x.jpg);
  }
}

@media screen and (min-width: 768px) {
  .hero-container {
    width: 576px;
    height: 680px;
    padding-top: 280px;
    padding-left: 70px;
    margin-left: auto;

    background-image: linear-gradient(
        rgba(25, 28, 38, 0.2),
        rgba(25, 28, 38, 0.2)
      ),
      url(../images/Hero-tablet@1x.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .hero-container {
    background-image: linear-gradient(
        rgba(25, 28, 38, 0.2),
        rgba(25, 28, 38, 0.2)
      ),
      url(../images/Hero-tablet@2x.jpg);
  }
}

@media screen and (min-width: 1280px) {
  .hero-container {
    width: 1073px;
    height: 672px;
    padding: 271px 0 0 99px;

    background-image: linear-gradient(
        rgba(25, 28, 38, 0.2),
        rgba(25, 28, 38, 0.2)
      ),
      url(../images/Hero-desktop@1x.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .hero-container {
    background-image: linear-gradient(
        rgba(25, 28, 38, 0.2),
        rgba(25, 28, 38, 0.2)
      ),
      url(../images/Hero-desktop@2x.jpg);
  }
}

@media screen and (max-width: 767px) {
  .soc {
    display: none;
  }
}

@media screen and (min-width: 768px) {
  .soc {
    position: absolute;
    display: flex;

    width: 85px;
    height: 680px;

    padding: 0 30px 0 30px;
  }
}

@media screen and (min-width: 1280px) {
  .soc {
    height: 672px;
    margin-right: 0;
    padding: 0 36px 0 20px;
  }
}

@media screen and (max-width: 767px) {
  .hero-socials {
    display: none;
  }
}

.hero-socials {
  position: absolute;
  bottom: 150px;
  display: flex;
  align-items: center;
  gap: 40px;
  transform: rotate(-90deg) translate(-20px);
  transform-origin: top left;
}

.hero-socials::before {
  position: absolute;
  top: -15px;
  left: -65px;
  content: '';
  display: block;
  width: 1px;
  height: 60px;
  background-color: currentColor;
  transform: rotate(-90deg);
}

.socials-link {
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--color-primary-dark);
  text-decoration: none;
  transition: color 300ms linear;
}

.socials-link:hover,
.socials-link:focus {
  color: var(--color-brand);
}

.hero-title {
  margin-bottom: 20px;
  font-family: 'Raleway', sans-serif;
  color: var(--color-white);
  font-size: 48px;
  line-height: 1.16;
  font-weight: 700;
  letter-spacing: 0.05em;
}

@media screen and (min-width: 1280px) {
  .hero-title {
    font-size: 72px;
    line-height: 1.18;
  }
}

.hero-text {
  color: var(--color-secondary);
  max-width: 306px;
  font-size: 16px;
  line-height: 1.66;
  letter-spacing: 0.36px;
  margin-bottom: 0;
}

@media screen and (min-width: 768px) {
  .hero-text {
    max-width: 374px;
  }
}

@media screen and (min-width: 1280px) {
  .hero-text {
    font-size: 18px;
    line-height: 1.67;
    max-width: 400px;
  }
}

/* About section */
.about-section {
  padding: 84px 30px;
}

@media screen and (min-width: 768px) {
  .about-section {
    padding: 100px 0;
  }
}

@media screen and (min-width: 1280px) {
  .about-section {
    padding: 130px 0 130px 55px;
  }
}

@media screen and (min-width: 768px) {
  .about-container {
    display: flex;
  }
}

@media screen and (min-width: 1280px) {
  .about-container {
    gap: 64px;
  }
}

.about-images {
  display: flex;
}

.about-images {
  display: none;
}

@media screen and (min-width: 768px) {
  .about-images {
    display: flex;
    flex-direction: column;
  }
}

@media screen and (min-width: 1280px) {
  .about-images {
    flex-direction: row;
  }
}

.about-item {
  width: 330px;
  height: auto;
  margin-right: 30px;
}

.about-item:first-child {
  margin-bottom: 30px;
}

@media screen and (min-width: 1280px) {
  .about-item {
    max-width: 270px;
    height: auto;
  }

  .about-item:first-child {
    margin-bottom: 0;
  }

  .about-item:last-child {
    margin-right: 0;
  }
}

.about-content {
  max-width: 500px;
}

@media screen and (max-width: 768px) {
  .about-title {
    max-width: 330px;
  }
}

.about-title {
  margin-bottom: 20px;
}

.about-first-text {
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

@media screen and (min-width: 1280px) {
  .about-first-text {
    font-size: 18px;
    line-height: 1.66;
    letter-spacing: 0.02em;
    margin-bottom: 20px;
  }
}

.about-second-text {
  letter-spacing: 0.02em;
  margin-bottom: 40px;
}

/* Services section */
.services-title {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 42px;
  letter-spacing: 0.05em;
  color: var(--color-white);
  margin-bottom: 44px;
}

.services-section {
  max-width: 480px;
  min-height: 826px;
  background-color: #111319;
  background-image: url(../images/services-mobile@1x.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin: 0 auto;
  padding: 84px 30px;
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .services-section {
    background-image: url(../images/services-mobile@2x.png);
  }
}

@media screen and (min-width: 768px) {
  .services-section {
    max-width: 768px;
    min-height: 858px;
    padding: 100px 0;
    background-image: url(../images/services-tablet@1x.png);
  }
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .services-section {
    background-image: url(../images/services-tablet@2x.png);
  }
}

@media screen and (min-width: 1280px) {
  .services-section {
    background-color: #111319;
    max-width: 1280px;
    min-height: 718px;
    background-image: linear-gradient(
        rgba(17, 19, 25, 0.2),
        rgba(17, 19, 25, 0.6)
      ),
      url('../images/services-desktop@1x.png');
    padding: 130px 0;
  }
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .services-section {
    background-image: url(../images/services-desktop@2x.png);
  }
}

.services-container {
  background-image: linear-gradient(
    180deg,
    #171a24 0%,
    rgba(23, 26, 36, 0.2) 100%
  );
  padding: 30px;
  margin-bottom: 50px;
}

@media screen and (min-width: 768px) {
  .services-container {
    padding: 30px 40px;
  }
}

@media screen and (min-width: 1280px) {
  .services-container {
    display: flex;
    padding: 0;
  }
}

@media screen and (min-width: 1280px) {
  .services-list {
    width: 585px;
    height: 240px;
    padding: 30px 40px;
  }

  .services-list-left {
    background-image: linear-gradient(
      180deg,
      #171a24 0%,
      rgba(23, 26, 36, 0.2) 100%
    );
  }

  .services-list-right {
    background-image: linear-gradient(
      180deg,
      #090b13 0%,
      rgba(9, 11, 19, 0.2) 100%
    );
  }
}

.services-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 20px;
}

.services-list-right .services-item:last-child {
  margin: 0;
}

@media screen and (min-width: 1280px) {
  .services-list-left .services-item:last-child {
    margin: 0;
  }
}

.services-item::after {
  content: '';
  height: 1px;
  width: 20px;
  margin-left: 6px;
  margin-right: 6px;
  background-color: rgba(157, 164, 189, 0.12);
  flex-grow: 1;
}

.service-name {
  color: var(--color-secondary);
  font-size: 14px;
  line-height: 2.14;
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

.service-name:last-child {
  order: 1;
}

@media screen and (min-width: 768px) {
  .service-name {
    font-size: 18px;
    line-height: 1.66;
  }
}

.services-button {
  display: block;
  margin: 0 auto;
}

/* Achievements section*/
.achievements-container {
  display: flex;
  padding: 84px 30px;
  flex-wrap: wrap-reverse;
}

@media screen and (min-width: 768px) {
  .achievements-container {
    padding: 100px 39px;
  }
}

@media screen and (min-width: 1280px) {
  .achievements-container {
    padding: 106px 86px 145px 116px;
    display: flex;
  }
}

.achievements-list {
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

@media screen and (min-width: 480px) {
  .achievements-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media screen and (min-width: 768px) {
  .achievements-list {
    max-width: 450px;
    margin: 0;
    margin-left: auto;
  }
}

@media screen and (min-width: 1280px) {
  .achievements-list {
    margin-right: 130px;
  }
}

.achievements-item {
  padding: 20px 30px;
  margin-bottom: 30px;
  width: 191px;
  height: 133px;
  background-color: var(--color-background-secondary);
}

.achievements-item:last-child {
  margin: 0;
}

@media screen and (min-width: 480px) {
  .achievements-item {
    margin: 0;
  }
}
@media screen and (min-width: 480px) {
  .achievements-item:nth-child(2n) {
    margin-top: 20px;
  }
}
@media screen and (min-width: 480px) {
  .achievements-item:first-child {
    margin-bottom: 20px;
  }
}

@media screen and (min-width: 480px) {
  .achievements-item:nth-child(2n + 1) {
    margin-right: 20px;
  }
}

@media screen and (min-width: 768px) {
  .achievements-item {
    width: 210px;
  }
}

@media screen and (min-width: 1280px) {
  .achievements-item {
    width: 170px;
    padding: 20px;
  }
}

.achievements-statistics {
  display: block;
  color: var(--color-primary-dark);
  text-align: center;
  font-size: 42px;
  line-height: 1.36;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.achievements-statistics-plus {
  color: var(--color-brand);
  font-size: 16px;
  line-height: 1.37;
  font-weight: 600;
  text-align: center;
  vertical-align: top;
}

.achievements-explanation {
  color: var(--color-primary-dark);
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0;
}

.achievements-title {
  margin-bottom: 20px;
  max-width: 318px;
}

@media screen and (min-width: 1280px) {
  .achievements-title {
    max-width: 418px;
  }
}

@media screen and (min-width: 768px) {
  .achievements-content {
    max-width: 500px;
  }
}

@media screen and (min-width: 1280px) {
  .achievements-content {
    max-width: 470px;
  }
}

.achievements-description {
  color: var(--color-primary);
  font-size: 18px;
  line-height: 1.66;
  letter-spacing: 0.02em;
  margin-bottom: 44px;
}

@media screen and (min-width: 1280px) {
  .achievements-description {
    margin-bottom: 0;
  }
}

/* Masters section */
.masters-section {
  background-color: var(--color-background-secondary);
  max-width: 1280px;
  margin: 0 auto;
}

.masters-container {
  padding: 84px 30px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .masters-container {
    padding: 100px 120px;
  }
}

@media screen and (min-width: 1280px) {
  .masters-container {
    padding: 130px 0;
    max-width: 1280px;
    margin: 0 auto;
  }
}

.masters-title {
  font-size: 42px;
}

@media screen and (min-width: 1280px) {
  .masters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
  }
}

.masters-item {
  flex-basis: calc((100% - 60px) / 3);
}

.masters-item {
  margin-bottom: 64px;
}
.masters-item:last-child {
  margin-bottom: 0;
}

.master-image {
  position: relative;
  overflow: hidden;
}

.master-info {
  text-align: center;
  padding: 30px 20px 0 20px;
}

.master-name {
  color: var(--color-primary-dark);
  font-size: 18px;
  line-height: 1.33;
  letter-spacing: 0.36px;
  margin-bottom: 8px;
}

.master-job {
  color: var(--color-brand);
  font-size: 14px;
  line-height: 1.36;
  letter-spacing: 0.02em;
  margin-bottom: 30px;
}

.soc-list {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.soc-item {
  width: 44px;
  height: 44px;
}

.soc-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  fill: var(--color-primary-dark);
  background-color: var(--color-background-primary);
  border-radius: 50%;
  transition: fill 300ms linear;
}

.soc-icon {
  width: 20px;
  height: 20px;
}

.soc-link:hover {
  fill: var(--color-brand);
}

/* Gallery section*/
.gallery-container {
  padding: 84px 30px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .gallery-container {
    padding: 100px 0;
  }
}

@media screen and (min-width: 1280px) {
  .gallery-container {
    padding: 130px 0;
  }
}

.gallery-text {
  margin-bottom: 44px;
}

.visually-hidden {
  position: absolute;
  white-space: nowrap;
  width: 1px;
  height: 1px;
  overflow: hidden;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  margin: -1px;
}

@media screen and (min-width: 768px) {
  .gallery-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
  }
}

.gallery-item {
  display: block;
  margin-bottom: 30px;
}

@media screen and (min-width: 768px) {
  .gallery-item {
    margin-bottom: 0;
  }
}

.gallery-item:last-child {
  margin-bottom: 0;
}

@media screen and (min-width: 768px) {
  .gallery-item {
    width: 330px;
    flex-basis: calc((100% - 30px) / 2);
  }
}

@media screen and (min-width: 1280px) {
  .gallery-item {
    width: 270px;
    margin-bottom: 0;
    flex-basis: calc((100% - 90px) / 4);
  }
}

/* Footer */
.footer {
  background-color: var(--color-background-secondary);
  max-width: 1280px;
  margin: 0 auto;
}

.footer-container {
  padding: 44px 30px;
  display: flex;
  flex-direction: column-reverse;
}

@media screen and (min-width: 768px) {
  .footer-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row;
    padding: 56px 0;
  }
}

.footer-text {
  margin-bottom: 0;
  color: var(--color-secondary);
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  letter-spacing: 2.2px;
}

.footer-container-list {
  margin-bottom: 20px;
  margin-left: auto;
}

@media screen and (min-width: 768px) {
  .footer-container-list {
    margin-bottom: 0;
  }
}

.footer-list {
  position: relative;
  display: flex;
  gap: 40px;
}

.footer-list::before {
  position: absolute;
  content: '';
  top: -38px;
  left: -80px;
  width: 1px;
  height: 60px;
  background-color: var(--color-primary-dark);
  transform: rotate(-90deg) translate(-23px);
}

/* Contact section */
.contact-section {
  background-color: var(--color-background-contacts);
  background-image: url('../images/contacts-mobile@1x.png');
  background-position: bottom;
  background-repeat: no-repeat;
  background-size: 480px;
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .contact-section {
    background-image: url('../images/contacts-mobile@2x.png');
  }
}

@media screen and (min-width: 768px) {
  .contact-section {
    background-image: url('../images/contacts-tablet@1x.png');
    background-size: 768px 530px;
  }
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .contact-section {
    background-image: url('../images/contacts-tablet@2x.png');
  }
}

@media screen and (min-width: 1280px) {
  .contact-section {
    background-image: url('../images/contacts-desktop@1x.png');
    background-position: right;
    background-size: 625px;
    max-width: 1280px;
    margin: 0 auto;
  }
}

@media (min-device-pixel-ratio: 2),
  (min-resolution: 192dpi),
  (min-resolution: 2dppx) {
  .contact-section {
    background-image: url('../images/contacts-desktop@2x.png');
  }
}

@media screen and (min-width: 1280px) {
  .contact-container {
    display: flex;
  }
}

.contact-form {
  padding: 84px 30px;
}

@media screen and (min-width: 768px) {
  .contact-form {
    padding: 100px 0;
  }
}

@media screen and (min-width: 1280px) {
  .contact-form {
    width: 50%;
    padding: 130px 0 130px 0;
  }
}

.form-container {
  margin-bottom: 44px;
}

@media screen and (min-width: 768px) {
  .form-container {
    display: flex;
    flex-wrap: wrap;
  }
}

@media screen and (min-width: 1280px) {
  .form-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 44px;
  }
}

.form-field {
  position: relative;
  height: 24px;
  margin-bottom: 44px;
}

@media screen and (min-width: 768px) {
  .form-field {
    width: 330px;
  }
}

@media screen and (min-width: 768px) {
  .form-field:first-child {
    margin-right: 30px;
  }
}

.form-field:first-child,
.form-field:nth-child(2) {
  flex-basis: calc((100% - 30px) / 2);
}

.form-field:hover .form-input {
  border-bottom: 1px solid var(--color-white);
  cursor: pointer;
}

.form-field:hover .form-label {
  color: var(--color-white);
  cursor: pointer;
}

.form-label {
  position: absolute;
  top: 0;
  left: 0;
  text-transform: uppercase;
  color: var(--color-form-line);
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  letter-spacing: 1.1px;
  transition: transform 300ms linear, color 300ms linear;
}

.form-input {
  color: var(--color-white);
  width: 100%;
  height: 24px;
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  letter-spacing: 1.1px;
  outline: none;
  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--color-form-line);
  transition: border 300ms linear;
}

.form-input:focus + .form-label {
  color: var(--color-white);
  transform: translateY(-100%);
}

.form-input:not(:placeholder-shown) + .form-label {
  color: var(--color-white);
  transform: translateY(-100%);
}

/* Textarea */
.form-textarea {
  position: relative;
  flex-basis: 100%;
  height: 60px;
}

.textarea {
  height: 100%;
  resize: none;
}

.textarea-label {
  position: absolute;
  top: 0;
  left: 0;
  text-transform: uppercase;
  color: var(--color-form-line);
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  letter-spacing: 1.1px;
  transition: transform 300ms linear, color 300ms linear;
}

.form-textarea:hover .textarea {
  border-bottom: 1px solid var(--color-white);
  cursor: pointer;
}

.form-textarea:hover .textarea-label {
  color: var(--color-white);
  cursor: pointer;
}

.form-input:not(:placeholder-shown) + .textarea-label {
  color: var(--color-white);
  transform: translateY(-100%);
}

.form-input:focus + .textarea-label {
  color: var(--color-white);
  transform: translateY(-100%);
}

.form-button {
  display: block;
  margin: 0 auto;
  width: 160px;
}

@media screen and (min-width: 768px) {
  .form-button {
    margin: 0;
  }
}

/* Contact info */
.contact-info {
  padding: 84px 30px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .contact-info {
    padding: 100px 0;
  }
}

@media screen and (min-width: 1280px) {
  .contact-info {
    width: 50%;
    padding: 130px 0 130px 100px;
  }
}

.contact-title {
  color: var(--color-white);
  font-family: Raleway;
  font-size: 42px;
  line-height: 1.19;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 40px;
  text-align: center;
}

.contact-list {
  max-width: 400px;
  margin-bottom: 44px;
}

@media screen and (min-width: 1280px) {
  .contact-list {
    max-width: 260px;
    margin-bottom: 70px;
  }
}

.contact-item {
  margin-bottom: 20px;
}

.contact-item:last-child {
  margin-bottom: 0;
}

.contact-link {
  display: flex;
  color: var(--color-secondary);
  gap: 16px;
  font-size: 18px;
  line-height: 1.66;
  letter-spacing: 0.36px;
  text-decoration: none;
}

.link-underline {
  text-decoration: underline;
}

.contact-icon {
  align-items: center;
  fill: transparent;
  stroke: currentColor;
}

/*  */
.contact-time-container {
  position: relative;
  width: 330px;
}

.contact-time-title {
  color: var(--color-white);
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  margin-left: 80px;
}

.contact-time-title::before {
  position: absolute;
  display: block;
  content: '';
  top: 0;
  left: 30px;
  width: 1px;
  height: 60px;
  background-color: var(--color-form-line);
  transform: rotate(90deg) translate(-23px);
}

.contact-time-text {
  color: var(--color-secondary);
  font-size: 18px;
  line-height: 1.66;
  letter-spacing: 0.36px;
  margin-bottom: 0;
}

/* Modal */
.backdrop {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: var(--color-secondary-transparent);
  padding: 20px 0;
  transition: opacity 500ms, visibility 500ms;
}

.backdrop.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.modal {
  position: absolute;
  min-width: 100%;
  min-height: 400px;
  border-radius: 10px;
  padding: 30px;

  background-color: var(--color-background-contacts);
  box-shadow: inset 0 0 10px 5px rgba(244, 244, 244, 0.3);
  transform: translate(-50%, -50%);
  transform: scale(1);
  transition: transform 500ms;
}

@media screen and (min-width: 480px) {
  .modal {
    min-width: 450px;
  }
}

@media screen and (min-width: 1280px) {
  .modal {
    min-width: 530px;
  }
}

.backdrop.is-hidden .modal {
  transform: scale(0);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;

  background-color: transparent;
  border: none;
  align-items: center;
  display: flex;
  cursor: pointer;
  margin: 0;
}

.modal-icon {
  width: 20px;
  height: 20px;
  fill: var(--color-white);
  transition-property: fill;
  transition-duration: 300ms;
}

.modal-icon:hover,
.modal-icon:focus {
  fill: var(--color-brand);
}

.modal-title {
  font-family: 'Raleway';
  color: var(--color-white);
  font-size: 42px;
  line-height: 1.16;
  font-weight: 700;
  text-align: center;
  letter-spacing: 2.1px;
  margin-bottom: 44px;
}

.modal-field {
  position: relative;
  margin-bottom: 20px;
}

.modal-field:hover .modal-input {
  border-bottom: 1px solid var(--color-white);
  cursor: pointer;
}

.modal-field:hover .modal-label {
  color: var(--color-white);
  cursor: pointer;
}

.modal-input {
  width: 100%;
  height: 24px;

  background-color: transparent;
  border: none;
  outline: none;
  border-bottom: 1px solid var(--color-form-line);
  color: var(--color-white);
  transition: border 300ms linear;
}

.modal-input:not(:placeholder-shown) + .modal-label {
  color: var(--color-white);
  transform: translateY(-100%);
}

.modal-input:focus + .modal-label {
  color: var(--color-white);
  transform: translateY(-100%);
}

.modal-label {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--color-form-line);
  font-size: 11px;
  line-height: 1.36;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  transition: transform 300ms linear, color 300ms linear;
}

/* Textarea */
.modal-field-text {
  position: relative;
  margin-bottom: 44px;
}

.modal-field-text:hover .modal-text {
  border-bottom: 1px solid var(--color-white);
  cursor: pointer;
}

.modal-field-text:hover .modal-label {
  color: var(--color-white);
  cursor: pointer;
}

.modal-text {
  width: 100%;
  height: 64px;

  background-color: transparent;
  border: none;
  border-bottom: 1px solid var(--color-form-line);
  resize: none;
  color: var(--color-white);
  outline: none;
  transition: border 300ms linear;
}

.modal-text:not(:placeholder-shown) + .modal-label {
  color: var(--color-white);
  transform: translateY(-100%);
}

.modal-text:focus + .modal-label {
  color: var(--color-white);
  transform: translateY(-100%);
}

.modal-button {
  display: block;
  margin: 0 auto;
  width: 160px;
  height: 40px;
}

/* Scroll up */
#scrollToTop {
  position: fixed;
  bottom: 67px;
  left: 75%;
  display: none;
  cursor: pointer;
  z-index: 15;
  opacity: 0.6;
}

@media (min-width: 1280px) {
  #scrollToTop {
    left: 83%;
  }
}

.scroll-up {
  fill: var(--color-primary-dark);
}