.collectionTile {
    &.senza-titolo {
        .showMore {
            display: none;
        }
    }

    &.carousel {
        div[class^='carousel-wrapper'] {
            position: relative;
        }

        .slick-list {
            width: 93%;
            margin: auto;
        }

        .slick-track {
            display: flex;
            flex-flow: row nowrap;
        }

        .slick-slide {
            height: auto;
        }

        ul.slick-dots {
            width: 100%;
            padding: 15px 0 0;
            margin: 0;
            list-style: none;
            display: inline-flex;
            flex-flow: row wrap;
            justify-content: center;

            li {
                padding: 0 5px;

                button {
                    padding: 0;
                    overflow: hidden;
                    width: 12px;
                    height: 12px;
                    text-indent: 1000px;
                    border-radius: 4px;
                    background: none;
                }

                &.slick-active {
                    button {
                        background-color: rgba(0, 0, 0, 0.67);
                    }
                }
            }
        }

        .slick-arrow {
            position: absolute;
            top: calc(50% - 15px);
            width: 30px;
            height: 30px;
            padding: 0 0 0 30px;
            overflow: hidden;
            z-index: 100;
            background: none;
            border: 0;

            &:before {
                @include make-ita('\23f4', #333);
                position: absolute;
                left: 5px;
                top: 0;
                font-size: 1.2em;
                font-weight: 100;
            }

            &.slick-prev {
                left: 0;
                right: auto;
            }

            &.slick-next {
                right: 0;
                left: auto;

                &:before {
                    left: 7px;
                    @include make-ita('\23f5', #333);
                }
            }

            &:hover {
                opacity: 0.7;
                box-shadow: none;
            }
        }

        &.sfondo-scuro {
            ul.slick-dots {
                button {
                    border-color: #fff;
                }

                .slick-active {
                    button {
                        background-color: #fff;
                    }
                }
            }

            .slick-arrow {
                &:before {
                    color: #fff;
                }
            }
        }
    }

    &.with-comments {
        .tile-collection {
            .collectionItemFooter {
                display: flex;
            }

            .collectionItemDates {
                text-align: left;
                width: 50%;
            }

            .collectionItemComments {
                padding-top: 20px;
                width: 50%;
                text-align: right;
                margin-left: auto;

                &,
                span {
                    color: $brand-primary;
                }
            }
        }

        .news-highlight {
            .news-comments {
                padding-top: 20px;
            }
        }
    }
}

.tile-collection {
    &.video-collection {
        .collectionItemImage {
            position: relative;

            .video-icon {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background-color: rgba(0, 0, 0, 0.4);

                &:after {
                    content: '';
                    display: inline-block;
                    width: 100%;
                    height: 100%;
                    opacity: 0.6;
                    background-size: 30%;
                    background-repeat: no-repeat;
                    background-position: center;
                    // background-image: url(data:image/svg+xml;utf8;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8IS0tIEdlbmVyYXRvcjogQWRvYmUgSWxsdXN0cmF0b3IgMTYuMC4wLCBTVkcgRXhwb3J0IFBsdWctSW4gLiBTVkcgVmVyc2lvbjogNi4wMCBCdWlsZCAwKSAgLS0+CjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0iQ2FwYV8xIiB4PSIwcHgiIHk9IjBweCIgd2lkdGg9IjUxMnB4IiBoZWlnaHQ9IjUxMnB4IiB2aWV3Qm94PSIwIDAgMzE0LjA2OCAzMTQuMDY4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCAzMTQuMDY4IDMxNC4wNjg7IiB4bWw6c3BhY2U9InByZXNlcnZlIj4KPGc+Cgk8ZyBpZD0iX3gzM181Ni5fUGxheSI+CgkJPGc+CgkJCTxwYXRoIGQ9Ik0yOTMuMDAyLDc4LjUzQzI0OS42NDYsMy40MzUsMTUzLjYxOC0yMi4yOTYsNzguNTI5LDIxLjA2OEMzLjQzNCw2NC40MTgtMjIuMjk4LDE2MC40NDIsMjEuMDY2LDIzNS41MzQgICAgIGM0My4zNSw3NS4wOTUsMTM5LjM3NSwxMDAuODMsMjE0LjQ2NSw1Ny40N0MzMTAuNjI3LDI0OS42MzksMzM2LjM3MSwxNTMuNjIsMjkzLjAwMiw3OC41M3ogTTIxOS44MzQsMjY1LjgwMSAgICAgYy02MC4wNjcsMzQuNjkyLTEzNi44OTQsMTQuMTA2LTE3MS41NzYtNDUuOTczQzEzLjU2OCwxNTkuNzYxLDM0LjE2MSw4Mi45MzUsOTQuMjMsNDguMjYgICAgIGM2MC4wNzEtMzQuNjksMTM2Ljg5NC0xNC4xMDYsMTcxLjU3OCw0NS45NzFDMzAwLjQ5MywxNTQuMzA3LDI3OS45MDYsMjMxLjExNywyMTkuODM0LDI2NS44MDF6IE0yMTMuNTU1LDE1MC42NTJsLTgyLjIxNC00Ny45NDkgICAgIGMtNy40OTItNC4zNzQtMTMuNTM1LTAuODc3LTEzLjQ5Myw3Ljc4OWwwLjQyMSw5NS4xNzRjMC4wMzgsOC42NjQsNi4xNTUsMTIuMTkxLDEzLjY2OSw3Ljg1MWw4MS41ODUtNDcuMTAzICAgICBDMjIxLjAyOSwxNjIuMDgyLDIyMS4wNDUsMTU1LjAyNiwyMTMuNTU1LDE1MC42NTJ6IiBmaWxsPSIjRkZGRkZGIi8+CgkJPC9nPgoJPC9nPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+CjxnPgo8L2c+Cjwvc3ZnPgo=);
                    background-image: url($img-path+'video-icon.svg');
                }
            }
        }

        .collectionItemTitle {
            font-size: 1.2em;
            padding-bottom: 10px;
            margin-bottom: 1.2em;
        }

        .collectionItemWrapper {
            .collectionItemText {
                padding: 10px 20px 20px;
            }
        }
    }

    &.gallery-collection {
        .collectionItemWrapper {
            background-color: $tile-fascia-scura;

            .collectionItemText {
                padding: 10px 20px 20px;
            }

            .collectionItemDates {
                color: #fff;
                font-weight: 100;
                padding-top: 0;
            }

            .collectionItemTitle {
                font-size: 1.2em;
                color: #fff;
                display: flex;
                flex-flow: row nowrap;

                .item-icon {
                    &:before {
                        padding-right: 10px;
                        font-size: 1.33em;
                        font-weight: 100;
                        position: relative;
                        top: -3px;
                    }

                    &.photo {
                        &:before {
                            @include make-ita('\1f4f7', #fff);
                        }
                    }

                    &.video {
                        &:before {
                            @include make-ita('\1f3a5', #fff);
                        }
                    }
                }
            }
        }
    }

    &.sights-collection {
        .tileBody {
            h3,
            h2 {
                color: $brand-primary;
                margin: 0;
            }
        }
    }

    &.empty {
        opacity: 0.35;
        background: #e3e3e3;
    }

    .tile-collection-container {
        position: relative;
        padding: 20px 0px;
        @include clearfix;
    }

    ul.tileContent {
        list-style: none;
        padding-left: 0;
        display: flex;
        flex-flow: row wrap;
        margin-left: -10px;
        margin-right: -10px;
    }

    li.collectionItem {
        padding: 20px 10px;
    }

    .showMore {
        position: absolute;
        top: 1.6em;
        right: 2%;

        a {
            font-size: 2rem;
            font-weight: $bold;
            border-bottom: 1px solid;
        }
    }

    .tileTitle {
        font-size: 1.6em;
    }

    .collectionItemWrapper {
        background: #eee;
        height: 100%;
        position: relative;

        a {
            color: #000;
            display: flex;
            flex-flow: column nowrap;
            height: 100%;
            border: 0;

            &:hover,
            &:focus {
                border: 0;

                .newsTitle,
                .videoTitle {
                    span {
                        border-bottom: 1px solid #000;
                    }
                }
            }
        }

        .collectionItemImage {
            flex: 0 0 auto;

            img {
                width: 100%;
                height: auto;
            }
        }

        .collectionItemText {
            padding: 20px;
            display: flex;
            flex-flow: column nowrap;
            flex: 1 1 auto;
            justify-content: flex-start;
        }

        .collectionItemDates {
            padding-top: 20px;
            text-align: right;
            color: $gray;

            > div {
                display: inline-block;
            }
        }

        .collectionItemTitle {
            font-weight: $bold;
            padding: 10px 0;
            font-size: 2.1rem;
        }

        .collectionItemDescription {
            font-size: 1.7rem;
        }

        .collectionItemFooter {
            margin-top: auto;
        }
    }

    @media (max-width: $screen-xs-max) {
        ul.tileContent {
            font-size: 0.9em;
        }
    }
}

@media (max-width: $screen-sm-max) {
    .mobile-hidden {
        display: none;
    }
}

.aree-tematiche-collection {
    position: relative;

    .tileTitle {
        font-size: 1.6em;
        margin: 25px 0 12.5px;
    }

    ul {
        @extend .list-inline;
        display: inline-flex;
        flex-flow: row wrap;
        @include make-row();
        width: 100%;

        li {
            @include make-xs-column(6);
            @include make-md-column(3);

            a {
                display: block;
                overflow: auto;
                border-top: 1px solid $gray-border;
                font-weight: $bold;
                padding: 15px 10px;

                .linkImage {
                    width: 40px;
                    float: left;
                    padding-right: 10px;
                    text-align: center;

                    img {
                        height: 100%;
                        width: auto;
                    }
                }

                .linkText {
                    width: calc(100% - 40px);
                    padding-left: 10px;
                    float: left;
                }

                &:focus,
                &:hover {
                    .linkText {
                        .title {
                            border-bottom: 1px solid $brand-primary;
                        }
                    }
                }
            }
        }

        @media (max-width: 550px) {
            li {
                width: 100%;
                float: none;
            }
        }
    }
    .showMore {
        position: absolute;
        top: 30px;
        right: 15px;

        a {
            font-size: 2rem;
            font-weight: $bold;
            border-bottom: 1px solid;
        }
    }
}

.news-highlight {
    background: #fff;

    .tileBody {
        @include make-row;
        padding: 30px 0px 40px;
    }

    .tile-content {
        display: flex;
        flex-flow: row wrap;

        .news-infos,
        .item-image {
            width: 50%;
            padding: 15px;
        }

        .news-infos {
            .news-detail {
                @include clearfix;

                .tileTitle {
                    float: left;
                    font-size: 1.9rem;
                    font-weight: $bold;
                    padding-right: 3rem;
                }

                .news-date {
                    float: left;
                    font-size: 1.8rem;
                }
            }

            .news-title {
                margin: 2rem 0;
                font-size: 4rem;
                font-weight: $bold;
                line-height: 1.2em;

                a {
                    &:focus,
                    &:hover {
                        border-bottom: 1px solid $link-hover-color;
                    }
                }
            }
            .news-description {
                font-size: 2.8rem;
            }
        }

        .item-image {
            img {
                float: right;
                max-width: 100%;
                height: auto;
            }
        }
    }

    @media (max-width: $screen-xs-max) {
        .tileBody {
            padding-top: 0;
            padding-bottom: 0;
        }

        .tile-content {
            .news-infos {
                width: 100%;

                .news-detail {
                    .tileTitle,
                    .news-date {
                        float: none;
                        clear: both;
                    }

                    .news-date {
                        margin: 0;
                    }

                    .tileTitle {
                        padding-bottom: 7px;
                    }
                }

                .news-title {
                    font-size: 2rem;
                }

                .news-description {
                    font-size: 1.7rem;
                }
            }

            .item-image {
                width: 100%;
                text-align: center;

                img {
                    float: none;
                }
            }
        }
    }
}
.sfondo-scuro {
    .news-highlight {
        background: $tile-fascia-scura;

        .tile-content .news-infos .news-title a:focus,
        .tile-content .news-infos .news-title a:hover {
            border-color: #ddd;
        }
    }

    a {
        border-bottom: 0;
    }

    .tile-collection {
        &.gallery-collection {
            .collectionItemWrapper {
                background-color: #eee;

                .collectionItemTitle,
                .collectionItemDates {
                    color: #000;
                }

                .collectionItemTitle {
                    .item-icon {
                        &:before {
                            color: #000;
                        }
                    }
                }
            }
        }
    }
}
.sfondo-chiaro {
    .news-highlight {
        background: $gray-bg;
    }

    .tile-collection {
        .collectionItemWrapper {
            background: #fff;

            a,
            span,
            h2,
            h3 {
                color: #000;
            }
        }

        &.gallery-collection {
            .collectionItemWrapper {
                .collectionItemTitle {
                    .item-icon {
                        &:before {
                            color: #000;
                        }
                    }
                }
            }
        }
    }
}

.online-services {
    position: relative;
    padding: 15px 0 30px;

    .tile-collection-container {
        position: relative;
    }

    ul.tileContent {
        list-style: none;
        padding-left: 0;
        display: flex;
        flex-flow: row wrap;
        justify-content: space-between;
        margin-bottom: 0;
        margin-left: -10px;
        margin-right: -10px;
    }

    li.collectionItem {
        padding: 20px 10px;
        width: 22.5%;
    }

    @media (max-width: $screen-sm-max) {
        li.collectionItem {
            width: 47.5%;
        }
    }
    @media (max-width: $screen-xs-max) {
        li.collectionItem {
            width: 100%;
        }
    }

    .showMore {
        position: absolute;
        top: 30px;
        right: 15px;

        a {
            font-size: 2rem;
            font-weight: $bold;
            border-bottom: 1px solid;
        }
    }

    .tileTitle {
        font-size: 1.6em;
        padding: 0 10px;
        margin: 25px 0 12.5px;
    }

    .serviceWrapper {
        height: 100%;
        position: relative;

        a {
            color: #000;

            &:hover,
            &:focus {
                border-bottom: 1px solid #000;
            }
        }

        .serviceSubject {
            font-weight: $bold;
            font-size: 1.5rem;
            text-transform: uppercase;
            min-height: 25px;
        }

        .serviceTitle {
            font-weight: $bold;
            font-size: 2rem;
            padding: 5px 0 10px;
        }

        .serviceDescription {
            overflow: hidden;
            position: relative;
            height: 6em;
        }

        .serviceDescription:before {
            content: '';
            float: left;
            width: 5px;
            height: 6em;
        }

        .serviceDescription > *:first-child {
            float: right;
            width: 100%;
            margin-left: -5px;
        }

        .serviceDescription:after {
            content: '\02026';
            box-sizing: content-box;
            float: right;
            position: relative;
            top: -25px;
            left: 100%;
            width: 1em;
            margin-left: -1em;
            padding-right: 5px;
            text-align: right;
        }
    }
}
.sfondo-scuro {
    .online-services {
        .serviceWrapper a {
            color: #fff;

            &:focus,
            &:hover {
                color: #ddd;
                border-color: #ddd;
            }
        }
    }
}

// NEWS CON FOTO GRANDE IN SFONDO (homepage)
.news-big-photo {
    min-height: 40rem;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    .tileBody {
        @include make-row;

        .tile-content {
            max-width: 600px;
            margin: 3% auto 3% 5%;
            background-color: rgba(255, 255, 255, 0.85);
            padding: 2% 3%;
            color: $text-color;
            position: relative;
            border-left: 30px solid $brand-primary;
            font-size: 1.2em;

            h2 {
                margin-top: 0;
                font-size: 1.6em;

                a {
                    color: $text-color;

                    &:focus,
                    &:hover {
                        color: $brand-primary;
                    }
                }
            }

            .news-date-more {
                display: flex;
                justify-content: space-between;

                .show-more {
                    a {
                        font-weight: $semibold;
                        border-bottom: 1px solid $brand-primary;

                        &:focus,
                        &:hover {
                            border-color: $link-hover-color;
                        }
                    }
                }

                .news-date {
                    font-size: 0.9em;
                    color: $gray;
                }
            }
        }
    }
}

h3.tileTitle,
h2.tileTitle,
.collectionItemTitle h3,
.collectionItemTitle h2,
.tileTitle h3,
.tileTitle h2 {
    margin: 0;
}
