body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  font-size: 16px;
  line-height: 1.5;
  background-color: #ffffff;
}

/* Загальні правила */
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

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

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

a {
  text-decoration: none;
}

:root {
  --primary-brand: #4d5ae5;
  --gray-text: #8e8f99;
  --cubie-effect: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --checked-bg: #404bbf;
  --checked-fill: #f4f4fd;
  --link-color: #4d5ae5;
}

/* Mobile first */

.container {
  min-width: 320px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;

  /* max-width: 1158px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px; */
}

@media only screen and (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media only screen and (min-width: 1158px) {
  .container {
    max-width: 1158px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

.section {
  padding-bottom: 120px;
}

/*  Кінець загальних правил */

/* мій хедер */

.header {
  border-bottom: 1px solid #e7e9fc;
  box-shadow: 0px 2px 1px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16), 0px 1px 6px rgba(46, 47, 66, 0.08);
}

.header-nav {
  display: flex;
  align-items: center;
}

.header-container {
  display: flex;
  align-items: center;
}

.full-logo {
  font-size: 18px;
  font-weight: 700;
  color: #4d5ae5;
  font-family: 'Raleway', sans-serif;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-right: 76px;
  padding: 24px 0;
  position: relative;
}

.studio-color-one {
  color: #2e2f42;
}

.nav {
  display: flex;
  gap: 40px;
}

.nav-list-one {
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  padding: 24px 0;
  position: relative;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-list-one:hover,
.nav-list-one:focus {
  color: #404bbf;
  transition: var(--cubie-effect);
}

.nav-list-one.active {
  color: #404bbf;
}

.active::after {
  position: absolute;
  left: 0;
  bottom: -1px;
  content: '';
  display: block;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: #404bbf;
}

.nav :hover,
.nav :focus {
  color: #404bbf;
  transition: var(--cubie-effect);
}

.mail {
  color: #434455;
  font-style: normal;
  line-height: 1.5;
  letter-spacing: 0.02em;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-list {
  display: flex;
  gap: 40px;
}

.description {
  font-style: normal;
  margin-left: auto;
}

.description :hover,
.description :focus {
  color: #404bbf;
  transition: var(--cubie-effect);
}

/* кінець хедера */

/* секція перша */

.logo-name-color {
  background-color: #2e2f42;
  padding-top: 188px;
  padding-bottom: 188px;
  max-width: 1440px;
  margin: 0 auto;

  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;

  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/people-office.jpg);
}

.logo-name {
  display: block;
  color: #ffffff;
  font-size: 56px;
  line-height: 1.07;
  text-align: center;
  letter-spacing: 0.02em;
  max-width: 496px;
  margin-bottom: 48px;
  justify-self: center;
}

.button-style {
  border: none;
  background-color: #4d5ae5;
  color: #ffffff;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  font-family: 'Roboto', sans-serif;
  min-width: 169px;
  min-height: 56px;
  padding: 14px 32px;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.button-style:hover,
.button-style:focus {
  background-color: #404bbf;
  transition: var(--cubie-effect);
}

/* кінець першої секції */

/* секція два */

.advantages-list {
  display: flex;
  gap: 24px;
}

.our-advantages {
  padding: 120px 0;
}

.advantages-list-item {
  width: calc((100% - 72px) / 4);
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;

  white-space: nowrap;
  clip-path: inset(100%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

.our-advantages-title {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.our-advantages-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  gap: 8px;
}

.advantages-icon {
  width: 264px;
  height: 112px;
  border: 1px solid #8e8f99;
  background-color: #f4f4fd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

/* кінець другої секції */

/* секція три */

.section-team {
  background-color: #f4f4fd;
  padding: 120px 0;
}

.section-team-list {
  display: flex;
  gap: 24px;
}

.name-and-prof {
  padding-top: 32px;
  padding-bottom: 32px;
}

.section-team-name {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}

.team-img {
  width: 264px;
  height: 260px;
}

.section-team-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

.section-title {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  margin-bottom: 72px;
}

.section-color {
  background-color: #ffffff;
  text-align: center;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 2px 1px 0 rgb(46 47 66 / 8%), 0 1px 1px 0 rgb(46 47 66 / 16%),
    0 1px 6px 0 rgb(46 47 66 / 8%);
}

.logo-item {
  fill: #4d5ae5;
}

.social-list {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-top: 8px;
}

.logo-icon:hover,
.logo-icon:focus {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #404bbf;
  transition: var(--cubie-effect);
}

.logo-icon:active {
  background-color: #404bbf;
}

.logo-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  fill: #f4f4fd;
  background-color: var(--primary-brand);
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* кінець третьої секції */

/* секція четверта */

.list-apps {
  padding-top: 120px;
  padding-bottom: 120px;
}

.section-box {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.section-box:hover {
  box-shadow: 0px 1px 6px rgba(46, 47, 66, 0.08),
    0px 1px 1px rgba(46, 47, 66, 0.16), 0px 2px 1px rgba(46, 47, 66, 0.08);
  transition: var(--cubie-effect);
}

.portfolio-img {
  width: 360px;
  height: 300px;
}

.portfolioadds {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  row-gap: 48px;
}

.our-advantages-block {
  padding: 32px 16px;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
}

.overlay {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  width: 100%;
  height: 100%;
  padding: 40px 32px;
  position: absolute;
  top: 0;
  left: 0;
  color: #f4f4fd;
  background-color: #4d5ae5;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card-thumb {
  position: relative;
  overflow: hidden;
}

.section-box:hover .overlay {
  transform: translateY(0);
  max-width: 100%;
  max-height: 100%;
  transition: var(--cubie-effect);
}

/* мій футер */

.footer {
  padding-top: 100px;
  padding-bottom: 100px;
  background-color: #2e2f42;
}

.studio-color-two {
  color: #f4f4fd;
}

.social-list-footer {
  display: flex;

  gap: 16px;
}

.footer-left {
  margin-right: 120px;
}

.footer-right {
  margin-right: 80px;
}

.full-logo-down {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 18px;
  font-weight: 700;
  color: #4d5ae5;
  font-family: 'Raleway', sans-serif;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-right: 76px;
}

.footer-text {
  color: #f4f4fd;
  letter-spacing: 0.02em;
  font-family: 'Roboto';
  width: 264px;
  font-weight: 500;
}

.social-media-text {
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: #ffffff;
  margin-bottom: 16px;
  font-weight: 500;
}

.footer-container {
  display: flex;
  align-items: baseline;
  /* gap: 80px; */
}

.logo-icon-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  fill: #f4f4fd;
  gap: 16px;
  background-color: var(--primary-brand);
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-icon-footer:hover,
.logo-icon-footer:focus {
  background-color: #31d0aa;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  transition: var(--cubie-effect);
}

.footer-icon:active {
  background-color: #31d0aa;
}

.sub-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 16px;
  border-radius: 4px;
  border: transparent;
  padding: 8px 24px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  min-width: 165px;
  height: 40px;
  background: #4d5ae5;
  color: #ffffff;
  text-align: center;
  margin-top: auto;
  min-width: 165px;
  cursor: pointer;
}

.sub-btn:hover,
.sub-btn:active {
  background-color: #404bbf;
  transition: var(--cubie-effect);
  cursor: pointer;
}

.container.footer-container {
  display: flex;
  align-items: baseline;
}

.sub-btn-icon {
  fill: #ffffff;
  margin-left: 16px;
}

.subscribe-form {
  align-items: baseline;
}

.sub-input {
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  border: 1px solid #ffffff;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  color: #ffffff;
  border-radius: 4px;
  width: 264px;
  height: 40px;
  background-color: transparent;
  padding-left: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.sub-input::placeholder {
  color: #ffffff;
}

.subscribe-text {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.footer-sub {
  display: flex;
  gap: 24px;
  align-items: center;
}

.sub-input::placeholder {
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
}

/* кінець футера */

/* Початок modal */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 2;
  background-color: rgba(46 47 66 / 40%);
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: initial;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%) scale(1);
  width: 408px;
  min-height: 584px;
  background-color: #fcfcfc;
  border-radius: 4px;
  box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.14), 0px 1px 3px rgba(0, 0, 0, 0.12),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 24px 24px 24px;
}

.modal-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn:hover,
.modal-btn:focus {
  background-color: #404bbf;
  border: none;
  fill: #ffffff;
}

.modal-btn-icon {
  width: 8px;
  height: 8px;
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn:hover .modal-btn-icon,
.modal-btn:focus .modal-btn-icon {
  fill: #ffffff;
}

.button-position {
  width: 24px;
  margin-left: auto;
}

.modal-slogan {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 16px;
}

.modal-form-wrapper {
  margin-bottom: 8px;
}

.wrapper-marg {
  margin-bottom: 16px;
}

.modal-form-label {
  display: block;
  line-height: 1.17;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--gray-text);
  margin-bottom: 4px;
}

.modal-form-field {
  height: 40px;
  position: relative;
}

.modal-form-input {
  display: block;
  width: 100%;
  height: 40px;

  border: 1px solid rgba(46 47 66 / 40%);
  border-radius: 4px;
  padding-left: 38px;
  background-color: transparent;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form-input:focus {
  border-color: #4d5ae5;
  color: #2e2f42;
}

.modal-form-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%) translateX(-50%);
  fill: rgb(46, 47, 66);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form-field:focus-within .modal-form-icon {
  fill: #4d5ae5;
}

.modal-form-comment {
  border: 1px solid rgba(46 47 66 / 0.4);
  color: rgba(46 47 66 / 0.4);
  border-radius: 4px;
  width: 100%;
  background-color: transparent;
  height: 120px;
  resize: none;
  padding: 8px 16px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  font-size: 12px;
  font-weight: 400;
  outline: transparent;
  resize: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form-comment:focus {
  border-color: #4d5ae5;
}

.modal-form-agreement {
  display: block;

  align-items: center;
  margin-bottom: 24px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--gray-text);
}
.modal-form-checkbox {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46 47 66 / 40%);
  border-radius: 2px;
  cursor: pointer;
  margin-right: 8px;
  line-height: 0;
  fill: transparent;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1),
    fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

input[type='checkbox']:checked + label .modal-form-checkbox {
  background-color: var(--checked-bg);
  border: none;
  fill: var(--checked-fill);
}

.modal-form-agreement-link {
  text-decoration: underline;
  color: var(--link-color);
}

.modal-btn-sub {
  display: block;
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  min-width: 169px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  height: 56px;
  text-align: center;
  background-color: #4d5ae5;
  color: #ffffff;
  margin: auto;
  margin-top: 24px;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-btn-sub:hover,
.modal-btn-sub:focus {
  background-color: #404bbf;
}
