/* C5–C8: Шрифти та базові стилі */
body {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    color: #434455;
    background-color: #ffffff;
    margin: 0;
}

/* C9–C10: Заголовки */
h1,
h2,
h3 {
    margin: 0;
    line-height: 1.2;
}

h1 {
    font-size: 56px;
    font-weight: 700;
    text-align: center;
    color: #ffffff;
}

h2 {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    color: #2e2f42;
}

/* A3: Групування стилів (наприклад, шапка) */
/* C1: Flex-розмітка для хедера */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 120px;
    background-color: #ffffff;
}

/* C1: Flex для навігації */
.nav {
    display: flex;
    gap: 40px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

/* C11: Стилі логотипа */
.logo-top {
    font-family: "Raleway", sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 117%;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #4d5ae5;
    text-decoration: none;
}

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

/* C2: Вирівнювання меню */
.nav-list {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: 76px;
    font-size: 16px;
}

/* C3: Стилі посилань */
.nav-link {
    display: block;
    padding: 24px 0;
    text-decoration: none;
    color: #2e2f42;
    font-weight: 500;
    transition: color 250ms ease-in-out;
}

/* C4: Ховер/фокус ефекти */
.nav-link:hover,
.nav-link:focus,
.contact-link:hover,
.contact-link:focus {
    color: #404bbf;
}

/* C3: Активне посилання */
.nav-link.current {
    color: #404bbf;
    position: relative;
}

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

/* C3: Контакти */
.contacts {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-style: normal;
}

.contact-link {
    text-decoration: none;
    color: #434455;
    transition: color 250ms ease-in-out;
}

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

/* C12: Hero-секція */
.hero {
    position: relative;
    width: 100%;
    max-width: 1440px;
    height: 600px;
    overflow: hidden;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-title,
.hero-button {
    position: relative;
    z-index: 2;
    color: #1ae707;

}

.hero-title {
    margin-top: 200px;
    font-size: 56px;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    display: block;
    text-shadow:
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000;
}

.hero-button {
    margin-top: 48px;
    background-color: #4d5ae5;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

/* C13: Ховер/фокус для кнопки */
.hero-button:hover,
.hero-button:focus {
    background-color: #404bbf;
}

/* C12: Секція "Our Advantages" */
.advantages-section {
    padding: 120px 156px;
}

/* C12: Список переваг */
.advantages-list {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* C12: Пункт списку */
.advantages-item {
    flex-basis: calc((100% - 72px) / 4);
    /* якщо 4 елементи */
}

/* C12: Заголовок пункту */
.advantages-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.2;
    color: #2e2f42;
    margin-bottom: 8px;
    text-align: left;
}

/* C12: Текст пункту */
.advantages-text {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.5;
    color: #434455;
    text-align: left;
}

/* C12: Секція "Our Team" */
.team-section {
    background-color: #f4f4fd;
    padding: 120px 0;
    text-align: center;
}

/* C12: Список команди */
.team-list {
    display: flex;
    justify-content: center;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin-top: 72px;
}

/* C12: Картка команди */
.team-card {
    background-color: #ffffff;
    padding-bottom: 32px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0px 2px 1px rgba(0, 0, 0, 0.08),
        0px 1px 1px rgba(0, 0, 0, 0.16), 0px 1px 6px rgba(0, 0, 0, 0.08);
}

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

.team-social li a i {
    font-size: 20px;
    color: #4d5ae5;
    /* синій початково */
    transition: color 0.3s ease;
}

.team-social li a:hover i {
    color: #00ff00;
    /* зелений при наведенні */
}

/* C13: Секція "Our Portfolio" */
.portfolio-section {
    padding: 60px 20px;
    background-color: #fff;
    max-width: 1200px;
    margin: 0 auto;
}

/* C13: Заголовок портфоліо */
.portfolio-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 40px;
}

/* C13: Список елементів портфоліо */
.portfolio-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* C13: Елемент портфоліо */
.portfolio-item {
    border: 1px solid #eee;
    padding-bottom: 20px;
    background-color: #fff;
    transition: box-shadow 0.3s ease;
}

/* C13: Елемент портфоліо на ховер */
.portfolio-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* C13: Зображення елемента портфоліо */
.portfolio-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* C13: Назва елемента портфоліо */
.portfolio-name {
    font-size: 18px;
    font-weight: 600;
    margin: 16px;
}

/* C13: Категорія елемента портфоліо */
.portfolio-category {
    font-size: 14px;
    color: #777;
    margin: 0 16px;
}

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

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
}

.footer-logo {
    max-width: 300px;
}

.logo {
    font-weight: bold;
    font-size: 24px;
    text-decoration: none;
    color: #ffffff;
}

.logo-blue {
    color: #4d5ae5;
}

.footer-text {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.footer-social,
.footer-subscribe {
    margin-top: 20px;
}

.footer-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
}

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

.social-list li a img {
    width: 24px;
    height: 24px;
}

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

.subscribe-form input[type="email"] {
    padding: 8px 12px;
    border: 1px solid #ffffff;
    background-color: transparent;
    color: #ffffff;
    border-radius: 4px;
}

.subscribe-form input::placeholder {
    color: #cfcfcf;
}

.subscribe-form button {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    background-color: #4d5ae5;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.subscribe-form button img {
    margin-left: 8px;
    width: 16px;
    height: 16px;
}

.social-list li a i {
    font-size: 24px;
    color: #4d5ae5;
}

.subscribe-form button i {
    margin-left: 8px;
    font-size: 16px;
}

.social-list li a i {
    font-size: 24px;
    color: #4d5ae5;
    transition: color 0.3s ease;

}

.social-list li a:hover i {
    color: #00ff00;
}

/* Стилі для модального вікна */
.modal {
    display: none;
    /* Початково сховане */
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
}
