/*
Theme Name: Quran Garden
Theme URI: https://qurangardenacademy.com/
Author: Quran Garden Academy
Description: Custom Quran Garden Academy theme.
Version: 0.5.0
Text Domain: quran-garden
*/

:root {
    --qga-bg: #ffffff;
    --qga-header-bg: rgba(255,255,255,.93);
    --qga-text: #28342f;
    --qga-green: #11695f;
    --qga-line: rgba(28,48,39,.10);
    --qga-hover: rgba(28,70,57,.055);
    --qga-panel: #ffffff;
    --qga-active: #eef5f8;

    --qga-font-latin:
        "Source Sans 3",
        Arial,
        sans-serif;

    --qga-font-arabic:
        "IBM Plex Sans Arabic",
        Tahoma,
        Arial,
        sans-serif;
}

html[data-theme="dark"] {
    --qga-bg: #1f1f1f;
    --qga-header-bg: rgba(31,31,31,.97);
    --qga-text: #f2f2ef;
    --qga-green: #8fc6b4;
    --qga-line: rgba(255,255,255,.09);
    --qga-hover: rgba(255,255,255,.06);
    --qga-panel: #242424;
    --qga-active: #2d3432;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    background: var(--qga-bg);
}

body {
    background: var(--qga-bg);
    color: var(--qga-text);

    font-family:
        var(--qga-font-latin);

    -webkit-font-smoothing:
        antialiased;

    text-rendering:
        optimizeLegibility;
}

html[lang="ar"] body {
    font-family:
        var(--qga-font-arabic);
}

.qga-site-header {
    position: sticky;
    z-index: 5000;
    top: 0;
    width: 100%;

    direction: ltr;

    background:
        var(--qga-header-bg);

    border-bottom:
        1px solid var(--qga-line);

    backdrop-filter:
        blur(7px);

    -webkit-backdrop-filter:
        blur(7px);
}

.admin-bar .qga-site-header {
    top: 32px;
}

.qga-header-inner {
    width:
        min(
            calc(100% - 48px),
            1760px
        );

    min-height: 82px;

    margin:
        0 auto;

    display: grid;

    grid-template-columns:
        minmax(260px,1fr)
        auto
        minmax(260px,1fr);

    align-items: center;

    column-gap: 25px;

    direction: ltr;
}

.qga-brand {
    justify-self: start;

    display:
        inline-flex;

    align-items: center;

    gap: 11px;

    direction: ltr;

    color:
        var(--qga-text);

    text-decoration: none;
}

.qga-brand-logo {
    width: 54px;
    height: 54px;

    flex:
        0 0 54px;

    display: block;

    object-fit: contain;
}

.qga-brand-copy {
    font-family:
        var(--qga-font-latin);

    font-size: 17px;

    font-weight: 600;

    line-height: 1.1;

    letter-spacing: -.1px;

    white-space: nowrap;
}

.qga-brand-mobile {
    display: none;
}

.qga-primary-navigation {
    justify-self: center;
    margin: 0;
    direction: ltr;
}

.qga-nav-list {
    margin: 0;
    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    gap:
        clamp(
            14px,
            1.05vw,
            22px
        );

    list-style: none;

    direction: ltr;
}

.qga-nav-link {
    display: block;

    padding:
        30px 0 28px;

    color:
        var(--qga-text);

    font-family:
        var(--qga-font-latin);

    font-size: 14px;

    font-weight: 550;

    line-height: 1.25;

    text-decoration: none;

    white-space: nowrap;
}

html[lang="ar"] .qga-nav-link {
    font-family:
        var(--qga-font-arabic);

    font-size: 14.5px;

    font-weight: 500;
}

.qga-nav-link > span {
    unicode-bidi: plaintext;
}

.qga-nav-link[aria-disabled="true"] {
    cursor: default;
}

.qga-nav-home:hover,
.qga-nav-home:focus-visible {
    color: var(--qga-green);
}

.qga-header-actions {
    justify-self: end;

    display: flex;

    align-items: center;

    gap: 5px;

    direction: ltr;
}

.qga-language {
    position: relative;
}

.qga-language-trigger {
    min-height: 46px;

    padding:
        5px 7px;

    display: flex;

    align-items: center;

    gap: 8px;

    border: 0;
    outline: 0;

    border-radius: 9px;

    background: transparent;

    box-shadow: none;

    color:
        var(--qga-text);

    font-family:
        var(--qga-font-latin);

    cursor: pointer;
}

.qga-language-trigger:hover,
.qga-language-trigger:focus-visible {
    background:
        var(--qga-hover);
}

.qga-flag-circle {
    width: 32px;
    height: 32px;

    min-width: 32px;

    flex:
        0 0 32px;

    display: block;

    overflow: hidden;

    border-radius: 50%;

    background: transparent;
}

.qga-flag-image {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    border: 0;

    border-radius: 50%;

    object-fit: cover;

    object-position: center;
}

.qga-language-short {
    font-family:
        var(--qga-font-latin);

    font-size: 14px;

    font-weight: 650;

    line-height: 1;
}

.qga-language-chevron {
    width: 9px;
    height: 6px;
}

.qga-language-panel {
    position: absolute;

    z-index: 9999;

    top:
        calc(100% + 9px);

    right: 0;

    width: 245px;

    padding: 8px;

    direction: ltr;

    border:
        1px solid var(--qga-line);

    border-radius: 14px;

    background:
        var(--qga-panel);

    box-shadow:
        0 15px 35px
        rgba(15,31,23,.10);
}

html[data-theme="dark"]
.qga-language-panel {
    box-shadow:
        0 17px 38px
        rgba(0,0,0,.27);
}

.qga-language-panel[hidden] {
    display: none;
}

.qga-language-option {
    min-height: 53px;

    padding:
        8px 10px;

    display: flex;

    align-items: center;

    gap: 12px;

    direction: ltr;

    border-radius: 10px;

    color:
        var(--qga-text);

    text-decoration: none;
}

.qga-language-option:hover,
.qga-language-option:focus-visible {
    background:
        var(--qga-hover);
}

.qga-language-option.is-active {
    background:
        var(--qga-active);

    font-weight: 650;
}

.qga-language-option-name {
    font-family:
        var(--qga-font-latin);

    font-size: 15px;

    font-weight: 520;

    line-height: 1.25;

    unicode-bidi: plaintext;
}

.qga-language-option[href*="/ar/"]
.qga-language-option-name {
    font-family:
        var(--qga-font-arabic);

    font-size: 15px;

    font-weight: 500;
}

.qga-theme-toggle {
    width: 44px;
    height: 44px;

    padding: 0;

    display: grid;

    place-items: center;

    border: 0;
    outline: 0;

    border-radius: 9px;

    background: transparent;

    box-shadow: none;

    color: #07598e;

    cursor: pointer;
}

.qga-theme-toggle:hover,
.qga-theme-toggle:focus-visible {
    background:
        var(--qga-hover);
}

html[data-theme="dark"]
.qga-theme-toggle {
    color: #e8cf85;
}

.qga-moon-icon {
    width: 21px;
    height: 21px;
}

.qga-menu-toggle {
    display: none;

    width: 42px;
    height: 42px;

    padding: 0;

    place-items: center;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color:
        var(--qga-text);

    cursor: pointer;
}

.qga-menu-toggle:hover {
    background:
        var(--qga-hover);
}

.qga-menu-lines {
    width: 20px;

    display: flex;

    flex-direction: column;

    gap: 4px;
}

.qga-menu-lines span {
    width: 100%;
    height: 1.5px;

    display: block;

    background: currentColor;
}

.qga-skip-link {
    position: fixed;

    z-index: 99999;

    top: 8px;
    left: 8px;

    transform:
        translateY(-160%);
}

.qga-skip-link:focus {
    transform:
        translateY(0);
}

.qga-foundation-main {
    min-height: 70vh;

    background:
        var(--qga-bg);

    color:
        var(--qga-text);
}

@media
(max-width: 1550px)
and
(min-width: 1361px) {

    .qga-header-inner {
        width:
            calc(100% - 34px);

        grid-template-columns:
            minmax(220px,1fr)
            auto
            minmax(220px,1fr);

        column-gap: 16px;
    }

    .qga-brand-logo {
        width: 49px;
        height: 49px;
        flex-basis: 49px;
    }

    .qga-brand-copy {
        font-size: 15.5px;
    }

    .qga-nav-list {
        gap: 12px;
    }

    .qga-nav-link {
        font-size: 13px;
    }

    html[lang="ar"]
    .qga-nav-link {
        font-size: 13.5px;
    }
}

@media
(max-width: 1360px) {

    .qga-header-inner {
        position: relative;

        width:
            calc(100% - 32px);

        min-height: 72px;

        display: flex;

        align-items: center;

        gap: 11px;

        direction: ltr;
    }

    .qga-brand {
        margin-right: auto;
    }

    .qga-brand-logo {
        width: 47px;
        height: 47px;
        flex-basis: 47px;
    }

    .qga-brand-copy {
        font-size: 15.5px;
    }

    .qga-header-actions {
        margin-left: auto;
    }

    .qga-menu-toggle {
        display: grid;
    }

    .qga-primary-navigation {
        position: absolute;

        top: 100%;

        left: -16px;
        right: -16px;

        display: none;

        margin: 0;

        padding:
            8px 16px 19px;

        background:
            var(--qga-panel);

        border-top:
            1px solid var(--qga-line);

        border-bottom:
            1px solid var(--qga-line);
    }

    .qga-menu-open
    .qga-primary-navigation {
        display: block;
    }

    .qga-nav-list {
        width:
            min(100%,720px);

        margin:
            0 auto;

        display: block;
    }

    .qga-nav-list li {
        border-bottom:
            1px solid var(--qga-line);
    }

    .qga-nav-list li:last-child {
        border-bottom: 0;
    }

    .qga-nav-link {
        padding:
            12px 3px;

        font-size: 15.5px;
    }

    html[lang="ar"]
    .qga-nav-link {
        font-size: 16px;
    }
}

@media
(max-width: 660px) {

    .qga-header-inner {
        width:
            calc(100% - 22px);

        min-height: 66px;

        gap: 6px;
    }

    .qga-brand {
        gap: 8px;
    }

    .qga-brand-logo {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .qga-brand-desktop {
        display: none;
    }

    .qga-brand-mobile {
        display: block;
    }

    .qga-brand-copy {
        font-size: 14px;

        font-weight: 600;

        white-space: nowrap;
    }

    .qga-header-actions {
        gap: 1px;
    }

    .qga-language-trigger {
        min-height: 39px;

        padding:
            3px 4px;

        gap: 6px;
    }

    .qga-flag-circle {
        width: 29px;
        height: 29px;
        min-width: 29px;
        flex-basis: 29px;
    }

    .qga-language-short {
        font-size: 12px;
    }

    .qga-language-chevron {
        display: none;
    }

    .qga-theme-toggle,
    .qga-menu-toggle {
        width: 38px;
        height: 38px;
    }

    .qga-language-panel {
        top:
            calc(100% + 7px);

        right: 0;

        width:
            min(
                245px,
                calc(100vw - 22px)
            );
    }

    .qga-language-option
    .qga-flag-circle {
        width: 32px;
        height: 32px;
        min-width: 32px;
        flex-basis: 32px;
    }

    .qga-primary-navigation {
        left: -11px;
        right: -11px;
    }
}

@media
(max-width: 430px) {

    .qga-header-inner {
        width:
            calc(100% - 18px);
    }

    .qga-brand-logo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .qga-brand {
        gap: 6px;
    }

    .qga-brand-copy {
        font-size: 12.5px;
    }

    .qga-language-short {
        display: none;
    }

    .qga-language-trigger {
        width: 34px;

        padding: 0;

        justify-content: center;
    }

    .qga-flag-circle {
        width: 28px;
        height: 28px;
        min-width: 28px;
        flex-basis: 28px;
    }

    .qga-theme-toggle,
    .qga-menu-toggle {
        width: 35px;
        height: 35px;
    }
}

@media
(max-width: 782px) {

    .admin-bar
    .qga-site-header {
        top: 46px;
    }
}

/* BEGIN QGA DESKTOP NAV CLICK FIX */

@media (min-width: 1381px) {

    .qga-primary-navigation {
        position: relative;
        z-index: 20;
        pointer-events: auto;
    }

    .qga-nav-list,
    .qga-nav-list li {
        position: relative;
        pointer-events: auto;
    }

    .qga-nav-link {
        position: relative;

        z-index: 21;

        pointer-events: auto;

        cursor: pointer;

        padding-left: 13px;
        padding-right: 13px;

        font-size: 15.5px;

        font-weight: 560;

        line-height: 1.2;
    }

    html[lang="ar"]
    .qga-nav-link {
        font-size: 16px;
        font-weight: 500;
    }
}

@media
(max-width: 1580px)
and
(min-width: 1381px) {

    .qga-nav-link {
        padding-left: 10px;
        padding-right: 10px;

        font-size: 14.5px;
    }

    html[lang="ar"]
    .qga-nav-link {
        font-size: 15px;
    }
}

/* END QGA DESKTOP NAV CLICK FIX */
