:root {
    --orange: #ef8354;
    --orange-dark: #d85d28;

    --black: #1e1e1e;
    --black-opacity: #1e1e1ecc;

    --grey: #747474;

    --bg-white-light: #ffffff;
    --bg-white: #f0f0f0;
    --bg-white-dark: #f5f5f5;

    --white: #f5f5f5;
    --white-opacity: #f5f5f5cc;

    --green: #4BB543;
    --green-opacity: #4BB543cc;

    --red: #FF5252;
    --red-opacity: #FF5252cc;
}

html {
    scroll-behavior: smooth
}

body {
    font-family: "Roboto", sans-serif;

    margin: 0;
    padding: 0;

    background-color: #090909;
    opacity: 0.9;
    
    background: var(--bg-white-light);
    background: linear-gradient(
        0deg,
        var(--bg-white-light) 0%,
        var(--bg-white) 50%,
        var(--bg-white-dark) 100%
    );
    background-attachment: fixed;
}

p, h1 {
    margin: 0;
    padding: 0;
}

.container {
    position: relative;
    padding: 0 1rem;
}

.main {
    height: 100%;
}

.content {
    display: flex;
    align-items: center;
    flex-direction: column;
    height: 100%;
}

.title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    color: var(--white);
}

.project .content {
    flex-direction: row;
}

.project .image-side {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40%;
    height: 100%;
}

.project .description-side {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 0 4rem;
    width: 60%;
    height: 100%;
    z-index: 2;
}

.project .description-side .title {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    box-sizing: border-box;
    margin-bottom: 2rem;
    color: var(--black);
    height: 50%;
}

.project .description-side .description {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;

    box-sizing: border-box;
    padding-top: 2rem;

    color: var(--white);
    height: 50%;
    font-size: 18px;
    gap: 1rem;
}

@media only screen and (max-width: 1240px) {
    .project .description-side {
        padding: 0 2rem;
    }

    .project .description-side .description {
        font-size: 16px;
    }
}


@media only screen and (max-width: 768px) {
    .title {
        font-size: 12px;
    }

    .project .content {
        flex-direction: column-reverse
    }

    .project .image-side {
        height: 50%;
        width: 100%;
    }

    .project .description-side {
        padding: 0rem 1rem;
        height: 50%;
        width: 100%;
    }

    .project .description-side .title {
        height: fit-content;
        font-size: 14px;
        margin-top: 3rem;
        margin-bottom: 1rem;
        color: var(--white);
    }

    .project .description-side .description {
        height: fit-content;
        font-size: 16px;
        padding-top: 0;
        text-align: start;
    }
}

.projects .circle-icon,
.contact-me .circle-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;

    border: 1px solid var(--orange);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: var(--white);
    font-size: 18px;
}

.text-hover-animation {
    background-image: linear-gradient(to right,
            var(--orange),
            var(--orange) 50%,
            var(--black) 50%);
    background-size: 200% 100%;
    background-position: -100%;
    display: inline-block;
    padding: 5px 0;
    position: relative;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease-in-out;
}

.text-hover-animation:before {
    content: "";
    background: var(--orange);
    display: block;
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    transition: all 0.3s ease-in-out;
}

.text-hover-animation:hover {
    background-position: 0;
}

.text-hover-animation:hover::before {
    width: 100%;
}

.text-dark-hover-animation {
    background-image: linear-gradient(to right,
            var(--orange),
            var(--orange) 50%,
            white 50%);
    background-size: 200% 100%;
    background-position: -100%;
    display: inline-block;
    padding: 5px 0;
    position: relative;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease-in-out;
}

.text-dark-hover-animation:before {
    content: "";
    background: var(--orange);
    display: block;
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    transition: all 0.3s ease-in-out;
}

.text-dark-hover-animation:hover {
    background-position: 0;
}

.text-dark-hover-animation:hover::before {
    width: 100%;
}

/* ---------- Buttons ---------- */

.btn-open {
    border-radius: 2rem;
    border: 1px solid white;
    background-color: transparent;
    color: white;
    padding: 10px 20px;
    transition: 0.2s;
    font-size: 16px;
    margin: 5px;
}

a:has(.btn-open, .btn-icon) {
    text-decoration: none;
}

.btn-icon {
    border-radius: 50%;
    border: 1px solid white;
    background-color: transparent;
    color: white;
    padding: 10px 10px;
    transition: 0.2s;
    font-size: 16px;
    margin: 5px;
}

.btn-open:hover,
.btn-icon:hover {
    cursor: pointer;
    background-color: rgb(245, 245, 245);
    color: var(--black);
    border: 1px solid var(--black);
}

.button-hover-animation {
    display: inline-block;
    color: var(--black);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 18px;
    background-color: transparent;
    border: 1px solid var(--black);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.button-hover-animation:hover {
    background-color: var(--orange);
    color: white;
    cursor: pointer;
}

.button-dark-hover-animation {
    display: inline-block;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 18px;
    background-color: transparent;
    border: 1px solid white;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.button-dark-hover-animation:hover {
    background-color: var(--orange);
    color: var(--black);
    cursor: pointer;
    border: 1px solid var(--black);
}

/* ---------- Cards ---------- */

/* ----------------------------- */

.container.projects {
    background: #141414;
    background: linear-gradient(90deg, rgba(20, 20, 20, 1) 0%, rgba(38, 38, 38, 1) 50%, rgba(66, 66, 66, 1) 100%);
}

.container.projects h1 {
    margin-top: 40px;
    margin-bottom: 40px;
}

.cards {
    position: relative;
    padding-bottom: 1rem;
    display: flex;
    overflow: auto;
    box-sizing: border-box;
    width: 100%;
    transition: height 0.3s ease-in-out;
}

:is(.cards, .technologies) {
    scrollbar-width: none;
}

:is(.cards, .technologies)::-webkit-scrollbar {
    display: none;
}

:is(.cards, .technologies):hover {
    scrollbar-width: auto;
}

:is(.cards, .technologies):hover::-webkit-scrollbar {
    display: block;
}

:is(.cards, .technologies):hover::-webkit-scrollbar {
    height: 8px;
}

:is(.cards, .technologies):hover::-webkit-scrollbar-thumb {
    background: var(--grey);
    border-radius: 4px;
}

:is(.cards, .technologies):hover::-webkit-scrollbar-thumb:hover {
    background: var(--orange);
}

:is(.cards, .technologies) .arrow {
    position: sticky;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    top: 0;
    bottom: 0;
    width: 50px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
    width: 0px;
}

:is(.cards, .technologies):hover .arrow {
    opacity: 1;
}

.cards .arrow-left {
    left: 1.5rem;
}

.cards .arrow-right {
    right: 1.5rem;
}

.technologies .arrow-left {
    left: 1rem;
}

.technologies .arrow-right {
    right: 1rem;
}

:is(.cards, .technologies) .arrow i{
    color: var(--white);
    font-size: 24px;
}

@media (max-width: 1024px) {
    .cards .arrow,
    .technologies .arrow {
        opacity: 1;
    }
}

.card-img {
    border: 1px solid var(--grey);
    width: 250px;
    height: 200px;
    overflow: hidden;
    margin-right: 20px;

    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    transition: .1s;
    border-radius: 1rem;
    transition: .1s;
}

.card-img img {
    height: 100%;
    width: 100%;
    max-height: 150px;
    object-fit: contain;
    transition: .1s;
}

.card-img:hover {
    background-color: black;
}

.card-img:hover img {
    cursor: pointer;
    transform: scale(1.1);
}

.card.selected .card-img {
    border: 1px solid var(--orange);
    background-color: var(--white);
}

@media (max-width: 1240px) {
    .card-img {
        width: calc(250px / 1.2);
        height: calc(200px / 1.2);
        margin-right: 15px;
        padding: 1rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .card-img {
        width: calc(250px / 1.7);
        height: calc(200px / 1.7);
        margin-right: 10px;
        padding: 1rem 2rem;
    }
}

/* ---------- Projects ---------- */

/* ----------------------------- */

.container.project {
    height: 100vh;
    background: #d1d1d1;
    background: linear-gradient(0deg, rgba(209, 209, 209, 1) 0%, rgba(232, 232, 232, 1) 50%, rgba(245, 245, 245, 1) 100%);
}

.container.project .bottom-half {
    background: #141414;
    background: linear-gradient(90deg, rgba(20, 20, 20, 1) 0%, rgba(38, 38, 38, 1) 50%, rgba(66, 66, 66, 1) 100%);
    height: 50svh;
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}

/* ---------- Timeline ---------- */

.technologies {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #1e1e1e;
    border-radius: 1rem;
    padding: 1rem;
    color: #ffffff;
    box-sizing: border-box;
    width: 100%;
    overflow-x: auto;
    border: 1px solid rgb(116, 116, 116);
    transition: height 0.3s ease-in-out;
}

.technologies .logo {
    filter: saturate(0);
    width: 50px;
    height: auto;
    margin-inline: 5rem;
    transition: 0.1s;
}

.technologies .logo:hover {
    cursor: pointer;
    filter: saturate(1);
    scale: 1.1;
}

.image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50%;
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .technologies {
        gap: 0.5rem;
    }

    .technologies .logo {
        width: 40px;
        margin-inline: 2rem;
    }
}

.works {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-bottom: 2rem;
}

.work {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

.work .period {
    display: flex;
    gap: 0 1rem;
    font-size: 18px;
    color: white;
    margin-right: 1rem;
    font-weight: bold;
}

.work .line{
    display: inline-block;
    position: relative;
    width: 1px;
    height: 310px
}

.work .line::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 2px; /* largura da borda */
    height: 100%; /* linha completa para o primeiro work */
    background-color: white; /* cor da borda */
}

.timeline .work:first-of-type .line::before {
    height: 50%; /* metade inferior para os demais */
    top: 50%;
}

.timeline .work:last-of-type .line::before {
    height: 50%; /* metade superior para o último work */
}

.timeline .work:only-of-type .line::before {
    height: 0%; /* linha invisível caso seja o único work */
}

.work:hover .point {
    outline: 1px solid var(--orange);
    outline-offset: 5px;
    transition: 0.2s;
}

.work .point {
    display: inline-block;
    position: absolute;
    left: -5px;
    top: calc(50% - 5px);
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
}

.work .description {
    display: flex;
    flex-direction: column;
    align-items: start;
    text-align: left;
    padding: 0 1rem;
}

.work .description .enterprise{
    color: var(--white);
    margin: 5px;
    font-size: 22px;
}

.work .description .function{
    margin: 5px;
    font-weight: bold;
    color: var(--orange);
}

.work .description p{
    margin: 5px;
    color: var(--white);
}

.wave {
    background-image: url('../images/wave.svg');
    min-height: 320px;

    background-repeat: no-repeat;
    background-position: bottom;
    
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;

    transition: opacity 0.3s ease-in-out;
}

/* TABLET */
@media (min-width: 1024px) {
    .wave {
        background-size: cover;
    }
}

@media (max-width: 768px) {
    .works {
        gap: 0;
    }

    .work {
        flex-direction: column;
        align-items: center;
        text-align: center;
        margin-bottom: 2rem;
    }

    .work .period {
        margin: 0 0 1rem 0;
    }

    .work .line {
        display: none;
    }

    .work .description {
        align-items: center;
        padding: 0;
        text-align: center;
    }
}
/* ---------- Form ---------- */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 1rem;
    color: var(--black);
    font-weight: 500;
}

.input,
.textarea {
    padding: 0.7rem 1rem;
    border: 1px solid var(--grey);
    border-radius: 0.5rem;
    font-size: 1rem;
    background: var(--black);
    color: var(--white);
    transition: border-color 0.2s;
    font-family: "Roboto", sans-serif;
}

.input:focus,
.textarea:focus {
    border-color: var(--orange);
    outline: none;
}

.btn-submit {
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: var(--orange-dark);
    color: #fff;
}

/* ---------- Gallery ---------- */
.image-side {
    display: flex;
    align-items: center;
    gap: 3rem;
    position: relative;
    width: 50%;
}

.image-side .screen {
    display: none;
    width: calc(100% / 1.15);
    height: fit-content;
    border-radius: 1rem;
    outline: 1px solid var(--grey);
    
    transform: perspective(400px) rotateY(-10deg);
    transition: 0.3s;
}

.image-side .screen.active {
    display: flex;
}

.image-side:hover .screen {
    cursor: pointer;
    outline-offset: 5px;
    transform: perspective(400px) rotateY(0deg);
}

.image-side .btn-previous,
.image-side .btn-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    z-index: 10;
    transition: 0.3s;
    font-size: 24px;
    height: 40px;
    width: 40px;
    border-radius: 50%;
}

.image-side .btn-previous,
.image-side .btn-next {
    color: var(--white);
    background-color: var(--black);
    outline: 1px solid var(--grey);
}

.image-side .btn-previous:hover,
.image-side .btn-next:hover {
    outline-offset: 5px;
}


.image-side:hover :is(.btn-previous, .btn-next) {
    opacity: 1;
}

.image-side .btn-previous {
    left: 5rem;
}

.image-side .btn-next {
    right: 5rem;
}

@media (max-width: 1240px) {
    .image-side .btn-previous {
        left: 3.5rem;
    }

    .image-side .btn-next {
        right: 3.5rem;
    }
}

@media (max-width: 768px) {
    .image-side .btn-previous {
        left: 2.5rem;
    }

    .image-side .btn-next {
        right: 2.5rem;
    }
}