// -----------------------------------------------------------------------------
// This file contains styles that are specific to the home page.
// -----------------------------------------------------------------------------
.home {
    overflow-x: hidden;

    main {
        position: relative;

        .background-apl-text {
            position: absolute;
            left: -25%;
            font-family: $text-logo;
            color: #262626;
            font-size: 51em;
            z-index: -1;
        }
        small {
            display: block;
            padding-top: 200px;
            font-size: 16pt;
            line-height: 0;
        }
        big {
            display: block;
            line-height: 1em;
            font-size: 48pt;
            font-family: $text-logo;
        }
        img {
            float: right;
            width: 256px;
        }
        p {
            max-width: 600px;
            width: 100%;
        }
    }

    .featured-news {
        margin-top: 270px;
        margin-bottom: 200px;

        .grid {
            margin-top: 30px;
            display: grid;
            grid-template-columns: 70% 1fr;
            grid-template-rows: 500px;

            .panel {
                position: relative;
                font-weight: 500;
                background-size: cover;
                background-position: center;
                background-repeat: no-repeat;
                text-align: center;
                transition: 0.5s ease-in-out;

                .overlay {
                    position: absolute;
                    top: 0;
                    left: 0;
                    bottom: 0;
                    right: 0;
                    width: 100%;
                    height: 100%;
                    background: rgba(0, 0, 0, 0.5);
                    transition: 0.5s ease-in-out;
                }

                .ptitle {
                    position: absolute;
                    bottom: 50px;
                    width: 100%;
                    font-size: 14pt;
                    color: $text-color;
                    transition: 0.5s ease-in-out;
                }

                .author_name {
                    position: absolute;
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    bottom: 25px;
                    width: 100%;
                    font-size: 12pt;
                    color: $text-color;
                    fill: $text-color;
                    transition: 0.5s ease-in-out;

                    svg {
                        width: 16px;
                        margin-right: 10px;
                    }
                }
            }

            .big {
                overflow: hidden;

                .panel {
                    height: 100%;

                    .ptitle {
                        font-size: 18pt;
                    }
                }

                &:hover {
                    .panel {
                        transform: scale(1.1);

                        .overlay {
                            background: rgba(0, 0, 0, 0);
                        }

                        .ptitle {
                            color: $brand-color;
                        }

                        .author_name {
                            color: $brand-color;
                            fill: $brand-color;
                        }
                    }
                }

                &:focus {
                    .panel {
                        transform: scale(1.1);

                        .overlay {
                            background: rgba(0, 0, 0, 0);
                        }

                        .ptitle {
                            color: $brand-color;
                        }

                        .author_name {
                            color: $brand-color;
                            fill: $brand-color;
                        }
                    }
                }
            }

            .inner-grid {
                display: flex;
                flex-direction: column;
            }

            .small1 {
                height: calc(100% / 2);
                overflow: hidden;

                .panel {
                    height: 100%;

                    .overlay {
                        background: rgba(black, 0.65);
                    }

                    .ptitle {
                        font-weight: bold;
                    }
                }

                &:hover {
                    .panel {
                        transform: scale(1.1);

                        .ptitle {
                            color: $brand-color;
                        }

                        .author_name {
                            color: $brand-color;
                            fill: $brand-color;
                        }
                    }
                }

                &:focus {
                    .panel {
                        transform: scale(1.1);

                        .ptitle {
                            color: $brand-color;
                        }

                        .author_name {
                            color: $brand-color;
                            fill: $brand-color;
                        }
                    }
                }
            }

            .small2 {
                height: calc(100% / 2);
                overflow: hidden;

                .panel {
                    height: 100%;
                    
                    .overlay {
                        background: rgba(black, 0.65);
                    }

                    .ptitle {
                        font-weight: bold;
                    }
                }

                &:hover {
                    .panel {
                        transform: scale(1.1);

                        .ptitle {
                            color: $brand-color;
                        }

                        .author_name {
                            color: $brand-color;
                            fill: $brand-color;
                        }
                    }
                }

                &:focus {
                    .panel {
                        transform: scale(1.1);

                        .ptitle {
                            color: $brand-color;
                        }

                        .author_name {
                            color: $brand-color;
                            fill: $brand-color;
                        }
                    }
                }
            }
        }
    }

    .featured-tournament {
        margin-bottom: 200px;
        .tournament {
            margin: 50px 0;
            position: relative;

            .container {
                display: flex;
                justify-content: space-evenly;

                img {
                    max-height: 400px;
					height: 100%;
                }

                .text {
                    margin-top: 125px;
                    line-height: 2.2em;

                    .name {
                        font-size: 30pt;
                        font-weight: 500;
                        text-transform: uppercase;
                    }

                    .btn {
                        margin-top: 40px;
                    }
                }
            }

            &:before {
                content: '';
                position: absolute;
                top: 25%;
                width: 100%;
                height: 230px;
                right: 0;
                z-index: -1;
                background: #920000;
            }
        }
    }

    .tweets {

        .container {
            .title {
                margin-bottom: 1em;
            }

            .twitter {
                display: flex;
                justify-content: center;
            }
        }
    }
}

@media only screen and (max-width: 960px) {
    .home {
        main {
            img {
                width: 150px;
            }

            .background-apl-text {
                font-size: 30em;
                top: 5rem;
            }

            big {
                font-size: 40pt;
            }

            p {
                margin-top: 3rem;
                font-size: 1em;
            }
        }

        .featured-news {
            .grid {
                grid-template-columns: 100%;
                grid-template-rows: 300px 600px;
            }
        }

        .featured-tournament {
            .tournament {
                .container {
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;

                    img {
                        width: 400px;
                        height: 100%;
                    }

                    .text {
                        margin-top: 2rem;
                    }
                }
                
                &:before {
                    display: none;
                }
            }
        }
    }
}

@media only screen and (max-width: 480px) {
    .home {
        main {
            padding: 2rem;

            img {
                float: none;
            }

            big {
                font-size: 30pt;
            }

            small {
                padding-top: 5rem;
            }

            .background-apl-text {
                font-size: 20em;
                margin-top: 10rem;
                margin-left: -8rem;
            }
        }

        .featured-news {
            margin-top: 7rem;
            margin-bottom: 0;
        }

        .featured-tournament {
            margin-top: 7rem;
            margin-bottom: 0;

            .tournament > .container > img {
                width: 200px;
            }

            .tournament > .container > .text {
                .name {
                    font-size: 2rem;
                }
            }
        }

        .tweets {
            margin-top: 7em;
        }
    }

    .title {
        margin-left: 2rem;
    }
}
