/*Remove browser default styles*/

* (@value: none) {
    -webkit-appearance:     @value;
    -moz-appearance:        @value;
    -ms-appearance:         @value;
    -o-appearance:          @value;
    appearance:             @value;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
}

body {
    color: #303030;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
}

header {
    margin-top: 64px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

@media only screen and (max-width: 950px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/*Header desktop*/

@media only screen and (min-width: 951px) {
    div.mobile, .mobile {
        display: none;
    }
    div.desktop {
        z-index: 1;
    }

div.desktop {
    position: fixed;
    top: 0;
    display: flex;
    background-color: white;
    height: 64px;
    width: 100%;
    justify-content: space-between;
}

div.desktop #logo {
    display: flex;
    align-items: center;
    padding-left: 24px;
}

div.desktop #logo p {
    display: inline;
    font-size: 1.2rem;
    text-transform: uppercase;
}

div.desktop #logo-part1 {
    font-weight: 600;
}

div.desktop #logo-part2 {
    color: #D0D0D0;
}

div.desktop nav ul li {
    display: inline;
    text-decoration: none;
    padding-right: 16px;  
}

div.desktop nav ul li a {
    text-decoration: none;
    font-size: 1.5rem;
    color: #303030;
}
}

/*Header mobile*/

@media only screen and (max-width: 950px){
    div.desktop, .desktop {
         display: none;
    }
    div.mobile {
        z-index: 1;
    }

    .sections-right-learn {
        padding-right: 32px;
    }
}  
    div.mobile {
        position: fixed;
        top: 0;
        background-color: white;
        height: 64px;
        width: 100%;
        display: flex;
    }

    div.mobile nav {
        width: 100%;
    }

    div.mobile nav ul {
    display: flex;
    justify-content: space-around;
    }

    div.mobile nav ul li {
        display: inline;
        text-decoration: none; 
    }

/*Common elements for different sections*/

.sections {
    display: flex;
    padding: 32px 24px;
}

@media only screen and (max-width: 950px) {
    .sections {
        flex-wrap: wrap;
        padding: 0;
        margin-bottom: 32px;
    }
}


/*First section: Learn something new*/

/*sections-left and right initially shared with other sections, update names?*/
.sections-left-learn {
    flex: 2 1 60%;
    padding-right: 24px;
}

.sections-left-learn img {
    width: 100%;
}

@media only screen and (max-width: 950px){
    .sections-left-learn {
        padding-right: 0;
    }

    .sections-right-learn {
        margin-left: 32px;
        padding-bottom: 32px;

    }

    button {
        background-color: #303030;
        
    }
}

.sections-right-learn {
    flex: 1 2 40%;
}

button {
    background-color: #303030;
    padding: 16px 80px;
    width: 100%;
    margin-top: 1.6rem;
}

button a {
    color: whitesmoke;
    font-size: 1.5rem;
    text-decoration: none;
}

button:hover {
    background-color: #D0D0D0;
    color: #303030;
}

#first-section {
    background-color: #D0D0D0;
    align-items: center;
}

/*Second section: Keep practicing*/

.sections-left {
    flex: 2 1 60%;
    padding-right: 24px;
}

.sections-left img {
    width: 100%;
}

.sections-right {
    flex: 1 2 40%;
}

.blue a {
    color: #0096FF;
    text-decoration: none;
}

@media only screen and (min-width: 951px){

    .sections-right div.our-sub-section:nth-child(2) {
    border-top: 5px double #D0D0D0;
    }

    .sections-right div:nth-child(3) {
    background-color: #D0D0D0;
    }

    div.sections-right {
    border-left: 2px solid #D0D0D0;
    }
}

#orientation {
    padding-top: 0;
}

.our-sub-section {
    display: flex;
    padding: 16px;
    align-items: flex-start; 
}

.our-sub-section-text {
    flex-basis: 65%;
    margin-left: 45px;
}

@media only screen and (max-width: 950px) {
    
    /*Hide on mobile display*/
    #second-section .sections-left {
        display: none;
    }

    .our-sub-section {
        display: block; /*For mobile, if I change to display: block (instead of flex) it works, but I don't understand why*/
        padding: 0;
        margin: 0 16px 44px 16px;
    }

    .our-sub-section div, .our-sub-section div img {
        width: 100%;
    }

    .our-sub-section-text {
        margin-left: 16px;
    }

    /*Make margin smaller between "Our guest lecture" and "Start learning"*/
    .our-sub-section:nth-child(3) {
        margin-bottom: 0;
    }
}

/*Third section: Start learning*/

#third-section {
    background-color: #f0f0f0;
    display: flex;
    flex-flow: row wrap;
}

#third-section h1 {
    text-align: center;
    width: 100%;
}

#courses {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    margin: 0 72px;
}

/*To adjust number of flex-items per row: 3 per row*/

@media only screen and (min-width: 1537px) {
    .course-square {
        flex-basis: 25%;
    }  
}

@media only screen and (min-width: 1024px) and (max-width: 1536px) {
    .course-square {
        flex-basis: 40%;
    }  
}

.course-square {
    background-color: white;
    margin-bottom: 32px;
    margin-right: 32px;
}

.course-square img {
    width: 100%;
}

.course-square div {
    padding: 16px 16px;
}

/*Mobile*/

/*Show only h2's as links*/

@media only screen and (max-width: 950px){
    .course-square img, .course-square div p {
        display: none;
    }

    #third-section {
    background-color: white;
    border-top: solid 1px #D0D0D0;
    padding-top: 32px
    }

/*Display "courses" column*/
    #courses {
        display: flex;
        flex-flow: column;
        justify-content: flex-start;
        margin: 0;
        width: 100%;
    }

    .course-square {
        background-color: #f0f0f0;
        margin: 0 16px 8px 16px;
        padding-left: 16px;
    }

    #third-section h1 {
        width: 100%;
        margin-top: 0;
    }
}

/*Fourth section: Thesis exhibit*/

#fourth-section h1 {
    text-align: center;
}

#fourth-section {
    flex-direction: column;
}

.thesis-container {
    display: flex;
    flex-direction: row;
}

.sections-left-video {
    flex-basis: 60%;
    padding-right: 24px;
}

video {
    width: 100%;
}

.sections-right-video {
    flex-basis: 40%;     
}

#fisma {
    background-color: #f0f0f0;
}

.sub-section-thesis {
    display: flex;
    padding: 16px;
    align-items: flex-start;
}

.sub-section-thesis-text {
    flex-basis: 65%;
    margin-left: 45px;
}

/*Mobile*/

@media only screen and (max-width: 950px) {

    #fourth-section {
        border-top: solid 1px #D0D0D0;
        padding-top: 32px;
    }
    
    .thesis-container {
        flex-direction: column;
    }

    #fourth-section h1 {
        margin-top: 0;
    }

    .sections-right-video {
        display: none;
    }

    .sections-left-video h2, .sections-left-video p {
        display: none;
    }

    .sections-left-video {
        padding-right: 0;
    }
}

/**Footer**/

footer {
    border-top: 2px solid #D0D0D0;
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
}

footer p {
    padding-left: 24px;
}

footer ul li {
    text-decoration: none;
    display: inline;
    padding: 0 24px 0 0;
}

footer ul li a {
    text-decoration: none;
}

@media only screen and (max-width: 950px) {
    footer {
        border: none;
    }
    
    footer ul {
        display: none;
    }

    footer p {
        margin-top: 0;
    }
}
