html {
  scroll-behavior: smooth;
}

body {
  font-family: "Roboto", sans-serif;
  color: #434455;
  background-color: #ffffff;
}

ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
}

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

a {
  text-decoration: none;
}

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

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

.container {
  width: 100%;
  max-width: 320px;
  padding-left: 16px;
  padding-right: 16px;
  margin: 0 auto;
}

.title {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #2e2f42;
  text-transform: capitalize;
}

.subtitle {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

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

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

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

.header-logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #c066c0;
  padding-top: 16px;
  padding-bottom: 16px;
}

.header-logo span {
  color: #55265f;
}

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

.header-menu-link {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2e2f42;
  padding-top: 24px;
  padding-bottom: 24px;
  position: relative;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-menu-link:hover,
.header-menu-link:focus {
  color: #a74fa7;
}

.header-address {
  font-style: normal;
  margin-left: auto;
}

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

.header-address-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  padding-top: 24px;
  padding-bottom: 24px;
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.header-address-link:hover,
.header-address-link:focus {
  color: #a74fa7;
}

.menu-open-btn {
  background-color: transparent;
  border: none;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mob-menu {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 10;
  background-color: #ffffff;

  padding: 72px 24px 40px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: auto;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

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

.mob-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mob-menu-container {
  position: relative;
  padding-top: 72px;
  padding-bottom: 40px;
  padding-left: 16px;
  padding-right: 24px;

  display: flex;
  flex-direction: column;
  height: 100%;
}

.menu-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  display: block;
  margin-left: auto;
  margin-bottom: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: #e7e9fc;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.mob-menu-list {
  margin-bottom: auto;
}

.mob-menu-item:not(:last-child) {
  margin-bottom: 40px;
}

.mob-menu-link {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

.mob-menu-link.active {
  color: #784578;
}

.mob-address {
  font-style: normal;
}

.mob-address-item:not(:last-child) {
  margin-bottom: 24px;
}

.mob-address-link {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #434455;
}

.mob-address-link.active {
  color: #784578;
}

.mob-social-list {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
}

.mob-social-item {
  width: 40px;
  height: 40px;
}

.mob-social-link {
  width: 100%;
  height: 100%;
  background-color: #784578;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.mob-social-icon {
  fill: #ffffff;
}

.hero {
  background-color: #2e2f42;
  padding-top: 72px;
  padding-bottom: 72px;
  max-width: 1555px;
  margin: 0 auto;
  background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/font-mob.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  border-radius: 30px;
}

.hero-title {
  font-size: 36px;
  line-height: 1.11;
  letter-spacing: 0.02em;
  text-align: center;
  color: #fff;
  max-width: 216px;
  margin: 0 auto;
  margin-bottom: 72px;
}

.hero-sub {
    font-size: 30px;
}

.about-me-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
}

.about-me-text {
  border-radius: 30px;
  /*background: #f4f4fd;*/
  background: #f3f3f3;
  padding-top: 40px;
  padding-bottom: 40px;
  padding-left: 40px;
  padding-right: 40px;
}

.about-me-title {
  font-weight: 600;
  font-size: 32px;
  line-height: 100%;
  letter-spacing: -0.02em;
  color: #0c0c0c;
  margin-bottom: 12px;
}

.about-me-subtitle {
  font-weight: 600;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: -0.02em;
  color: #0c0c0c;
  margin-bottom: 28px
}

.about-me-item {
  margin-bottom: 20px;
}

.about-me-item:last-child {
  margin-bottom: 0;
}

.about-me-dscr {
  font-weight: 500;
  font-size: 14px;
  line-height: 129%;
  letter-spacing: -0.02em;
  color: rgba(12, 12, 12, 0.7);
}

.rounded-image {
  border-radius: 30px;
}

 /*old*/

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

.features-wrap {
  display: none;
}

.features-subtitle {
  margin-bottom: 8px;
  text-align: center;
  font-size: 36px;
  line-height: 1.11;
  font-weight: 700;
}

.team {
  background-color: #f4f4fd;
  /*background-color: #c4eba2;*/
}

.team-title {
  margin-bottom: 72px;
}

.team-list {
  display: flex;
  flex-wrap: wrap;
  gap: 72px;
  justify-content: center;
}

.team-item {
  background-color: #ffffff;
  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-img {
  filter: blur(1.5px);
}

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

.team-social-list {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.team-social-item {
  width: 40px;
  height: 40px;
}
.team-social-link {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #4d5ae5;
  border-radius: 50%;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.team-social-link:hover,
.team-social-link:focus {
  background-color: #404bbf;
}
.team-social-icon {
  fill: #f4f4fd;
}

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

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

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

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

.portfolio-item {
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #ebd9ec;
  /*
    background-image: linear-gradient(
      rgba(46, 47, 66, 0.7),
      rgba(46, 47, 66, 0.7)
    ),
    url(../images/prof-2.PNG);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  filter: blur(2px)*/;
}

.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-item:hover .portfolio-cover-text {
  transform: translateY(0);
}

.portfolio-cover-wrap {
  position: relative;
  overflow: hidden;
}

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

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

.portfolio-subtitle {
  margin-bottom: 8px;
}

/*  відгуки   */

.testimonials {
  padding: 80px 20px;
  background-color: #f6f6f6;
  text-align: center;
}

.section-title {
  font-size: 36px;
  margin-bottom: 40px;
  color: #333;
}

.carousel {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonial {
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fade 1s ease-in-out;
}

.testimonial.active {
  display: flex;
}

.testimonial img {
  width: 300px;
  height: auto;
  border-radius: 30px;
  object-fit: cover;
  margin-bottom: 20px;
}

.quote {
  font-size: 18px;
  color: #555;
  margin-bottom: 10px;
}

.author {
  font-weight: bold;
  color: #222;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  font-size: 32px;
  cursor: pointer;
  color: #888;
  padding: 10px;
}

.carousel-btn:hover {
  color: #000;
}

.carousel-btn.prev {
  left: 0;
}

.carousel-btn.next {
  right: 0;
}

@keyframes fade {
  from {opacity: 0;}
  to {opacity: 1;}
}

.footer {
  background-color: #73447a;
  padding-top: 96px;
  padding-bottom: 96px;
}

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

.footer-text-wrap {
  margin-bottom: 72px;
}

.footer-logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #f2a5f2;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  text-align: center;
}

.footer-logo span {
  color: #f4f4fd;
}

.footer-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #f4f4fd;
}

.footer-subtitle {
  font-weight: 500;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 16px;
  text-align: center;
}

.footer-soc-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 72px;
}

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

.footer-social-item {
  width: 50px;
  height: 50px;
}

.footer-social-link {
  width: 100%;
  height: 100%;
  background-color: #90c066;
  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-icon {
  fill: #f4f4fd;
}

.footer-social-link:hover,
.footer-social-link:focus {
  background-color: #f2a5f2;
}

.footer-form-wrap {
  width: 100%;
}

.footer-form {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 16px;
}


.footer-btn-icon {
  fill: #ffffff;
  margin-left: 16px;
}


@media screen and (min-width: 788px) {
  .container {
    max-width: 786px;
  }

  .team .container,
  .footer .container {
    max-width: 782px;
  }

  .menu-open-btn {
    display: none;
  }

  .header-logo {
    padding-top: 24px;
    padding-bottom: 24px;
    margin-right: 120px;
  }

  .header-menu-list {
    display: flex;
  }

  .header-address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .header-address-link {
    font-size: 12px;
    line-height: 1.17;
    letter-spacing: 0.04em;
    padding: 0;
  }

  .hero {
    padding-top: 112px;
    padding-bottom: 112px;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/font-tab.png);
  }

  .hero-title {
    max-width: 566px;
    font-size: 56px;
    line-height: 1.07;
  }

  .hero-sub {
    font-size: 48px;
  }

  .about-me-container {
    gap: 40px;
  }

  .about-me-text {
    padding: auto;
    /*padding-top: 80px;
    padding-bottom: 80px;
    padding-left: 60px;
    padding-right: 60px;*/
    min-width: 600px;
  }

  .about-me-title {
    font-size: 48px;
    line-height: 92%;
  }

  .about-me-subtitle{
    font-size: 24px;
  }

  .about-me-dscr {
    font-size: 16px;
    line-height: 125%;
  }

  .features-list {
    gap: 72px 24px;
  }

  .features-item {
    flex-basis: calc((100% - 48px) / 2);
  }

  .features-subtitle {
    text-align: left;
  }

  .team-list {
    gap: 64px 24px;
  }

  .team-item {
    flex-basis: calc((100% -24px) / 2);
  }

  .team-img {
    width: 264px;
    height: 316px;
  }

  .portfolio-list {
    gap: 72px 24px;
  }

  .portfolio-item {
    flex-basis: calc((100% - 24px) / 2);
  }

  .footer-text-wrap {
    max-width: 264px;
    margin-right: 24px;
  }

  .footer-logo {
    justify-content: flex-start;
  }

  .footer-soc-wrap {
    width: unset;
  }

  .footer-subtitle {
    text-align: left;
  }
}

@media screen and (min-width: 1358px) {
  .container {
    max-width: 1358px;
  }

  .team .container,
  .footer .container {
    max-width: 1358px;
  }

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

  .header-menu-link {
    font-size: 18px;
  }

  .header-address-list {
    flex-direction: row;
    gap: 40px;
  }

  .header-address-link {
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: 0.02em;
    padding: 24px 0;
  }

  .hero {
    height: 788px;
    padding-top: 188px;
    padding-bottom: 188px;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url(../images/font-desk.png);
  }

  .hero-title {
    margin-top: 160px;
    margin-bottom: 160px;
  }

  .about-me-container {
    flex-direction: row;
    align-items: stretch;
    max-width: 1150px;
  }

  .about-me-subtitle{
    font-size: 18px;
  }

  .about-me-dscr {
    font-size: 16px;
    line-height: 125%;
    max-width: 660px;
  }

  .about-me-text,
  .about-me-img {
    flex: 1;
  }
  
  .about-me-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .features-wrap {
    width: 100%;
    height: 112px;
    border: 1px solid #8e8f99;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
  }
  .one {
  background-image:
    url(../images/photo-1.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  .two {
    background-image:
    url(../images/photo-2.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  .three {
    background-image:
    url(../images/photo-3.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  .four {
    background-image:
    url(../images/photo-4.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
  }

  .features-list {
    gap: 24px;
  }

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

  .features-subtitle {
    font-size: 20px;
    line-height: 1.2;
  }

  .team-list {
    gap: 24px;
  }

  .team-item {
    flex-basis: calc((100% - 72px) / 4);
  }

  .team-img {
    width: 313px;
    height: auto;
  }

  .portfolio-list {
    gap: 48px 24px;
  }

  .portfolio-item {
    flex-basis: calc((100% - 48px) / 3);
  }

  .footer-form-wrap {
    margin-left: 80px;
    width: unset;
  }

  .footer-form {
    gap: 24px;
  }

  .footer-text-wrap {
    margin-right: 300px;
    margin-bottom: unset;
    max-width: 496px
  }

  .footer-soc-wrap {
    margin-bottom: unset;
  }
}
