/* ..............
   BASE STYLES
   ............... */
body {
  font-family: Roboto, sans-serif;
  color: #434455;
  background-color: #ffffff;
}
a {
  text-decoration: none;
  color: inherit;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
input,
textarea,
button {
  font-family: inherit;
  line-height: inherit;
}

/* ..............
   LOGO
  ..............*/
.logo {
  margin-right: 76px;
  font-family: Raleway, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: #4d5ae5;
  text-transform: uppercase;
}
/*.logo-header {
  margin-right: 76px;
}*/
.logo-web {
  color: #2e2f42;
}
.logo-footer {
  display: inline-block;
  margin-bottom: 16px;
}
.logo-footer-span {
  color: #f4f4fd;
}

/* ..............
   HEADER
   .............. */
.header {
  padding: 24px 0;
  border-bottom: 1px solid #e7e9fc;
  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);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ..............
   NAVIGATION
   .............. */
.nav {
  display: flex;
  align-items: center;
}
.nav-list {
  display: flex;
  gap: 40px;
}
.nav-link {
  position: relative;
  padding: 24px 0;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover,
.nav-link:focus {
  color: #404bbf;
}
.nav-link.blue-line {
  color: #404bbf;
}
.nav-link.blue-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;

  width: 100%;
  height: 4px;
  border-radius: 2px;
  background-color: #404bbf;
}

/* ..............
   CONTACTS
   ..............*/
.contacts {
  font-style: normal;
}
.contact-list {
  display: flex;
  gap: 40px;
}
.contact-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.contact-link:hover,
.contact-link:focus {
  color: #404bbf;
}

/* ..............
   HERO SECTION
   .............. */
.hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 188px 0;
  background-color: #2e2f42;
  background-image:
    linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)),
    url(../images/hero/Hero.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
.hero-title {
  max-width: 496px;
  margin-bottom: 40px;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-align: center;
}
.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-button {
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  padding: 16px 32px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.hero-button:hover,
.hero-button:focus {
  background-color: #404bbf;
}

/* ..............
   FEATURES SECTION
   ..............*/
.features-list {
  display: flex;
  gap: 24px;
}
.features-title,
.team-name,
.portfolio-name {
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-transform: capitalize;
}
.features-text,
.team-position,
.portfolio-category {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}
.team-name,
.team-position {
  margin-bottom: 8px;
  text-align: center;
}
.features-item {
  flex-basis: calc((100% - 72px) / 4);
}
.features-items-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
  border: 1px solid #8e8f99;
  background-color: #f4f4fd;
  border-radius: 4px;
  width: 264px;
  height: 112px;
}
/* ..............
   TEAM SECTION
   .............. */
.team {
  background-color: #f4f4fd;
}
.team-title,
.portfolio-title {
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  text-transform: capitalize;
}
.team-list {
  display: flex;
  gap: 24px;
}
.team-item {
  flex-basis: calc((100% - 72px) / 4);
  background-color: #ffffff;
  overflow: hidden;
  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);
}
.team-info {
  padding: 32px 0;
  text-align: center;
}
.team-social {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.team-social-link,
.footer-social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #4d5ae5;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.team-social-link:hover,
.team-social-link:focus {
  background-color: #404bbf;
}
.team-icon,
.footer-icon {
  fill: #f4f4fd;
}

/* ..............
   PORTFOLIO SECTION
   .............. */
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  row-gap: 48px;
}
.portfolio-info {
  border-top: none;
  border-bottom: 1px solid #e7e9fc;
  border-left: 1px solid #e7e9fc;
  border-right: 1px solid #e7e9fc;
  padding: 32px 16px;
}
.portfolio-item {
  flex-basis: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item: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);
}

.portfolio-extra-top-layer {
  position: relative;
  overflow: hidden;
}

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

/* ..............
   FOOTER
  .............. */
.footer {
  padding: 100px 0;
  background-color: #2e2f42;
}
.footer .container {
  display: flex;
  align-items: baseline;
}
.footer-left-block {
  margin-right: 120px;
}
.footer-text {
  width: 264px;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}
.footer-text-social {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}
.footer-social-list {
  display: flex;
  gap: 16px;
}
.footer-social-link {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.footer-social-link:hover,
.footer-social-link:focus {
  background-color: #31d0aa;
}

/* ..............
   MODAL
  .............. */
.backdrop {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3;
  background-color: rgba(46, 47, 66, 0.4);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 250ms cubic-bezier(0.4, 0, 0.2, 1),
    visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 408px;
  min-height: 584px;
  padding: 72px 24px 24px 24px;
  background-color: #fcfcfc;
  border-radius: 4px;
  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);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form {
  display: flex;
  flex-direction: column;
}
.form-field {
  margin-bottom: 8px;
}
.form-field-comment {
  margin-bottom: 16px;
}
.backdrop-text {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
}
.form-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
}

.form-checkbox-custom {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;

  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);
}
.form-field-checkbox {
  margin-bottom: 24px;
}
.form-label-checkbox {
  /*display: flex;
  align-items: center;
  gap: 8px;*/
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: #8e8f99;
  cursor: pointer;
}

.form-input-checkbox:checked + .form-label-checkbox > .form-checkbox-custom {
  background-color: #404bbf;
  border: none;
  fill: #f4f4fd;
}
.form-input {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  padding: 8px 38px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-textarea {
  height: 120px;
  padding: 8px 16px;
  resize: none;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
}
.form-input:focus {
  border-color: #4d5ae5;
}
.form-input:focus + .name-phone-email-svg {
  fill: #4d5ae5;
}
.form-input::placeholder {
  color: rgba(46, 47, 66, 0.4);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
}
.form-button {
  display: block;
  margin: 0 auto;
  min-width: 169px;
  height: 56px;
  padding: 16px 32px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.form-button:hover,
.form-button:focus {
  background-color: #404bbf;
}
/*Icon close inside a modal*/
.icon-close {
  z-index: 2;
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #e7e9fc;
  cursor: pointer;
  transition:
    background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
    border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.icon-close-svg {
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.icon-close:hover .icon-close-svg,
.icon-close:focus .icon-close-svg {
  fill: #ffffff;
}
.icon-close:hover,
.icon-close:focus {
  background-color: #404bbf;
  border: none;
}
/*ICONS*/
.form-input-wrapper {
  position: relative;
}
.name-phone-email-svg {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  fill: #2e2f42;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-checkbox-policy {
  color: #4d5ae5;
  text-decoration: underline;
  text-decoration-color: #4d5ae5;
  text-decoration-skip-ink: none;
}
/* ..............
   FOOTER SUBSCRIBE
  .............. */
.footer-subscribe {
  margin-left: 80px;
}
.footer-subscribe-text {
  margin-bottom: 16px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #ffffff;
}
.subscribe-form {
  display: flex;
  gap: 24px;
}
.subscribe-input {
  width: 264px;
  height: 40px;
  padding: 8px 16px;
  font-size: 12px;
  line-height: 2;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: transparent;
  border: 1px solid #ffffff;
  border-radius: 4px;
  outline: transparent;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.subscribe-input::placeholder {
  color: #ffffff;
}
.subscribe-input:focus {
  border-color: #4d5ae5;
}
.subscribe-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  min-width: 165px;
  height: 40px;
  padding: 8px 24px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.subscribe-button:hover,
.subscribe-button:focus {
  background-color: #404bbf;
}
.subscribe-icon {
  margin-left: 16px;
  fill: #ffffff;
}
/* ..............
   LAYOUT UTILITIES
  .............. */
.container {
  width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
  /*outline: 1px solid blue;*/
}
.section:not(.hero) {
  padding: 120px 0;
}
.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;
}
