/* ---Styles for index.html--- */

:root {
  --text-color: #757575;
  --title-color: #212121;
  --accent-color: #2196f3;
  --primary-bcg-color: #ffffff;
  --secondary-bcg-color: #2f303a;
  --add-bcg-color: #f5f4fa;
  --icon-color: #afb1b8;
  --text-font: 'Roboto', sans-serif;
  --accent-font: 'Raleway', sans-serif;
  --grid-gap: 30px;
  --grid-item: 2;
  --timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-animation: 250ms;
}

html {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--text-font);
  font-size: 14px;
  line-height: 1.71;
  letter-spacing: 0.03em;
  color: var(--text-color);
  background-color: var(--primary-bcg-color);
}

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

ul {
  margin: 0;
  padding: 0;
}

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

.list {
  list-style: none;
}

.link {
  text-decoration: none;
  color: inherit;
}

.visually-hidden {
  position: absolute !important;
  clip: rect(1px 1px 1px 1px);
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
}

/* ---COMPONENTS--- */
.container {
  width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

.section {
  padding-top: 94px;
  padding-bottom: 94px;
}

.section-title {
  margin-bottom: 50px;

  font-size: 36px;
  line-height: 1.17;
  text-align: center;
  color: var(--title-color);
}

.social-list {
  display: flex;
  justify-content: space-between;
}

.social-list-link {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color var(--duration-animation) var(--timing-function);
}

.social-list-icon {
  width: 20px;
  height: 20px;
  fill: var(--icon-color);
  transition: fill var(--duration-animation) var(--timing-function);
}

.social-list-link:hover,
.social-list-link:focus {
  background-color: var(--accent-color);
}

.social-list-link:hover .social-list-icon,
.social-list-link:focus .social-list-icon {
  fill: var(--primary-bcg-color);
}

.btn {
  min-width: 200px;

  font-family: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.87;
  letter-spacing: 0.06em;

  color: var(--primary-bcg-color);
  background-color: var(--accent-color);
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
/* ---END COMPONENTS--- */

/* ---HEADER---*/
.header {
  border-bottom: 1px solid #ececec;

  font-weight: 500;
  line-height: 1.14;
  letter-spacing: 0.02em;
}

.logo {
  font-family: var(--accent-font);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.19;
  color: var(--accent-color);
}

.logo-part-dark {
  color: #000000;
}

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

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

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

.contacts-header-list {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

.nav .logo {
  margin-right: 93px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.nav-link {
  display: inline-block;
  padding-top: 32px;
  padding-bottom: 32px;
  color: var(--title-color);
  transition: color var(--duration-animation) var(--timing-function);
}

.contacts-header-link {
  display: flex;
  padding-top: 32px;
  padding-bottom: 32px;
  align-items: center;
  transition: color var(--duration-animation) var(--timing-function);
}

.nav-item:not(:last-child),
.contacts-header-item:not(:last-child) {
  margin-right: 50px;
}

.nav-link:hover,
.nav-link:focus,
.contacts-header-link:hover,
.contacts-header-link:focus,
.nav-link.current {
  color: var(--accent-color);
}

.nav-link.current {
  position: relative;
}

.nav-link.current::after {
  content: '';

  position: absolute;
  left: 0;
  bottom: 0;

  display: block;
  width: 100%;
  height: 4px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

.icon {
  margin-right: 10px;
  fill: currentColor;
}

/* ---END HEADER--- */

/* ---HERO--- */
.hero {
  max-width: 1600px;
  padding-top: 200px;
  padding-bottom: 200px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;

  background-color: var(--secondary-bcg-color);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: linear-gradient(to right, rgba(47, 48, 58, 0.4), rgba(47, 48, 58, 0.4)),
    url('../images/hero-bg.jpg');
}

.hero-title {
  max-width: 700px;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 30px;

  font-weight: 900;
  font-size: 44px;
  line-height: 1.36;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-bcg-color);
}

.hero-btn {
  padding: 10px 30px;

  transition: background-color var(--duration-animation) var(--timing-function);
}

.hero-btn:focus,
.hero-btn:hover {
  background-color: #188ce8;
}
/* ---END HERO--- */

/* ---FEATURE--- */
.feature-list {
  display: flex;
  margin-left: calc(-1 * var(--grid-gap));
  margin-top: calc(-1 * var(--grid-gap));
}

.feature-list-item {
  flex-basis: calc((100% - var(--grid-item) * var(--grid-gap)) / var(--grid-item));
  --grid-item: 4;
  margin-left: var(--grid-gap);
  margin-top: var(--grid-gap);
}

.feature-thumb {
  display: flex;
  width: 270px;
  height: 120px;
  margin-bottom: 30px;
  background-color: var(--add-bcg-color);
  align-items: center;
  justify-content: center;
}

.feature-icon {
  width: 70px;
  height: 70px;
}

.feature-item-title {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.14;
  text-transform: uppercase;
  color: var(--title-color);
}
/* ---END FEATURE--- */

/* ---SERVICES--- */
.services.section {
  padding-top: 0;
}

.services-list {
  display: flex;
  margin-left: calc(-1 * var(--grid-gap));
  margin-top: calc(-1 * var(--grid-gap));
}

.services-list-item {
  position: relative;

  flex-basis: calc((100% - var(--grid-item) * var(--grid-gap)) / var(--grid-item));
  --grid-item: 3;
  margin-left: var(--grid-gap);
  margin-top: var(--grid-gap);
}

.overlay-services {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  min-height: 70px;
  padding-top: 27px;
  padding-bottom: 27px;
  background-color: rgba(47, 48, 58, 0.8);
}

.overlay-services-title {
  font-weight: 700;
  line-height: 1.143;
  text-align: center;
  text-transform: uppercase;
  color: var(--primary-bcg-color);
}

/* ---END SERVICES--- */

/* ---TEAM--- */
.team.section {
  background: var(--add-bcg-color);
}

.team-list {
  display: flex;
  margin-left: calc(-1 * var(--grid-gap));
  margin-top: calc(-1 * var(--grid-gap));
}

.team-list-item {
  flex-basis: calc((100% - var(--grid-item) * var(--grid-gap)) / var(--grid-item));
  --grid-item: 4;
  margin-left: var(--grid-gap);
  margin-top: var(--grid-gap);

  text-align: center;
  background-color: var(--primary-bcg-color);
  border-radius: 0px 0px 4px 4px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px 0 rgba(0, 0, 0, 0.2);
}

.team-list-item-content {
  padding: 32px 30px;
}

.team-item-name {
  margin-bottom: 10px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.19;
  color: var(--title-color);
}

.team-item-position {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.19;
}
/* ---END TEAM--- */

/* ---CLIENTS--- */
.client-list {
  display: flex;
  margin-left: calc(-1 * var(--grid-gap));
  margin-top: calc(-1 * var(--grid-gap));
}

.client-list-item {
  flex-basis: calc((100% - var(--grid-item) * var(--grid-gap)) / var(--grid-item));
  --grid-item: 6;
  margin-left: var(--grid-gap);
  margin-top: var(--grid-gap);
}

.client-list-link {
  display: flex;
  width: 100%;
  height: 90px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--icon-color);
  border-radius: 4px;
  transition: border-color var(--duration-animation) var(--timing-function);
}

.client-list-link:hover,
.client-list-link:focus {
  border-color: var(--accent-color);
}

.client-icon {
  fill: var(--icon-color);
  transition: fill var(--duration-animation) var(--timing-function);
}

.client-list-link:hover .client-icon,
.client-list-link:focus .client-icon {
  fill: var(--accent-color);
}
/* ---END CLIENTS--- */

/* ---FOOTER--- */
.footer {
  padding-top: 60px;
  padding-bottom: 60px;
  background-color: var(--secondary-bcg-color);
}

.footer .container {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.footer-block {
  flex-basis: calc((50% - (var(--grid-gap) * 1.5)) / 2);
}

.footer-block:last-child {
  flex-basis: calc(50% - (var(--grid-gap) / 2));
}

.footer-content-block {
  margin-top: 20px;
}

.logo-part-light {
  color: var(--primary-bcg-color);
}

.adress {
  margin-bottom: 9px;

  font-style: normal;
  color: var(--primary-bcg-color);
}

.contacts-footer-item:first-child {
  margin-bottom: 9px;
}

.contacts-footer-link {
  color: rgba(255, 255, 255, 0.6);
}

.footer-subtitle {
  margin-bottom: 20px;

  font-weight: 700;
  line-height: 1.143;
  text-transform: uppercase;
  color: var(--primary-bcg-color);
}

.footer .social-list {
  justify-content: flex-start;
}

.footer .social-list-item:not(:last-child) {
  margin-right: 10px;
}

.footer .social-list-icon {
  fill: var(--primary-bcg-color);
}

.social-list-link {
  background-color: rgb(255, 255, 255, 0.1);
}

.footer-form {
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-form-input {
  width: 358px;
  height: 50px;
  padding: 15px 16px;

  margin-right: 12px;

  font-size: 16px;
  line-height: 1.25;
  letter-spacing: 0.03em;

  color: var(--primary-bcg-color);
  background-color: transparent;
  outline: none;
  border: 1px solid rgb(255, 255, 255, 0.3);
  border-radius: 4px;
  filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.15));

  transition: border-color var(--duration-animation) var(--timing-function);
}

.footer-form-input:focus {
  border-color: var(--accent-color);
}

.footer-form-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.footer-btn {
  display: flex;
  justify-content: center;
  align-items: center;

  padding: 10px 28px;
}

.footer-btn-icon {
  margin-left: 10px;
}

/* ---END FOOTER--- */

/* ---Styles for Portfolio.html-- */
/* ---PROJECT SET--- */
.project-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 50px;
}

.project-filter-item:not(:last-child) {
  margin-right: 8px;
}

.project-btn {
  min-width: 73px;
  padding: 6px 21px;
  border: none;
  border-radius: 4px;

  font-weight: 500;
  font-size: 16px;
  line-height: 1.63;
  color: var(--title-color);
  background-color: var(--add-bcg-color);
  cursor: pointer;

  transition: color var(--duration-animation) var(--timing-function),
    background-color var(--duration-animation) var(--timing-function),
    box-shadow var(--duration-animation) var(--timing-function);
}

.project-btn:hover,
.project-btn:focus {
  color: var(--primary-bcg-color);
  background-color: var(--accent-color);
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 1px 2px 0 rgba(0, 0, 0, 0.08), 0 3px 1px 0 rgba(0, 0, 0, 0.1);
}

.project-set {
  display: flex;
  flex-wrap: wrap;
  margin-left: calc(-1 * var(--grid-gap));
  margin-top: calc(-1 * var(--grid-gap));
}

.project-set-item {
  flex-basis: calc((100% - var(--grid-item) * var(--grid-gap)) / var(--grid-item));
  --grid-item: 3;
  margin-left: var(--grid-gap);
  margin-top: var(--grid-gap);
}

.project-card {
  display: block;
  width: 100%;
  height: 100%;

  transition: box-shadow var(--duration-animation) var(--timing-function);
}

.project-card:hover,
.project-card:focus {
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12), 0 4px 4px 0 rgba(0, 0, 0, 0.06), 1px 4px 6px 0 rgba(0, 0, 0, 0.16);
}

.project-card-wrapper {
  position: relative;
  overflow: hidden;
}

.project-card:hover .project-card-overlay,
.project-card:focus .project-card-overlay {
  transform: translateY(0);
  opacity: 1;
}

.project-card-overlay {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  overflow: scroll;

  width: 100%;
  height: 100%;
  padding: 63px 24px;

  font-size: 18px;
  line-height: 1.56;
  color: var(--primary-bcg-color);
  background-color: rgba(33, 150, 243, 0.9);

  transform: translateY(100%);
  transition: transform var(--duration-animation) var(--timing-function),
    opacity var(--duration-animation) var(--timing-function);
}

.project-set-content {
  padding: 20px 24px;
  border: 1px solid #eeeeee;
  border-top: 0;
}

.project-title {
  font-size: 18px;
  line-height: 2;
  letter-spacing: 0.06em;
  color: var(--title-color);
  margin-bottom: 4px;
}

.project-direction {
  font-size: 16px;
  line-height: 1.88;
  color: var(--text-color);
}

/* ---END PROJECT SET--- */

/* ---MODAL WINDOW--- */
.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 1;

  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);

  transition: opacity var(--duration-animation) var(--timing-function),
    visibility var(--duration-animation) var(--timing-function);
}

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

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);

  width: 528px;
  min-height: 581px;
  padding: 40px;

  background-color: var(--primary-bcg-color);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 1px 1px 0 rgba(0, 0, 0, 0.16), 0 2px 1px 0 rgba(0, 0, 0, 0.2);
  border-radius: 4px;

  transition: transform var(--duration-animation) var(--timing-function);
}

.backdrop.is-hidden .modal {
  transform: translate(-50%, -50%) scale(0.9);
}

.modal-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: transparent;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;

  transition: fill var(--duration-animation) var(--timing-function);
}

.modal-close-btn:hover,
.modal-close-btn:focus {
  fill: var(--accent-color);
}

.contact-form {
  display: flex;
  flex-direction: column;
  /* width: 448px; */
}

.contact-form-title {
  margin-bottom: 12px;

  text-align: center;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.15;

  color: var(--title-color);
}

.contact-form-label {
  font-size: 12px;
  line-height: 1.67;
  letter-spacing: 0.01em;
  color: inherit;
}

.contact-form-input-wraper {
  position: relative;
  display: block;
}

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

  padding: 11px 11px 11px 42px;
  margin-bottom: 10px;

  border: 1px solid rgba(33, 33, 33, 0.2);
  border-radius: 4px;

  transition: border-color var(--duration-animation) var(--timing-function);
}

.contact-form-input:focus,
.contact-form-message:focus {
  outline: none;
  border-color: var(--accent-color);
}

.contact-form-input:focus + .contact-form-icon {
  fill: var(--accent-color);
}

.contact-form-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);

  width: 18px;
  height: 18px;

  transition: fill var(--duration-animation) var(--timing-function);
}

.contact-form-message {
  display: block;
  width: 100%;
  height: 120px;
  padding: 12px 16px;
  margin-bottom: 20px;

  border: 1px solid rgba(33, 33, 33, 0.2);
  border-radius: 4px;

  resize: none;

  transition: border-color var(--duration-animation) var(--timing-function);
}

.contact-form-message::placeholder {
  font-size: 14px;
  line-height: 1.143;
  letter-spacing: 0.01em;

  color: rgba(117, 117, 117, 0.5);
}

.contact-form-label-policy {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
}

.contact-form-label-policy::before {
  display: inline-block;
  content: '';

  width: 16px;
  height: 15px;
  margin-right: 7px;

  border: 1px solid #000000;
  border-radius: 2px;
}

.contact-form-check-policy:checked + .contact-form-label-policy::before {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  background-image: url(../images/icon-check.svg);
  background-size: contain;
  background-origin: border-box;
  background-repeat: no-repeat;
}

.contact-form-check-policy:focus + .contact-form-label-policy::before {
  box-shadow: 0px 0px 0px 2px rgba(33, 150, 243, 0.9);
}

.agreement-link {
  color: var(--accent-color);
}

.contact-form-btn {
  align-self: center;
  padding: 10px 55px;

  transition: background-color var(--duration-animation) var(--timing-function);
}

.contact-form-btn:focus,
.contact-form-btn:hover {
  background-color: #188ce8;
}
/* --END MODAL WINDOW-- */
