@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

:root {
    --padding-container: 100px 0;
    --color-title: #333;
    --color-primary: #333;
    --align-title: left;
    --width-container: 90%;
    --max-width-container: 1200px;
    --color-btn: #444CF7;
    --text-btn: #fff;
    --padding-btn: 20px 35px;
    --height-shape: 18em;
}

* {
    margin: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
}

.container--loader {
    background-color: #333;
    position: fixed;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    transition: all 1.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid white;
    border-top-color: transparent;
    animation: loader 1.2s linear infinite;
}

@keyframes loader {
    to {
        transform: rotate(360deg);
    }
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: var(--padding-container);
}

.hero {
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 800px;
    position: relative;
    display: grid;
    grid-template-rows: 100px 1fr;
    color: #fff;
    margin-bottom: -150px;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(180deg, #0000008c 0%, #0000008c 100%), url('../images/background-course-html-css-js.jpg');
    background-size: cover;
    background-position: bottom;
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 80%, 0 80%);
    z-index: -1;
}

/* Scrollbar */

::-webkit-scrollbar {
    width: 15px;
    background-color: #f0eded;
}

::-webkit-scrollbar-thumb {
    background-color: #a2a2a2;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #aaa;
}

::-webkit-scrollbar-corner {
    background-color: #f5f5f5;
}

/* Nav */

.nav {
    padding: 10px;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav__title {
    font-weight: 300;
    display: inline-block;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.nav__logo:hover .nav__title {
    transform: scale(0.9);
}

.nav__link {
    margin-left: auto;
    padding: 0;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 2em;
}

.nav__items {
    list-style: none;
}

.nav__links {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav__links span {
    display: inline-block;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.nav__links:hover span {
    transform: scale(1.2);
}

.nav__menu {
    margin-left: auto;
    cursor: pointer;
    display: none;
}

.nav__img {
    display: block;
    width: 30px;
}

.nav__close {
    display: var(--show, none);
}

/* Hero container */

.hero__container {
    max-width: 800px;
    --padding-container: 0;
    display: grid;
    grid-auto-rows: max-content;
    align-content: center;
    gap: 1em;
    padding-bottom: 100px;
    text-align: center;
    margin-top: -50px;
}

.hero__title {
    font-size: 3rem;
}

.hero__phrase,
.hero__author {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 2s ease-in-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__phrase {
    margin-top: 5px;
    margin-bottom: 0px;
}

.hero__author {
    font-style: italic;
}

.title {
    font-size: 2.5rem;
    text-align: var(--align-title);
    color: var(--color-title);
}

.cta {
    display: inline-block;
    background-color: #333;
    justify-self: center;
    color: #fff;
    text-decoration: none;
    padding: 13px 30px;
    border-radius: 32px;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.cta:hover {
    transform: scale(0.9);
}

/* about */

.about {
    display: grid;
    grid-template-columns: 5fr 4fr;
    place-items: center;
    margin-bottom: -30px;
}

.about__course {
    width: 90%;
}

.about__paragraph {
    margin: 20px 0;
    line-height: 1.5;
    font-weight: 300;
    text-align: justify;
}

.about__picture {
    text-align: center;
}

.about__img {
    width: 95%;
}

/* Card */

.card {
    background: #ccc;
    margin-bottom: -30px;
}

.card__main {
    margin-top: -40px;
}

.card__copy {
    margin-top: 20px;
}

.card__container {
    width: 99%;
    margin: 0 auto;
    margin-top: 60px;
    margin-bottom: -20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 20px;
    grid-template-areas:
        ".      card1   .    "
        "card2  card1   card3"
        "card2  card4   card3"
        ".      card4   .   ";
}

.card__item {
    padding: 20px;
    background: #fff;
    border-top: 5px solid #363636;
    box-shadow: 0 0 3px rgba(0, 0, 0, .5);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.card__item:hover {
    transform: scale(0.9);
}

.card__img {
    background: #333;
    margin-top: 20px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card__picture {
    width: 35px;
}

.card__picture__special {
    width: 40px;
}

.card__title {
    margin: 20px 0;
    font-size: 1.5rem;
    text-align: center;
}

.card__paragraph {
    font-weight: 300;
    margin-bottom: 20px;
    text-align: center;
}

.card__item:nth-last-of-type(1) {
    grid-area: card1;
}

.card__item:nth-last-of-type(2) {
    grid-area: card2;
}

.card__item:nth-last-of-type(3) {
    grid-area: card3;
}

.card__item:nth-last-of-type(4) {
    grid-area: card4;
}

/* course */

.course {
    --color-title: #fff;
    --color-btn: #fff;
    --text-btn: #444cf7;
    color: var(--color-title);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
}

.course__about {
    z-index: 100;
    align-self: center;
    width: 97%;
    margin: 0 auto;
    padding: 30px;
    box-shadow: 0 0 6px rgba(0, 0, 0, .5);
    background: #333;
    grid-column: 1/4;
    grid-row: 2/-2;
}

.course__picture {
    margin: 0;
    grid-column: 3/-1;
    grid-row: 1/-1;
}

.course__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: opacity 0.5s ease-in-out;
}

.course__img.fade-out {
    opacity: 0;
}

.course__img.fade-in {
    opacity: 1;
}

.course__picture--right {
    grid-column: 1/4;
}

.course__about--left {
    grid-column: 3/-1;
}

.course__paragraph {
    margin-top: 20px;
    line-height: 1.5;
    font-weight: 300;
    text-align: justify;
}

/* syllabus */

.syllabus {
    text-align: center;
    background: #ccc;
    margin-top: -30px;
    margin-bottom: -20px;
}

.syllabus__container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: var(--padding-container);
    margin-top: -20px;
    display: grid;
    gap: 0.3em;
    padding-top: 50px;
    padding-bottom: 100px;
}

.subtitle {
    color: var(--color-title);
    font-size: 2.5rem;
    margin-bottom: 35px;
}

.syllabus__padding {
    padding: 0;
    transition: padding .3s;
    border: 1px solid #333;
    border-radius: 6px;
    background-color: #f2f2f2;
}

.syllabus__padding--add {
    padding-bottom: 30px;
}

.syllabus__answer {
    padding: 0 30px 0;
    overflow: hidden;
}

.syllabus__title {
    text-align: left;
    display: flex;
    font-size: 20px;
    padding: 30px 0 30px;
    cursor: pointer;
    color: var(--color-title);
    justify-content: space-between;
}

.syllabus__arrow {
    border-radius: 50%;
    background-color: var(--color-title);
    width: 25px;
    height: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    margin-left: 10px;
    transition: transform .3s;
}

.syllabus__arrow--rotate {
    transform: rotate(180deg);
}

.syllabus__show {
    text-align: center;
    height: 0;
    transition: height .3s;
}

.syllabus__show p,
.syllabus__show ul {
    text-align: left;
}

.syllabus__img {
    display: block;
}

.syllabus__show .desktop {
    display: block;
}

.syllabus__show .mobile {
    display: none;
}

/* Footer */

.footer {
    background-color: #333;
}

.footer__copy {
    --padding-container: 30px 0;
    text-align: center;
    color: #fff;
}

.footer__copyright {
    font-weight: 300;
}

.footer__icons {
    margin-bottom: 10px;
}

.footer__img {
    width: 30px;
    transform: scale(1);
    transition: transform 0.5s ease;
}

.footer__img:hover {
    transform: scale(1.3);
}

/* Media queries */

@media (max-width:800px) {
    ::-webkit-scrollbar {
        width: 0px;
    }
    
    .nav {
        --padding-container: 0;
    }
    
    :root {
        --height-shape: 14em;
    }

    .hero {
        margin-bottom: -180px;
    }

    .nav__menu {
        display: block;
    }

    .nav__link {
        gap: 1em;
    }

    .nav__link--menu {
        position: fixed;
        background-color: #000;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        z-index: 999;
        opacity: 0;
        pointer-events: none;
        transition: .7s opacity;
    }

    .nav__link--show {
        --show: block;
        opacity: 1;
        pointer-events: unset;
    }

    .nav__close {
        position: absolute;
        top: 30px;
        right: 30px;
        width: 30px;
        cursor: pointer;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    /* About */

    .about {
        grid-template-columns: 1fr;
        grid-template-rows: max-content 1fr;
        gap: 80px;
        margin-bottom: -50px;
    }

    .about__course {
        width: 100%;
    }

    .about__picture {
        order: -1;
    }

    .about__img {
        width: 100%;
    }

    /* Card */

    .card__container {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, 1fr);
        gap: 15px;
        grid-template-areas:
            "card1      ."
            "card1  card2"
            "card3  card2"
            "card3  card4"
            ".      card4";
    }

    /* Course */

    .course {
        grid-template-columns: repeat(6, 1fr);
    }

    .course__about {
        grid-column: 1/6;
    }

    .course__about--left {
        grid-column: 2/-1;
    }

    .course__picture {
        grid-column: 2/-1;
    }

    .course__picture--right {
        grid-column: 1/6;
    }

    .syllabus__show {
        text-align: right;
    }

    .syllabus__copy {
        width: 100%;
    }
}

@media (max-width:600px) {
    :root {
        --padding-btn: 20px 0;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__phrase {
        font-size: 1rem;
    }

    .hero__author {
        font-size: 0.9rem;
    }

    /* About */

    .title {
        font-size: 2rem;
    }

    .about {
        gap: 40px;
        margin-bottom: -50px;
    }

    .about__course {
        width: 100%;
    }

    /* Card */

    .card__container {
        width: 97%;
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
        grid-template-areas:
            "card1"
            "card2"
            "card3"
            "card4";
    }

    /* Course */

    .course {
        grid-template-columns: 1fr;
        --padding-container: 80px 0 30px;
    }

    .course--modifier {
        --padding-container: 0 0 80px;
    }

    .course__about {
        padding: 20px 20px;
        width: 95%;
        grid-column: 1/-1;
        grid-row: 1/-1;
    }

    .course__picture {
        display: none;
    }

    .course__element {
        width: 90%;
    }

    .course__course {
        font-size: 2rem;
    }

    .syllabus {
        margin-top: 20px;
    }

    .syllabus__show {
        text-align: left;
    }

    .subtitle {
        font-size: 1.8rem;
    }

    .syllabus__title {
        padding: 30px 0 25px;
        font-size: 1rem;
    }

    .syllabus__show .desktop {
        display: none;
    }

    .syllabus__show .mobile {
        display: block;
    }
}