/* global styles */
h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin: 0;
}

h3 {
  margin-bottom: 8px;
}

ul,
ol {
  margin: 0;
  padding-left: 0;
  list-style-type: none;
}

img {
  display: block;
}

button {
  border: none;
}

.container {
  width: 100%;
  max-width: 1158px;
  margin-left: auto;
  margin-right: auto;
}

body {
  background-color: #ffffff;
  color: #434455;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* header */
.header {
  background-color: #ffffff;
  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-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.header .logo {
  margin-right: 76px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  font-weight: 500;
  text-decoration: none;
  position: relative;

  padding: 24px 0;

  display: block;

  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.current {
  color: #404bbf;
}

.current::after {
  content: "";

  display: block;
  width: 100%;
  position: absolute;
  top:0;
  left: 0;
  bottom: -1px;
  height: 4px;
  background-color: #404bbf;
  border-radius: 2px;
  color: #404bbf;
}

.nav-link:hover {
  color: #404bbf;
}

.nav-link:focus {
  color: #404bbf;
}

/* Address selectors */
.address {
  font-style: normal;
  margin-left: auto;
}

.address-link {
  display: block;
  padding: 24px 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434445;
  text-decoration: none;

  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.address-link:hover {
  color: #404bbf;
}

.address-link:focus {
  color: #404bbf;
}

/* section presentation */
.section-first {
  background-color: #2e2f42;
  padding: 188px 0;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/img-name.jpeg);
  background-size: cover;
  margin:0 auto;
  max-width: 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.section-first-h {
  font-weight: 700;
  color: #ffffff;
  text-align: center;

  font-size: 56px;
  line-height: 1.07;
  letter-spacing: 0.02em;
  margin: auto;
  max-width: 496px;
}

.section-first-button {
  min-width: 169px;
  height: 56px;
  background-color: #4d5ae5;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  color: #ffffff;
  cursor: pointer;
  border-radius: 4px;
  margin: 0 auto;
  display: block;
  margin-top: 48px;
  border: none;

  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.section-first-button:hover {
  background-color: #404bbf;
}
.section-first-button:focus {
  background-color: #404bbf;
}

/* section benefits */
.section-benefits {
  padding: 120px 0;
}

.section-benefits .container {
  padding:0 15px;
}

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

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

.benefits-li {
  flex-basis: calc((100% - 3 * 24px) / 4);
}

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

.benefits-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background-color: rgba(244, 244, 253, 0);
  transform: translatey(100%);
}

.benefits-li:hover .benefits-overlay,
.benefits-li:focus .benefits-overlay {
  transform: translatey(0%);
  transition: background-color 350ms ease, transform 400ms ease;
  background-color: rgba(244, 244, 253, 1);
}

.benefits-h {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
}
.benefits-p {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

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

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

.team-list {
  background-color: #ffffff;
  flex-basis: calc((100% - 3 * 24px) / 4);
  border-radius: 0px 0px 4px 4px;
  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);
}

.team-img{
  width:100%;
}

.team-div {
  padding: 32px 0;
}

.section-team-h {
  margin-bottom: 72px;
  text-align: center;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.team-name {
  text-align: center;
  margin-bottom: 8px;
}

.team-p {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  text-align: center;
  margin-bottom: 8px;
}

.social-ul {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.social-li {
  width: 40px;
  height: 40px;
}

.social-li-a {
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.social-li-a:hover {
  background-color: #404bbf;
}

.social-li-a:focus {
  background-color: #404bbf;
}

/* section portfolio */
.portfolio {
  padding: 120px 0 120px 0;
}

.section-portfolio-h {
  margin-bottom: 72px;
  font-weight: 700;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-align: center;
}

.portfolio-ul {
  flex-wrap: wrap;
  display: flex;
  column-gap: 24px;
  row-gap: 48px;
}

.portfolio-li {
  width: calc((100% - 48px) / 3);
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border:#E7E9FC solid 1px;
}

.portfolio-li:hover .overflow-portfolio-p {
  transform: translateY(0%);
}

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

.portfolio-li-div {
  padding: 32px 16px;
  border: 1px solid #e7e9fc;
  border-top: none;
}

.portfolio-li-text {
  position: relative;
  overflow: hidden;
  padding:32px 0 32px 16px;
}

.portfolio-h-and-p-div{
  
}

.portfolio-div-overflow {
  width:360px;
  height:300px;
  position:relative;
  overflow:hidden;
}

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

.portfolio-div-overflow:hover .overflow-portfolio-p,
.portfolio-div-overflow:focus .overflow-portfolio-p {
  transform: translatey(0%);
  transition: background-color 350ms ease, transform 400ms ease;
  background-color: rgba(77, 90, 229, 1);
}

.portfolio-p {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  transform: translateY(0%);
}

/* Footer */
.footer {
  background-color: #2e2f42;
  padding: 100px 0;
}

.footer .container {
  display: flex;
  align-items: baseline;
  padding:0 15px;
}

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

.footer-p {
  line-height: 1.5;
  color: #f4f4fd;
  letter-spacing: 0.02em;
  font-weight: 400;
  font-size: 16px;
  max-width: 264px;
}

.footer-div-social-media {
  margin-left:120px;
  margin:0 auto;
}

.footer .social-media-ul {
  display: flex;
  gap: 16px;
}

.footer-social-media-li {
  width: 40px;
  height: 40px;
}

.footer-social-a {
  width: 100%;
  height: 100%;
  background-color: #4d5ae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-a:hover {
  background-color: #31d0aa;
}

.footer-social-a:focus {
  background-color: #31d0aa;
}

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

.footer-form {
  display:flex;
  gap:24px;
}

.footer-div-label {

}

.footer-social-subscribe-svg-use {
  fill:#ffffff;
  margin-left:16px;
}

.footer-input {
  width:264px;
  height:40px;
  border-radius:4px;
  background-color: transparent;
  border: 1px solid #ffffff;
  display:flex;

  font-size:12px;
  line-height:2;
  letter-spacing: 0.04em;
  padding-left:16px;
  box-shadow:0px 4px 4px rgba(0, 0, 0, 0.15);
  border-radius:4px;
  color:#ffffff;
}

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

.social-subscribe-button {
  display:flex;
  justify-content:center;
  align-items:center;

  padding:8px 24px;
  min-width:165px;
  height:40px;
  
  
  font-family:"Roboto", sans-serif;
  font-size:16px;
  font-weight:500;
  line-height:1.5;
  letter-spacing:0.04em;
  
  cursor:pointer;
  
  color:#ffffff;
  background-color: #4d5ae5;
  
  border:none;
  border-radius:4px;
}

.span-subscribe {
  font-size:16px;
  font-weight:500;
  line-height:1.5;
  letter-spacing:0.04em;
  text-align:center;
  margin-right:16px;
  color:#fff;
  font-family:'Roboto';
}

/* logo */
.logo {
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: 0.03em;
  color: #4d5ae5;
  text-decoration: none;
  text-transform: uppercase;
  display: block;
}
.logo-headspan {
  color: #2e2f42;
}

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

.logo-span {
  color: #f4f4fd;
}

        /* social media icons */

.icons-social {
  fill: #f4f4fd;
}

.icons-social-use{
}

.icons-social-use-footer{
}

        /* modal window */
.modal-overlay {
  background-color: rgba(46, 47, 66, 0.4);
  position:fixed;
  width:100%;
  height:100%;
  top:0;
  left: 0;

  z-index:999;
  display:flex;
  justify-content: center;
  align-items: center;
  padding:72px 24px;

  opacity:0;
  pointer-events:none;
  /* visibility: ; */
  transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1), visibility 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay::backdrop{
  background-color:rgba(46, 47, 66, 0.4);
  width:100vw;
  height:100vh;
}

.modal-overlay.is-open {
  opacity:1;
  pointer-events:auto;
}

.modal {
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  width:408px;
  min-height:584px;
  background:#fcfcfc;
  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);
  border-radius:4px;
  transition:transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius:4px;
  padding:72px 24px 24px 24px;
}

.modal-button-close {
  width:24px;
  height:24px;
  
  background-color: #E7E9FC;
  border:  1px solid rgba(0, 0, 0, 0.1);
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content: center;
  background-color: #e7e9fc;
  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);

  position:absolute;
  top:24px;
  right:24px;
  align-items: center;
  justify-items:right;
}

.modal-button-close:hover {
  background-color:#404bbf;
  border:none;
}

.modal-button-close:hover .modal-button-close-svg, 
.modal-button-close:focus .modal-button-close-svg{
  fill: #ffffff;
}

.modal-button-close:focus {
  background-color:#404bbf;
  border:none;
}

.modal-button-close-svg {
  fill:#2E2F42;
  transition:fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-button-close:hover .modal-button-close-svg, 
.modal-button-close:focus modal-button-close-svg {
  fill:#ffffff;
}

.modal-overlay-p{
  font-weight:500;
  font-size:16px;
  line-height:1.5;
  text-align:center;
  letter-spacing:0.02em;
  color:#2e2f42;
  margin-bottom:16px;
  max-width:360px;
  max-height:24px;
}
 
.modal-form {
  margin:16px 0 0;
  display:flex;
  flex-direction: column;
  gap:8px;
}

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

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

.modal-form-div-div-textarea{
  margin-bottom:16px;
}

.modal-form-label {
  font-size:12px;
  line-height:1.17;
  letter-spacing: 0.04em;
  color:#8e8f99;
  display:block;
  margin-bottom:4px;
}

.div-for-input-and-svg{
  position:relative;
  fill:#4d5ae5;
  stroke:#4d5ae5;
}

.modal-form-label-input {
  background-color:transparent;
  border-color:#2E2F42;
  border:1px solid rgba(46,47,66,0.4);
  border-radius:4px;
  width:100%;
  height:40px;
  overflow-y:auto;
  padding-left:38px;
  outline:transparent;
  transition:border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal-form-label-input:focus .modal-form-div-div-svg{
  fill:#4d5ae5;
}

.modal-form-div-div-svg{
  position:absolute;
  left:16px;
  top:50%;
  transform:translatey(-50%);
  transition:fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-form-label-input:focus .modal-form-div-div-svg{
  fill:#4d5ae5;
}

.modal-form-label-textarea {
  width:100%;
  background-color:transparent;
  border:1px solid rgba(46, 47, 66, 0.4);
  border-radius:4px;
  outline:transparent;
  resize:none;
  height:120px;

  padding:8px 16px;

  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);  
  font-size:12px;
  line-height:1.17;
  letter-spacing:0.04em;
  color:rgba(46,47,66,0.4);
}

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

.form-div-div-input-and-button {
  position:relative;
  margin-bottom:24px;
}

.form_div_privacy-policy {
  margin-bottom:24px;
}

.visually-hidden-checkbox {
  margin-bottom:24px;
}

.visually-hidden:checked + .modal-form-label .span_privacy-policy{
  background-color:#404bbf;
  border:none;
  fill:#F4F4FD;
}

.span_privacy-policy{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  fill:transparent;

  width:16px;
  height:16px;
  border:1px solid rgba(46,47,66,0.4);
  border-radius:2px;
  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);
}

.checked-p {
  margin-right:8px;
}

.form_div_div_a {
  color:#4d5ae5;

}

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

  justify-self: center;

  color:#fff;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: #4d5ae5;
}