@font-face {
    font-family: Practice;
    src: url(../fonts/PracticeDisplay-Regular.woff) format("woff"), url(../fonts/PracticeDisplay-Regular.woff2) format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    font-stretch: normal;
}

@font-face {
    font-family: Practice;
    src: url(../fonts/PracticeDisplay-Bold.woff) format("woff"), url(../fonts/PracticeDisplay-Bold.woff2) format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap
}

@font-face {
    font-family: Engry;
    src: url(../fonts/engry.otf) format("woff"), url(../fonts/engry.otf) format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --scroll: 0;
    --rowSector: 7rem;
    --rowSectorClose: 8;
}

body {
    font-family: Practice;
    font-size: 16px;
}

.title-div {
    /*display: flex;*/
    display: grid;
    grid-template-rows: 1fr 2fr 1fr;

    position: sticky;
    position: -webkit-sticky;
    left: 0;
    top: 1vh;
    width: calc(100% - 2vh);
    height: calc(100vh - 2vh);
    margin: 1vh;
    align-items: center;
    justify-content: center;
}


.box {
    display: flex;
    position: absolute;
    left: 0;
    /*top: 50%;*/
    /*transform: translateX(-50%) scale(0);*/
    transform: scaleX(0);
    transform-origin: left;
    transition: 0s;
    height: 15vw;
    width: 100%;
}

.grey-box {
    z-index: 1;
    background-color: gray;
    /*animation: sx2dx 2s linear;*/
    animation: sx2dx-v2 2s forwards;
}

.black-box {
    z-index: 2;
    background-color: #383838;
    /*animation: sx2dx 1.5s 0.5s forwards;*/
    animation: sx2dx-v2 1.5s 0.5s forwards;
}

#title {
    font-size: 16vw;
    z-index: 3;
    background-color: transparent;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    animation: dx2sx 2s 1s forwards;
    opacity: 0;
    font-family: Engry;
}

#scroll-to-continue-main {
    position: absolute;
    /*left: 0;
    top: calc(100% - 20px);*/
    left: 7vw;
    bottom: 0;
    padding-left: 10%;
}

#scroll-to-continue {
    display: flex;
    flex-direction: row;
    column-gap: 15px;
    align-items: center;
    font-size: 1.3rem;
    animation: enter-from-bottom 3s linear;
}

#scroll-to-continue::before {
    content: '';
    width: 0.3em;
    height: 0.3em;
    background-color: #383838;
    border-radius: 50%;
    transform: translateY(100%);
    animation: bounce 1s infinite;
}

.animate-hide-on-scroll {
    animation: hide-on-scroll 2s forwards;
}

.class-hide-on-scroll {
    opacity: 0.2;
    scale: 0.8;
}

.animate-show-on-scroll {
    animation: show-on-scroll 2s forwards;
}

.class-show-on-scroll {
    opacity: 1;
    scale: 1;
}

.animate-rotate-on-scroll {
    animation: rotate-on-scroll 2s forwards;
}

.class-rotate-on-scroll {
    transform: rotateZ(-90deg);
    opacity: 0;
}

.animate-rotate-back-on-scroll {
    animation: rotate-back-on-scroll 2s forwards;
}

.class-rotate-back-on-scroll {
    transform: rotateZ(0deg);
    opacity: 1;
}

#content {
    width: 100%;
    position: relative;
    z-index: 5;
}

.company-desc {
    display: flex;
    flex-direction: row;
}


.company-desc .left {
    left: 0;
    width: 60%;
    display: flex;
    flex-direction: column;
    row-gap: 5vh;
}

.company-desc .left span {
    margin: 0 3.125vw;
}

.company-desc .right {
    position: absolute;
    left: 50%;
    width: 30%;
}

.company-desc span {
    font-size: 1.8rem;
    line-height: 1.4;
}

.holding-list {
    /*padding-top: 150px;*/
    padding-top: 35vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    /*row-gap: 20px;*/
    row-gap: 2vh;
}

.titolo-sezione {
    font-size: 6.8rem;
    line-height: 1em;
    margin: 10vh 3.125vw;
}

.sector {
    font-size: 5.8rem;
    line-height: 1em;
    margin: 0 3.125vw;
    display: flex;
    flex-direction: column;
    /*max-height: 8rem;*/
    max-height: calc(var(--rowSectorClose) * 1rem);
    overflow: hidden;
    transition: max-height 2s;
}

.sector-name {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    cursor: pointer;
}

.sector-name::before {
    content: '';
    width: 0.3rem;
    height: 0.3rem;
    background-color: #383838;
    border-radius: 50%;
    margin-right: 0.8em;
}

.company-list {
    padding-left: 2em;
}

.company-list ul {
    font-size: 4rem;
    list-style: none;
}

.company-list-element {
    display: flex;
    flex-direction: row;
    column-gap: 20px;
    align-items: baseline;
}

.company-list-element a {
    /*text-decoration: none;*/
    text-decoration: underline;
    color: #383838;
}

.company-list-element span {
    display: flex;
    flex-direction: row;
    column-gap: 3vw;
    align-items: baseline;
}

.company-list-element span::before {
    content: '';
    width: 0.3rem;
    height: 0.3rem;
    background-color: #383838;
    border-radius: 50%;
}

.animate-open-company-list {
    max-height: var(--rowSector);
}

.animate-close-company-list {
    /*max-height: 8rem;*/
    max-height: calc(var(--rowSectorClose) * 1rem);
}

.company-list-always-open {
    max-height: 90rem;
}

.contacts-div {
    display: flex;
    flex-direction: row;
    column-gap: 20px;
    align-items: center;
    padding-top: 20vh;
}


.contacts-div .left {
    left: 0;
    width: 50%;
}

.contacts-div .right {
    left: 50%;
    width: 50%;
}

.contacts-inside-div {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
}


.contacts-inside-div .title {
    font-size: 5rem;
    display: flex;
    flex-direction: row;
    column-gap: 50px;
    align-items: baseline;
    padding: 0 50px;
}

.contacts-inside-div .title::before {
    content: '';
    width: 0.3rem;
    height: 0.3rem;
    background-color: #383838;
    border-radius: 50%;
}

.contacts-text {
    font-size: 1.5rem;
    line-height: 4rem;
    padding-left: 50px;
}

.contacts-inside-div a {
    text-decoration: none;
    font-size: 4rem;
    color: #383838;
}


.to-enter {
    transition: 0.5s;
}

.to-enter:nth-child(n) {
    transform: translateX(100%) scale(0);
}

.to-enter.active {
    transform: translateX(0) scale(1);
}

.footer-div {
    display: flex;
    flex-direction: row;
    /*column-gap: 10px;*/
    align-items: baseline;
    justify-content: space-between;
    font-size: 2rem;
    padding-top: 20vh;
    padding-left: 10vw;
    padding-right: 10vw;
    padding-bottom: 2vh;
}

.footer-div-inside {
    display: flex;
    flex-direction: row;
    /*column-gap: 10px;*/
    column-gap: 1vw;
    align-items: baseline;
    justify-content: center;
}

.dynamic-link {
    transition: 0.5s;
    text-decoration: none;
    display: block;
    position: relative;
    cursor: pointer;
    color: #383838;
}

.dynamic-link:hover::after,
.dynamic-link:focus::after {
    transform: scaleX(1);
    transform-origin: left;
}

.dynamic-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.1em;
    background-color: #383838;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s;
}

.language-label {
    color: #d8d8d8;
}

/* MOBILE VERSION */
@media screen and (max-width: 1600px) {
    :root {
        --rowSectorClose: 9;
    }

    .sector {
        font-size: 4.2rem;
        margin-left: 17.2vw;
        margin-right: 5vw;
    }

    .company-list {
        padding-top: 2rem;
    }

    .company-list ul {
        font-size: 2.5rem;
    }

}

@media screen and (max-width: 1200px) {
    :root {
        --rowSectorClose: 6;
    }

    .company-desc .right {
        width: 40%;
    }

    .sector {
        font-size: 3.5rem;
    }

    .titolo-sezione {
        font-size: 4.8rem;
    }

    .company-list ul {
        font-size: 2rem;
    }

    .contacts-inside-div .title {
        font-size: 3.5rem;
    }

    .contacts-inside-div a {
        font-size: 3rem;
    }
}

@media screen and (max-width: 1000px) {
    :root {
        --rowSectorClose: 4;
    }

    .company-desc .right {
        left: 40%;
        width: 50%;
    }

    .sector {
        font-size: 2.8rem;
    }

    .titolo-sezione {
        font-size: 3.8rem;
    }

    .company-list ul {
        font-size: 1.5rem;
    }

    .contacts-inside-div .title {
        font-size: 3rem;
    }

    .contacts-inside-div a {
        font-size: 2.5rem;
    }

    .footer-div {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 850px) {
    :root {
        --rowSectorClose: 3;
    }

    .company-desc .right {
        left: 30%;
        width: 60%;
    }

    .company-desc span {
        font-size: 1.4rem;
    }

    .sector {
        font-size: 2.2rem;
    }

    .titolo-sezione {
        font-size: 2.8rem;
    }

    .company-list ul {
        font-size: 1.5rem;
    }

    .contacts-inside-div .title {
        font-size: 2rem;
    }

    .contacts-inside-div a {
        font-size: 1.8rem;
    }

    .contacts-text {
        font-size: 1.2rem;
    }

    .footer-div {
        font-size: 1rem;
    }
}

@media screen and (max-width: 450px) {
    :root {
        --rowSectorClose: 4;
    }

    .company-desc .right {
        left: 10%;
        width: 80%;
    }

    .company-desc span {
        font-size: 1.4rem;
    }

    .holding-list {
        padding-top: 65vh;
    }

    .sector {
        font-size: 1.6rem;
        margin-left: 10vw;
    }

    .titolo-sezione {
        font-size: 1.8rem;
    }

    .company-list {
        padding-left: 0;
        padding-top: 2rem;
    }

    .company-list ul {
        font-size: 1.2rem;
    }

    .contacts-div {
        flex-direction: column;
        row-gap: 8vh;
        align-items: initial;
        padding-left: 5vw;
        padding-top: 10vh;
    }

    .contacts-div .left {
        width: 100%;
    }

    .contacts-div .right {
        width: 100%;
    }

    .contacts-inside-div .title {
        font-size: 2rem;
        padding: 0;
    }

    .contacts-inside-div a {
        padding-top: 2rem;
        font-size: 1.8rem;
    }

    .contacts-text {
        font-size: 1.2rem;
        line-height: 1.4rem;
    }

    .footer-div {
        font-size: 0.7rem;
        padding-left: 5vw;
        padding-right: 5vw;
    }
}

/* ANIMATIONS */
@keyframes sx2dx {
    0% {
        /*left: 0%;
        width: 3%;*/
        transform: translateX(0) scaleX(0.03);
    }

    20% {
        /*left: 0%;
        width: calc(90% - 20px);*/
        transform: translateX(0) scaleX(0.9);
    }

    30% {
        /*left: 0%;
        width: calc(100% - 20px);*/
        transform: translateX(0) scaleX(1);
    }

    60% {
        /*left: 1%;
        width: calc(100% - 20px);*/
        transform: translateX(1%) scaleX(1);
    }

    80% {
        /*left: 90%;
        width: 10%;*/
        transform: translateX(90%) scaleX(0.1);
    }

    100% {
        /*left: 100%;
        width: 0%;*/
        transform: translateX(100%) scaleX(0);
    }
}

@keyframes sx2dx-v2 {
    0% {
        transform: scaleX(0);
        transform-origin: left;
    }

    40% {
        transform: scaleX(1);
        transform-origin: left;
    }

    60% {
        transform: scaleX(1);
        transform-origin: right;
    }

    100% {
        transform: scaleX(0);
        transform-origin: right;
    }
}

@keyframes dx2sx {
    0% {
        left: 100%;
        letter-spacing: -1em;

        opacity: 0;
    }

    100% {
        left: 50%;
        letter-spacing: 0.0em;
        opacity: 1;
    }
}

@keyframes bounce {
    0% {
        transform: translateY(100%);
    }

    50% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

@keyframes enter-from-bottom {
    0% {
        top: 100%;
        opacity: 0;
    }

    60% {
        top: 100%;
        opacity: 0;
    }


    100% {
        top: calc(100% - 20px);
        opacity: 1;
    }
}

@keyframes hide-on-scroll {
    0% {
        opacity: 1;
        scale: 1;
    }

    100% {
        opacity: 0.2;
        scale: 0.8;
    }
}

@keyframes show-on-scroll {
    0% {
        opacity: 0.2;
        scale: 0.8;
    }

    100% {
        opacity: 1;
        scale: 1;
    }
}

@keyframes rotate-on-scroll {
    0% {
        transform: rotateZ(0deg);
        opacity: 1;
    }

    100% {
        transform: rotateZ(-90deg);
        opacity: 0;
    }
}

@keyframes rotate-back-on-scroll {
    0% {
        transform: rotateZ(-90deg);
        opacity: 0;
    }

    100% {
        transform: rotateZ(0deg);
        opacity: 1;
    }
}


/****************/