/*! HTML5 Boilerplate v6.0.1 | MIT License | https://html5boilerplate.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
    color: white;
    font-size: .9em;
    line-height: 1.4;
}

body {
    background-color: black;
}

p {
    font-family: "canada-type-gibson";
    font-weight: 100;
    max-width: 600px;
    margin: 0;
}

b, strong {
    font-size: 17px;
}

a {
    color: white;
}

.no-underline {
    text-decoration: none;
}

h1, h2, h3, h4, h5 {
    font-weight: normal;
    margin: 0;
}

h1 {
    font-size: 5em;
    font-family: "essonnes-headline";
}

h2 {
    font-size: 2.5em;
    font-family: "essonnes-headline";
    font-weight: 800;
    margin-bottom: 10px;
}

h3 {
    font-size: 1.3em;
    line-height: 1;
    font-family: "essonnes-headline";
    font-weight: 800;
}

h4 {
    font-size: 1em;
    font-family: "essonnes-headline";
}

h5 {
    font-size: .9em;
    font-family: "canada-type-gibson";
    letter-spacing: 1px;
    font-weight: 100;
}

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


/* ==========================================================================
   Author's custom styles
   ========================================================================== */

header {
    position: fixed;
    height: 60px;
    width: 100%;
    top: 0;
    left: 0;
    background-color: black;
    z-index: 10000;
}

#logo {
    height: 40px;
    width: auto;
    margin: 10px 0;
    float: left;
}

#header p, 
#header h3, 
#header h5 {
    line-height: 60px;
}

/* sections */
#main-container {
    overflow-x: hidden;
}

.macro-section {
    position: relative;
}

.viewport-section {
    min-height: calc(100vh - 60px);
    padding: 60px 0 30px 0;
    position: relative;
    display: inline-block;
    width: 100%;
}

.double-section {
    height: calc(200vh - 60px);
    padding: 60px 0 0 0;
    position: relative;
}

.inner-section {
    max-width: 980px;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    position: relative;
}

.section-title {
    position: fixed;
    top: 20px;
    left:0;
    margin: 0 calc(33.3333% + 20px) !important;
    z-index: 1002;
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    transition: all 0.5s ease;
    z-index: 100000;
}

#cover {
    background-color: black;
    position: relative;
    z-index: 999;
}

#cover img {
    height: calc(40vh - 60px);
    padding: 15vh 0 5vh 0;
}

#cover h1 {
    font-size: 10vh;
    line-height: 15vh;
    font-weight: 800;
}

#cover h5 {
    height: 6vh;
    line-height: 10vh;
}

.text-title {
    position: relative;
    margin-bottom: 50px;
}

.text-title:after {
    content:'';
    display: inline-block;
    width: 150px;
    height: 1px;
    background-color: white;
    position: absolute;
    bottom: -25px;
    left: 0;
}

#closing img {
    width: 70%;
}

#closing span {
    font-size: 1.3em;
}

#to-top, #about {
    cursor: pointer;
}

.gray {
    background-color: #333;
    padding: 100px 0;
    width: 100%;
}

.gray img {
    width: 100px;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background-color: black;
    opacity: 1;
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    transition: all 0.5s ease;
    z-index: 1000;
}

.overlay .col-3 {
    float: left;
}

.overlay .button-close {
    position: fixed;
    right: 15px;
    top: 80px;
}

/* images */
.full-background::after {
    content: "";
    background-attachment: fixed;
    background-size: auto 100%;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    position: absolute;
    z-index: -1;
    opacity: 0;
    -webkit-transition: all .5s ease;
    -moz-transition: all .5s ease;
    -o-transition: all .5s ease;
    -ms-transition: all .5s ease;
    transition: all .5s ease;
}

#intro::after {
    background: url('../img/capitoli/intro.jpg') no-repeat right center;
    background-attachment: fixed;
    background-size: 100%;
}

#percorsi-fede::after {
    background: url('../img/capitoli/percorsi-di-fede.jpg') no-repeat center center;
    background-attachment: fixed;
    background-size: 100%;
}

#schema-amore::after {
    background: url('../img/capitoli/schema-amore.jpg') no-repeat center center;
    background-attachment: fixed;
    background-size: 100%;
}

#storie-in-cammino::after {
    background: url('../img/capitoli/storie-in-cammino.jpg') no-repeat center center;
    background-attachment: fixed;
    background-size: 100%;
}

.fade-in-bnd::after {
    opacity: 1 !important;
}

/* grafico */
.grafico {
    height: 100vh !important;
    display: inline-block !important;
    background: url('../img/altro/crescita_gruppi.png') no-repeat center center;
    background-size: contain;
    margin-top: 25px !important;
}


/* slider */
.slider-section, .slider-audio {
    height: calc(100vh - 60px);
    padding-bottom: 150px;
    display: block;
    width: 100%;
}

.slider {
    visibility: hidden;
}

.slider, .slider-video {
    margin: 0 !important;
    padding: 0;
}

.slider, .slider > li,
.slider-video, .slider-video li {
    height: 100%;
}

.slider, .slider > li > img,
.slider-video, .slider-video > li > img {
    width: auto;
    margin: 0 auto;
    max-width: 100%;
}

.bx-wrapper .bx-next {
    right: -40px !important;
    background: url(../img/gallery_ar_right.svg) no-repeat center center !important;
}

.bx-wrapper .bx-prev {
    left: -40px !important;
    background: url(../img/gallery_ar_left.svg) no-repeat center center !important;
}

.no-pager .bx-pager {
    display: none;
}

.no-caption .bx-caption {
    display: none !important;
}


/* video */
.video-section {
    //height: calc(100vh - 60px);
    display: block;
    width: 100%;
}

video {
    width: 100%;
}

.video {
    width: 100%;
    position: absolute;
    top: 0;
    -webkit-transition: all 0.5s ease;
    -moz-transition: all 0.5s ease;
    -o-transition: all 0.5s ease;
    -ms-transition: all 0.5s ease;
    transition: all 0.5s ease;
    opacity: 1;
}

.button-close {
    position: absolute;
    right: -10px;
    width: 15px;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.video-caption {
    position: relative;
    display: inline-block;
    height: initial !important;
    cursor: pointer;
}

.video-caption .uppercase {
    padding-left: 30px;
    margin-top: 10px;
    background: url('../img/btn_play.svg') no-repeat left 0;
    background-size: 14px;
}

/* audio */
audio {
    //display: none;
}

.audio-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
}

.button {
    display: inline-block;
    margin-right: 5px;
    cursor: pointer;
}

.button img {
    width: 32px;
}

/* svg */
div > object {
    width: 130%;
}

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.overflow-block {
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.invisible {
    opacity: 0;
    visibility: hidden;
}

.relative {
    position: relative;
}

.serif {
    font-family: "essonnes-headline";
}

.sans {
    font-family: "canada-type-gibson";
}

.uppercase {
    text-transform: uppercase;
}

/* sizes */

.col-1 {
    width: calc(100% - 40px);
    margin: 0 20px;
    display: inline-block;
    //float: left;
}

.col-2 {
    width: calc(50% - 40px);
    margin: 0 20px;
    display: inline-block;
    float: left;
}

.col-3 {
    width: calc(33.3333% - 43px);
    min-height: 1px;
    margin: 0 20px;
    display: inline-block;
    vertical-align: top;
}

.half {
    width: 50%;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* alignment */

.t-alignright {
    text-align: right;
}

.t-alignleft {
    text-align: left;
}

.t-aligncenter {
    text-align: center;
}

.vertical-center {
    display: table !important;
    height: 100vh;
}

.vertical-center > * {
    display: table-cell;
    vertical-align: middle;
    width: 100%;
}

.floatleft {
    float: left;
}

.floatright {
    float: right;
}

.margincenter {
    margin: 0 auto;
}

.margin10 {
    margin: 0 10px;
}

.margin20 {
    margin: 0 20px;
}

.margin30 {
    margin: 0 30px;
}

.margin-top {
    margin-top: 30px;
}

.margin-top-15 {
    margin-top: 15px;
}

.padding-bottom-60 {
    padding-bottom: 60px;
}


/* color */
.orange {
    color: orangered;
}

.cyan {
    color: deepskyblue;
    margin: 15px 0;
}


/*
 * Remove text-shadow in selection highlight:
 */

::-moz-selection {
    background: transparent;
    text-shadow: none;
}

::selection {
    background: transparent;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap; /* 1 */
}

.smaller {
    font-size: 30px;
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    -webkit-clip-path: none;
    clip-path: none;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
    white-space: inherit;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}


@media only screen and (min-width: 1161px) { 
    .bx-viewport{
        height: 100% !important;
    }
}

@media only screen and (orientation: portrait) {

    .slider-section, .slider-audio {
        display: table;
        width: 100%;
    }

    .slider-section > .inner-section, .slider-audio > .inner-section {
        display: table-cell;
        vertical-align: middle;
    }

    /* makes tablecell center the slider */
    .bx-wrapper{
        height: initial !important;
    }

    .slider, .slider > li, .slider-video, .slider-video li {
        height: initial !important;
    }

    .bx-wrapper img {
        max-height: 50vh !important;
    }

    #intro::after {
        background-size: cover;
    }

    #percorsi-fede::after {
        background-size: cover;
    }

    #schema-amore::after {
        background-size: cover;
    }

    #identita-gender::after {
        background-size: cover;
    }

    audio {
        position: relative;
    }
}

@media only screen and (max-width: 1160px) and (orientation: landscape) {
    .bx-viewport{
        height: inherit !important;
    }
}

@media only screen and (max-width: 1160px) {
    #main-container, .max-width {
        max-width: calc(100% - 100px);
        padding: 0 50px;
        width: 100%;
        overflow: hidden;
    }

    .full-background {
        width: calc(100% + 100px);
        margin: 0 -50px;
        padding: 30px;
    }

    .gray {
        width: calc(100% + 100px);
        margin: 0 -50px;
    }

    .bx-wrapper .bx-next {
        right: -10px !important;
    }

    .bx-wrapper .bx-prev {
        left: -10px !important;
    }

    .bx-wrapper .bx-pager, .bx-wrapper .bx-controls-auto {
        position: static !important; 
    }
}

@media only screen and (max-width: 980px) and (orientation: landscape) {

    .slider-section, .slider-audio {
        display: table;
        width: 100%;
    }

    .bx-wrapper {
        display: table-cell;
        vertical-align: middle;
    }

    .bx-viewport{
        height: inherit !important;
    }

}

@media only screen and (max-width: 768px) {
    header {
        height: 80px;
    }

    header .col-3 {
        width: calc(50% - 40px);
        float: left;
    }


    .viewport-section {
        padding:0;
        padding-top: 80px;
        height: initial;
    }

    .inner-section {
        max-width: 100%;
        width: 100%;
    }

    .full-background > .inner-section {
        margin: 0 50px;
        width: calc(100% - 100px);
    }

    section .col-1, section .col-2, section .col-3 {
        width: 100%;
        margin:0;
        margin-bottom: 50px;
        float: none;
    }

    .overlay {
        overflow-y: scroll;
        overflow-x: hidden;
    }

    .overlay .inner-section {
        padding: 80px 50px;
    }

    .overlay .col-3 {
        width: calc(100% - 100px);
        margin:0;
        margin-bottom: 50px;
        float: none;
    }

    .overlay .vertical-center {
        display: inline-block !important;
        height: initial;
    }

    .header .col-3 {
        width:  calc(33.3333% - 40px);
        float: left;
    }

    .m-initial-height {
        height: initial !important;
        min-height: initial;
    }

    .m-half-height {
        display: inline-block !important;
        height: initial !important;
        text-align: center;
    }

    .m-half-height > * {
        display: initial;
    }

    .m-half-height img {
        height: 50vh !important;
        width: auto !important;
    }

    audio {
        position: relative;
    }

}

@media only screen and (max-width: 736px) and (orientation: landscape) {
    .viewport-section {
        padding: 60px 0;
        height: unset;
        min-height: calc(100vh - 60px);
    }

    .bx-wrapper {
        display: inline-block;
        height: calc(100vh - 120px) !important;
    }

}

@media only screen and (max-width: 450px) {
    .section-title {
        margin: 0 !important;
        top:50px;
        width: 100% !important;
    }
    
    .full-background {
        width: calc(100% + 100px);
        margin: 0 -50px;
    }

    .full-background > .inner-section {
        margin: 0 50px;
        width: calc(100% - 100px);
    }

    .grafico {
        height: 100vh !important;
        display: inline-block !important;
        background: url('../img/altro/crescita_gruppi_mobile.png') no-repeat center center;
        background-size: contain;
    }

    .gray {
        width: 100%;
        margin: 0 -30px;
        padding: 30px;
    }

}


@media print,
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 1.25dppx),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   http://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important; /* Black prints faster:
                                   http://www.sanbeiji.com/archives/953 */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */

    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

    pre {
        white-space: pre-wrap !important;
    }
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    /*
     * Printing Tables:
     * http://css-discuss.incutio.com/wiki/Printing_Tables
     */

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
