/* ======================================= */
/* ============ Root Variables =========== */
/* ======================================= */

:root {
  --iris: #4d5ae5;
  --ocean: #404bbf;
  --navy-blue: #2e2f42;
  --green: #31d0aa;
  --slate: #434455;
  --light-slate: #8e8f99;
  --cornflower: #e7e9fc;
  --cloud: #f4f4fd;
  --navy-blue-modal: rgba(46, 47, 66, 0.4);
  --grey: rgba(46, 47, 66, 0.7);
  --white: #fff;
  --dairy: #fcfcfc;
  --mobile: 320px;
  --tablet: 768px;
  --desktop: 1440px;
}

/* ======================================= */
/* =============== Reset ================= */
/* ======================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: 0.02em;
  font-style: normal;
  color: var(--slate);
  background-color: var(--white);
}

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

h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
  margin: 0;
  padding: 0;
  font-weight: normal;
  list-style: none;
}

img {
  display: block;
}

/* ======================================= */
/* =========== Layout Utilities ========== */
/* ======================================= */

.container {
  max-width: 320px;
  padding-left: 16px;
  padding-right: 16px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: center;
}

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

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

.section {
  padding: 96px 0;
  margin: 0 auto;
  max-width: 1440px;
}

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

@media screen and (min-width: 1440px) {
  .section {
    padding: 120px 0;
  }
}

.section__title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  text-align: center;
}

.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;
}

.list {
  display: flex;
}

.icon {
  width: 16px;
  height: 16px;
  fill: var(--cloud);
}

/* ======================================= */
/* =============== Header ================ */
/* ======================================= */

.page-header {
  width: 100%;
  position: relative;
  border-bottom: 1px solid var(--cornflower);
  box-shadow:
    0 1px 6px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16),
    0 2px 1px 0 rgba(46, 47, 66, 0.08);
  background: var(--white);
}

.page-header .container {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.container .header__list--social {
  display: none;
}

.container.is-open .header__list--social {
  display: flex;
  gap: 40px;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
}

.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.main-nav .list,
.menu-nav--contact-position.list {
  gap: 40px;
  visibility: hidden;
  display: none;
}

@media screen and (max-width: 768px) {
  .page-header .container.is-open {
    max-width: var(--mobile);
    position: fixed;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: start;
    flex-direction: column;
    z-index: 5;
    background: var(--white);
    padding: 72px 16px 40px;
  }

  .container.is-open .main-nav,
  .container.is-open .main-nav .list,
  .container.is-open .menu-nav--contact-position.list {
    visibility: visible;
    display: flex;
    flex-direction: column;
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: var(--navy-blue);
  }

  .container.is-open .menu-nav--contact-position.list {
    font-family: Roboto, sans-serif;
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: var(--slate);
    flex-direction: column-reverse;
    width: 100%;
    gap: 24px;
    margin-bottom: 48px;
  }

  .container.is-open .menu-nav--contact-position.list:first-child {
    color: var(--iris);
  }

  .container.is-open .main-nav {
    width: 100%;
    padding-bottom: 168px;
  }

  .container.is-open .menu-nav__link {
    padding: 0;
  }

  .container.is-open .active a::after {
    display: none;
  }

  .container.is-open .main-nav .list {
    display: flex;
    gap: 40px;
    justify-content: start;
    width: 100%;
  }

  .container.is-open .main-nav .list:first-child {
    color: var(--ocean);
  }

  .container.is-open .logo {
    display: none;
  }

  .container.is-open .address {
    width: 100%;
  }

  .container.is-open .menu_btn {
    top: 24px;
    right: 24px;
  }
}

@media screen and (min-width: 768px) {
  .main-nav .list,
  .menu-nav--contact-position.list {
    visibility: visible;
    display: flex;
  }
}

@media screen and (min-width: 768px) {
  .main-nav .logo {
    margin-right: 120px;
  }
}

@media screen and (min-width: 1440px) {
  .main-nav .logo {
    margin-right: 76px;
  }
}

.logo {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--iris);
  display: inline-block;
  padding: 16px 0;
}

.main-nav .logo {
  position: relative;
}

.logo-style {
  color: var(--navy-blue);
}

.menu-nav__link {
  display: block;
  position: relative;
  padding: 24px 0;
  color: var(--navy-blue);
  font-weight: 500;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.menu-nav__link:hover,
.menu-nav__link:focus {
  color: var(--ocean);
}

.menu-nav__item {
  position: relative;
}

.menu-nav__item.active {
  position: relative;
}

.menu-nav__item.active a {
  color: var(--ocean);
}

.active a::after {
  position: absolute;
  content: '';
  display: block;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--ocean);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address {
  display: flex;
  justify-content: center;
  align-items: center;
  font-style: normal;
}

.contact {
  color: var(--slate);
  cursor: pointer;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.contact:hover,
.contact:focus {
  color: var(--ocean);
}

.menu_btn {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: transparent;
  border: none;
  outline: none;
}

@media screen and (min-width: 768px) {
  .menu_btn,
  .container .header__list--social.list {
    display: none;
    visibility: hidden;
  }

  .menu-nav--contact-position.list {
    flex-direction: column-reverse;
    gap: 12px;
    margin-left: 121px;
  }

  .address {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    color: var(--slate);
  }
}

@media screen and (min-width: 1440px) {
  .menu-nav--contact-position.list {
    flex-direction: row;
    margin: 0;
    width: 100%;
    justify-content: end;
    gap: 40px;
  }

  .address {
    font-size: 16px;
    line-height: 1.5;
  }

  .address .menu-nav__item {
    min-width: 151px;
  }
}

/* ======================================= */
/* ================ Hero ================= */
/* ======================================= */

.hero.section {
  padding: 72px 0;
  margin: 0 auto;
  background: var(--navy-blue);
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url('../images/people-office.jpg');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

@media (min-resolution: 192dpi) {
  .hero.section {
    background-image:
      linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
      url('../images/people-office@2x.jpg');
  }
}

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

@media screen and (min-width: 1440px) {
  .hero.section {
    padding: 188px 0;
  }
}

.hero .container {
  gap: 72px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media screen and (min-width: 768px) {
  .hero .container {
    gap: 48px;
  }
}

.hero__title {
  max-width: 216px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--white);
}

@media screen and (min-width: 768px) {
  .hero__title {
    max-width: 496px;
    font-size: 56px;
    line-height: 1.07;
  }
}

.btn-order {
  min-width: 169px;
  height: 56px;
  padding: 16px 32px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  line-height: 1.5;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--white);
  background-color: var(--iris);
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-order:hover,
.btn-order:focus {
  background-color: var(--ocean);
}

/* ======================================= */
/* ============== Features =============== */
/* ======================================= */

.features__list {
  margin: 0 auto;
  gap: 72px;
  justify-content: space-between;
  flex-direction: column;
}

@media screen and (min-width: 768px) {
  .features__list {
    flex-direction: row;
    gap: 24px;
    flex-wrap: wrap;
  }
}

@media screen and (min-width: 1440px) {
  .features__list {
    gap: 24px;
  }
}

.features__item {
  display: flex;
  flex-direction: column;
  width: 100%;
}

@media screen and (min-width: 768px) {
  .features__item {
    max-width: 356px;
    width: calc(100% / 2 - 24px * 2);
  }
}

@media screen and (min-width: 1440px) {
  .features__item {
    max-width: 264px;
  }
}

.features__icon {
  display: none;
  justify-content: center;
  align-items: center;
  max-width: 264px;
  width: 100%;
  height: 112px;
  margin-bottom: 8px;
  border: 1px solid var(--light-slate);
  border-radius: 4px;
  background: var(--cloud);
}

@media screen and (min-width: 1440px) {
  .features__icon {
    display: flex;
  }
}

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

.features__title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
  margin-bottom: 8px;
  text-align: center;
}

@media screen and (min-width: 768px) {
  .features__title {
    font-weight: 700;
    font-size: 36px;
    line-height: 1.11;
    text-align: start;
  }
}

@media screen and (min-width: 1440px) {
  .features__title {
    font-weight: 500;
    font-size: 20px;
    line-height: 1.2;
    text-align: start;
  }
}

.features--description {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
}

/* ======================================= */
/* ================ Team ================= */
/* ======================================= */

.team.section {
  background: var(--cloud);
  color: var(--navy-blue);
}

.team .container {
  flex-direction: column;
}

.team .section__title {
  margin-bottom: 72px;
}

.team__list {
  gap: 72px;
  flex-direction: column;
  justify-content: center;
  margin: auto 0;
}

@media screen and (min-width: 768px) {
  .team__list {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 64px;
    column-gap: 24px;
    max-width: calc(264px * 2 + 24px);
    margin: 0 auto;
  }
}

@media screen and (min-width: 1440px) {
  .team__list {
    justify-content: space-between;
    gap: 24px;
    max-width: calc(264px * 4 + 24px * 3);
  }
}

.team__item {
  width: 100%;
  max-width: 264px;
  background: var(--white);
  border-radius: 0 0 4px 4px;
  box-shadow:
    0 2px 1px 0 rgba(46, 47, 66, 0.08),
    0 1px 1px 0 rgba(46, 47, 66, 0.16),
    0 1px 6px 0 rgba(46, 47, 66, 0.08);
  text-align: center;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .team__item {
    width: 100%;
    max-width: calc((100% - 24px) / 2);
  }
}

@media screen and (min-width: 1440px) {
  .team__item {
    width: 100%;
    max-width: calc((100% - 72px) / 4);
  }
}

.team__item img {
  margin: 0 auto;
  width: 100%;
  max-width: 264px;
  max-height: 260px;
}

.team__item-wrap {
  padding: 32px 0;
}

.team--member {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.team--position {
  color: var(--slate);
}

.social__list {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 24px;
  margin-top: 8px;
}

.social__item {
  width: 40px;
  height: 40px;
}

.social__link {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--iris);
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team__item:hover .social__link,
.team__item:focus .social__link {
  background-color: var(--ocean);
}

.social__link:hover,
.social__link:focus,
.social__link:active {
  background-color: var(--ocean);
}

/* ======================================= */
/* ============== Portfolio ============== */
/* ======================================= */

.portfolio.section {
  color: var(--navy-blue);
}

.portfolio .container {
  flex-direction: column;
}

.portfolio .section__title {
  margin-bottom: 72px;
}

.portfolio__list {
  flex-wrap: wrap;
  flex-direction: column;
  row-gap: 48px;
  margin: auto 0;
  justify-content: center;
}

@media screen and (min-width: 768px) {
  .portfolio__list {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    max-width: calc(356px * 2 + 24px);
    row-gap: 64px;
    column-gap: 24px;
    margin: 0 auto;
  }
}

@media screen and (min-width: 1440px) {
  .portfolio__list {
    flex-direction: row;
    column-gap: 24px;
    justify-content: space-between;
    max-width: calc(356px * 3 + 24px * 2);
  }
}

.portfolio__item {
  max-width: 288px;
  background-color: var(--white);
  border: 1px solid var(--cornflower);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 768px) {
  .portfolio__item {
    width: 100%;
    max-width: calc((100% - 24px) / 2);
  }
}

@media screen and (min-width: 1440px) {
  .portfolio__item {
    width: calc((100% - 48px) / 3);
  }
}

.portfolio__img-wrapper {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  object-fit: cover;
}

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

.portfolio__description-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--cloud);
}

.portfolio__item:hover .portfolio__description-overlay,
.portfolio__item:focus .portfolio__description-overlay {
  transform: translateY(0%);
}

.portfolio__item:hover {
  box-shadow:
    0 1px 6px rgba(46, 47, 66, 0.08),
    0 1px 1px rgba(46, 47, 66, 0.16),
    0 2px 1px rgba(46, 47, 66, 0.08);
}

.portfolio__item img {
  max-width: 288px;
  width: 100%;
  max-height: 288px;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .portfolio__item img {
    max-width: 356px;
    max-height: 300px;
  }
}

.portfolio__item-wrap {
  padding: 32px 16px;
  text-align: start;
  border-bottom: 1px solid var(--cornflower);
  border-left: 1px solid var(--cornflower);
  border-right: 1px solid var(--cornflower);
}

.portfolio--project {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.portfolio--field {
  color: var(--slate);
}

/* ======================================= */
/* ================ Footer =============== */
/* ======================================= */

.footer {
  padding: 96px 0;
  background: var(--navy-blue);
  width: 100%;
}

@media screen and (min-width: 1158px) {
  .footer {
    padding: 100px 0;
  }
}

.footer .container {
  flex-direction: column;
  justify-content: center;
  gap: 72px;
  align-items: center;
  width: 100%;
  margin: 0 auto;
}

@media screen and (min-width: 768px) {
  .footer .container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center; /* Center the content */
    align-items: flex-start;
    column-gap: 24px;
    row-gap: 72px;
  }
}

@media screen and (min-width: 1158px) {
  .footer .container {
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 0;
    justify-content: space-between; /* Spread across full width on desktop */
    padding-left: 15px;
    padding-right: 15px;
  }
}

.column {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

@media screen and (min-width: 768px) {
  .column {
    justify-content: flex-start;
    align-items: flex-start;
  }
}

.column.footer__about-section {
  margin-right: 0;
  width: 100%;
  max-width: 264px;
}

@media screen and (min-width: 768px) {
  .column.footer__about-section {
    width: 264px;
  }
}

@media screen and (min-width: 1158px) {
  .column.footer__about-section {
    margin-right: 120px;
    width: 264px;
    min-width: 264px;
  }
}

.column.footer__social-section {
  margin-right: 0;
  gap: 16px;
  width: 100%;
  max-width: 208px;
}

@media screen and (min-width: 768px) {
  .column.footer__social-section {
    width: 208px;
  }
}

@media screen and (min-width: 1158px) {
  .column.footer__social-section {
    margin-right: 80px;
  }
}

.column.footer__subscribe-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 453px; /* Subscribe section max width */
}

@media screen and (min-width: 768px) {
  .column.footer__subscribe-section {
    align-items: flex-start;
    justify-content: flex-start;
    width: 100%; /* Full width on tablet */
  }
}

@media screen and (min-width: 1158px) {
  .column.footer__subscribe-section {
    flex: 1;
    max-width: none;
  }
}

.logo.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
  padding: 0;
}

.footer .logo-style {
  color: var(--cloud);
}

.footer__list--social {
  gap: 16px;
}

.footer__title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 16px;
}

.footer__text {
  max-width: 264px;
  color: var(--cloud);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.footer .social__link:hover,
.footer .social__link:focus {
  background-color: var(--green);
}

.subscribe-form {
  flex-direction: column;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

@media screen and (min-width: 768px) {
  .subscribe-form {
    flex-direction: row;
    gap: 24px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    align-items: flex-start;
  }
}

.subscribe-form__label {
  width: 100%;
  max-width: 264px;
}

@media screen and (min-width: 768px) {
  .subscribe-form__label {
    width: 264px;
  }
}

.subscribe-form__input {
  width: 100%;
  max-width: 264px;
  height: 40px;
  border: 1px solid var(--white);
  border-radius: 4px;
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
  background-color: transparent;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  padding-left: 16px;
  color: var(--white);
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media screen and (min-width: 768px) {
  .subscribe-form__input {
    width: 264px;
  }
}

.subscribe-form__input::placeholder {
  color: var(--white);
  font-family: Roboto, sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
}

.subscribe-form__input:hover,
.subscribe-form__input:focus {
  border-color: var(--ocean);
  outline: none;
}

.button.subscribe-form__button {
  min-width: 165px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: Roboto, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--white);
  background-color: var(--iris);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 8px 24px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.15);
}

.button.subscribe-form__button:hover,
.button.subscribe-form__button:focus {
  background-color: var(--ocean);
}

.subscribe-form__icon {
  fill: var(--white);
  margin-left: 16px;
  width: 24px;
  height: 24px;
}

/* ======================================= */
/* ============== Modal Window =========== */
/* ======================================= */

.backdrop {
  position: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(46, 47, 66, 0.4);
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  pointer-events: auto;
  transition:
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal {
  position: absolute;
  display: inline-block;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  vertical-align: middle;
  text-align: left;
  background: var(--dairy);
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.14),
    0 1px 3px rgba(0, 0, 0, 0.12),
    0 2px 1px rgba(0, 0, 0, 0.2);
  width: 288px;
  min-height: 623px;
  border-radius: 4px;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 72px 16px 24px;
}

@media screen and (min-width: 768px) {
  .modal {
    width: 408px;
    min-height: 584px;
    padding: 72px 24px 24px 24px;
  }
}

.modal__btn-close {
  display: flex;
  position: absolute;
  top: 24px;
  right: 24px;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--cornflower);
  border: rgba(0, 0, 0, 0.1) 1px solid;
  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-close:hover,
.modal__btn-close:focus {
  background-color: var(--ocean);
  border: none;
}

.modal__close-icon {
  fill: var(--navy-blue);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal__btn-close:hover .modal__close-icon,
.modal__btn-close:focus .modal__close-icon {
  fill: var(--white);
}

.modal__title {
  font-family: Roboto, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
  margin-bottom: 16px;
}

.modal-form {
  display: flex;
  flex-direction: column;
}

.modal-form__field {
  display: flex;
  position: relative;
  flex-direction: column;
  margin-bottom: 8px;
}

.modal-form__field:nth-child(4) {
  margin-bottom: 16px;
}

.modal-form__label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--light-slate);
  font-family: 'Roboto', sans-serif;
}

.modal-form__input-wrapper {
  position: relative;
}

.modal-form__input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  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: var(--iris);
}

.modal-form__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  fill: var(--navy-blue);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form__input:focus + .modal-form__icon {
  fill: var(--iris);
}

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

.modal-form__textarea:hover,
.modal-form__textarea:focus {
  border-color: var(--iris);
}

.modal-form__textarea::placeholder {
  color: var(--navy-blue-modal);
}

.modal-form__agreement {
  margin-bottom: 24px;
}

.modal-form__label-checkbox {
  display: block;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--light-slate);
  cursor: pointer;
}

.modal-form__checkbox-icon-wrapper {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  fill: transparent;
  vertical-align: middle;
  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);
}

.modal-form__checkbox:checked
  + .modal-form__label-checkbox
  .modal-form__checkbox-icon-wrapper {
  background-color: var(--ocean);
  border: none;
  fill: var(--cloud);
}

.modal-form__privacy-link {
  color: var(--iris);
  text-decoration: underline;
  text-decoration-skip-ink: none;
}

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

.button.modal-form__button:hover,
.button.modal-form__button:focus {
  background-color: var(--ocean);
}
/* Mobile menu icon control */
.menu_btn .icon-menu-close {
  display: none;
}

.menu_btn .icon-menu-open {
  display: block;
}

.container.is-open .menu_btn .icon-menu-close {
  display: block;
}

.container.is-open .menu_btn .icon-menu-open {
  display: none;
}

/* Mobile Menu Container */
.menu-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  padding: 80px 35px 40px 40px;
  background-color: #fff;
  z-index: 999;
  transform: translateX(100%);
  transition: transform 250ms ease-in-out;
}

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

.mobile-menu__nav {
  margin-bottom: 50px;
}

.mobile-menu__item:not(:last-child) {
  margin-bottom: 40px;
}

.mobile-menu__link {
  display: block;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.mobile-menu__contacts {
  margin-bottom: 48px;
}

.mobile-menu__contact {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
}

.mobile-menu__tel {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  color: #4d5ae5;
}

.mobile-menu__socials {
  display: flex;
  gap: 56px;
}

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

/* Menu button icon styling */
.menu_btn svg {
  fill: #2f2f37;
  stroke: #2f2f37;
}

.menu_btn .icon-menu-open use,
.menu_btn .icon-menu-close use {
  fill: currentColor;
}
