:root {
    --primary-color: #337ab7;
    --text-color: #000;
    --background-color: #fcfcfd;
    --border-color: #d9e1e6;
    --grey-color: #555;

    --font-family-title: 'Noto Kufi Arabic', 'Open Sans', tahoma;
    --font-family-content: 'Noto Naskh Arabic', 'Open Sans', tahoma;
}

.alternate, .inverse {
    --text-color: #fcfcfd;
    --background-color:  #151718;
    --border-color: #38383d;
    --grey-color: #999;
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #fcfcfd;
        --background-color: #151718;
        --border-color: #38383d;
        --grey-color: #999;
    }

    .alternate {
        --background-color: #1f2325;
    }

    .inverse {
        --text-color: #000;
        --background-color: #fcfcfd;
        --border-color: #d9e1e6;
        --grey-color: #555;
    }
}

* {
    box-sizing: border-box;
}

body {
    color: var(--text-color);
    background: var(--background-color);
    font-family: var(--font-family-content);
    font-size: 1.4rem;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

html[lang="ar"] body {
    direction: rtl;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: normal;
    font-family: var(--font-family-title);
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

.center {
    text-align: center;
}

.highlight {
    background: linear-gradient(180deg, rgba(255,255,255,0) 70%, #FFFEAE 70%) 0 -0.9rem;
}

.button {
    font-family: var(--font-family-title);
    display: inline-block;
    border: 1px solid var(--text-color);
    padding: .2rem .8rem;
    font-size: 0.75rem;
    text-align: center;
    margin: 1rem;
}

.langauge-button {
    font-family: var(--font-family-title);
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 1rem;
}

html[lang="ar"] .langauge-button {
    top: 2rem;
    right: auto;
    left: 2rem;
}

.content {
    padding: 0 2rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

section {
    padding: 3rem 0 6.6rem;
    color: var(--text-color);
    background: var(--background-color);
}

section h2 {
    margin-bottom: 3rem;
}

section.hero {
    padding: 3rem 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
}

section.hero .content {
    padding: 3rem 2rem;
    max-width: 62rem;
}

section.hero .content p {
    font-size: 1.6rem;
}

section.hero .content .title {
    margin: 0 0 3rem;
    text-align: center;
}

section.products .grid {
    margin: 0;
    display: grid;
    grid-gap: 2rem;
    grid-template-columns: repeat(2, minmax(0, 0.5fr));
}

section.products .grid .item {
    display: block;
    padding: 0 2rem 1rem;
    border: 1px solid var(--border-color);
}

section.products .grid a.item {
    color: var(--text-color);
}

section.products .grid .item a {
    color: var(--text-color);
}

section.products .grid .item p {
    font-size: 1.2rem;
}

footer {
    padding: 3rem 0;
    color: var(--text-color);
    background: var(--background-color);
}

footer a {
    color: var(--text-color);
}

footer a.button {
    width: 120px;
    margin: .5rem 0;
}

footer .grid {
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: repeat(5, minmax(0, 0.2fr));
}

footer .grid .item {
    display: block;
    font-size: 1rem;
}

footer .grid .item ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    line-height: 2;
}

footer .grid .item ul.buttons {
    margin: .8rem 0;
}

footer .grid .item.logo svg {
    width: 70px;
    margin: 1.6rem 0;
}

footer .info {
    margin: 3rem 0 1rem;
    font-size: 0.8rem;
    color: var(--grey-color);
    text-align: center;
}


@media only screen and (max-width: 1092px) {
    footer .grid {
        grid-template-columns: repeat(4, minmax(0, 0.5fr));
    }
}

@media only screen and (max-width: 992px) {
    section.products .grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 768px) {
    footer .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 576px) {
    .content {
        padding: 0 1rem;
    }

    section {
        padding: 1.2rem 0 4.6rem;
    }

    section h3 {
        line-height: 1;
    }

    section.hero .content {
        padding: 2rem 1rem;
    }

    section.hero .content .title {
        font-size: 1.2rem;
        margin: 1rem 0;
    }

    section.hero .content p {
        font-size: 1.4rem;
    }

    section.products .grid {
        grid-gap: 1rem;
    }

    section.products .grid .item {
        padding: 0 1rem 0;
    }

    footer .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}



.brand-icon {
    height: 48px;
    width: 48px;
    display: block;
    background-size: cover;
    background-image: url(/assets/images/brands.svg);
}

.brand-hsoub    { background-position: 0 0 }
.brand-khamsat  { background-position: left -249px }
.brand-mostaql  { background-position: left -125px }
.brand-academy  { background-position: left -499px }
.brand-io       { background-position: left -374px }
.brand-suar     { background-position: left -623px }
.brand-baaeed   { background-position: left -748px }
.brand-ana      { background-position: left -872px }
.brand-wiki     { background-position: left -997px }
.brand-zaetoon  { background-position: left -1122px }
.brand-picalica { background-position: left -1247px }
