: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;
}
/* Загальні налаштування стилів */
.container {
  max-width: 1158px;
  padding-left: 15px;
  padding-right: 15px;
  margin: 0 auto;
}
.section {
  padding-top: 120px;
  padding-bottom: 120px;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

ul {
  list-style: none;
  margin-top: 0;
  margin-bottom: 0;
  padding-left: 0;
}

a {
  text-decoration: none;
  font-style: normal;
  color: currentColor;
}
button {
  cursor: pointer;
  box-shadow: none;
  border: none;
}
address {
  font-style: normal;
}
img {
  display: block;
}

body {
  font-family: "Roboto", sans-serif;
  color: var(--slate);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--white);
}
/* Header Navigation Styles   */
.header {
  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);
}
.header .container {
  display: flex;
  align-items: center;
}
.header-nav {
  display: flex;
  align-items: center;
  flex-grow: 1;
}
.header-nav-unordered {
  display: flex;
  gap: 40px;
}

.header-nav-logo-web {
  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);
  margin-right: 76px;
}
.header-nav-logo-studio {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy-blue);
}
.header-nav-link {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
  display: inline-block;
  padding: 24px 0;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.current {
  color: var(--ocean);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.current::after {
  content: "";
  position: absolute;
  border-radius: 2px;
  height: 4px;
  width: 100%;
  background-color: var(--ocean);
  bottom: -1px;
  left: 0;
}
.header-nav-link:hover,
.header-nav-link:focus,
.header-nav-link:active {
  color: #404bbf;
}
.header-address {
  font-style: normal;
}
.header-address-unordered {
  display: flex;
  gap: 40px;
}

.header-address-contacts {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.header-address-contacts:hover,
.header-address-contacts:focus {
  color: #404bbf;
}

/* Main Page Styles */
/*section hero */
.hero {
  background: var(--grey);
  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;
  padding: 188px 0;
  max-width: 1440px;
  margin: 0 auto;
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero-title {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--white);
  margin-bottom: 48px;
  max-width: 496px;
}
.button-hero {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: var(--white);
  background-color: var(--iris);
  border-radius: 4px;
  min-width: 169px;
  padding: 16px 32px;
  gap: 10px;

  cursor: pointer;
  border: none;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: var(--iris);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.button-hero:hover,
.button-hero:focus {
  background-color: #404bbf;
}
/*section feature */
.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;
}
.feature-unordered {
  display: flex;
  gap: 24px;
}
.feature-list {
  width: calc((100% - 3 * 24px) / 4);
}
.feature-title-name {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
  margin-bottom: 8px;
}
.feature-text {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--slate);
}
.feature-icon-container {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
  background-color: var(--cloud);
  width: 264px;
  height: 112px;
  border-radius: 4px;
  align-items: center;
  border: 1px solid var(--light-slate);
  gap: 8px;
}
/*team cards */
.team-cards {
  background-color: var(--cloud);
}
.team-cards-unordered {
  display: flex;
  gap: 24px;
}
.team-cards-list {
  background-color: #ffffff;
  width: calc((100% - 3 * 24px) / 4);
  border-radius: 0px 0px 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);
}
.team-cards-name-container {
  padding: 32px 16px;
}
.team-cards-title {
  font-family: "Roboto", sans-serif;
  font-weight: bold;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
  text-transform: capitalize;
  margin-bottom: 72px;
}
.team-cards-name {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
  text-transform: capitalize;
  margin-bottom: 8px;
}

.team-cards-content {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--slate);
  margin-bottom: 8px;
  gap: 8px;
}
.team-cards-list {
  background-color: #ffffff;
}
.team-social-unordered {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.team-social-list {
  width: calc((100% - 3 * 24px) / 4);
}
.team-social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--iris);
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--white);
}
.team-social-link:hover {
  background-color: #404bbf;
}
.team-social-link:focus,
.team-social-link:active {
  background-color: #404bbf;
}
.team-social-icon {
  fill: #f4f4fd;
}

/*section projects */
.projects-list-unordered {
  display: flex;
  gap: 48px 24px;
  flex-wrap: wrap;
}
.projects-list {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.projects-list:hover {
  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);
  background: var(--white);
}

.section-projects-title {
  font-family: "Roboto", sans-serif;
  font-weight: bold;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
  text-transform: capitalize;
  margin-bottom: 72px;
}

.projects-text-container {
  position: relative;
  overflow: hidden;
}
.projects-text-overlay {
  inset: 0;
  position: absolute;
  display: flex;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--cloud);
  padding: 40px 32px;
  height: 100%;
  transform: translateY(100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--iris);
}
.projects-list:hover .projects-text-overlay {
  transform: translateY(0);
}
.projects-list-name-container {
  padding: 32px 16px;
  border: 1px solid var(--cornflower);
  border-top: none;
}
.projects-name {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  /*text-align: center;*/
  color: var(--navy-blue);
  text-transform: capitalize;
  margin-bottom: 8px;
}
.projects-text {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  /*text-align: center;*/
  color: var(--slate);
}

/* Footer Styles */
.footer {
  background-color: var(--navy-blue);
  padding: 100px 0;
}
.footer .container {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0;
  padding-left: 15px;
}
.footer-logo-text-container {
  margin-right: 120px;
}
.footer-logo-web {
  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;
  margin-bottom: 16px;
}
.footer-logo-studio {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f4f4fd;
}
.footer-text {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
  max-width: 264px;
}
.footer-social-container {
  max-width: 208px;
  margin-right: 80px;
}
.footer-social-title {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--white);
}
.footer-social-unordered {
  display: flex;
  gap: 16px;
}
.footer-social-link {
  display: flex;
  background-color: #4d5ae5;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-social-link:hover,
.footer-social-link:focus {
  background-color: #31d0aa;
}
.footer-social-icon {
  fill: #f4f4fd;
}
.footer-subscribe-container {
  max-width: 453px;
  margin-left: auto;
}
.footer-sub-row {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-sub-text {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-sub-input {
  border: 1px solid var(--white);
  border-radius: 4px;
  width: 264px;
  height: 40px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: rgba(0, 0, 0, 0.15);
  padding: 8px 16px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  outline: none; /* прибираємо стандартну рамку для фокуса під час введення */
  color: var(--white);
}
.footer-sub-input::placeholder {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: var(--white);
}
.footer-sub-button {
  font-family: "Roboto", sans-serif;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 16px;
  border-radius: 4px;
  padding: 8px 24px;
  min-width: 165px;
  height: 40px;
  background: var(--iris);
  color: var(--white);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  border: none;
  cursor: pointer;
}
.footer-sub-button-icon {
  fill: #f4f4fd;
  display: block;
}
.footer-sub-input:hover,
.footer-sub-input:focus,
.footer-sub-input:focus-visible {
  border-color: var(--green);
}
.footer-sub-button:hover,
.footer-sub-button:focus {
  background: var(--green);
}
/* Modal-Ovelay Styles */
.modal-overlay {
  display: flex;
  position: fixed;
  top: 0;
  align-items: center;
  justify-content: center;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--navy-blue-modal);
  z-index: 1000;

  /* сховати оврлей та актиність миші*/
  opacity: 0; /*0 - прихований, 1 - видимий*/
  pointer-events: none; /* none - неактивний, auto - активний*/
  transition:
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
  visibility: hidden;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
} /* зробити оврлей видимим */
.modal {
  background-color: #fcfcfc;
  width: 408px;
  min-height: 584px;
  box-shadow:
    0 1px 1px 0 rgba(0, 0, 0, 0.14),
    0 1px 3px 0 rgba(0, 0, 0, 0.12),
    0 2px 1px 0 rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  position: relative;
  padding: 72px 24px 24px;
  overflow: auto;
}
.modal-close-button {
  position: absolute;
  top: 24px;
  right: 24px;
  border-radius: 100%;
  width: 24px;
  height: 24px;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #e7e9fc;
  transition:
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close-button:hover,
.modal-close-button:focus {
  background-color: #404bbf;
  border-color: #404bbf;
}
.modal-close-icon {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-close-button:hover .modal-close-icon,
.modal-close-button:focus .modal-close-icon {
  fill: white;
}
.modal-title {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  margin-bottom: 16px;

  /* line-height: 24px; */
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--navy-blue);
}
.modal-form-container {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  border-radius: 4px;
  position: relative;
  margin-bottom: 8px;
  width: 100%;
}
textarea.modal-input {
  resize: none;
}
.modal-input-container {
  position: relative;
  width: 100%;
}

.modal-input-comment {
  border: 1px solid var(--navy-blue-modal);
  border-radius: 4px;
  width: 100%;
  height: 120px;
  resize: none;
  padding: 8px 16px;
  font-family: "Roboto", sans-serif;
  font-size: 12px;
  line-height: 1.5;
  box-sizing: border-box;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.04em;
  color: var(--navy-blue);
}
.modal-input-comment:focus,
.modal-input-comment:focus-visible {
  border-color: var(--iris);
  outline: none;
}
.modal-input-icon {
  position: absolute;
  top: 50%;
  left: 19px;
  pointer-events: none;
  width: 18px;
  height: 24px;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
  fill: #2e2f42;
}
.modal-label {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.16667;
  letter-spacing: 0.04em;
  color: #8e8f99;
  display: block;
  margin-bottom: 4px;
  width: 100%;
}
.modal-input {
  border: 1px solid var(--navy-blue-modal);
  border-radius: 4px;
  width: 100%;
  height: 40px;
  padding-left: 38px;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  outline: none; /* прибираємо стандартну рамку для фокуса під час введення */
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
}
.modal-input:hover,
.modal-input:focus,
.modal-input:focus-visible {
  border: 1px solid var(--iris);
}
.modal-input-container:focus-within .modal-input-icon {
  fill: var(--iris);
}
.comment {
  margin-bottom: 16px;
}
.modal-accept-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  gap: 8px;
  border-radius: 4px;

  margin-bottom: 24px;
}
.modal-accept-label {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #8e8f99;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  margin-bottom: 0;
}
.modal-span-container {
  border-radius: 2px;
  border: 1px solid var(--navy-blue-modal);
  width: 16px;
  height: 16px;
  margin-right: 8px;
  background-color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-accept-icon {
  fill: white;
}
.modal-accept-checkbox:checked + .modal-accept-label .modal-span-container {
  background-color: var(--iris);
  border-color: var(--iris);
}

.privacy-policy-link {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-decoration-skip-ink: none;
  color: var(--iris);
}
.modal-send-button {
  font-family: "Roboto", sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 4px;
  padding: 16px 32px;
  width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background: var(--iris);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--white);
  margin: 0 auto;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
