/* GENERAL CSS PROPERTIES */

* {  
    margin: 0;
    padding: 0;
    font-family: "Roboto", sans-serif;
}

h1 {
    font-size: 36px;
    font-weight: 600;
}

 p {
    color: #777;
    font-size: 14px;
    font-weight: 300;
    line-height: 22px;
    padding: 10px;
}

h3 {
    text-align: center;
    font-weight: 600;
    margin: 10px 0;
}


/* HEADER STYLING SECTION */

.header {
    min-height: 100vh; /* section element (with class header) will stretch to fill whole screen, even with no content inside */
                       /* min-height allows the section to grow taller to fit all content, making you have to scroll up and down */
    width: 100%; /* section element (with class header) will stretch to fill the available width of its parent container */

                                                                            /*  "../" means go outside of the style folder to access the img folder then the png */
    background-image: linear-gradient(rgba(4,9,30,0.7), rgba(4,9,30,0.7)), url(../imgs/banner.png); /* background-image sets the background of an element (can be image or a gradient) */
                                                                                                     /* linear-gradient goes from top to bottom and takes two color values in, since same color rgba, color displayed will be the same */
    background-position: center; /* background-position controls where the background image is placed inside its container */
                                 /* "center" positions bg image to center of its container */
    background-size: cover; /* background-size controls how the background image scales to fill the container */
                            /* "cover" makes background image fill container completely, cropping if needed */
    position: relative;        
}           

nav {
    display: flex;
    padding: 2% 6%; /* padding relative to parent container's width */
    justify-content: space-between;
    align-items: center;
}


nav a img {
    width: 150px;
}

.nav-links {
    flex: 1;
    text-align: right; /* text will be on the right side */
}

/* targets the li element inside ul insude .nav-links */
.nav-links ul li {
    list-style: none; /* removes the bullet points that coome from the unordered list element */
    display: inline-block; /* list items are now in a horizontal direction */
    padding: 8px 12px;
    position: relative;
}

.nav-links ul li a {
    color: white;
    text-decoration: none;
    font-size: 13px;
}
/* :__ one colon is a pseudo-code 
    :__ two colons is a pseudo-element */
.nav-links ul li::after { /* pseudo-elemnt ::after creates a virtual element that is inserted just after the content inside a selected element.
                          This element doesn't exist in HTML, but can style it with CSS like normal elements */
    content: ''; /* required for ::after to show up, creates an empty element (no text) */
    width: 0%; /* pseudo-element will be as wide as the <li> (100% width) & 2 px tall */
    height: 2px;
    background-color: #f44336;
    display: block; /* pseudo-element will behave like a block, so it fills up full width of its container, the <li> */
    margin: auto; /* centers the element horizontally inside the <li> */
    transition: 0.5s;
}

.nav-links ul li:hover::after{
    width: 100%;
}


.text-box {
    width: 90%;
    color: white;
    position: absolute;
    /* trick to centering an element on the screen or inside a parent */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);/* transform: translate moves an element relative to its own size, not parent. 
    Pulls the element left by 50% of its width and up by 50% of its height, so the box itself is centered. */

    text-align: center;
}

.text-box h1 {
    font-size: 62px;
}

.text-box p {
    margin: 10px 0 30px;
    font-size: 14px;
    color: white;
}

.hero-btn {
    display: inline-block;
    text-decoration: none;
    color: white;
    border: 1px solid white;
    padding: 12px 34px;
    font-size: 13px;
    background-color: transparent; /*makes bg of an element invisible, so element is see through - no bg color, no bg image */
    position: relative;
    cursor: pointer;
    transition: 1s; /* would change ALL the animatable properties in the :hover */
}

.hero-btn:hover {
    border: 1px solid #f44336;
    background: #f44336;
}

nav .fa {
    display: none; /* icon will be hiden for the larger screen devices */
}

@media(max-width: 700px){
    .text-box h1 {
        font-size: 20px;
    }

    .nav-links ul li {
        display: block;
    }

    .nav-links {
        position: fixed; /* in small screen size, if scroll to the right, can see the menu so to fix this change 
        position: relative to position: fixed. This makes the menu position relative to the viewport (broswer window) and we can hide this using the right: -200px in this case*/
        background-color: #f44336;
        height: 100vh;
        width: 200px;
        top: 0;
        right: -200px; /* menu is hidden in smaller screen, so when click on menu icon will bring up */
        text-align: left;
        z-index: 2; 
        transition: 1s; /* transitions the opening/closing of menu */
    }

    nav .fa {
        display: block;
        color: white;
        margin: 10px;
        font-size: 22px;
        cursor: pointer;
    }

    .nav-links ul {
        padding: 30px;
    }
}


/* COURSE STYLING SECTION */

.course {
    width: 80%; 
    text-align: center;
    margin: auto; /* needs a defined width to use margin: auto (note: margin:auto does nothing when width is 100% or display: block) */
    padding-top: 100px;
}

.row {
    margin-top: 5%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.course-col {
    flex-basis: 31%; /* flex-basis defines the initial size of a flex item before any extra spacee is distributed.
    This makes the flex item take up 31% of the container's width (or height depending on direction of flex), before adjusting for space (the justify-content: space-between applied to the .row) */
    background-color: #fff3f3;
    border-radius: 10px;
    margin-bottom: 5%;
    padding: 20px 12px;
    box-sizing: border-box; /* the padding is factored into the flex-basis: 31%, and won't cause overflow.
    The original box-sizing property is content-box so only content is calculated into flex-basis: 31%, but with border-box, it includes the padding */ 
    transition: 0.5s;
}

.course-col:hover {
    box-shadow: 0 0 20px 0px rgba(0,0,0,0.2); /*the 4th value in box-shadow is the spread radius: how much the shadow expands or contracts before the blur is applied (the 3rd value in box-shaodw) */
}

@media(max-width: 700px){
    .row{
        flex-direction: column;
    }
}

/* CAMPUS SECTION STYLING */

.campus {
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 50px;
}

.campus-col {
    flex-basis: 32%;
    border-radius: 10px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden; /* this allows the border-radius: 10px to work */
}

.campus-col img {
    width: 100%; /* img will shrink, in this case, to fit the container of the div that's set to flex-basis: 32% as size */
    display: block; /*img are display: inline-block, so they have a bit of added space below. This removes it so the layer styling looks better (will reach the bottom space that the layer red bg covers) */
}

.layer {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    transition: 0.5s;
}

.layer:hover {
    background-color: rgba(226,0,0,0.7);
}

.layer h3{
    width: 100%;
    font-weight: 500;
    color: white;
    font-size: 26px;
    position: absolute;
    bottom: 0;
    opacity: 0;
    transition: 0.5s;
}
.layer:hover h3{
    bottom: 50%;
    opacity: 1;
}

/* FACILITIES SECTION */

.facilities {
    width: 80%;
    margin: auto;
    text-align: center;
    padding-top: 100px;
}

.facilities-col {
    flex-basis: 31%;
    border-radius: 10px;
    margin-bottom: 5%;
    text-align: left;
}

.facilities-col img {
    width: 100%;
    border-radius: 10px;
}

.facilities-col h3 {
    margin-top: 16px;
    margin-bottom: 15px;
    text-align: left;

}

.facilities-col p {
    padding: 0;
}

 /* TESTIMONIALS SECTION */

.testimonials {
    width: 80%;
    margin: auto;
    padding-top: 100px;
    text-align: center;
 }

.testimonial-col {
    flex-basis: 44%; /* only two columns (than previously three) so flex-basis is bigger */
    border-radius: 10px;
    margin-bottom: 5%;
    text-align: left;
    background: #fff3f3;
    padding: 25px;
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
 }

.testimonial-col img {
    height: 40px;
    margin-left: 5px;
    margin-right: 30px;
    border-radius: 50%;
 }

.testimonial-col p {
    padding: 0;
}

.testimonial-col h3 {
    margin-top: 15px;
    text-align: left;
}

.testimonial-col .fa {
    color: #f44336;
}

@media(max-width: 700px) {
    .testimonial-col img {
        margin-left: 0px;
        margin-right: 15px;
     }
}

/* CALL TO ACTION SECTION STYLING */

.cta {
    width: 80%;
    margin: 100px auto;
    background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url(../imgs/banner2.jpg);
    background-position: center;
    background-size: cover;
    border-radius: 10px;
    text-align: center;
    padding: 100px 0;
}

.cta h1 {
    color: white;
    margin-bottom: 40px;
}

@media(max-width: 700px) {
    .cta h1 {
        font-size: 24px;
    }
}

/* FOOTER SECTION STYLING */

.footer {
    width: 80%;
    margin: auto;
    text-align: center;
    padding: 30px 0;
}

.footer h4 {
    margin-bottom: 25px;
    margin-top: 20px;
    font-weight: 600;
}

.icons .fa {
    color: #f44336;
    margin: 0 13px;
    cursor: pointer;
    padding: 18px 0;
}

.fa-heart-o {
    color: #f44336;
}






