programa.scss 4.49 KB
// Variables
$program-box-space: 20px;
$scale: 1.1;
$time: .2s;
$darken: 15%;

.program-box {
    cursor: pointer;
    background-color: #fff;
    margin-top: $program-box-space;
    margin-bottom: $program-box-space;
    border-radius: 3px;
    overflow: hidden;

    .contraste & {
        color: #fff;
        background-color: #262626;
    }

    &--category {
        font-size: 14px;
        font-weight: bold;
        text-transform: uppercase;
        line-height: 22px;
        display: block;
        height: 30px;
        margin: 0;
        padding: 5px $program-box-space;
        color: #ffffff;

        @each $category, $color in $categories {
            .#{$category} & {
                background-color: $color;
            }
        }

        .contraste & {
            background-color: #262626;
        }
    }

    &--title {

        padding: 0 $program-box-space;

        h1 {
            font-size: 18px;
            font-weight: bold;
            margin: 0 0 $program-box-space 0;
            display: table-cell;
            vertical-align: middle;

            // Altura das linhas do abstract
            $hLine: 20px;            
            // default 
            height: $hLine * 2; 
            
            @media (max-width: $screen-xs) {
                // height: $hLine * 3;
                height: auto;
            }

            @media (min-width: $screen-xs + 1) {
                // height: $hLine * 2;
                height: auto;
            }

            @media (min-width: $screen-sm + 1) {
                height: $hLine * 2;
            }

            @media (min-width: $screen-md + 1) {
                height: $hLine * 2;
            }
        }
    }

    &--abstract {
        padding: 0 $program-box-space;
        display: table-cell;
        vertical-align: middle;
        
        // Altura das linhas do abstract
        $pLine: 20px;
        // 1 linha: 19px -> 20
        // 2 linhas: 38px -> 40
        // 3 linhas: 57px -> 60
        // 4 linhas: 76px -> 80

        height: $pLine * 2; // default
        
        @media (max-width: $screen-xs) {
            // height: $pLine * 4;
            height: auto;
        }

        @media (min-width: $screen-xs + 1) {
            // height: $pLine * 3;
            height: auto;
        }

        @media (min-width: $screen-sm + 1) {
            height: $pLine * 4;
        }

        @media (min-width: $screen-md + 1) {
            height: $pLine * 3;
        }

        p { margin: 0; }
    }

    &--button {
        padding: $program-box-space;
        .btn {
            color: #fff;
            font-weight: bold;
            padding: 15px 0;
            border-left: 0;
            border-right: 0;
            border-top: 0;
            border-radius: 6px;

            -webkit-transition: all $time ease-in-out;
            -moz-transition: all $time ease-in-out;
            -o-transition: all $time ease-in-out;
            transition: all $time ease-in-out;

            @each $category, $color in $categories {
                .#{$category} & {
                    background-color: $color;
                    border-bottom: 3px solid darken($color, $darken);
                }
            }

            &:hover,
            &:focus {
                @each $category, $color in $categories {
                    .#{$category} & {
                        background-color: darken($color, $darken);
                    }
                }
            }

            .contraste & {
                color: #262626;
                background-color: #fff;
            }
        }
    }

    &--image-wrapper {
        position: relative;
        // width: 100%;
        // width: 370px;
        // height: 170px;

        overflow: hidden;
        // text-align: center;
        min-height: 170px;
    }

    &--image {
        min-height: 170px;
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;

        -webkit-transition: all $time ease-in-out;
        -moz-transition: all $time ease-in-out;
        -o-transition: all $time ease-in-out;
        transition: all $time ease-in-out;
    }

    &:hover {
        background-color: #d9d9d9;

        .program-box--image {
            -webkit-transform: scale($scale); /* prefixo para browsers webkit */
            -moz-transform: scale($scale); /* prefixo para browsers gecko */
            -o-transform: scale($scale); /* prefixo para opera */
            transform: scale($scale);
        }
    }
}

.program-preview {
    .program-banner {
        
    }
}