* {
    padding: 0;
    margin: 0;
    outline: 0;
    font-family: 'Poppins', sans-serif;
}

:root {
    --black: #212121;
    --blue: #19b2fc;
    --blueOpacity: #19b0fcc4;
    --white: #fff;
    --offWhite: #f6f6f6;
    --gray: #b4b4b4;
}

body {
    background-color: var(--offWhite);
}

a {
    transition: 0.3s all ease-in-out;
}

.container {
    width: 90%;
    max-width: 90%;
    margin: 0 auto;
}




/* Header */ 

header {
    background-color: var(--white);
    padding: 10px 0;
    box-shadow: 0 1px 3px 0 var(--gray);
    position: sticky;
    top: 0;
    z-index: 500;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header a#logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--black);
    text-decoration: none;
    font-size: 28px;
}

header a#logo span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--blue);
}

header nav#mainMenu {
    display: flex;
    gap: 40px;
}

header nav#mainMenu a {
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    color: var(--black);
    position: relative;
    padding: 5px;
}

header nav#mainMenu a::before {
    position: absolute;
    content: '';
    height: 2px;
    width: 0;
    bottom: 0;
    left: 50%;
    background-color: var(--blue);
    transition: 0.3s all ease-in-out;
}

header nav i {

padding-right: 10px;
}

header nav#mainMenu a.active,
header nav#mainMenu a:hover {
    color: var(--blue);
}

header nav#mainMenu a.active::before,
header nav#mainMenu a:hover::before {
    width: 100%;
    left: 0;
}

header nav#iconMenu  {
    display: flex;
    gap: 15px;
}

header nav#iconMenu a {
    text-decoration: none;
    background-color: var(--blue);
    width: 40px;
    height: 40px;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

header nav#iconMenu a svg {
    width: 25px;
    height: 25px;
}

header nav#iconMenu a svg path {
    fill: var(--white);
    transition: 0.3s all ease-in-out;
}

header nav#iconMenu a svg circle,
header nav#iconMenu a svg line {
    stroke: var(--white);
    transition: 0.3s all ease-in-out;
}

header nav#iconMenu a:hover svg path {
    fill: var(--black);
}

header nav#iconMenu a:hover svg circle,
header nav#iconMenu a:hover svg line {
    stroke: var(--black);
}

/* Header End */


/* Banner */

section#banner {
    background-color: var(--white);
    margin-top: 0px;
    margin-bottom: 20px;

}

section#banner .container {
    padding: 200px 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    
}

section#banner aside,
section#banner img {
    width: 50%;
    margin-top: 30px;
    margin-bottom: 20px;

}

section#banner aside h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 40px;
    font-weight: 600;
    color: var(--black);
}

section#banner aside h1 span {
    font-family: 'Montserrat', sans-serif;
    font-size: 40px;
    font-weight: 600;
    color: var(--blue);
}

section#banner aside p {
    font-size: 16px;
    font-weight: 400;
    color: var(--black);
    margin: 20px 0;
}

/* Banner End */


/* Search Bar */

form#searchBar {
    position: relative;
    width: 50px;
    transition: 0.3s all ease-in-out;
}

form#searchBar.active {
    width: 100%;
}

form#searchBar::before {
    position: absolute;
    content: attr(data-info);
    left: 120%;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    font-weight: 500;
    color: var(--blue);
    overflow: hidden;
    transition: 0.2s all ease-in-out;
    white-space: nowrap;
}

form#searchBar.active::before {
    width: 0;
}

form#searchBar input[type=text] {
    font-size: 16px;
    padding: 6px;
    border-radius: 25px 0 0 25px;
    transition: 0.3s all ease-in-out;
    border: transparent solid 2px;
    width: 0;
}

form#searchBar.active input[type=text] {
    width: calc(100% - 60px);
    padding: 6px 12px;
    border-color: var(--blue);
}

form#searchBar button[type=button] {
    position: absolute;
    width: 50px;
    height: 50px;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    border-radius: 500%;
    background-color: var(--blue);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

form#searchBar button[type=button] svg {
    width: 30px;
    height: 30px;
    transition: 0.3s all ease;
}

form#searchBar.active button[type=button] svg.search,
form#searchBar button[type=button] svg.close {
    width: 0;
    height: 0;
    opacity: 0;
    visibility: hidden;
}

form#searchBar button[type=button] svg.search,
form#searchBar.active button[type=button] svg.close {
    width: 30px;
    height: 30px;
    opacity: 1;
    visibility: visible;
}

/* Search Bar End */

/* Latest Courses */

section#latestCourses {
    padding: 40px;   /* กำหนดความสูง ความห่างของ การ์ดหน่วยการเรียนรู้ */
}


section#teachers h2,
section#latestCourses h2 {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: var(--black);
}

section#teachers h2 span,
section#latestCourses h2 span {
    font-family: 'Montserrat', sans-serif;
    color: var(--blue);
}

section#latestCourses .flexRow {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
}

@media(max-width: 996px) {
    section#latestCourses .flexRow {
        flex-flow: wrap;
        gap: 20px;
    }
}

@media(max-width: 768px) {
    section#latestCourses .flexRow {
        flex-flow: column;
        align-items: center;
        gap: 20px;
    }
}




/* Latest Courses video*/

section#latestCourses-video {


    width: 100%;
    padding: 50px;   /* กำหนดความสูง ความห่างของ video*/
    margin-left: -40px;
    margin-right: 20px;
}


section#latestCourses-video h2,
section#latestCourses-video h2 {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: var(--black);
}

section#latestCourses-video h2 span,
section#latestCourses-video h2 span {
    font-family: 'Montserrat', sans-serif;
    color: var(--blue);
}

section#latestCourses-video .flexRow {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
}

@media(max-width: 996px) {
    section#latestCourses-video .flexRow {
        flex-flow: wrap;
        gap: 20px;
    }
}

@media(max-width: 768px) {
    section#latestCourses-video .flexRow {
        flex-flow: column;
        align-items: center;
        gap: 20px;
    }
}


/*สิ้นสุดการกำหนด section video*/



section#latestCourses .flexRow aside {
    width: calc((100% - 30px) / 4);
    height: 250px;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-flow: column;
    gap: 30px;
    border-radius: 5px;
    transition: 0.4s all ease-in-out;
    perspective: 600px;
    box-shadow: 0 2px 15px 0 rgba(0,0,0,0.3);
}

@media(max-width: 996px) {
    section#latestCourses .flexRow aside {
        width: calc((100% - 20px) / 2);
    }
}

@media(max-width: 768px) {
    section#latestCourses .flexRow aside {
        width: 100%;
        max-width: 350px;
    }
}

section#latestCourses .flexRow aside img {
    width: 100px;
}

section#latestCourses .flexRow aside h3 {
    color: var(--black);
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
}

section#latestCourses .flexRow aside .info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 15px;
    border-radius: 5px;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-flow: column;
    opacity: 0;
    visibility: hidden;
    transition: 0.4s all ease-in-out;
    transform-origin: left center;
    transform: rotateY(-90deg);
}

section#latestCourses .flexRow aside:hover .info {
    opacity: 1;
    visibility: visible;
    transform: rotateY(0deg);
}

section#latestCourses .flexRow aside .info p {
    font-size: 15px;
    color: var(--black);
}

section#latestCourses .flexRow aside .info a {
    font-size: 14px;
    background-color: var(--blue);
    color: var(--white);
    text-decoration: none;
    padding: 5px 15px;
    border-radius: 5px;
}

/* Latest Courses End */

/* Featured Teachers */

section#teachers {
    padding: 80px 0;
    background-color: var(--white);
}

section#teachers .flexBox {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
}

@media (max-width: 996px) {
    section#teachers .flexBox {
        flex-flow: wrap;
    }
}

@media (max-width: 576px) {
    section#teachers .flexBox {
        flex-flow: column;
        align-items: center;
    }
}

section#teachers .teacher {
    width: 200px;
    height: 200px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 100%;
    position: relative;
}

section#teachers .teacher1 {
    background-image: url('../images/st1.png');
}

section#teachers .teacher2 {
    background-image: url('../images/st2.png');
}

section#teachers .teacher3 {
    background-image: url('../images/st3.png');
}

section#teachers .teacher4 {
    background-image: url('../images/st4.jpg');
}

section#teachers .teacher::before {
    position: absolute;
    content: attr(data-name);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--blueOpacity);
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 300;
    letter-spacing: 3px;
    transform: rotate(360deg) translate(-20%, 40%) scale(0.3);
    transition: 0.2s letter-spacing ease-in-out,
                0.6s transform ease-in-out;
}

section#teachers .teacher:hover::before {
    transform: rotate(0deg) translate(0%) scale(1);
    letter-spacing: 8px;
    transition: 0.6s letter-spacing ease-in-out 0.4s,
                0.6s transform ease-in-out;
}

section#teachers .teacher::after {
    position: absolute;
    content: attr(data-field);
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: 500;
    opacity: 0;
    transition: 0.2s all ease-in-out 0s;
}

section#teachers .teacher:hover::after {
    opacity: 1;
    transition: 0.5s all ease-in-out 0.5s;
}

/* Featured Teachers End */

/* Enroll */
section#enroll {
    background-color: var(--gray);
    padding: 50px 0;
}

section#enroll .flexRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

section#enroll article {
    width: 50%;
}

section#enroll article h2 {
    font-size: 35px;
    color: var(--white);
    margin-bottom: 10px;
}

section#enroll article h2 span {
    color: var(--black);
}

section#enroll article p {
    color: var(--offWhite);
    font-weight: 500;
}

section#enroll aside {
    width: 40%;
    border-radius: 20px;
    background-color: var(--white);
}

section#enroll aside form {
    padding: 30px;
}

section#enroll aside form h2 {
    font-size: 30px;
    color: var(--black);
    text-align: center;
    margin-bottom: 10px;
    font-size: 30px;
}

section#enroll aside form input[type=text],
section#enroll aside form input[type=email],
section#enroll aside form input[type=tel],
section#enroll aside form select {
    width: calc(100% - 18px);
    background-color: var(--white);
    border: var(--gray) solid 1px;
    padding: 8px;
    margin: 6px 0;
    border-radius: 5px;
}

section#enroll aside form input[type=text]:focus,
section#enroll aside form input[type=email]:focus,
section#enroll aside form input[type=tel]:focus,
section#enroll aside form select:focus {
    border-color: var(--blue);
}

section#enroll aside form select {
    width: 100%;
}

section#enroll aside form button[type=submit] {
    margin-top: 10px;
    width: 100%;
    padding: 8px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--white);
    background-color: var(--blue);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s all ease-in-out;
}

section#enroll aside form button[type=submit]:hover {
    background-color: var(--black);
}

@media (max-width: 768px) {
    section#enroll .flexRow {
        flex-flow: column;
    }

    section#enroll article {
        width: 100%;
    }

    section#enroll aside {
        width: 100%;
        max-width: 500px;
        margin-top: 50px;
    }
}

/* End Enroll */

/* Footer */

footer {
    background-color: var(--black);
    padding: 20px 0;
    font-size: 14px;
    color: var(--gray);
}

footer .flexRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 596px) {

    footer .flexRow {
        flex-flow: column;
        gap: 10px;
    }
}

footer nav a {
    margin-left: 10px;
}

footer nav a svg {
    width: 20px;
    height: 20px;
}

footer nav a svg path,
footer nav a svg circle {
    fill: var(--white);
    transition: 0.3s all ease-in-out;
}

footer nav a:hover svg path,
footer nav a:hover svg circle {
    fill: var(--blue);
}

/* End Footer */