: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;
  --font-family: 'Roboto', sans-serif;
  --second-family: 'Raleway', sans-serif;
  --text-size: 16px;
  --line-height: 1.5;
  --letter-spacing: 0.02em;
}
/* ==================== RESET ==================== */

body {
  font-family: var(--font-family);
  font-size: var(--text-size);
  background-color: var(--white);
  color: var(--slate);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
}

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

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

ul,
ol {
  margin: 0;
  padding-left: 0;
}
img {
  display: block;
  max-width: 100%;
}

.list {
  list-style: none;
}

button {
  cursor: pointer;
}

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

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

.scnd-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--navy-blue);
}

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

/* ====================  HEADER SECTION ==================== */
.header {
  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;
  flex-direction: row;
  gap: 0px;
}

.wb_link {
  margin-right: 76px;
  display: flex;
  align-items: center;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--iris);
  font-family: var(--second-family);
}

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

.navigation {
  display: flex;
  gap: 76px;
  align-items: center;
}

.navigation-list {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: row;
  gap: 40px;
  font-weight: 500;
  color: var(--navy-blue);
}

.head-link {
  display: block;
  padding-top: 24px;
  padding-bottom: 24px;
  position: relative;
  color: var(--navy-blue); /* звичайний стан */
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.head-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 4px;
  background-color: var(--ocean);
  border-radius: 2px;

  transform: scaleX(0);
  transform-origin: right;
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.head-link:hover::after,
.head-link:focus::after {
  transform: scaleX(1);
  transform-origin: left;
}

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

address {
  color: var(--slate);
}

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

.header-list {
  display: flex;
  gap: 40px;
}

/* ==================== HERO SECTION ==================== */
.hero {
  background-image: linear-gradient(180deg, var(--grey), var(--grey)),
    url(../images/hero/bg.jpg);
  background-color: var(--navy-blue);
  max-width: 1440px;
  height: 600px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  margin: 0 auto;
}

.hero .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 48px;
  height: 100%;
}

.hero-title {
  font-weight: 700;
  font-size: 56px;
  line-height: 1.07;
  text-align: center;
  color: var(--white);
  letter-spacing: 0.02em;
  max-width: 496px;
}

.hero-btn {
  display: block;
  border-radius: 4px;
  border: none;

  padding: 16px 32px;
  min-width: 169px;
  height: 56px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  background-color: var(--iris);
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: var(--white);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ==================== FEATURES SECTION ==================== */

.features {
  padding-top: 120px;
  padding-bottom: 120px;
}

.features .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.features-item {
  width: calc((100% - 72px) / 4);
}

.features-text {
  color: var(--slate);
}

.features-icon-div {
  display: flex;
  background: var(--cloud);
  border: 1px solid var(--light-slate);
  border-radius: 4px;
  width: 100%;
  height: 112px;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}
/* ==================== TEAM SECTION ==================== */
.team {
  background-color: var(--cloud);
  padding-top: 120px;
  padding-bottom: 120px;
}

.tem-title {
  display: block;
}

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

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

.team-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  height: 428px;
  border-radius: 0 0 4px 4px;
  width: calc((100% - 72px) / 4);
  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);
  background: var(--white);
  width: 264px;
}

.team-item-block {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  padding: 32px 0;
}

.social-team-icon-link {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background-color: var(--iris);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.social-team-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 24px;
  height: 40px;
}

.social-team-icon {
  fill: var(--cloud);
}

.social-team-icon-link:hover,
.social-team-icon-link:focus,
.social-team-icon-link:active {
  background-color: var(--ocean);
}

/* ==================== PROTFOLIO SECTION ==================== */
.portfolio {
  padding-top: 105px;
  padding-bottom: 145px;
}

.portfolio-title {
  padding-bottom: 72px;
}

.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 24px;
  justify-content: center;
}

.portfolio-item {
  flex: 1 1 calc((100% - 48px) / 3);
  max-width: 360px;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.portfolio-item: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-img {
  position: relative;
  overflow: hidden;
}

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

.portfolio-item:hover .portfolio-img-description {
  transform: translateY(0%);
}

.portfolio-item-container {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--cornflower);
  border-top: none;
  padding: 32px 16px;
  flex-grow: 1;
  gap: 8px;
}

/* ==================== FOOTER SECTION ==================== */

.footer {
  padding-top: 100px;
  padding-bottom: 100px;
  background: var(--navy-blue);
  color: var(--cloud);
  padding: 100px 0;
}

.footer .container {
  display: flex;
  align-items: baseline;
}

.webstudio_footer {
  margin-right: 120px;
}

.wb_link_footer {
  margin-bottom: 16px;
  display: inline-block;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--iris);
  font-family: var(--second-family);
}

.wb_footer {
  color: var(--cloud);
}

.p_footer {
  max-width: 264px;
}

.social-team-list-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 16px;
  height: 40px;
}

.social-footer-text {
  font-weight: 500;
  color: var(--white);
  margin-bottom: 16px;
}

.social-link-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.social-footer-list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 24px;
  height: 40px;
}

.social-footer-icon-link {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background-color: var(--iris);
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.social-footer-icon-link:hover,
.social-footer-icon-link:focus,
.social-footer-icon-link:active {
  background-color: var(--green);
}
