@mixin button($type: '') {
    display: inline-block;
    font-weight: 600;
    font-size: .9em;
    line-height: 1em;
    border-radius: .5rem;
    text-align: center;
    text-decoration: none;
    -webkit-transition: all 0.3s ease-in-out;
    -moz-transition: all 0.3s ease-in-out;
    -ms-transition: all 0.3s ease-in-out;
    -o-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    padding: 1rem;
    min-width: 10rem;
    color: $color-white;

    @if $type == 'success' {
        background-color: $color-success;
        border-top: 2px solid $color-success-light;
    } @else if $type == 'warning' {
        background-color: $color-warning;
        border-top: 2px solid $color-warning-light;
    } @else if $type == 'danger' {
        background-color: $color-danger;
        border-top: 2px solid $color-danger-light;
    } @else {
        font-weight: 700;
        color: $color-primary-dark;
        background-color: $color-white;
        box-shadow: $color-button-shadow;
    }

    &:hover {
        @if $type == 'success' {
            color: $color-success-dark !important;
        } @else if $type == 'warning' {
            color: $color-warning-dark !important;
        } @else if $type == 'danger' {
            color: $color-danger-dark !important;
        } @else {
            color: $color-primary !important;
        }
    }
}

@mixin link-style($type: '') {
    a {
        text-decoration: none;
        transition: .4s all;

        @if $type == 'light' {
            color: $color-white;
        } @else {
            color: $color-primary;
        }

        &:hover {
            @if $type == 'light' {
                color: $color-primary;
            } @else {
                color: $color-primary-dark;
            }
        }
    }
}

@mixin title {
    .title {
        width: 100%;
        display: flex;
        text-align: center;
        align-items: center;

        h1, h2, h3, span {
            margin: 0;
            font-weight: var(--font-weight);
            font-size: var(--font-size);
            line-height: var(--line-height);
    
            @media (max-width: $breakpoint-lg) {
                & {
                    font-size: var(--font-size-lg);
                    line-height: var(--line-height-lg);
                }
            }
    
            @media (max-width: $breakpoint-md) {
                & {
                    font-size: var(--font-size-md);
                    line-height: var(--line-height-md);
                }
            }
    
            @media (max-width: $breakpoint-sm) {
                & {
                    font-size: var(--font-size-sm);
                    line-height: var(--line-height-sm);
                }
            }
        }
    }
}
