@import '../functions.less';
@import '../../../../files/config/colors.less';


@cinza: #9AB;
#timeline {
    .container {
        min-height: 100vh;
        overflow: hidden !important; // evita scroll lateral causado pelos translateX
        h2 {
            text-align: center;
            padding: 40px 0;
        }
        #fatos {
            margin-bottom: 40px;
            .item {
                // estado inicial controlado via JS (fallback se JS falhar)
                opacity: 0;
                will-change: transform, opacity;
                .data, .content {
                    display: grid;
                    grid-template-columns: 1fr 80px 3px 80px 1fr;
                    align-items: center;
                    .div {
                        height: 100%;
                        position: relative;
                        &:after {
                            content: "";
                            position: absolute;
                            width: 100%;
                            height: 150%;
                            background: @cinza;
                        }
                    }
                    .seta-l, .seta-r {
                        height: 15px;
                        background: @cinza;
                    }
                    .seta-l {
                        -webkit-clip-path: polygon(100% 0, 0 47%, 0 52%, 100% 100%);
                        clip-path: polygon(100% 0, 0 47%, 0 52%, 100% 100%);
                    }
                    .seta-r {
                        -webkit-clip-path: polygon(0 0, 100% 47%, 100% 52%, 0 100%); 
                        clip-path: polygon(0 0, 100% 47%, 100% 52%, 0 100%);
                    }
                    .trace {
                        height: 1px;
                        background: @cinza;
                    }
                    .desc {
                        padding: 40px 50px;
                        margin-bottom: 50px;
                        border-radius: 5px;
                        border: 1px solid #1232;
                        box-shadow: 0 10px 10px -10px #DDD;
                        &.destaque {
                            background: linear-gradient(#234, #123);
                            color: #FFF;
                            p:not([class]){
                                opacity: 80%;
                            }
                        }
                    }
                }
                &:last-child {
                    .content {
                        div {
                            &:after {
                                height: 100%;
                            }
                        }
                    }
                }
                .data {
                    .ano {
                        span {
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            border-radius: 60px;
                            font-size: 1.7em;
                            width: 100px;
                            height: 100px;
                            border: 4px solid ~"@{cinza}D";
                            color: @cinza;
                            position: relative;
                            z-index: 10;
                            &:after {
                                content: "";
                                position: absolute;
                                width: 100%;
                                height: 100%;
                                border: 2px solid ~"@{cinza}5";
                                border-radius: 60px;
                                padding: 10px;
                            }
                        }
                    }
                }
                &.pos-0 {
                    .data {
                        .ano {
                            span {
                                margin: 0 10px 0 auto;
                            }
                        }
                        .trace:after {
                            content: "";
                            position: absolute;
                            width: 1px;
                            height: 30px;
                            background: @cinza;
                            right: 0px;
                        }
                    }
                    // transform do .desc agora é controlado pelo JS
                }
                &.pos-1 {
                    .data {
                        .ano {
                            span {
                                margin-left: 10px;
                            }
                        }
                        .trace:after {
                            content: "";
                            position: absolute;
                            width: 1px;
                            height: 30px;
                            background: @cinza;
                        }
                    }
                    // transform do .desc agora é controlado pelo JS
                }
                .content {
                    .div {
                        background: @cinza;
                        height: 100%;
                    }
                    .desc {
                        opacity: 0;
                        will-change: transform, opacity;
                        .titulo {
                            font-size: 1.6em;
                            margin-bottom: 15px;
                        }
                        img {
                            display: block;
                            width: 100%;
                            margin-bottom: 15px;
                        }
                        p:not([class]){
                            line-height: 25px;
                            font-size: 1.1em;
                            opacity: 55%;
                            text-align: justify;
                        }
                    }
                        
                }
            }
        }
    }
}