/*
Welcome to the style.css file
########################################################################
Contents:
body
#map
#header
#features
#footer
styling for the header
styling for the features
styling for the footer
styling for any popups
styling for various classes used in the storymap
*/

/* The body element is the parent element of all other elements. */
body {
    margin: 0;
    padding: 0;
}

/* The map element is the container for the map. */
#map {
    top: 0;
    width: 100%;
    height: 100vh;
    position: fixed;
}

/* The header will hold the title, byline and an introductory description of the project. */
#header {
    margin: auto;
    min-height: 100vh; 
    width: 100%; 
    position: relative; 
    z-index: 5; /* Ensures the header is always on top of the map */
    padding: 2vh 0vh 5vh 0vh; /* top right bottom left */
    background-color: #fdfbf6;
  }

/* The features element holds all the chapters. */
#features {
    padding-top: 80vh;
    padding-bottom: 10vh;
  }

@media (max-width: 750px) { /* This would be for media with a maximum width of 750px */
    #features {
        width: 80vw;
        margin: 0 auto;
    }
}

/* The footer contains some concluding notes, like attributions to gov.sg */
#footer {
    min-height: 2vh;
    text-align: left;
    line-height: 25px;
    width: 100%;
    position: relative;
    z-index: 5; /* Ensures the footer is always on top of the map */
  }

/* Styling the header. */
#header h1 {
    font-weight: 700;
    text-transform: uppercase;
    font-family: Barlow, serif;
    text-align: left;
    margin: auto;
    max-width: 800px;
}

#header h4 {
    font-family: Barlow, sans-serif;
    font-weight: 300;
    margin-bottom: 0.5em;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    max-width: 800px;
}

#header p.byline {
    font-weight: 300;
    font-size: 0.9em;
    margin: 0.5em auto 0.8em auto;
}

#header p {
    font-family: 'Barlow', sans-serif;
    font-weight: 400;
    text-align: left;
    font-size: 1.2em;
    max-width: 800px;
    margin: 1em auto 1em auto;
}

/* Mobile Styles for header */
@media only screen and (max-width: 800px) {
    #header h1, #header h4, #header p {
        max-width: 80%; /* Full width on small screens */
    }
    
    #header {
        padding: 1vh 1vh 3vh 1vh; /* Adjust padding for smaller screens */
    }
}

/* Styling features. */
#features h3 {
    font-weight: 700;
    text-transform: uppercase;
    font-family: Barlow, serif;
    text-align: left;
    max-width: 65vw;
}

#features p {
    font-family: 'Barlow', sans-serif;
    text-align: left;
    font-size: 1.2em;
    max-width: 65vw;
}

#features .imageCredit {
  font-size: 0.9em;
  margin-top: -5px;
}

/* Styling the footer. */
#footer p {
    font-family: 'Barlow', sans-serif;
    font-size: 1em;
    max-width: 800px;
    padding: 0.75em 0em;
    margin: 0px auto;
  }
  
  a, a:hover, a:visited {
      color: #5f514d;
    }

/* Mobile Styles for footer */
@media only screen and (max-width: 800px) {
    #footer p {
        max-width: 80%; /* Full width on small screens */
    }

    #footer {
        padding: 1vh 1vh 3vh 1vh; /* Adjust padding for smaller screens */
    }
}

/* Styling any popups */
.mapboxgl-popup-content h4 {
    font-weight: 500;
    font-size: 0.9em;
    border-width: 0px 0px 0.5px 0px;
    border-style: solid;
    border-color: rgb(80, 80, 80);
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.mapboxgl-popup-content p {
    font-weight: 300;
    margin-top: 0.3em;
    margin-bottom: 0em;
}

/* This section defines styles for various classes used in the storymap. */
.hidden {
    visibility: hidden;
}

.centered {
    width: 50vw;
    margin: 0 auto;
}

.lefty {
    width: 33vw;
    margin-left: 5vw;
}

.righty {
    width: 33vw;
    margin-left: 62vw;
}

.fully {
    width: 100%;
    margin: auto;
}

.light {
    color: #444;
    background-color: #fbf9f2;
}

.dark {
    color: #fafafa;
    background-color: #444;
}

.step {
    padding-bottom: 50vh;
    opacity: 0.15;
}

.step.active {
    opacity: 0.99;
}

.step div {
    padding: 25px 50px;
    line-height: 25px;
    font-size: 13px;
}

.step img {
    width: 100%;
}

@media (max-width: 750px) {
    .centered, .lefty, .righty, .fully {
        width: 90vw;
        margin: 0 auto;
    }
}

/* This chunk supposedly fixes an issue on mobile browsers where scroll breaks  */
.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan, 
.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas {
touch-action: unset;
}




