/* Base styles */

*,
*::before,
*::after{box-sizing: border-box}

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

:root {
  --icon-color: #f4f4fd;



  --font-family: "Roboto", sans-serif;
  --second-family: "Raleway", sans-serif;
}
}

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

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

a {
  text-decoration: none;
  color: inherit;
}

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

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

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

    margin-left: auto;
    margin-right: auto;
  }
}
@media screen and (min-width: 1158px) {
  .container {
    max-width: 1158px;
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Header */

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

.page-header {
  position: sticky;
  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;
}

.nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

}

.web-logo {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
  text-decoration: none;
  margin-right: 17px;
  padding: 24px 0;
}

@media (min-width: 320px) and (max-width: 768px) {
  .web-logo{
    font-family: Raleway;
    font-weight: 700;
    font-style: Bold;
    font-size: 18px;
    line-height: 21px;
    letter-spacing: 3%;
    vertical-align: middle;
    text-transform: uppercase;
  }
}

.studio-text {
  color: #2e2f42;
}

.nav-list {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link.current {
  position: relative;
  color: #404bbf; 
  font-size: 16px;
}

.nav-link.current::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 4px;
  width: 100%;
  background-color: #404bbf; 
  border-radius: 2px;
}


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

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

.address-list {
  font-family: "Roboto" sans-serif;
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding-left: 0;
  margin: 0;
  font-style: normal;
  list-style: none;
  justify-content: center;
  align-items: center;
}

.address-list li:first-child .address-link,
.address-list li:nth-child(2) .address-link {
  transition: color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.address-link {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  text-decoration: none;
}

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

@media screen and (min-width: 720px){
  .address-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}

/* Бургер */
.menu-toggle {
  fill: #2F2F37;
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

@media only screen and (min-width:768px){
  .menu-toggle{
    display:none;
  }
}

/* Мобільне меню */
.mobile-menu {
  background-color: rgb(255, 255, 255);

  width: 320px;
  padding: 72px 16px 40px;
  position: fixed;
  inset: 0;
  display:flex; 
  flex-direction: column;

  transition: opacity 200ms ease-in-out, transform 200ms ease-in-out;
  transform: translateX(100%);
  opacity: 1;
}

@media only screen and (min-width: 768px) and (max-width: 1157px) {
  .mobile-menu {
    display: none !important;
  }
}

/* Desktop: never show */
@media only screen and (min-width: 1158px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu.is-open {
  transform: translateX(0);   /* slide in */
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu > .menu-close{
  position: absolute;
  top: 24px;
  right: 24px;

}

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

}

.mobile-nav-list{
  display: flex;
  flex-direction:column;
  margin-bottom: auto;
}

.mobile-nav-link{
  font-family: "Roboto", sans-serif;;
  font-weight: 700;
  font-size: 36px;
  line-height: 111%;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

.mobile-menu-contacts-item:not(:last-child){
  margin-bottom:24px;
}

.mobile-menu-contacts-link{
  font-family: "Roboto", sans-serif;;
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #434455;

}



.mobile-menu.is-open {
  display: flex;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu .nav-link,
.mobile-menu .contact-link {
  font-size: 18px;
  padding: 10px 0;
}


.menu-close {
  align-self: flex-end;
  background: none;
  border: none;
  margin-bottom: 20px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border: 1px solid #E7E9FC;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mobile-contacts {
  display: grid;
  gap: 24px;
  margin-top: 40px;
}

.mobile-tel {
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  color:#4d5ae5;

}
.mobile-mail {
  font-size: 16px;
  text-decoration: none;
  color: #434455;
}

.mobile-socials{
  display: flex;
  justify-content: center; 
  align-items: center;
  gap: 40px;
  margin-top: 48px;
  padding: 0;
  list-style: none;
}

@media (max-width: 767px) {
  .nav-list,
  .address-main {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    stroke-width: 2.5;
    background: transparent;
    cursor: pointer;
 
    right: 20px;
    top: 22px;
    position: absolute;
  }
  .menu-toggle svg use {
    width: 16.8px;
    height:14.4px;
    stroke-width: 1.5; /* тонші лінії */
}
}



.hero-button {
  background-color: var(--iris);
  color: #ffffff;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 4px;
  padding: 16px 32px;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0px 4px 4px rgba(46, 47, 66, 0.08);
  display: block;
  min-width: 169px;
  margin-left: auto;
  margin-right: auto;
}
.hero-button:hover,
.hero-button:focus {
  background-color: var(--ocean);
}

/* ===== SECTIONS paddings ===== */
.features-section,
.section-three,
.section-four {
  padding: 96px 0;
}
@media (min-width: 1158px) {
  .features-section,
  .section-three,
  .section-four {
    padding: 120px 0;
  }
}
.section-title
.project-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.11;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: capitalize;
  color: #2e2f42;
  margin-bottom: 72px;
}


/* Hero section */
.hero-section {
  background-color: #2e2f42;
  color: #ffffff;

  background-image: linear-gradient(rgba(46, 47, 66, 0.7),
                                    rgba(46, 47, 66, 0.7)),
                    url("../images/people-office.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;

  max-width: 1440px;
  margin: 0 auto;
  text-align: center;
  padding: 112px 0;
}

@media (min-width: 768px) {
  .section-hero {
    padding: 112px 0;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/Dark-bgTablet.jpg");
  }
}

@media (min-width: 768px) and (min-resolution: 192dpi) {
  .hero-section {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/Dark-bgTablet@2x.jpg");
  }
}

@media (min-resolution: 192dpi) {
  .hero-section {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/Dark-bg@2x.jpg");
  }
}

@media (min-width: 1158px) {
  .section-hero {
    padding: 188px 0;
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/Dark-bgdesctop@2x.jpg");
  }
}

@media (min-width: 1158px) and (min-resolution: 192dpi) {
  .section-hero {
    background-image: linear-gradient(
        rgba(46, 47, 66, 0.7),
        rgba(46, 47, 66, 0.7)
      ),
      url("../images/Dark-bgdesctop@2x.jpg");
  }
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 111%;
  letter-spacing: 0.02em;
  text-align: center;
  max-width: 216px;
  margin: 0 auto 48px auto;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 56px;
    line-height: 107%;
    margin-bottom: 36px;
    max-width: 496px;
  }
}
@media (min-width: 1158px) {
  .hero-title {
    margin-bottom: 48px;
  }
}

.hero-button {
  display: block;
  margin: auto;
  padding: 16px 32px;
  height: 56px;
  min-width: 169px;
  background-color: var(--primary-accent, #4d5ae5);
  color: #ffffff;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  border: none;
  border-radius: 4px;
  font-family: 'Roboto', sans-serif;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-button:hover,
.hero-button:focus {
  background-color: #404bbf;
}

/*Features*/
.features-section {
  background-color: #ffffff;
  color: #2e2f42;
  padding-top: 96px;
  padding-bottom: 96px;
}

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

.features-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

.features-image-box {
  display: none;
  justify-content: center;
  align-items: center;
  width: 264px; 
  height: 112px;
  border: 1px solid #8e8f99; 
  border-radius: 4px;
  background-color: #f4f4fd;
  margin-bottom: 8px;
}

.features-image-box .icon {
  width: 64px;
  height: 64px;
}

@media screen and (min-width: 768px) {
  .features-image-box {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px; 
  }
}

.features-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #2e2f42;
  margin-bottom: 8px;
  text-align: left;
}

.features-text {
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
  margin: 0;
  text-align: left;
}

@media (max-width: 767.98px) {
  .features-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.11;
    letter-spacing: 0.02em;
    color: #2e2f42;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .features-text {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.02em;
    color: #434455;
    
  }

    .footer-logo {
    display: block;
    width: max-content;
    margin: 0 auto 16px;
    white-space: nowrap;
  }

  .logo-span {
    display: inline-block;
    margin-left: auto;
    margin-right: auto; 
  }
  .media-title {
    text-align: center;
  }
}

@media (min-width: 768px) {
  .features-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    row-gap: 72px;
  }
  .features-item {
    flex: 0 0 calc((100% - 24px) / 2);
  }
    .features-image-box {
      display: flex;  
      justify-content: center;
      align-items: center;  
  }
    .features-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.11;
    margin-bottom: 8px;
  }
  .features-text {
    font-size: 16px;
    line-height: 1.5;
  }
}

@media (min-width: 1158px) {
  .features-item {
    flex: 0 0 calc((100% - 72px) / 4);
  }
}

@media (max-width: 1157.98px) {
  .features-image-box {
    display: none;
  }
}


/* - MOBILE - */
@media screen and (max-width: 767px) {
  .features-list {
    display: flex;
    align-items: center; 
    gap: 72px;
  }

  .features-item {
    flex: 1 1 100%;
    text-align: center; 
    justify-content: center;
  }


  .features-image-box {
    display: none;
  }
}


/* SECTION 3 */
.section-three {
  background-color: #f4f4fd;
  padding: 96px 0;
}
@media screen and (min-width: 768px){
  .container {
  width: 100%;

  margin: 0 auto;
  padding: 0 15px;
}
  
}

.section-three svg {
  fill: var(--icon-color); 
}

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

.card-list {
  display: flex;
  gap: 24px;
  padding-left: 0;
  margin: 0;
  list-style: none;
  fill: #f4f4fd
}

@media (max-width: 767.98px) {
  .card-list {
    row-gap: 72px;
  }
}

.card-item {
  flex-basis: 100%;
  background-color: #ffffff;
  width: calc((100% - 72px) / 4);
  border-radius: 0 0 4px 4px;
  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);
  text-align: center;
}

@media (min-width: 768px) and (max-width: 1157.98px) {
  .team-container{
    max-width: 584px;
  }
  .card-item {
    flex-basis: calc((100% - 24px) / 2);
  }
}
@media (min-width: 1024px) {
  .card-item {
    flex-basis: calc((100% - 72px) / 4);
  }
}



@media (min-width: 768px){
  .card-item img {
    display: block;
    width: 100%;
    object-fit: cover; 
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
  }
}

.card-content{
  padding: 32px 0 ; 
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-title {
  font-weight: 500;
  font-size: 20px;
  line-height: 24px;
  letter-spacing: 0.02em;
  color: #2e2f42;
  text-align: center;
  margin-bottom: 8px;
}

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

.team-icon-list {
  display: flex;
  justify-content: center;
  gap: 24px; 
  padding: 0;
  margin-top: 16px; 
  list-style: none;
}

.team-icon-list-item {
  display: flex;
  width: 40px;
  height: 40px;
}

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

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

.team-icons {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

/* - MOBILE -*/
@media screen and (max-width: 767px) {
  .card-list {
    display: flex;
    flex-direction: column;   
    align-items: center;      
    gap: 72px;                
  }

  .card-item {
    width: 100%;             
    max-width: 264px;        
  }
}

/* SECTION 4 */

.section-four{
  padding:96px 0 96px 0;
}



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

.project-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  row-gap: 48px;
}

.project-item {
  flex-basis: 100%;
  background-color: #fff;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.project-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);
}

@media (min-width: 768px) {
  
  
  .project-item {
    flex-basis: calc((100% - 24px) / 2);
  }

}
@media (min-width: 1024px) {
  .project-item {
    flex-basis: calc((100% - 48px) / 3);
  }
}

.portfolio-top{
  position:relative;
  overflow: hidden;

}

.portfolio-top:hover .overlay-text {
  transform: translateY(0); 
  opacity: 1;
}


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


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

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



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

.card-list,
.features-list {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  padding-left: 0;
  margin: 0;
}

/* MOBILE Portfolio */
@media screen and (max-width: 767px) {
  .project-list {
    display: flex;
    flex-direction: column;   
    align-items: center;     
    gap: 48px;               
    padding-left: 0;
    margin: 0 auto;
    list-style: none;
  }

  .project-item {
    width: 100%;           
    max-width: 360px;        
  }
}

@media screen and (min-width: 768px) and (max-width: 1157px) {
  .project-list {
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: repeat(2, 1fr); 
    gap: 72px 24px; 
    justify-items: center; 

  }

  .project-item {
    width: 356px; 

  }
}

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

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

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

.footer-logo {
  display: inline-block;
  margin-bottom: 16px;
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.17;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #4d5ae5;
  text-decoration: none;
}

.logo-span {
  color: #f4f4fd;
}

.footer-text {
  max-width: 264px;
  line-height: 1.5;
  color: #f4f4fd;
  letter-spacing: 0.02em;
  margin: 0;
}

.social-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.card-social-list-footer {
  gap: 16px;
  display: flex;
  justify-content: center;

}

.card-social-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  fill: #f4f4fd;
}

.team-social {
  width: 40px;
  height: 40px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;

}

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

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


.media-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #fff;
  margin-bottom: 16px;
}

.subscribe-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

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

.subscribe-input {
  width: 288px;
  height: 40px;
  line-height: 2;
  letter-spacing: 0.04em;
  padding: 8px 16px;
  border: 1px solid #ffffff;
  border-radius: 4px;
  background-color: transparent;
  font-size: 12px;
  color: #fff;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.15);
  outline: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.subscribe-input:focus {
  border-color: #4d5ae5;
}

.subscribe-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 165px;
  height: 40px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  background-color: #4d5ae5;
  border: none;
  border-radius: 4px;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  margin: 0 auto;
}


.subscribe-btn:hover,
.subscribe-btn:focus {
  background-color: #31d0aa;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.subscribe-icon {
  fill: #fff;
  margin-left: 16px; 
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) and (max-width: 1157.98px) {
  .footer-container {
    display: grid;
    grid-template-columns: repeat(2, auto); 
    grid-template-rows: auto auto; 
    justify-content: center;       
    align-items: start;
    column-gap: 24px;             
    row-gap: 24px;                 
    padding: 0 15px;  
  }

  .footer-info {
    grid-column: 1;
    margin: 0;
  }

  .social-footer {
    grid-column: 2;
    text-align: left;
  }

  .subscribe-footer {
    grid-column: 1 / -1;
    text-align: left;
  }

  .subscribe-form {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    align-items: center;
  }

  .subscribe-input {
    flex: 0 0 264px;
    height: 40px;
  }

  .subscribe-btn {
    flex: 0 0 auto;
    height: 40px;
    min-width: 165px;
  }
}


@media (max-width: 767.98px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 72px;
  }

  .footer-info,
  .social-footer,
  .subscribe-footer {
    align-items: center;
    text-align: center;
    margin: 0 auto;
  }

  .subscribe-form {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }

}

@media screen and (min-width: 1158px) {
  .page-footer {
      max-width: 100%;
      padding: 100px 0;          
      height: 312px;           
  }
  .footer-container {
      display: flex;
      justify-content: flex-start;
      align-items: flex-start;
      gap: 0;                    
      padding: 0 15px;
  }
  /* Logo + text block */
  .footer-logo-container {
      max-width: 264px;
      margin-right: 120px;       
  }
  .footer-text {
      max-width: 264px;
  }
    /* Social block */
  .footer-social {
      max-width: 208px;
      margin-right: 80px;        
  }

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

    /* Subscribe form */
  .footer-form {
      max-width: 453px;
     .footer-form-container {
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 24px;
  }

  .footer-form-input {
      width: 264px;
      opacity: 1;
      box-shadow: none;
  }
}


.subscribe-btn:hover .subscribe-icon,
.subscribe-btn:focus .subscribe-icon {
  fill: #fff;
}



/* Backdrop */
.mdl-bck {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;

}
.mdl-bck.is-open {
  display: flex;

}

/* Visually hidden */
.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;
}
.subscribe-lbl {
  display: contents;
}

/* Modal Window */
.mdl-win {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  position: relative;
}

@media (min-width: 768px) {
  .mdl-win {
    width: 408px;
  }
}

.mdl-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e7e9fc;
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0;
  margin: 0 auto 24px auto;
  cursor: pointer;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1),
              border 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mdl-close:hover,
.mdl-close:focus {
  background-color: #404bbf;
  border: none;
}
.mdl-close:hover .mdl-close-icon,
.mdl-close:focus .mdl-close-icon {
  fill: #ffffff;
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1); 
}

.mdl-title {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--title-color, #2E2F42);
  margin-bottom: 16px;
}

.mdl-field {
  margin-bottom: 8px;
}
.mdl-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--label-color, #8e8f99);
  display: block;
  margin-bottom: 4px;
}
.mdl-input-wrap {
  position: relative;
}
.mdl-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding-left: 38px;
  outline: transparent;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mdl-input:focus {
  border-color: #4D5AE5;
}
.mdl-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  fill: #2E2F42;
  transform: translateY(-50%);
  transition: fill 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mdl-input:hover + .mdl-input-icon,
.mdl-input:focus + .mdl-input-icon {
  fill: #4D5AE5;
}


.mdl-comment {
  margin-bottom: 16px;
}
.mdl-textarea {
  width: 100%;
  height: 120px;
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: rgba(46, 47, 66, 0.4);
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 4px;
  background-color: transparent;
  padding: 8px 16px;
  outline: transparent;
  resize: none;
  transition: border-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}
.mdl-textarea:focus {
  border-color: #4D5AE5;
}

.mdl-privacy {
  margin-bottom: 24px;
}
.mdl-privacy-label {
  font-size: 12px;
  line-height: 1.17;
  letter-spacing: 0.04em;
  color: var(--label-color, #8e8f99);
}
.mdl-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(46, 47, 66, 0.4);
  border-radius: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  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);
}
.mdl-check:checked + .mdl-privacy-label .mdl-checkbox {
  background-color: var(--accent-color, #404bbf);
  border: none;
  fill: var(--light-color, #F4F4FD);
}
.mdl-privacy-link {
  color: var(--link-color, #4d5ae5);
}

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

@media (min-width: 768px) and (max-width: 1157.98px) {


  .team-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 24px; 
    row-gap: 72px;    
  }
  .team-item {
    flex: 0 0 264px;
    width: 264px;
    height: 428px; 
    display: flex;
    flex-direction: column;
  }
  .team-img {
    width: 264px;

    object-fit: cover;
    object-position: center;
    border-radius: 4px 4px 0 0;
  }
  .team-info { padding: 32px 16px; flex: 1 0 auto; }
}



/* Desktop: contacts in one line*/
@media (min-width: 1158px) {
  .address-list {
    flex-direction: row;
    gap: 40px;

  }
}