:root { 
  --iris: #4d5ae5;
  --social-bg: #4d5ae5;
  --icon-fill: #f4f4fd;
}

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

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

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

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

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

a {
  text-decoration: none;
}

/* ====== Utilities ====== */
.container {
  width: 1158px;           
  margin: 0 auto;          
  padding: 0 15px;         
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  white-space: nowrap;
  clip-path: inset(50%);
  clip: rect(0 0 0 0);
  overflow: hidden;
}

/* ====== Logo ====== */
.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;
}

.logo-part {
  color: #2e2f42;
}

/* ====== Header ====== */
.site-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;
}

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

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

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

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

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

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

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

/* Contacts */
.contacts {
  font-style: normal;
}

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

.contact-link {
  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 1) ====== */
.hero {
  padding: 188px 0;        
  background-color: #2e2f42;
  text-align: center;

  background-image: linear-gradient(rgba(46,47,66,0.7), rgba(46,47,66,0.7)),
                    url("../images/hero-bg.jpg");
  max-width: 1440px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  margin: 0 auto;
}

.hero-title {
  max-width: 496px;        
  color: #fff;
  font-size: 56px;
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 auto 48px;
}

.hero-btn {
  display: block;
  min-width: 169px;
  height: 56px;
  border: none;
  background-color: var(--iris, #4d5ae5);
  border-radius: 4px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.04em;
  margin: 0 auto;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ====== Features (Section 2) ====== */
.features {
  padding: 120px 0;        
}

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

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



.feature-icon {
  display: flex;                 /* для можливості зміни розташування */
  align-items: center;           /* вирівнювання іконки по вертикалі */
  justify-content: center;       /* вирівнювання іконки по горизонталі */
  height: 112px;                 /* висота блоку */
  background-color: #f4f4fd;     /* колір фону */
  border-radius: 4px;            /* закруглення кутів */
  border: 1px solid #8e8f99;     /* рамка */
  margin-bottom: 8px;            /* відступ від заголовка */
}

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

.feature-text {
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}

/* ====== Team (Section 3) ====== */
.team {
  padding: 120px 0;        
  background-color: #f4f4fd;
}

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

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

.team-item {
  width: calc((100% - 72px) / 4);            
  background-color: #fff;
  border-radius: 0 0 4px 4px;                
  overflow: hidden;
  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-card {
  padding: 32px 0;
}

.team-name {
  text-align: center;                          
  margin: 0 0 8px;                             
  font-size: 20px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #2e2f42;
}

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

/* Social links in team cards */
.team-socials {
  display: flex;
  justify-content: center; /* вирівнювання по центру */
  gap: 24px;               /* відступи між іконками */
  margin-top: 8px;
}

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

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

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

.social-icon {
  width: 16px;
  height: 16px;
  fill: var(--icon-fill); /* ✅ іконки через css-змінну */
}


/* ====== Portfolio (Section 4) ====== */
.portfolio {
  padding-top: 120px;
  padding-bottom: 120px;    
}

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

.portfolio-item {
  width: calc((100% - 48px) / 3); 
  background-color: #fff;
  transition: box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

.portfolio-overlay {
  position: absolute;
  top: 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-item:hover .portfolio-overlay {
  transform: translateY(0%);
}

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

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

.item-description {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #434455;
}



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

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

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

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

.site-footer .logo-part {
  color: #f4f4fd;
}

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

/* Соцмережі */
.social-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--white, #ffffff);
  margin-bottom: 16px;
}


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

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

.social-link {
  width: 100%;
  height: 100%;
  background-color: var(--iris, #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-link:hover,
.social-link:focus {
  background-color: #31d0aa;
}

.social-icon {
  fill: var(--cloud, #f4f4fd);
}
