import { device } from "../common/Devices";
import { Colors, Gradient } from "../common/variable";
const { styled } = require("styled-components");

export const AboutUsRow = styled.section`
    margin-top: -50px;
    margin-bottom: -24px;
    .about-card{
        padding: 40px;
        position: relative;
        border-radius: 36px;
        @media ${device.tablet}{
            padding: 30px;
            border-radius: 25px;
        }
        @media ${device.mobileS}{
            padding: 20px;
        }
    }
    .year-list{
        .item{
            padding: 58px 50px;
            position: relative;
            border-radius: 36px;
            &::before{
                content: '';
                position: absolute;
                top: 0;
                height: 100%;
                width: 98%;
                z-index: -1;
            }
            .year-date{
                margin: 0;
            }
            &:nth-child(odd){
                &::before{
                    right: 0;
                    border: 2px  dashed #DBDBDB;
                    border-left: none;
                    border-radius: 0 36px 36px 0;
                    overflow: hidden;
                }
                .year-date{
                    left: 50px;
                }
            }
            &:nth-child(even){
                &::before{
                    top: -2px;
                    height: calc(100% - -4px);
                    left: 0;
                    border-left: 2px  dashed #DBDBDB;
                    border-radius: 36px 0 0 36px;
                }
                .year-date{
                    right: 50px;
                }
            }
            &:first-child{
                .year-date{
                    padding-left: 60px;
                    left: 0;
                }
            }
            &:last-child{
                &::before{
                    border-bottom: 2px  dashed #DBDBDB;
                }
            }
            .year-date{
                position: absolute;
                top: -32px;
                font-size: 28px;
                line-height: 1;
                font-weight: 600;
                background: ${Colors.white};
                color: ${Colors.primary};
                padding: 10px;
                display: flex;
                align-items: center;
                grid-gap: 10px;
                b{
                    font-size: 42px;
                    font-weight: 800;
                }
            }
            .year-card{
                padding: 40px 40px 65px;
                border-radius: 26px;
                transition: all 0.4s;
               &:hover{
                    background: ${Colors.lightPink};
                    transition: all 0.4s;
               }
                h4{
                    margin-bottom: 26px;
                }
                p{
                    margin-bottom: 16px;
                    &:last-child{
                        margin: 0;
                    }
                }
            }
        }
    }
    .card-col{
        margin-bottom: 24px;
    }
    .content-card{
        border-radius: 40px;
        padding: 50px 50px 100px;
        height: 100%;
        &.gray-bg{
            background: rgba(208, 208, 208, 0.20);
        }
       h4{
            margin-bottom: 30px;
            line-height: 1.2;
       }
       p{
            margin-bottom: 30px;
            line-height: 1.2;
            &:last-child{
                margin: 0;
            }
       }
    }
   @media ${device.laptop}{
        .year-list {
            .item {
                padding: 40px;
                .year-card{
                    padding: 40px;
                }
                &:nth-child(even){
                    &::before{
                        top: -4px;
                        height: calc(100% - -8px);
                    }
                }
            }
        }
        .content-card{
            padding: 40px;
        }
    }
    @media ${device.laptopS}{
        .year-list {
            .item {
                padding: 30px;
                .year-card{
                    padding: 30px;
                }
                .year-date {
                    top: -26px;
                    b{ 
                        font-size: 28px;
                    }
                }
                &:nth-child(even) {
                    .year-date{
                        right: 30px;
                    }
                }
                &:first-child {
                    .year-date{
                        padding-left: 40px;
                    }
                }
            }
        }
        .content-card {
            h4{
                margin-bottom: 16px;
            }
            p{
                margin-bottom: 16px;
            }
        }
    }
    @media ${device.tablet}{
        .year-list{
            .item {
                .year-card{
                    padding: 20px;
                    h4{
                        margin-bottom: 16px;
                    }
                }
                .year-date,.year-date b{
                    font-size: 22px;
                }
                .year-date{
                    top: -22px;
                }
                &::before{
                    width: 97%;
                }
                &:nth-child(even){
                    &::before{

                    }
                }
            }
        }
        .content-card{
            padding: 20px;
            border-radius: 25px;
        }
    }
    @media ${device.mobile}{
        .year-list {
            .item{
                margin-bottom: 20px;
                padding: 0;
                background: ${Gradient.primary};
                border-radius: 12px;
                &::before{
                    display: none;
                }
                &:last-child{
                    margin: 0;
                }
                .year-date{
                    position: relative;
                    top: auto;
                    left: auto;
                    background: transparent;
                    &::after,&::before{
                        content: '';
                        position: absolute;
                        top: 0;
                        right: 20px;
                        bottom: 0;
                        margin: auto;
                        background: ${Colors.primary};
                        width: 16px;
                        height: 2px;
                    }
                    &::after{
                        transform: rotate(90deg);
                    }
                }
                .year-card{
                    padding: 0 20px;
                    height: 0;
                    opacity: 0;
                    visibility: hidden;
                    transition: all 0.4s;
                }
                &:first-child,&:nth-child(even),&:nth-child(odd) {
                    .year-date{
                        top: auto;
                        left: auto;
                        right: auto;
                        padding: 20px;
                        padding-right: 46px;
                        cursor: pointer;
                    }
                }
                &.active{
                    .year-card{
                        padding: 20px;
                        height: auto;
                        opacity: 1;
                        visibility: visible;
                        transition: all 0.6s;
                    }
                    .year-date{
                        border-bottom: 1px solid #c9c6ff;
                        &::after{
                            display: none;
                        }
                    }
                }
            }
        }
    }
    @media ${device.mobileS}{
        margin-top: -26px;
        .about-card{
            h2{
                font-size: 22px;
            }
        }
        .year-list {
            .item {
                .year-date,.year-date b{
                    font-size: 18px;
                }
            }
        }
    }
`;