/* ------------------- */
/* Reset               */
/* ------------------- */

/* Box sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Reset margins */
body,
h1,
h2,
h3,
h4,
h5,
p,
figure,
picture {
    margin: 0; 
}

/* set up the body */
body {
    line-height: 1.5;
    min-height: 100vh;
}

/* make images easier to work with */
img,
picture {
    max-width: 100%;
    display: block;
}

/* make form elements easier to work with */
input,
button,
textarea,
select {
    font: inherit;
}

/* remove animations for people who've turned them off */
@media (prefers-reduced-motion: reduce) {  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ----------------------------- */
/* Variables and Utility Classes */
/* ----------------------------- */

:root {
    --box-bg: hsl(270, 64%, 38%);
    --clr-primary-dark: #552084;
    --clr-primary-light: #9333FF;
    --clr-secondary-dark: #D1C3FF;
    --clr-secondary-light: #DEDAFF;
    --clr-red: #FF3366;
    --clr-red-dim: #C63333;
    --clr-blue: #0093FF;
    --clr-blue-dim: #0066C6;
    --clr-green: #33C696;
    --clr-green-dim: #339366;
    --clr-orange: #FF9333;
    --clr-orange-dim: #C66633;
}

/* Background colors */
.bg-primary-dark {background-color: var(--clr-primary-dark);}
.bg-primary-light {background-color: var(--clr-primary-light);}
.bg-secondary-dark {background-color: var(--clr-secondary-dark);}
.bg-secondary-light {background-color: var(--clr-secondary-light);}
.bg-red {background-color: var(--clr-red);}
.bg-blue {background-color: var(--clr-blue);}
.bg-green {background-color: var(--clr-green);}
.bg-orange {background-color: var(--clr-orange);}
.bg-red-dim {background-color: var(--clr-red-dim);}
.bg-blue-dim {background-color: var(--clr-blue-dim);}
.bg-green-dim {background-color: var(--clr-green-dim);}
.bg-orange-dim {background-color: var(--clr-orange-dim);}
.bg-white {background-color: #FFFFFF;}

/* Font-colors */
.text-primary-dark {color: var(--clr-primary-dark);}
.text-primary-light {color: var(--clr-primary-light);}
.text-secondary-dark {color: var(--clr-secondary-dark);}
.text-secondary-light {color: var(--clr-secondary-light);}
.text-red {color: var(--clr-red);}
.text-blue {color: var(--clr-blue);}
.text-green {color: var(--clr-green);}
.text-orange {color: var(--clr-orange);}
.text-red-dim {color: var(--clr-red-dim);}
.text-blue-dim {color: var(--clr-blue-dim);}
.text-green-dim {color: var(--clr-green-dim);}
.text-orange-dim {color: var(--clr-orange-dim);}
.text-white {color: #FFFFFF;}

/* Font Sizes */
/* These are experimental at the moment, cannot predict the values before production */
.fs-100 {font-size: 1.2rem;}
.fs-200 {font-size: 1.5rem;}
.fs-300 {font-size: 2rem;}
.fs-400 {font-size: 3rem;}
.fs-500 {font-size: 4rem;}
.fs-600 {font-size: 5rem;}
.fs-700 {font-size: 6rem;}
.fs-800 {font-size: 7rem;}

/* Responsive Font Sizes (TO BE MERGED) */
.fs-100 {font-size: clamp(0.8rem, 3.5vw, 1.2rem);}
.fs-200 {font-size: clamp(0.8rem, 3.8vw, 1.5rem);}
.fs-300 {font-size: clamp(1rem, 4vw, 2rem);}
.fs-400 {font-size: clamp(0.8rem, 6vw, 3rem);}
.fs-500 {font-size: clamp(1rem, 6.5vw, 4rem);}
.fs-600 {font-size: clamp(1rem, 7.5vw, 5rem);}

/* Fonts */
.ff-noto-sans-arabic {
    font-family: "Noto Sans Arabic", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    font-variation-settings: "wdth" 100;
}

.ff-tajawal {
    font-family: "Tajawal", sans-serif;
    /* font-weight: 400; */
    font-style: normal;
}

/* .drop-shadow {
    filter: drop-shadow(0 2rem 6rem hsl(0, 0%, 20%));
} */

.button {
    border-radius: 1rem;
    padding: .5rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
}

.active-tab {
    border-bottom: 3px solid var(--clr-primary-light);
    padding-bottom: .2rem;
}

/* ------------------- */
/* Styles              */
/* ------------------- */

html {
    scroll-behavior: smooth;
}

body {
    text-align: right;
}

.collar {
    height: .5rem;
    display: flex;
    background-color: white;
}

.collar > div {
    flex: 1;
}

/* ------------------- */
/* Navbar Navigation   */
/* ------------------- */

nav.nav-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem 1rem;
}

.nav-bar img {
    width: 3.8rem;
}

.nav-bar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-bar ul li a {
    text-decoration: none;
    /* Had to insert this here since anchor tags don't inherit colors from the parent elements */
    color: white;
    font-weight: 600;
}

.nav-bar ul li a:not(.shadow-cta):not(.active-tab) {
    border-radius: 1rem;
    padding: .2rem .6rem;
}

.shadow-cta {
    border: 3px solid var(--clr-primary-light);
}

/* Fixing حمل التطبيق is larger than انضم إلينا */
body.homepage .shadow-cta {
    padding-inline: .5rem;
}

.nav-bar .main-logo {
    cursor: pointer;
}

/* ---------------------- */
/* Changing the ScrollBar */
/* ---------------------- */

html::-webkit-scrollbar,.news::-webkit-scrollbar{
    width: 10px;
}

html::-webkit-scrollbar-thumb,.news::-webkit-scrollbar-thumb{
    background-color: var(--clr-primary-light);
}

html::-webkit-scrollbar-thumb:hover,.news::-webkit-scrollbar-thumb:hover{
    background-color: var(--clr-orange);
}

html::-webkit-scrollbar-track,.news::-webkit-scrollbar-track{
    background-color: var(--clr-primary-dark);
}

html::-webkit-scrollbar-track,.news::-webkit-scrollbar-track:hover{
    background-color: var(--clr-primary-dark);
}

/* ------------------- */
/* Hero Header         */
/* ------------------- */

.hero-header {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    align-items: center;
    padding: 6rem;
    padding-top: 3rem;
}

/* .hero-header > * {
    flex: 1;
    border: solid 2px red;
} */

/* .hero-header > picture {
    border: 2px solid red;
    width: 50%;
    width: clamp(10rem, 100%, 30rem);
} */

body.homepage .hero-header > picture {
    width: clamp(10rem, 60vw, 20rem);
    transform: rotate(-15deg);
}

.hero-header > div > * {
    margin-bottom: 1rem;
}

.hero-header > div > p {
    margin-bottom: 2rem;
}

/* ------------------- */
/* General Benefits    */
/* ------------------- */

.general-benefits {
    background: linear-gradient(transparent 0%, var(--clr-primary-dark) 20%, var(--clr-primary-dark) 100%);
    /* padding: 10rem; */
    padding-bottom: clamp(4rem, 20vw, 10rem);
    padding-top: 14rem;
}

.general-benefits img {
    margin: auto;
    width: 90vw;
}

/* ------------------- */
/* Features            */
/* ------------------- */

.feature {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    align-items: center;
    padding: 3rem;
    padding-top: 10rem;
}

.feature:first-of-type {
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
}

.feature:last-of-type {
    padding-bottom: 10rem;
}

.feature > * {
    padding: clamp(1rem, 3vw, 3rem);
}

.feature > div > * {
    margin-bottom: 1rem;
}

/* ------------------------------ */
/* FAQ Frequently Asked Questions */
/* ------------------------------ */

/* .faq {
} */

.faq-border-radius-wrapper {
    border-top-left-radius: 2rem;
    border-top-right-radius: 2rem;
    padding: 6rem 0;
}

/* .faq * {
    border: 1px solid red;
} */

.faq h1 {
    text-align: center;
    margin-bottom: 1rem;
}

.questions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
}

.question {
    width: 80vw;
    max-width: 60rem;
    border-radius: 1rem;
    /* margin-inline: auto; */
    /* margin-block: 1rem; */
    cursor: pointer;
}

.question .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    border-radius: 1rem;
    font-weight: 600;
}

.question .title > div {
    display: flex;
    justify-content: end;
    align-items: center;
    gap: 1rem;
}

.question .title img {
    width: 1.5rem;
}

.question .content {
    overflow: hidden;
    padding: 0;
    max-height: 0;
    transition: all 300ms ease-in-out;
    padding-inline: 1rem;
}

.question .accordion-arrow-down {
    transition: transform 200ms ease-in-out;
    margin-right: 0.5rem;
}

.expanded-question .content {
    padding-block: 1rem;
    max-height: 100rem;
}

.expanded-question .accordion-arrow-down {
    transform: rotate(180deg);
}

/* body.homepage .faq-border-radius-wrapper {
    background: linear-gradient(
        var(--clr-secondary-dark) 0%,
        var(--clr-secondary-dark) 70%,
        var(--clr-secondary-light) 100%
    );
} */

/* ----------------------- */
/* Last CTA Call To Action */
/* ----------------------- */

.last-cta-border-radius-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.last-cta__student, .last-cta__teacher {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-direction: column;
    text-align: center;
    min-height: 75vh;
    width: 100%;
}

.last-cta__student {
    border-top-right-radius: 1rem;
}

.last-cta__teacher {
    border-top-left-radius: 1rem;
}

/* ------------------- */
/* Footer              */
/* ------------------- */

/* footer {
    min-height: 10rem;
} */

.footer-content {
    padding: 1rem;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
}

.social-media-links {
    display: flex;
    gap: 1rem;
}

.footer-content img {
    width: 2.5rem;
}

.vision-referral {
    background-color: hsl(0, 0%, 10%);
    padding-block: .5rem;
}

.vision-referral a {
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .3rem;
}

/* ------------------- */
/* Animated grid       */
/* ------------------- */

.animated-grid {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    gap: .5rem;
    z-index: -1;
}

.animated-grid .box {
    border-radius: 10px;
    width: 20vw;
    height: 20vw;
    max-width: 100px;
    max-height: 100px;
    background-color: var(--box-bg);
}

/* ------------------- */
/* Animation           */
/* ------------------- */

/* The body:not(.teacher) selector was used to prevent the animations from being assigned twice to the teacher grid */
body:not(.teacher) .glow-blue {
    animation: box-glow-blue ease-in-out 10000ms infinite;
}

@keyframes box-glow-blue {
    from {
        background-color: var(--box-bg);
    }

    10% {
        background-color: #007FE6;
    }

    20% {
        background-color: var(--box-bg);
    }

    to {
        background-color: var(--box-bg);
    }
}

body:not(.teacher) .glow-green {
    animation: box-glow-green ease-in-out 10000ms infinite;
}

@keyframes box-glow-green {
    from {
        background-color: var(--box-bg);
    }

    10% {
        background-color: #33AE7E;
    }

    20% {
        background-color: var(--box-bg);
    }

    to {
        background-color: var(--box-bg);
    }
}

body:not(.teacher) .glow-orange {
    animation: box-glow-orange ease-in-out 10000ms infinite;
}

@keyframes box-glow-orange {
    from {
        background-color: var(--box-bg);
    }

    10% {
        background-color: #E78033;
    }

    20% {
        background-color: var(--box-bg);
    }

    to {
        background-color: var(--box-bg);
    }
}

body:not(.teacher) .glow-red {
    animation: box-glow-red ease-in-out 10000ms infinite;
}

@keyframes box-glow-red {
    from {
        background-color: var(--box-bg);
    }

    10% {
        background-color: #EA3353;
    }

    20% {
        background-color: var(--box-bg);
    }

    to {
        background-color: var(--box-bg);
    }
}

/* ------------------- */
/* Teacher Page        */
/* ------------------- */

/* body.teacher {
    background-color: var(--clr-secondary-light);
} */

body.teacher .hero-header, body.parents .hero-header {
    min-height: 80vh;
    background: linear-gradient(
        180deg,
        var(--clr-primary-light) 0%,
        var(--clr-primary-dark) 90%,
        var(--clr-primary-dark) 100%
    );
}

/* body.teacher .nav-bar {

} */

/* body.teacher .nav-bar ul li a:not(.button) {
    color: var(--clr-primary-dark);
} */

.last-cta-teacher {
    text-align: center;
    padding-bottom: 2rem;
}

.last-cta-teacher div {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    align-items: center;
    min-height: 40vh;
    gap: 2rem;
    padding: .5rem;
}

.last-cta-teacher h2 {
    grid-column: span 2;
    align-self: end;
}

.last-cta-teacher div a {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: max-content;
    align-self: start;
    justify-self: end;
}

.last-cta-teacher div a:first-of-type {
    padding: 1rem 2rem;
}

.last-cta-teacher div a:last-of-type {
    justify-self: start;
}

.last-cta-teacher a img {
    width: 1.5rem;
}

/* body.teacher .faq-border-radius-wrapper {
    background: linear-gradient(
        var(--clr-secondary-dark) 0%,
        var(--clr-secondary-dark) 90%,
        transparent 100%
    );
    background: var(--clr-secondary-dark);
} */

/* --------------------- */
/* Teacher Animated grid */
/* --------------------- */

body.teacher .animated-grid .box {
    background-color: var(--clr-secondary-dark);
}

/* ------------------- */
/* Animation           */
/* ------------------- */

body.teacher .glow-blue {
    animation: teacher-box-glow-blue ease-in-out 10000ms infinite;
}

@keyframes teacher-box-glow-blue {
    from {
        background-color: var(--clr-secondary-dark);
    }

    10% {
        background-color: #007FE6;
    }

    20% {
        background-color: var(--clr-secondary-dark);
    }

    to {
        background-color: var(--clr-secondary-dark);
    }
}

body.teacher .glow-green {
    animation: teacher-box-glow-green ease-in-out 10000ms infinite;
}

@keyframes teacher-box-glow-green {
    from {
        background-color: var(--clr-secondary-dark);
    }

    10% {
        background-color: #33AE7E;
    }

    20% {
        background-color: var(--clr-secondary-dark);
    }

    to {
        background-color: var(--clr-secondary-dark);
    }
}

body.teacher .glow-orange {
    animation: teacher-box-glow-orange ease-in-out 10000ms infinite;
}

@keyframes teacher-box-glow-orange {
    from {
        background-color: var(--clr-secondary-dark);
    }

    10% {
        background-color: #E78033;
    }

    20% {
        background-color: var(--clr-secondary-dark);
    }

    to {
        background-color: var(--clr-secondary-dark);
    }
}

body.teacher .glow-red {
    animation: teacher-box-glow-red ease-in-out 10000ms infinite;
}

@keyframes teacher-box-glow-red {
    from {
        background-color: var(--clr-secondary-dark);
    }

    10% {
        background-color: #EA3353;
    }

    20% {
        background-color: var(--clr-secondary-dark);
    }

    to {
        background-color: var(--clr-secondary-dark);
    }
}

/* ------------------- */
/* Parents Page        */
/* ------------------- */

.last-cta-parents {
    text-align: center;
}

.last-cta-parents > h2 {
    padding: 5rem 0;
}

.last-cta-parents > p {
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
}

.last-cta-parents > div {
    display: flex;
    justify-content: center;
    align-content: center;
    margin-bottom: 2rem;
    border-radius: 1rem;
}

.last-cta-parents > div button {
    border: 0;
    padding: 0.5rem;
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.last-cta-parents > div input {
    padding-left: 1rem;
    border: 0;
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.last-cta-parents > div img {
    width: 1.5rem;
}

/* ------------------- */
/* Coming soon page    */
/* ------------------- */

body.coming-soon {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
}

body.coming-soon img {
    width: 10rem;
}

body.coming-soon a:first-of-type {
    display: flex;
    gap: .8rem;
    justify-content: center;
    align-items: center;
    flex-direction: row-reverse;
}

body.coming-soon a {
    border: 3px solid var(--clr-primary-light);
}

/* Toggling things off while transitioning into responsive design */
@media (max-width: 1000px) {
    /* main > * {
        display: none;
    }
    .last-cta {
        display: none;
    }
    .hero-header {
        display: grid;
    }
    .general-benefits {
        display: block;
    }
    .features {
        display: block;
    }

    .faq {
        display: block;
    }
    .last-cta {
        display: flex;
    } */

    /* Committing */
    .hero-header {
        grid-template-columns: 1fr;
        text-align: center;
        padding-inline: 1rem;
        gap: 2rem;
    }

    body.homepage .hero-header {
        margin-bottom: -12rem;
    }

    .hero-header picture {
        grid-row: 2 / span 1;
        transform: none;
    }

    body.homepage .hero-header picture {
        margin-top: 5rem;
    }

    .feature {
        padding-top: 0;
        padding-top: 2rem;
        padding-inline: 1rem;
    }

    .question .title {
        padding: 1rem 2rem;
    }

    .last-cta-border-radius-wrapper {
        flex-direction: column-reverse;
    }

    .last-cta__student {
        border-top-right-radius: 0;
    }
    
    .last-cta__teacher {
        border-top-left-radius: 0;
    }

    .last-cta__student, .last-cta__teacher {
        min-height: 40vh;
        width: 100%;
    }

    /* body.teacher .hero-header, body.parents .hero-header {
        background: linear-gradient(
            180deg,
            var(--clr-primary-light) 0%,
            var(--clr-primary-dark) 100%
        );
    } */

    .last-cta-teacher div {
        /* text-align: center;
        display: grid; */
        grid-template-columns: 1fr;
        /* justify-items: center;
        align-items: center;
        min-height: 80vh;
        gap: 2rem;
        padding: .5rem; */
    }
    
    .last-cta-teacher h2 {
        grid-column: unset;
        align-self: end;
    }
    
    .last-cta-teacher div a {
        /* display: flex;
        justify-content: center;
        align-items: center; */
        /* gap: 1rem;
        max-width: max-content; */
        align-self: end;
        justify-self: unset;
    }
    
    .last-cta-teacher div a:last-of-type {
        justify-self: unset;
        align-self: start;
    }
    
    /* .last-cta-teacher a img {
        width: 4rem;
    } */
}