/* Base styles */
body {
  font-family: 'Roboto', sans-serif;
  color: #434455;
  background-color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
}

h1, h2, h3, p {
  margin: 0;
}

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

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

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

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

/* Container */
.container {
  max-width: 1158px;
  margin: 0 auto;
  padding: 0 15px;
}
/* Universal section paddings */
.section {
  padding: 120px 0;
}
/* Уніфікована стилізація всіх SVG */
svg {
  display: inline-block;
  vertical-align: middle;
  fill: currentColor;
  transition: fill 250ms ease-in-out;
}



/* Region Header */
.header {
  border-bottom: 1px solid #e7e9fc;
  background-color: #ffffff;
  align-items: center;
  box-shadow: 
  0 1px 6px 0 rgba(46, 47, 66, 0.08),
  0 1px 1px 0 rgba(46, 47, 66, 0.16),
  0 2px 1px 0 rgba(46, 47, 66, 0.08);
}

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

.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;
  padding: 24px 0;
  margin-right: 76px 
}


.logo-accent {
  content: 'Studio';
  color: #2e2f42;
  margin-left: 4px;
}

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

}

.nav-list {
  display: flex;
  gap: 40px;
  align-items: center;
  color: #2e2f42;

}

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

.nav-link.current {
  position: relative;

}

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

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

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

.contact-list {
  display: flex;
  gap: 40px;
  align-items: center;
  font-style: normal; 
}

.contact-link {
  font-size: 16px;
  line-height: 1.5;
  color: #434455;
  letter-spacing: 0.02em;
  transition: color 250ms ease-in-out;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Hero Section */

.hero {
  position: relative;
  background-color: #2e2f42;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 188px 0;
  color: #ffffff;
  background-image: linear-gradient(rgba(46, 47, 66, 0.7), rgba(46, 47, 66, 0.7)), url("../images/people-office1.jpg");
    /* шлях до фонового зображення */
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
    /* щоб не розтягувалось більше 1440px */
  max-width: 1440px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 496px;
}

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

.hero-button {
  display: block; 
  margin: 0 auto;
  min-width: 169px;
  height: 56px;
  background-color: #4d5ae5;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.15);
  padding: 16px 32px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.04em;
  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 {
  padding: 120px 0;
}


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

.feature-item {
  width: 262.6px;
  flex-basis: calc((100% - 72px) / 4);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  width: 264px;
  background-color: #f4f4fd;
  border-radius: 4px;
  border: 1px solid #8e8f99;
  margin-bottom: 8px;
}
/* FEATURES icons */
.feature-icon {
  width: 64px;
  height: 64px;
  fill: #4d5ae5;
  margin-bottom: 16px;
  padding: 16px;
  color: rgba(46, 47, 66, 1);rgba(77, 90, 229, 1);
}

.feature-item:hover .feature-icon,
.feature-item:focus-within .feature-icon {
  fill: #404bbf;
  /* активний колір при hover/focus */
}

.feature-title {
  font-size: 20px;
  font-weight: 500;
  color: #2e2f42;
  margin-bottom: 8px;
}

.feature-text {
  font-size: 16px;
  color: #434455;
}

/* Загальний стиль для секції "Team" */
:root {
  --primary-color: #4d5ae5;
  --primary-color-hover: #404bbf;
  --icon-color: #f4f4fd;
}

/* Загальний стиль для секції "Team" */
.team {
  background-color: #f4f4fd;
  padding: 120px 0;
}

/* Контейнер */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Заголовок */
.team-title {
  font-size: 36px;
  line-height: 1.11;
  text-align: center;
  color: #2e2f42;
  margin-bottom: 72px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

/* Список карток */
.team-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Картка учасника */
.team-item {
  border-radius: 0;
  background-color: #ffffff;
  /* для першого елемента */
  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);
  overflow: hidden;
  width: 264px;
  text-align: center;
  position: relative;
}


.team-item:first-child {
  border-radius: 0 0 4px 4px;
}
/* Зображення учасника */
.team-img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Контейнер інформації */
.team-info {
  padding: 32px 0;
}

/* Ім'я */
.team-name {
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
  color: #2e2f42;
  margin-bottom: 8px;
}

/* Посада */
.team-role {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #434455;
  margin-bottom: 8px;
}

/* Список соціальних мереж */
.team-socials {
  display: flex;
  justify-content: center;

  gap: 24px;
  
  margin: 0;
  list-style: none;
}

/* Елемент соцмережі */
.team-socials li {
  width: 40px;
  height: 40px;
}

/* Посилання соцмережі */
.team-social-link {
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ховер і фокус на посиланнях */
.team-social-link:hover,
.team-social-link:focus {
  background-color: var(--primary-color-hover);
}

/* Іконки соцмереж */
.icon {
  width: 16px;
  height: 16px;
  fill: var(--icon-color);
}

/* --- Portfolio Section --- */
.portfolio {
  padding: 120px 0;
}

.portfolio-title {
  font-size: 36px;
  text-align: center;
  margin-bottom: 72px;
  color: #2e2f42;
}

/* Portfolio list layout */
.portfolio-list {
  display: flex;
  flex-wrap: wrap;
  gap: 48px 24px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

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

/* Hover effect with shadow */
.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);
}

/* Image container with overlay */
.portfolio-image-container {
  position: relative;
  overflow: hidden;
}

/* Image styling */
.portfolio-image-container img {
  display: block;
  width: 100%;
  height: auto;
}


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

/* Show overlay on hover */
.portfolio-item:hover .portfolio-paragraph {
  transform: translateY(0%);
}

/* Portfolio text below image */
.portfolio-text {
  padding: 32px 16px;
}

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

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

/* --- Футер --- */
.footer {
  background-color: #2e2f42;
  padding: 100px 0;
}

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

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

.footer-logo-accent {
  color: #f4f4fd;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

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

/* Зробимо колонку для логотипу та тексту */
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-right: 120px;
  
}

/* Відключаємо позиціонування absolute, використовуємо флекс */
.footer-socials {
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* Вирівняти соцмережі праворуч */
  gap: 12px;
  width: auto;
  height: auto;
  position: static;
  /* скидаємо absolute */
}

.footer-socials-title {
  font-family: 'Roboto', sans-serif;
  font-style: normal;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  text-align: left;
}

.footer-socials-list {
  display: flex;
  gap: 16px;
  padding: 0;
  margin: 0;
  list-style: none;
  
}

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

.footer-social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background-color: #4d5ae5;
  border-radius: 50%;
  
}

.footer-social-link:hover,
.footer-social-link:focus {
  background-color: #31d0aa;
  transform: scale(1.1);
}

/* Лише для першого пункту списку */
.footer-social-item:first-child .footer-social-link {
  transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social-link svg {
  width: 24px;
  height: 24px;
  fill: #f4f4fd;
}

/* Змінні для кольорів */
:root {
  --footer-text-color: #f4f4fd;
  --primary-color: #4d5ae5;
  --hover-color: #31d0aa;
}

