@import url('reset.css');

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    src: url('../fonts/Roboto-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* Global */
:root {
    --main-color-white: #FFFFFF;
    --main-color-blue: #2F303A;
    --main-color-grey: #757575;
    --title-color: #212121;
    --main-color-light-grey: #F5F4FA;
    --active-color: #2196F3; 
    --header-underline: #ECECEC;
    --portfolio-card-border: #EEEEEE;
    --portfolio-card-back: rgba(33, 150, 243, 0.898) 90%;
    --images: #AFB1B8;
    
}

html,
body {
    height: 100%;
}

html {
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 400;
}

body {
    background-color: var(--main-color-white);
    color: var(--main-color-grey);
}

.wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.title {
    font-size: 36px;
    font-weight: 700;
    color: var(--title-color);
    text-align: center;
}

.hidden {
    position: absolute;
    z-index: -1;
    width: 0;
    height: 0;
    opacity: 0;
}

/* Header */
.header {
    padding: 24px 0;
    border-bottom: solid 1px var(--header-underline);
}

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

.header-nav {
    margin-left: 93px;
    display: flex;
    align-items: center;
    width: 100%;
}

.header-nav-main, .header-nav-contacts {
    display: flex;
    column-gap: 50px;
}

.header-nav-main>ul {
    display: flex;
    column-gap: 50px;
}

.header-nav-main-list {
    position: relative;
}

.header-nav-main-item {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--main-color-light-grey);
    transform: translateY(40px);
    visibility: hidden;
    transition: transform 500ms ease, visibility 0ms linear 500ms;
}

.header-nav-main-list:hover>ul {
    transform: translateY(0);
    visibility: visible;
    transition: transform 500ms ease, visibility 0ms linear 0ms;
}

.header-nav-main-item-list {
    padding: 5px 10px;
    position: relative;
}


.header-nav-main-item-list a, .header-nav-main-item-list-contacts a {
    text-decoration: none;
}

.header-nav-main-item-list-slider {
    position: absolute;
    top: 0;
    right: 100%;
    background: var(--main-color-light-grey);
    padding-right: 20px;
    transform: translateY(25px);
    visibility: hidden;
    transition: transform 500ms ease, visibility 0ms linear 500ms;
}

.header-nav-main-item-list:hover ul {
    transform: translateY(0);
    visibility: visible;
    transition: transform 500ms ease, visibility 0ms linear 0ms;
}

.header-nav-contacts {
    margin-left: auto;
}

.nav-link, .nav-link-contacts {
    text-decoration: none;
    color: var(--title-color);
    font-weight: 500;
}

.nav-link:hover, .nav-link-contacts:hover {
    color: var(--active-color);
}

.nav-link-contacts:last-child {
    color: var(--main-color-grey);
}

.header-logo img {
    width: 145px;
    height: 31px;
}

.header-burger {
    display: none;
}

/* main */
.hero-section {
    background-color: var(--main-color-blue);
    background-image: url('../images/hero-image.jpg');
    background-repeat: no-repeat;
    background-position: 50%;
    background-size: cover;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
}

.hero-container {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.hero-title {
    font-size: 44px;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--main-color-white);
    text-align: center;
    max-width: 696px;
    line-height: 60px;
    position: relative;
}

.hero-button {
   margin-top: 30px; 
   padding: 10px 46px;
   font-weight: 700;
   line-height: 30px;
   font-size: 16px;
   color: var(--main-color-white);
   background-color: var(--active-color);
   border-radius: 4px;
   border: none;
   cursor: pointer;
   position: relative;
}

.why-us-container {
    margin-top: 94px;
    display: flex;
    gap: 30px;
    flex: 1 1 25%;
}

.why-us-items {
    max-width: 270px;
    position: relative;
}

.why-us-items:nth-child(1)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: url('../images/antenna1.png');
    background-repeat: no-repeat;
    background-position: 50%;
    background-color: var(--main-color-light-grey);
    border-radius: 4px;
}

.why-us-items:nth-child(2)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: url('../images/clock1.png');
    background-repeat: no-repeat;
    background-position: 50%;
    background-color: var(--main-color-light-grey);
    border-radius: 4px;
}

.why-us-items:nth-child(3)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: url('../images/diagram1.png');
    background-repeat: no-repeat;
    background-position: 50%;
    background-color: var(--main-color-light-grey);
    border-radius: 4px;
}

.why-us-items:nth-child(4)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background-image: url('../images/astronaut1.png');
    background-repeat: no-repeat;
    background-position: 50%;
    background-color: var(--main-color-light-grey);
    border-radius: 4px;
}

.why-us-items-title {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--title-color);
    padding-top: 150px;
}

.why-us-items-text {
    margin-top: 10px;
    line-height: 24px;
}

.what-are-we-doing {
    padding-bottom: 94px;
}

.what-are-we-doing-container {
    margin-top: 94px;
}

.what-are-we-doing-inner {
    display: flex;
    gap: 30px;
    margin-top: 50px;
}

.what-are-we-doing-image-container {
    position: relative;
    width: 370px;
    height: 294px;
    flex: 1 1 30%;
}

.what-are-we-doing-image-container img {
   width: 100%;
   height: 100%;
   object-fit: cover; 
}

.what-are-we-doing-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 27px 0;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 14px;
    color: var(--main-color-white);
    background: rgba(0, 0, 0, .6);
}

.our-team {
    background-color: var(--main-color-light-grey);
    padding: 94px 0;
}

.our-team-items {
    display: flex;
    gap: 30px;
    margin-top: 50px;
}

.our-team-item-title {
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    margin-top: 30px;
    color: var(--title-color);
}

.our-team-item {
    flex: 1 1 25%;
    background: var(--main-color-white);
    padding-bottom: 30px;
}

.our-team-item-job {
    font-size: 16px;
    text-align: center;
    margin-top: 10px;
}

.our-team-item img {
    width: 270px;
    height: 260px;
    object-fit: cover;
}

.our-team-item-social {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.our-team-item-social-list:hover a {
    background-color: var(--active-color);
    color: var(--main-color-white);
}

.our-team-item-social svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.our-team-item-social-list a {
    text-decoration: none;
    color: inherit;
    width: 44px;
    height: 44px; 
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center
}


.regular-customers {
    padding: 94px 0;
}

.regular-customers-images {
    display: flex;
    gap: 30px;
    margin-top: 66px;
    justify-content: center;
    align-items: center;
}

.regular-customers-images a {
    height: 92px;
    border-radius: 4px;
    border: solid 1px var(--images);
    flex: 1 1 16%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.regular-customers-image {
    width: 106px;
    height: 60px;
    fill:currentColor;
    color: var(--images);
}

.regular-customers-image:hover {
    color: var(--active-color);
}

/* footer */
.footer {
    background-color: var(--main-color-blue);
    padding: 60px 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
}

.footer-image {
    display: inline-block;
}

.footer-image img {
    width: 161px;
    height: 31px;
}

.footer-links {
   margin-top: 20px;
}

.footer-links-item {
color: var(--main-color-white);
margin-top: 9px;
}

.footer-links-link {
    text-decoration: none;
    color: var(--main-color-white);
}

.footer-social {
    padding: 12px 0 0 129px;
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-weight: 700;
    text-transform: uppercase;
    color: var(--main-color-white);
    margin-bottom: 20px;
}

.footer-social-item {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.footer-social-item-list {
    width: 44px;
    height: 44px; 
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--main-color-white);
}

.footer-social-item-list a {
    text-decoration: none;
    color: inherit;
    width: 44px;
    height: 44px; 
    border-radius: 50%; 
    display: flex;
    align-items: center;
    justify-content: center
}

.footer-social-item-list:hover {
    background-color: var(--active-color);
    color: var(--main-color-white);
}

.footer-social-item-list svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: currentColor;
    transition: transform 650ms ease;
}

.footer-social-item-list:hover svg {
    transform: scale(1.8);
}

.footer-social-item-list a {
    text-decoration: none;
    color: inherit;
}

/* Portfolio */
.portfolio-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 94px;
}

.portfolio-filter-buttons {
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    border-radius: 4px;
    min-width: 73px;
    min-height: 38px;
    padding: 6px 25px;
    background-color: var(--main-color-light-grey);
}

.portfolio-filter-buttons-active {
    background-color: var(--active-color);
    color: var(--main-color-white);
}

.portfolio-cards {
    display: flex;
    flex-wrap: wrap;
    margin-top: 34px;
    gap: 30px;
    background-color: var(--main-color-white);
    margin-bottom: 94px;
}

.portfolio-cards-item {
    border: solid var(--portfolio-card-border);
    flex: 1 1 30%;
}

.portfolio-cards-item-image {
    height: 294px;
    position: relative;
    overflow: hidden;
}

.portfolio-cards-item-image-back {
    position: absolute;
    inset: 0;
    background: var(--portfolio-card-back);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 250ms ease;
}

.portfolio-cards-item:hover .portfolio-cards-item-image-back {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-cards-item-image-back-text {
    color: var(--main-color-white);
    margin: 0 auto;
    font-size: 18px;
    line-height: 28px;
    padding: 24px;
}

.portfolio-cards-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-cards-item-text {
    padding: 20px 24px;
    background-color: var(--main-color-white);
}
.portfolio-cards-item-text-top {
    font-weight: 700;
    font-size: 16px;
    color: var(--title-color);
    line-height: 36px;
}
.portfolio-cards-item-text-bottom {
    margin-top: 4px;
    font-size: 16px;
    color: var(--main-color-grey);
    line-height: 30px;
}

@media (max-width:1024px) {
.header-nav {
    margin-left: 50px;
}

.header-nav-main, .header-nav-contacts {
    column-gap: 30px;
}

.header-nav-contacts {
    display: none;
}

}

@media (max-width:720px) {
.title {
    font-size: 28px;
}

    .header {
    padding: 16px 0;
}

.header-nav {
        display: none;
    }

.header-burger {
    display: block;
    width: 30px;
    height: 30px;
    margin-left: auto;
    position: relative;
    cursor: pointer;
}

.header-burger::before,
.header-burger::after,
.header-burger span {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--title-color);
}

.header-burger::after {
    top: auto;
    bottom: 0;
}

.header-burger span {
    top: 50%;
    transform: translateY(-50%);
}

.hero-container {
    min-height: 500px;
}

.hero-title {
    font-size: 35px;
    max-width: 550px;
    line-height: 50px;
}

.why-us-container {
    margin-top: 60px;
    flex-direction: column;
}

.why-us {
    padding-bottom: 60px;
}

.why-us-items {
    max-width: 700px;
}

.why-us-items-title {
    text-align: center;
}

.what-are-we-doing  {
    display: none;
}

.our-team-items {
    flex-direction: column;
    margin-top: 30px;
}

.our-team-item {
    padding-bottom: 24px;
}

.our-team-item img {
    width: 600px;
    height: 650px;
}

.regular-customers {
    display: none;
}

.footer-social {
    display: none;
}

.footer {
    padding: 62px 0;
}

.footer-container {
    justify-content: center;
    align-items: center;
}

.footer-image img {
    width: 154px;
    height: 28px;
}

.portfolio-filters {
    margin: 60px 0;
    flex-wrap: wrap;
}

.portfolio-cards {
    flex-direction: column;
}

.portfolio-cards-item-image-back {
    opacity: 1;
    background: rgba(0, 0, 0, .4);
    transform: translateY(0);
}

}

@media (max-width:480px) {
.header-logo img {
    width: 134px;
    height: 28px;
}

.hero-container {
    min-height: 400px;
}

.hero-title {
    font-size: 26px;
    max-width: 360px;
    line-height: 42px;
}

.why-us-items {
    max-width: 450px;
}

.our-team {
    padding: 60px 0;
}

.our-team-item img {
    width: 450px;
    height: 460px;
}



}


